PDA

View Full Version : New to PHP


Carlo Gambino
21st July 2008, 18:33
Hello!

I made a small php file and uploaded it to my server to ensure I've set everything up correctly:

<HTML>
<HEAD>
<TITLE>PHP Testing</TITLE>
</HEAD>
<BODY>
<?php
echo "if this works, we <i>really</i> did it!";
?>
</BODY>
</HTML>

and confirmed the file was in the correct directory. When I call the file in a browser, I see the code, not the echo'd text. The code looks correct to me, but I am new to PHP. Is it the code or the configuration?

topdog
22nd July 2008, 09:56
your web server is not setup to interpret php files, you need to fix that.

falko
22nd July 2008, 15:19
Which tutorial did you follow to set the server up?

Carlo Gambino
22nd July 2008, 23:48
Which tutorial did you follow to set the server up?
The Perfect Server - Ubuntu Hardy Heron (Ubuntu 8.04 LTS Server) (http://www.howtoforge.com/perfect-server-ubuntu8.04-lts)

I also uninstalled PHP and reinstalled using the documentation available by Ubuntu (http://doc.ubuntu.com/ubuntu/serverguide/C/php5.html).

falko
23rd July 2008, 20:18
I guess you also followed chapter 17.1 (Disable PHP Globally) of that tutorial? If you're not using ISPConfig, undo that chapter, and PHP will work again.

Carlo Gambino
24th July 2008, 03:46
Thanks for pointing out the oversight!

I even told myself not to do this while I was reading the tutorial.. I must have been on auto pilot.

php works, thanks for the help!