-   Linux - Software (
-   -   apache2 + php4 (

atheist 10-23-2004 11:35 PM

apache2 + php4
I just installed and apache2 and php4. I used apt-get to install them and apache2 is working fine. php4, however, is not going too great. I installed all the necessary packages. The documentation says it should work out of the box and no extra configuration is required but when ever I try and load my page the browser tells me I have chosen to open the file index.php and asks me if I want to open it or save it to a disk.

What am I doing wrong here?

Any input or suggestions will be appreciated.


Boby 10-24-2004 09:52 AM

Please look at your httpd.conf file. Look if you have this:

DirectoryIndex index.php

AddType application/x-httpd-php .php

Pecunia 10-24-2004 10:27 AM

Also, you should edit Apache's httpd.conf to load the PHP module, like for example:

LoadModule php4_module        modules/

atheist 10-24-2004 01:21 PM

Thanks, both of you.

I tried that, and well... it didn't work.
A note, though: I replaced the modules/ with the real path to the php4 module, of course.

Any other ideas?

j-ray 10-24-2004 02:44 PM

did the server give any messages when u had changed the
LoadModule line in httpd.conf?
u have to restart the server to make the changes in httpd.conf work.
another possible error might be, that there are different versions of apache available on your box and the httpd.conf belongs to the other server. but if httpd.conf resides in sth like apache2 directory u can count this idea out.
good luck

atheist 10-24-2004 02:53 PM

Nope, no messages at all from apache. And yes, I did restart the server (apache2ctl stop && apache2ctl start). I only have apache2 installed. And another thing. It did give me an error when I first tried the LoadModule thing, then I changed the path and doesn't give the error anymore so it must be reading the config file and loading the module, right?

j-ray 10-25-2004 03:12 PM

i think so, too. you may check the error_log of the server. maybe it supplies some info.

All times are GMT -5. The time now is 08:37 PM.