wxquake.php not working

I would very much appreciate some help.
My quakes page stopped updating 3-4 days ago and now the page is blank… https://www.patricksweeneydds.com/wxquake.php . I have not edited or changed anything and I have been using Ken’s script v 2.0 for the last year.
Furthermore, https://www.patricksweeneydds.com/quakes.php only shows the header.

The last time I saw the working page was July 3, just before the 6.4 quake in SoCal. The last quake showing was a 5.0 and now nothing.
I live about 250 mi from the epicenter and did notice the swimming pool sloshing side to side and a swinging chandelier so it had to be a big one.

Frustrated

The Saratoga scripts still work at the sites here, and at Saratoga-Weather.org - Earthquake data from USGS
It must be something in your setup, I think.

It is therefor also frustrating for people who want to help, if the site only returns

[size=116][b]Forbidden[/b][/size] You don't have permission to access /wxquake.php on this server.

Wim,
from Belgium, country code BE

Strange. Can you access other pages on my site or is that the only one that is Forbidden?
I checked the permissions for wxquake.php and it is 0644

The script is working on my server.

I don’t get 404 error from either of the url’s in your post.

With chrome, Safari and FF for these URL’s I get a 403

https://www.patricksweeneydds.com/quakes.php

Request URL: https://www.patricksweeneydds.com/
Request Method: GET
Status Code: 403 Forbidden
Remote Address: 66.96.149.1:443
Referrer Policy: no-referrer-when-downgrade

Maybe you or your provider blocked access from abroad?
Wim

The USGS server is quite loaded at this time so some requests for the Jason data fail. The scripts are working…I can

OK. For now I have put another menu item below “Earthquakes” named “Earthquakes link” , linking to the USGA site for California.
Maybe things will sort out after awhile.

[quote author=saratogaWX link=topic=68172.msg548238#msg548238 date=1562441159]
The USGS server is quite loaded at this time so some requests for the Jason data fail. The scripts are working…I can

I am getting not available or just the header now also. I saw that Ken’s page was working earlier but, now he is getting it too.

https://ucweather.org/wxquake.php

Harry, the issue with your quake-json is it’s at V1.12 - 21-Feb-2017 and the current release is V2.00 - 10-May-2018

The Old version used Google maps… the V2.0 version uses Leaflet/OpenStreetmaps AND https to a newer URL at the USGS for content.

Update your script from https://saratoga-weather.org/scripts-quake.php#quakePHP and it should start working again.

^ Oops! Okay, Ken. Will update ASAP. Thanks.

Ken, I copied over the V2.00 quake-json.php file and still getting just the header. Is there something else I need to change?

Umm… yes, there are multiple files to replace:

quake-json.css
quake-json.js
quake-json.php
quakes.php (which is the model standalone page)
./ajax-images/layers*.png
./ajax-images/mma*.png

Optional:
wxquake.php (how it works in a Saratoga template).

I copied over all those files plus the images and I was getting files not available for a while and now, I just get the header.

It’s getting content … the JSON file is 7827375 bytes (WOW!)

The problem may be with your version of PHP being unable to json_decode that amount of data.

On my PHP 7.3.7, it handles the decode just fine

<!-- content length=7828136 -->
<!-- found 10012 earthquake records -->

The Headers on your site show PHP/5.5.22 – I think that versions prior to 5.6 had issues with decoding large JSON files into arrays. Check your Apache error_log for info… likely the script 500-Server error at the json_decode() command.

Due to the recent earthquakes in CA, the JSON is much larger than usual, and I fear that the only way for your site to work with the updated scripts, is to update PHP to 5.6+ or 7.2+

Looks like that was it. I updated to 7.3 and the earthquake page worked fine. The only problem is, it broke my index page. All I got was “Updated: @ 7/10/2019” at the top of the page where the current conditions would be and the rest of the page was blank. I tried 7.0, 7.1, 7.2 and got the same thing. The earthquake page doesn’t work in 5.6 but, the index page does work okay. Apparently something changed in 7.0+ that affected my index page. Of course, the template I’m using for the current conditions is old and moldy and I know you have made some updates to it so, I guess it’s time to update that anyway. In the meantime, I guess I’ll have to leave the earthquake page broken until the size of the JSON file goes back down something normal.

I have PHP Version 5.6.30 and the quake script works, so if you have 5.6 available it could be a quick fix before jumping to version 7.

I left it set to 5.6 since everything else works. For some reason, the earthquake page still doesn’t work.

5.6.what?

I had to ask my web hoster’s support people as it only shows 5.6 on the CP and they said it was 5.6.30.