How to use PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Evilferret
Forum Newbie
Posts: 1
Joined: Sun Jan 17, 2010 1:10 pm

How to use PHP

Post 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?
JakeJ
Forum Regular
Posts: 675
Joined: Thu Dec 10, 2009 6:27 pm

Re: How to use PHP

Post 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.
mellowman
Forum Commoner
Posts: 62
Joined: Sat Nov 22, 2008 5:37 pm

Re: How to use PHP

Post 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:
Post Reply