Page 1 of 1

Site works, but header analysis shows 500 error

Posted: Thu Feb 12, 2009 1:05 pm
by cristiano
I am working on fixing an error.

http://tinyurl.com/cnaxv8

The site works, i mean i am able to browse through the site but it shows an 500 error in the home page in the headers.

Any idea as to why this would happen?

Some problem in the script?

Re: Site works, but header analysis shows 500 error

Posted: Thu Feb 12, 2009 1:13 pm
by s.dot

Code: Select all

C:\Users\Scott>php -r "$h = get_headers('http://cafetropic.com'); print_r($h);"
Array
(
    [0] => HTTP/1.0 500 Internal Server Error
    [1] => Date: Thu, 12 Feb 2009 22:09:23 GMT
    [2] => Server: Apache/2.0.52 (CentOS)
    [3] => X-Powered-By: PHP/5.2.6
    [4] => Set-Cookie: PHPSESSID=d31hvkeh7ujvqidj8enim8l3p6; path=/
    [5] => Expires: Thu, 19 Nov 1981 08:52:00 GMT
    [6] => Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre
-check=0
    [7] => Pragma: no-cache
    [8] => Set-Cookie: curlanguage=en; expires=Sat, 14-Mar-2009 22:09:23 GMT; pa
th=/
    [9] => Connection: close
    [10] => Content-Type: text/html
)
 
C:\Users\Scott>
That is pretty weird. Usually an Internal Server Error is a result of a misconfiguration and/or .htaccess file.

Re: Site works, but header analysis shows 500 error

Posted: Thu Feb 12, 2009 1:18 pm
by sparrrow
I agree. If you have a .htaccess file, make sure you keep it in ASCII format. I've caused my site to show 500 error before by uploading my .htaccess file in binary format via FTP, which messes up the line breaks and file structure. Of course, my site didn't load at all when that happened. Not sure what's going on here. Is it possible that you have included files or iframes anywhere that might not be loading correctly?

Does your server have an error log you can access that might tell more of the story?

Re: Site works, but header analysis shows 500 error

Posted: Thu Feb 12, 2009 1:20 pm
by cristiano
Thanks for your time, If you analyze the headers of other pages, it shows a 404. But still the page is displayed.

Why would you think it is happening?

If the site is working properly, then the headers should be fine right?

Please provide any suggestions.

Meanwhile i'm checking the .htaccess files.

Re: Site works, but header analysis shows 500 error

Posted: Thu Feb 12, 2009 1:40 pm
by sparrrow
Searching on Google yielded this: http://forums.devshed.com/apache-develo ... 98387.html

I have received 500 server error before from code then went into endless loops, but I had error reporting on, which kills the script and displays the error. Your code may be experiencing an error but the the compiler is just stepping over it. Try setting error_reporting(1);

Re: Site works, but header analysis shows 500 error

Posted: Thu Feb 12, 2009 2:14 pm
by cristiano
Thanks for the replies guys. I really appreciate it.