PDA

View Full Version : 500 Internal Server Error



clearbrookforge
04-23-2009, 10:36 PM
I'm trying to get some simple php scripts running on my site. I'm just learning php, so it's quite likely that I'm doing something wrong. However, the pages are working fine on my local Apache installation.

All I'm trying to do is use php includes to pull in the HTML for my navigation and footer divs. It keeps throwing 500 errors:


Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@clearbrookforge.com 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.
Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8i DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at www.clearbrookforge.com Port 80

I've tried stripping my files down to one include, and it still won't run.

Any suggestions about where to start?

Thanks,
Josh

shadmego
04-23-2009, 11:06 PM
It would help if you could give us the code you are trying to run so we can see if you have it written correctly.

If you can't make sure you follow this link. It will show you how to properly write the command:

http://www.w3schools.com/php/php_includes.asp

~regards

clearbrookforge
04-24-2009, 11:23 AM
OK, I think I have it narrowed down now. I started a clean php page with one include, and it was able to pull a stripped-down HTML document without any trouble.

Working in the HM code editor, I copied my index.php file piece by piece over into test.php, and each piece worked. Finally I got the whole index file copied over, and it worked. :confused:

I think there is some kind of encoding issue. I notice that HM uses us-ascii for the code editor, and I have been saving stuff in utf-8 in my text editors (Notepad ++, gEdit).

I will try fiddling with different encodings and see what happens.

Thanks,
Josh