LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Need help with getting PHP5 to work on Apache2 (https://www.linuxquestions.org/questions/linux-server-73/need-help-with-getting-php5-to-work-on-apache2-660778/)

rehat 08-06-2008 01:07 AM

Need help with getting PHP5 to work on Apache2
 
Hi, I'm kinda new with using linux and I'm having problems getting apache2 to work with php5. I installed all the LAMP stuff before and it worked when I used these two commands:

apt-get install apache2 php5 libapache2-mod-php5
apt-get install mysql-server mysql-client php5-mysql

I removed these packages through Synaptic Package Manager and then reinstalled them with the same commands. But now the test.php that I made that had phpinfo(); does not display.

Any help would be great. If you need to see my apache2.conf let me know.

flandou 08-06-2008 06:02 AM

Hi,

Since you didn't post your configuration yet i can only guess, but most of the time this behaviour comes from:

- Not restarting apache.
- The lines to load the php5 module are still commented out.

The second can be fixed by running 'dpkg --reconfigure php5 libapache2-mod-php5' (Debian/Ubuntu only)
If that doesnt help look for lines like: 'LoadModule php5_module modules/libphp5.so' and 'AddType application/x-httpd-php .php' in your apache config and make sure they are not commented out. These lines should be in '/etc/apache2/modules.d/XX_mod_php5.conf'

If both don't work you should post your configuration ;)

greetz,

Henry

rehat 08-06-2008 12:17 PM

Thanks that helped


All times are GMT -5. The time now is 03:08 AM.