PDA

View Full Version : test.php not working


petergehrig
12-19-01, 01:05 AM
I saved the following 5 lines as test.php:

#!/usr/local/bin/php
<html><head><title>PHP Test</title></head>
<body>
<?php echo "Hello World<p>"; ?>
</body></html>

Then I put test.php into my htdocs directory.
Then I set test.php to chrmod 755.
Then I tried to view it at http://www.freedone.com/test.php
Then I got a 500 Internal Server Error.

Question: What did I wrong???

Thanks a lot!

Peter

wwuud
12-31-01, 07:01 AM
Since yours is an old post, you have hopefully already gotten an answer.... but if not...

My site is on saturn.powweb.com, and php is installed as an Apache module, not as a cgi.

Try this instead.... enter the following three lines into a file and save as test.php:

<?php
phpinfo();
?>


Don't put the #!/usr/local/bin/php line and put the file permissions at 644. Save it to your site & pull it up in a browser to see what happens. It should give a bunch of information about the server/php configuration.

If this does not work, you should be able to add directives to the .htaccess file to make it work. I am researching this option, but can't test anything until i can get on a server that does not have php_mod installed.

Peace,
- Earl