Local Apache server will sot serve PHP files

Dave M G martin at autotelic.com
Sun Jan 1 14:31:40 UTC 2006


Ubuntu Users,

	I have Ubuntu 5.10, Apache 2.0, PHP4 (?), and MySQL on my home machine,
a P3. It is not a web server, but I am intending to use it for testing
my web pages before uploading them by FTP to my hosting service.

	I installed PHP4 via Symantic, and so far as I knew, there was no
further set up needed. However, I am encountering two problems with PHP
scripts which indicate PHP is either not actually installed, or
installed incorrectly.

	In the case of PHP embedded in an html file, the PHP simply does not
display. I created a file called "test.html", which contains inside the
PHP code: <? phpinfo(); ?>. I save the file to my /var/www directory,
and view it in Firefox at localhost. Nothing shows up on screen.

	In the case of .php scripts, I created a file called index.php and put
it in its own directory within /var/www. However, when I try to call it,
I get a message from Firefox which says I am trying to open a "PHTML"
file, and would I like to save it or open it with another application.

	Is there some configuration with my Apache server settings that needs
to be altered?

	While I am comfortable writing PHP code, I am a newbie when it comes to
installing it, and this is one of my first attempts to install my own
PHP testing environment at home.

	Any advice would be much appreciated.

--
Dave M G





More information about the ubuntu-users mailing list