LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Php files don't load in my Apache Server (https://www.linuxquestions.org/questions/linux-software-2/php-files-dont-load-in-my-apache-server-710237/)

adrianc.grigoras 03-09-2009 07:59 AM

Php files don't load in my Apache Server
 
Hi,

I try to configure Apache to load Php. Everything works for Php4, but I upgrade to Php5.

I compile Php5 with apxs2 path, and it configures me the file:

Code:

LoadModule php4_module        /usr/lib/apache2/libphp4.so
LoadModule php5_module        /usr/lib/apache2/libphp5.so

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

When I try to load html files, it works.

When I hit in the console: php -f /path/to/file , it works.

But no php files are load in .Apache

I also restart it.

bathory 03-09-2009 08:37 AM

You cannot run add php support in apache for both php4 and php5 using modules. One of the phps must be run as a cgi. There are lots of howtos about the required configuration. Here is one written for Debian based distros.

adrianc.grigoras 03-09-2009 10:38 AM

Hi Bathory,

I comment this:
#LoadModule php4_module /usr/lib/apache2/libphp4.so

It works. I believe that Php5 add support for php4 in this way.

Thank you very much!


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