LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   apache2 won't parse php (https://www.linuxquestions.org/questions/linux-software-2/apache2-wont-parse-php-501732/)

irvken 11-15-2006 02:13 AM

apache2 won't parse php
 
This problem seems to happen everytime I try to set up a Lamp stack. Apache won't deliver php pages, instead opening kedit and displaying the code as a text file, including phpinfo.php.

I've been through all the configs and it all seems set up the same way as working servers I have access too, although I'm not even sure how you make php "run" :(

Any suggestions appreciated.

imagineers7 11-15-2006 02:19 AM

Hi Irvken,

Have you compiled apache with php support?



Aniruddha

irvken 11-15-2006 03:14 AM

Interestingly enough I've never done that, I avoid compilation like the plague and use off the shelf binaries usually, but I've always managed to get php webapps working in the past with a combination of apt-get's and conf edits. I can just never remember which ones and in what order.

baikonur 11-15-2006 10:58 AM

Code:

apt-get install libapache2-mod-php4
should do it.

irvken 11-15-2006 11:22 AM

libapache2-mod-php4 is already the newest version

that's what I thought too. :(

baikonur 11-15-2006 11:41 AM

hmmm... how about php4-common?
and is it really apache2 you're running?

irvken 11-15-2006 02:15 PM

I thought so, but then realised that if apache was running too and turned it off. I restarted apache2 but nothing seems to be happening. I've decided to install another app now that requires php5. I've got that via synaptic but without apache2 running that's not going to work either.

I started apache2 with /etc/init.d/apache2 start and there were no errors, but it doesn't seem to be responding to requests and the logs are empty!

Could it be something in the apache2 conf files?

irvken 11-15-2006 02:42 PM

hehe, I sheepishly admit apache2 wasn't installed

irvken 11-15-2006 04:16 PM

ok, apache 2 didn't run, so I reinstalled the working apache. I've also installed php5 (part of another project) and libapache2-mod-php5 but no joy, apache still doesn't parse php files - see for example http://irvken.homleinux.net/phpinfo.php

Is compilation looming on the horizon, unfortunately I nothing about it besides "make, make install etc."

irvken 11-26-2006 06:19 AM

just to finish off, the problem in the end was that the apache2 init script was not working properly, I can now launch apache2 from the command, and am investigating the problem, ta for all your help


All times are GMT -5. The time now is 05:28 AM.