WXforum.net
Web Weather => Weather Website PHP/AJAX scripting => Topic started by: Johnmac on April 09, 2019, 11:58:18 AM
-
I just updated my php from 5.4 to 7.2.16 and my web page seems to be working fine with the exception of my wccontact.php page, it brings up a "http error 500". Any thoughts as to how I can fix this?
scannorthcounty.net/wxcontact.php
Thanks,
John
-
You likely have to update the wxcontact.php form set to the new one which uses Google reCaptcha instead of the old built-in captcha (which is easily solved by spammers).
https://saratoga-weather.org/scripts-contact.php#contact
-
If you haven't updated your wxfreeze script since December 2018, you will need to update it.
http://www.wxforum.net/index.php?topic=24301.msg364940#msg364940 (http://www.wxforum.net/index.php?topic=24301.msg364940#msg364940)
-
You likely have to update the wxcontact.php form set to the new one which uses Google reCaptcha instead of the old built-in captcha (which is easily solved by spammers).
https://saratoga-weather.org/scripts-contact.php#contact
Ken, I was already using ver 2.0, I updated contact-inc.php to 2.01 and still get the same error. I used my old "Sitekey" and "SecretKey". Do I need to generate new ones or did I miss something else?
Thanks,
John
-
If you haven't updated your wxfreeze script since December 2018, you will need to update it.
http://www.wxforum.net/index.php?topic=24301.msg364940#msg364940 (http://www.wxforum.net/index.php?topic=24301.msg364940#msg364940)
Murry,
Thanks for the heads-up, I will update
John
-
Have not been able to resolve this issue.
If I run the contact-inc.php file, I get the contact page to show up, but no Captcha block.
I am using the latest files from Saratoga Templates. Looking for suggestions to resolve the problem. Started after updating from 5.4 to 7.2
Thanks,
John
Previous comments -
I just updated my php from 5.4 to 7.2.16 and my web page seems to be working fine with the exception of my wccontact.php page, it brings up a "http error 500". Any thoughts as to how I can fix this?
scannorthcounty.net/wxcontact.php
-
You probably need to update the contact script to the one that uses Google reCaptcha (instead of the old built-in captcha which was easily solved by spambots).
https://saratoga-weather.org/scripts-contact.php#contact
Mike's original contact script used ereg() and split() functions which are deprecated(and removed) from PHP 7+
-
You probably need to update the contact script to the one that uses Google reCaptcha (instead of the old built-in captcha which was easily solved by spambots).
https://saratoga-weather.org/scripts-contact.php#contact
Mike's original contact script used ereg() and split() functions which are deprecated(and removed) from PHP 7+
Ken,
Unless I am missing something, I believe I have the updated files from your website. V 2.01 - Are those the ones you are referring too? If so, it does not work for me. I can send my contact.php and contact-inc.php files if that would help.
Thanks,
John
-
Hmmm... V2.01 - 09-Aug-2018 is the current release for PHP 7+
Yes, send me your contact-inc.php and wxcontact.php to webmaster at saratoga-weather.org and I'll take a look.
-
Ok, just looked at your contact-inc.php and it looks ok.
What is the error reported in your website's error_log for the page?
-
Ok, just looked at your contact-inc.php and it looks ok.
What is the error reported in your website's error_log for the page?
http error 500
-
Umm.. that's the result, not the actual error message from PHP in your website's error_log -- it would look something like:
[Mon Apr 08 03:45:06.632234 2019] [php7:error] [pid 9864:tid 1920] [client ::1:56236] PHP Fatal error: ...
That '...' would have the exact cause of the issue and that is what is needed to resolve the problem.
-
Ken,
After reviewing the php error, I discovered some old "who's_online" settings in my settings.php that were the route of the problem. I commented those settings for whois_online (Not using Whosis_online anymore) and now the contact page is working fine. Not sure why none of the pages were not coming up with this error, at any rate it is now working. Thanks for your help in pushing me in the write direction.
John
-
John and Ken,
I have this exact problem with the contact page. http://cvweather.org/wxcontact.php
When I commented out (Thanks John), the last 2 lines highlighted below in my settings.php the wxcontact.php works.
My problem is I'd like to keep using the whos-online , at least until I can find a suitable replacement
// include the who's online functions
$C['files_path'] = '/home/cvweather/www/www/whos-online/'; // full path, always end with a slash
$C['files_url'] = 'http://cvweather.org/whos-online/'; // url, always end with a slash
//require ($C['files_path'].'include-whos-online-header.php');
// $whos_online_records = update_whos_online();
Thanks
-
There are many things that have to be changed with the old whos-online script set for PHP7+
Among them are changes to calls to mysql, deprecated calls to ereg., etc.
See this thread (https://www.weather-watch.com/smf/index.php/topic,66365.msg542857.html#msg542857) for more info.
and this thread (http://www.wxforum.net/index.php?topic=27367.msg265092#msg265092) for downloading some changes for mysql calls.
-
Thanks Ken,
I'll review those.