Page 1 of 1

How to use PHP

Posted: Sun Jan 17, 2010 1:14 pm
by Evilferret
Can't figure out what's wrong here.

index.php

Code: Select all

<html>
<head>
<?php include ("head.html");?>
</head>
<body>
<?php include ("navigation.html");?>
   Blah blah blah
</body>
</html>
If I rename the page to index.html it runs fine (Although the php includes do not function obviously).

If I remove both of the php includes from the page, it still won't load - Here's the error
Internal Server Error

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

Please contact the server administrator, webmaster@thunderguard.ca 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.8e-fips-rhel5 mod_wsgi/3.0c3 Python/2.4.3 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at http://www.thunderguard.ca Port 80
The server error log does not display any information.

My host is HelioHost.org, they say that they support PHP. Does this mean that they have not configured PHP properly, or is the error on my end?

Re: How to use PHP

Posted: Sun Jan 17, 2010 2:19 pm
by JakeJ
Why are your includes .html files? You need to have .php files as your includes.

It's unlikely that your host has php configured incorrectly.

Try this code though, just to test.

Code: Select all

<?php phpinfo(); ?>
To troubleshoot, start with the simplest code possible and then go from there.

Re: How to use PHP

Posted: Sun Jan 17, 2010 3:11 pm
by mellowman
your wrong...you are able to include just about anything...that means html files :].

I would suggest to talk to your server admin or whoever you are hosting with and talk to them or else just switch to a main stream hosting company...they never have server problems :mrgreen: