Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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 :(

share|improve this question
add comment

3 Answers

up vote 1 down vote accepted

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.

share|improve this answer
add comment

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

share|improve this answer
add comment

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).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.