|500 internal server error - Google Custom Search|
How to solve 500 internal server error?
| 11:10 am on Jan 23, 2010 (gmt 0)|
I'm trying to implement Google custom search on one of my domains, just to try it out for a bit and see if it can bring in some additional revenue.
I've already implemented custom search on another domain without any problems, so I'm fairly confident I'm not doing anything directly wrong myself.
The search box will be implemented on every page of www.widgets.com and points to www.widgets.com/searchresults.php. Google creates a far longer url for their search function to work, ofcourse.
The search box displays just fine but whenever I try to search for anything I get pointed to a 500 error page containing the following standard text:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, firstname.lastname@example.org and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Power MOD by Server at example.com Port 80
What is going wrong? I've set Google custom search up on another domain (with another host) perfectly fine without even the slightest speedbump.
I've already tried tinkering a bit with file/folder permissions. This seems to solve nothing.
Thanks a ton, this is driving me insane :)
[edited by: eelixduppy at 4:33 am (utc) on Jan. 25, 2010]
| 5:41 pm on Jan 23, 2010 (gmt 0)|
the 500 error is a bit of a catch-all, the server is saying "something is wrong, but I can't be more specific"
The only information you can truly extrapolate from this is it's not a client side problem.
Check your error log on the server for more information.
| 10:16 am on Jan 24, 2010 (gmt 0)|
This particular website is hosted by a medium hosting company from the Netherlands, should I activate them to go look for the problem or is this something I can fix myself?
My experiences with their customer support aren't too good.
| 6:53 pm on Jan 24, 2010 (gmt 0)|
Do you have any mod_rewrite on the site?
|Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. |
IMO There is some redirect loop happening when the server is looking for the file and it's causing the server to error... It could possibly be caused by making the site extensionless or the query_string if those are stripped. A 500 Internal Server Error usually in my experience has to do with redirecting something and it appears your custom error page cannot be found, so to me it sounds like .htaccess.
Check the Error Logs for details.
(Not the regular logs they won't tell you anything.)
[edited by: TheMadScientist at 6:57 pm (utc) on Jan. 24, 2010]
| 6:55 pm on Jan 24, 2010 (gmt 0)|
If you deliberatley cause the problem again, and then check the latest entry marked with your IP address in your error.log file (assuming you have access to it) it should tell you what the problem is.
It won't, however, tell you what is causing the problem, but it's probably just some faulty code you've got somewhere.
| 8:56 pm on Jan 24, 2010 (gmt 0)|
|Check your error log on the server for more information. |
This is the **definitive** first step, where to start, you're spinning your wheels until you get to this. :-) Even if you don't have command line access, the control panel for the hosting has to have error logs somewhere.
Re: the 404, just an extra 2 cents, it could also mean there just is no error document. That is, the .htaccess has an ErrorDocument directive, it's just not there, or where it expects it to be.
A 500 in PHP is rare, but have seen them, it could be a fatal error exceeding memory, a timeout, who knows. Basically it's causing PHP to crash on your application in one way or another.
All of which is of course speculation without the error_log entries.
| 8:55 am on Jan 25, 2010 (gmt 0)|
You guys are kings.
I worked all the steps described here and went over all the php again... And I got it solved! I still don't know exactly what went wrong but it seems to have something to do with the canonical link in the header.
Could that be correct?
Anyways: problem solved. Thanks a ton.