WXforum.net

Web Weather => Weather Website PHP/AJAX scripting => Custom Website Templates => Topic started by: cirrus on June 25, 2018, 07:30:33 PM

Title: wxquake fatal error
Post by: cirrus on June 25, 2018, 07:30:33 PM
I just started getting this error when opening wxquake.php:

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 4096 bytes) in /home/rkcrk201/public_html/quake-json.php on line 471

I'm using the latest $Version = 'quake-json.php V2.00 - 10-May-2018';

Any ideas how to fix?
Title: Re: wxquake fatal error
Post by: lddaly on June 25, 2018, 09:36:42 PM
32 MB seems like a low PHP memory_limit. Depends on your webhost, but I would look into increasing it in your PHP configuration and testing again.

Ours is currently set to 256M.
PHP Directive - memory_limit     Information - This sets the maximum amount of memory in bytes that a script is allowed to allocate. This helps prevent poorly written scripts from eating up all available memory on a server. Note that to have no memory limit, set this directive to -1.     Setting - 256M
Title: Re: wxquake fatal error
Post by: Intheswamp on June 26, 2018, 08:11:39 AM
I notice that mine isn't working, either.  But, I'm running v1.09 from back in 2016 and honestly don't know how long it hasn't worked.  :oops:
Title: Re: wxquake fatal error [Resolved]
Post by: cirrus on June 27, 2018, 02:18:33 AM
32 MB seems like a low PHP memory_limit. Depends on your webhost, but I would look into increasing it in your PHP configuration and testing again.

Ours is currently set to 256M.
PHP Directive - memory_limit     Information - This sets the maximum amount of memory in bytes that a script is allowed to allocate. This helps prevent poorly written scripts from eating up all available memory on a server. Note that to have no memory limit, set this directive to -1.     Setting - 256M

Okay....I looked into your sugestion and now I don't get the memory error...but now I get:
The USGS feed for earthquakes was not available at this time #-o :roll:

Guess I'll see what happens for a few days

6/27/18  1:30 am PDT Update: Finally figured out I also had to edit .user.ini and set it to 256M. Works okay now. Thanks lddaly for the lead to a fix :-)
Title: Re: wxquake fatal error
Post by: saratogaWX on June 27, 2018, 10:28:34 AM
It seems to be working this morning.
Title: Re: wxquake fatal error
Post by: cirrus on June 27, 2018, 03:44:26 PM
It seems to be working this morning.

Yes...working this afternoon just fine..Thanks for the work you did on the new script BTW...I really like the new MapBox api...Thanks Ken!