I have this url that seems to work fine but it returns a 500 error.
http://comehike.com/outdoors/hike_widget.php?hike_id=164&height=700&width=500
Any idea why that is possibly happening? I have like 10k such errors in my google webmaster tools :(
Webmasters Stack Exchange is a question and answer site for webmasters. It only takes a minute to sign up.
Sign up to join this communityI have this url that seems to work fine but it returns a 500 error.
http://comehike.com/outdoors/hike_widget.php?hike_id=164&height=700&width=500
Any idea why that is possibly happening? I have like 10k such errors in my google webmaster tools :(
If you can create a .htaccess
file (or already have one), put this code at the top:
# enable PHP error logging
php_flag log_errors on
php_value error_log /path/to/htdocs/PHP_errors.log
Create a blank PHP_errors.log
file in the directory specified in your .htaccess
file and set its permissions to 777
. Now refresh the page that's giving the 500 error and check if that log file now contains an error(s).
HTTP response headers are separate to the actual content that is returned. You can return any page with any response code (that's how custom 404 errors work).
The problem most likely lies with your server or PHP code. Check that there is no 500 error being sent in PHP (it would use the header()
function), check there are no errors in .htaccess
and that your server settings are not breaking anything.
If you are on shared hosting you'll probably need to contact your host since it may be their fault.
hike_widget.php
is returning an error 500. Check in chrome developer tools under Network. These are the headers for that file
Click on the file in the Networks left side window then view the headers on the right