Author Topic: Error Loading Pages  (Read 2640 times)

0 Members and 1 Guest are viewing this topic.

Offline Farmtalk

  • Fitzweather
  • Forecaster
  • *****
  • Posts: 4745
    • WV Waterfalls
Error Loading Pages
« on: July 29, 2016, 08:10:36 AM »
I uploaded the root files of Ken's Base-USA template, and when I click on a file, such as wxindex.php, it says it cannot load it. I have not edited these files at all.

Does someone have any idea what might be going on? Perhaps a hosting issue?

www.fitzweather.com
Joe Fitzwater
Chief Meteorologist for WVNS-TV 59 in Beckley, WV

Work Page on Facebook -> www.facebook.com/meteojoe
Work Page on Twitter -> https://twitter.com/meteojoe
Waterfalls -> www.wvfalls.com

Online Maumelle Weather

  • Forecaster
  • *****
  • Posts: 1827
    • Maumelle Weather
Re: Error Loading Pages
« Reply #1 on: July 29, 2016, 08:16:23 AM »
Hi Joseph,

Does your host have PHP installed? Over on Ken's site there is a script for testing for PHP.

John
GR2AE, GR3, Cumulus

Offline Farmtalk

  • Fitzweather
  • Forecaster
  • *****
  • Posts: 4745
    • WV Waterfalls
Re: Error Loading Pages
« Reply #2 on: July 29, 2016, 08:22:15 AM »
I tested it before a couple of years ago (same host) and it worked fine. I will do that now. Thanks for the idea!
Joe Fitzwater
Chief Meteorologist for WVNS-TV 59 in Beckley, WV

Work Page on Facebook -> www.facebook.com/meteojoe
Work Page on Twitter -> https://twitter.com/meteojoe
Waterfalls -> www.wvfalls.com

Offline Farmtalk

  • Fitzweather
  • Forecaster
  • *****
  • Posts: 4745
    • WV Waterfalls
Re: Error Loading Pages
« Reply #3 on: July 29, 2016, 08:26:01 AM »
That was a great idea! Unfortunately, that wasn't the problem. PHP is working on there and is above version 5.

Any other suggestions on what it could be?
Joe Fitzwater
Chief Meteorologist for WVNS-TV 59 in Beckley, WV

Work Page on Facebook -> www.facebook.com/meteojoe
Work Page on Twitter -> https://twitter.com/meteojoe
Waterfalls -> www.wvfalls.com

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Error Loading Pages
« Reply #4 on: July 29, 2016, 08:26:50 AM »
Hi Joe,

best thing to do would be if you create a blank file, call it whatever you want,

inside it put just this one line:

Code: [Select]
<?php echo phpinfo(); ?>
and save it as somename.php

Then post a link here to that file.

it will show all your PHP settings of your server and that way we can see what is and is not installed and which version is installed on your server

Online Maumelle Weather

  • Forecaster
  • *****
  • Posts: 1827
    • Maumelle Weather
Re: Error Loading Pages
« Reply #5 on: July 29, 2016, 08:45:30 AM »
Hi Folks,

Joseph has the following file installed from the Saratoga template. It shows the following:

Does PHP work?

Yes, it does. PHP Version 5.2.17

To run the WXGRAPHIC script, you need GD enabled in PHP.
Current GD status:

GD support: yes
GD Version: bundled (2.0.34 compatible)
FreeType Support: yes
FreeType Linkage: with freetype
T1Lib Support: no
GIF Read Support: yes
GIF Create Support: yes
JPG Support: yes
PNG Support: yes
WBMP Support: yes
XPM Support: no
XBM Support: yes
JIS-mapped Japanese Font Support: no
If you don't see "Yes, it does." in large font above, then PHP is not enabled.

He probably needs a newer version of PHP intalled.
GR2AE, GR3, Cumulus

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Error Loading Pages
« Reply #6 on: July 29, 2016, 08:51:00 AM »
Quote
it says it cannot load it

depends what exactly you mean by that.

If it is a permission problem then you would get either "Page Not Found" or "Permission Denied".

If it is a problem with some script, you might get a blank page or some fatal error displayed on the screen.

Online wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Error Loading Pages
« Reply #7 on: July 29, 2016, 08:53:48 AM »
Hi Folks,

Joseph has the following file installed from the Saratoga template. It shows the following:

Does PHP work?

Yes, it does. PHP Version 5.2.17

To run the WXGRAPHIC script, you need GD enabled in PHP.
Current GD status:

GD support: yes
GD Version: bundled (2.0.34 compatible)
FreeType Support: yes
FreeType Linkage: with freetype
T1Lib Support: no
GIF Read Support: yes
GIF Create Support: yes
JPG Support: yes
PNG Support: yes
WBMP Support: yes
XPM Support: no
XBM Support: yes
JIS-mapped Japanese Font Support: no
If you don't see "Yes, it does." in large font above, then PHP is not enabled.

He probably needs a newer version of PHP intalled.
Well, 5.2.17 is old, so a new version would be better.

But http://www.fitzweather.com/test.php  is the only script which executes.
http://www.fitzweather.com/check-fetch-times.php  fails, it gives a 500 error.
http://www.fitzweather.com/check-fetch-times.php?sce=view works OK.

So I would check the common scripts, such as Settings.php
One of them contains a php parsing error or is not there.

It is the missing Settings-weather.php
Only the base part is installed. Not the part for the weather-program.
This is the part which throws the error in Settings.php which is loaded by nearly all scripts:
Code: [Select]
# now fetch the weather software settings if it exists
if(isset($_REQUEST['wx']) and file_exists('Settings-weather-'.strtoupper($_REQUEST['wx']).'.php')) {
    include_once('Settings-weather-'.strtoupper($_REQUEST['wx']).'.php');
} elseif(file_exists("Settings-weather.php")) {
    include_once("Settings-weather.php");
}

Check here: http://www.fitzweather.com/check-fetch-times.php?show=settings

And when error reporting is switched off, you will get this "general" 500 error insted of a php error message.

Wim
« Last Edit: July 29, 2016, 09:16:14 AM by wvdkuil »

Offline Farmtalk

  • Fitzweather
  • Forecaster
  • *****
  • Posts: 4745
    • WV Waterfalls
Re: Error Loading Pages
« Reply #8 on: July 29, 2016, 10:52:48 AM »
I redownloaded Ken's script, and there still was no settings-weather file. Is there another way of getting it to seeing if that is the issue?

I also plan to install a higher version of php, but Ken's site says that a minimum of 5 should work fine. :D

Thanks so much folks!
Joe Fitzwater
Chief Meteorologist for WVNS-TV 59 in Beckley, WV

Work Page on Facebook -> www.facebook.com/meteojoe
Work Page on Twitter -> https://twitter.com/meteojoe
Waterfalls -> www.wvfalls.com

Online wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Error Loading Pages
« Reply #9 on: July 29, 2016, 10:53:48 AM »
I redownloaded Ken's script, and there still was no settings-weather file. Is there another way of getting it to seeing if that is the issue?

I also plan to install a higher version of php, but Ken's site says that a minimum of 5 should work fine. :D

Thanks so much folks!
You have to download the weather-program plug-in ALSO.
That is a separate download.

http://saratoga-weather.org/wxtemplates/install.php  => point 4 => Download One WX software Plugin:

You have to follow those instructions point for point, otherwise you run into more of these problems.

Do not forget point 5 either, the icons

it is only at step 13 that the uploading of all these files is mentioned.

Wim
« Last Edit: July 29, 2016, 11:01:23 AM by wvdkuil »

Offline Farmtalk

  • Fitzweather
  • Forecaster
  • *****
  • Posts: 4745
    • WV Waterfalls
Re: Error Loading Pages
« Reply #10 on: July 29, 2016, 12:01:08 PM »
I see now, it has been several years since I had downloaded everything that I forgot there were other things to download.

Thanks so much guys! I really appreciate it! :D
Joe Fitzwater
Chief Meteorologist for WVNS-TV 59 in Beckley, WV

Work Page on Facebook -> www.facebook.com/meteojoe
Work Page on Twitter -> https://twitter.com/meteojoe
Waterfalls -> www.wvfalls.com

Offline Farmtalk

  • Fitzweather
  • Forecaster
  • *****
  • Posts: 4745
    • WV Waterfalls
Re: Error Loading Pages
« Reply #11 on: July 31, 2016, 10:39:15 AM »
I went through all the steps, other than switching my wxindex to index, and I am still getting a 500 error. Do you all think it is the old version of php? That had never been an issue before, but I'm just trying to determine what the cause is.  8-)
Joe Fitzwater
Chief Meteorologist for WVNS-TV 59 in Beckley, WV

Work Page on Facebook -> www.facebook.com/meteojoe
Work Page on Twitter -> https://twitter.com/meteojoe
Waterfalls -> www.wvfalls.com

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Error Loading Pages
« Reply #12 on: July 31, 2016, 10:42:19 AM »
Hi joe,
Server Error 500 doesnt tell us much, ideally if you could go to your error log and find that error you are getting there. It should show exactly which file and which line. From there we can try to diagnose the problem, but otherwise it is close to impossible because it can be pretty much anything.

Online wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Error Loading Pages
« Reply #13 on: July 31, 2016, 11:04:20 AM »
I went through all the steps, other than switching my wxindex to index, and I am still getting a 500 error. Do you all think it is the old version of php? That had never been an issue before, but I'm just trying to determine what the cause is.  8-)
Just to check some things Ken included a handy utility
http://www.fitzweather.com/check-fetch-times.php?show=settings  => both Settings and Settings-weather are readable, no parsing errors.
http://www.fitzweather.com/check-fetch-times.php?show=structure  => top.php  header.php  menubar.php  footer.php seem to be ok

So it is not your php version as the test-script works OK and the script reads some of your file also OK.
The problem is that your default php settings suppresses ALL warnings, errors a.s.o.  So we get no information about what is going on.

I use a small test-program to load a script i have to test.  It sets all error reporting on and then loads the script to be tested.
Code: [Select]
<?php ini_set('display_errors''On');   error_reporting(E_ALL);
include 
'wxindex.php';
If your main page is wxindex.php the script is correct, otherwise change line 2.
I attach the script. Put the unzipped version in your root and run http://www.fitzweather.com/testit.php
At least we should see some errors.

If you run into more problems, you can pm me with a (temporary) userid and password.
I can check faster what the problem is that way then typing these messages,

Wim


Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9297
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Error Loading Pages
« Reply #14 on: July 31, 2016, 11:18:25 AM »
I'm suspecting something wrong with Settings.php (or Settings-weather.php).  Running check-fetch-times.php?show=info also fails, and it does an include for Settings.php.  I'd try uploading it again.

Also, check the error_log on the webserver.. it should show what the fatal error is, and where it is.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Online wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Error Loading Pages
« Reply #15 on: July 31, 2016, 11:36:13 AM »
I'm suspecting something wrong with Settings.php (or Settings-weather.php).  Running check-fetch-times.php?show=info also fails, and it does an include for Settings.php.  I'd try uploading it again.

Also, check the error_log on the webserver.. it should show what the fatal error is, and where it is.
Hello Ken,
I copied the Settings and Settings-weather and tested them.
They seem to be OK as my Saratoga template started with them.  A lot of include errors for CUtags.php and all american  scripts, missing data fields a.s.o..
But the complete page including the footer is printed.

I always thought that copying them from  the output of .??/check-fetch-times.php?show=settings  is exactly the same as loading them directly.

What if the permissions are not set?
If reading the file (check-fetch-times.php?show=settings ) is OK
But executing Settings.php or Settings-weather.php is not allowed?

I think that would explain the 500 error also.

Wim
« Last Edit: July 31, 2016, 11:39:00 AM by wvdkuil »

Offline PaulMy

  • Forecaster
  • *****
  • Posts: 5520
    • KomokaWeather
Re: Error Loading Pages
« Reply #16 on: July 31, 2016, 11:40:46 AM »
Hi Joseph,
I've been running my websites for nearly 8 years and until this past week didn't even know about my web server's access log and error log files :oops: .  Now that I've discovered them I will be referring to them much more whenever there appears to be an issue.  Also the templates have those additional features like xxx.php?sce=view xxx.php?show= etc. as Wim has mentioned.  I am keeping note of these to also use whenever I detect an issue.

Give them a try, I certainly have learned a lot from them.

Good luck to get back up and running.
Paul

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9297
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Error Loading Pages
« Reply #17 on: July 31, 2016, 02:55:08 PM »
I'm suspecting something wrong with Settings.php (or Settings-weather.php).  Running check-fetch-times.php?show=info also fails, and it does an include for Settings.php.  I'd try uploading it again.

Also, check the error_log on the webserver.. it should show what the fatal error is, and where it is.
Hello Ken,
I copied the Settings and Settings-weather and tested them.
They seem to be OK as my Saratoga template started with them.  A lot of include errors for CUtags.php and all american  scripts, missing data fields a.s.o..
But the complete page including the footer is printed.

I always thought that copying them from  the output of .??/check-fetch-times.php?show=settings  is exactly the same as loading them directly.

What if the permissions are not set?
If reading the file (check-fetch-times.php?show=settings ) is OK
But executing Settings.php or Settings-weather.php is not allowed?

I think that would explain the 500 error also.

Wim


It depends on the hoster, I think.  using the check-fetch-times.php?show=settings does a file() to open the files and run them through the highlighter for display.  So that shows the files are accessable from the filesystem.  Whether they can be processed by the PHP interpreter on his site depends (I think) on how the permissions are set, and it may require 755 (with the executable) to run.
Failure to run (with a 500 error) can be caused by many different things.. only the error_log would show for sure what is going on.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9297
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Error Loading Pages
« Reply #18 on: July 31, 2016, 02:58:59 PM »
Hi Joseph,
I've been running my websites for nearly 8 years and until this past week didn't even know about my web server's access log and error log files :oops: .  Now that I've discovered them I will be referring to them much more whenever there appears to be an issue.  Also the templates have those additional features like xxx.php?sce=view xxx.php?show= etc. as Wim has mentioned.  I am keeping note of these to also use whenever I detect an issue.

Give them a try, I certainly have learned a lot from them.

Good luck to get back up and running.
Paul

Hi Paul,
Many of the built-in debugging tools for the Saratoga templates/scripts are shown at http://saratoga-weather.org/wxtemplates/maint.php
I had to install them generally to be able to provide support for the scripts, otherwise PHP at a distance is just an inscrutable  'black box' :)
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline Farmtalk

  • Fitzweather
  • Forecaster
  • *****
  • Posts: 4745
    • WV Waterfalls
Re: Error Loading Pages
« Reply #19 on: August 04, 2016, 11:05:57 AM »
Hey guys, I've had a few days straight of long hours of work, so I wasn't able to work on this until this morning.

I have my error log, would you like me to post it? If so, how far down would you like me to post?
Joe Fitzwater
Chief Meteorologist for WVNS-TV 59 in Beckley, WV

Work Page on Facebook -> www.facebook.com/meteojoe
Work Page on Twitter -> https://twitter.com/meteojoe
Waterfalls -> www.wvfalls.com

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9297
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Error Loading Pages
« Reply #20 on: August 04, 2016, 12:02:43 PM »
Go ahead and .zip it up and attach it to a post here. 

If it's too big to attach, upload the .zip to your site and I can download it from there.. just give the name of the file, and not the full URL if you post it on your site.  No need to have the bots index/download it.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline tbrasel

  • Contributor
  • ***
  • Posts: 141
    • Northwest Arkansas Weather.com
Re: Error Loading Pages
« Reply #21 on: August 04, 2016, 12:44:17 PM »
The 500 server error can also result in a typo in the .htaccess file, as this happened to me early this week. Just sharing my mistakes/learning curves.
Best Regards
tbrasel

Bentonville Arkansas, USA
Hardware: Davis 6153 - Wireless Vantage Pro2 with FARS
Software: VWS V15.00
Website: https://www.nwarwx.com

Offline Farmtalk

  • Fitzweather
  • Forecaster
  • *****
  • Posts: 4745
    • WV Waterfalls
Re: Error Loading Pages
« Reply #22 on: August 04, 2016, 01:01:44 PM »
I went ahead and attached it as a notepad document. My hosting company doesn't seem to give an option to easily download it.

Joe Fitzwater
Chief Meteorologist for WVNS-TV 59 in Beckley, WV

Work Page on Facebook -> www.facebook.com/meteojoe
Work Page on Twitter -> https://twitter.com/meteojoe
Waterfalls -> www.wvfalls.com

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9297
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Error Loading Pages
« Reply #23 on: August 04, 2016, 01:21:41 PM »
Ok, the error is
Quote
PHP Parse error: syntax error, unexpected T_FUNCTION in /hsphere/local/home/a991748/fitzweather.com/common.php on line 95

Make sure you are running PHP 5.4 or later on your site.  I think you may be running 5.2.17 or earlier.

FYI.. line 95 in common.php is
Code: [Select]
      $text = preg_replace_callback('!\.\s+([a-z])!s',
  function ($matches) { return('.  ' . strtoupper($matches[1]) ); }
  ,$text);
and PHP is complaining about the anonymous function inline. 

Anonymous functions became available in 5.3.0.
« Last Edit: August 04, 2016, 02:27:34 PM by saratogaWX »
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline Farmtalk

  • Fitzweather
  • Forecaster
  • *****
  • Posts: 4745
    • WV Waterfalls
Re: Error Loading Pages
« Reply #24 on: August 04, 2016, 01:33:30 PM »
I can upgrade to PHP 5.4. I am running under that right now.

I thought the requirement was just PHP 5?

I really appreciate everyone checking this out for me  8-)
Joe Fitzwater
Chief Meteorologist for WVNS-TV 59 in Beckley, WV

Work Page on Facebook -> www.facebook.com/meteojoe
Work Page on Twitter -> https://twitter.com/meteojoe
Waterfalls -> www.wvfalls.com