LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Php support with apache (http://www.linuxquestions.org/questions/linux-software-2/php-support-with-apache-296774/)

c00l 03-02-2005 02:05 PM

Php support with apache
 
Hi, I installed Debian 3 woody today and can't seem to php to work.

After Debian was installed I typed...
apt-get install php4
apt-get install mysql-server
apt-get install php4-mysql

Once those were installed I added the line below to httpd.conf
LoadModule php4_module /usr/lib/apache/1.3/libphp4.so

and then I restarted apache which gave no warnings or allerts, but php still does not work. I can run scripts by typing php4 -q /var/www/index.php but the scripts are not run by typing in the url.

What am I doing wrong or have not done properly?



Thanks

houdelou 03-02-2005 02:23 PM

Do your scripts are in the cgi-bin directory?

c00l 03-02-2005 02:37 PM

no, but I dont think that would matter as I am trying to load php as a module not from cgi.
Also I added these lines to httpd.conf but again it does not seem to make a difference

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

berrance 03-02-2005 02:40 PM

dont you have to tell apache to treat the extention as a php script?

try adding this to your httpd.conf

AddType application/x-httpd-php .php

also try adding this

AddModule mod_php4.c

then restart apache and it should work i think

c00l 03-02-2005 05:30 PM

ok, after a restart it seems to work :scratch:


anyways for anyone else having the same problem inseart the below in your php.ini

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
LoadModule php4_module /usr/lib/apache/1.3/libphp4.so

and if it still doesnt work just restart the computer


Thanks for your help guys


All times are GMT -5. The time now is 06:33 AM.