Mandriva Expert
The place where your Mandriva Linux system finds support

php files not being processed

+/- details
User Patricia_BOH_2783
Incident Number 94863
Date 2005/12/31 15:24
Status Incident closed
Paid No

Product Mandriva Linux 2006 (Official)
Architecture x86_32
Scope Web Server

Products owned
Community Support question - to convert into a paid question, click here

Lines in bold below have not yet been seen by the customer - those in blue are from the customer

Username : Date : Action : Comments [ close all ]    
 
Patricia_BOH_2783 : 31/12/05 03:24 PM : Incident created
-   Hi! I have installed the Powerpack version of Mandriva, and I included both
Apache and PHP in the installation. I get the "it works!" page as well as
my own html files displayed correctly, but apache is not procesing php
extension files. I have tried finding out whats wrong by looking into the
httpd.conf file: The following line appears on the httpd.conf file, after all
the LoadModule... lines:

Include modules.d/*.conf

When I look at the modules.d directory, there is a file named 70_mod_php.conf

which contains the following code:

IfDefine HAVE_PHP5
IfModule !mod_php5.c
LoadModule php5_module extramodules/mod_php5.so
/IfModule
IfDefine

IfModule mod_php5.c
PHPINIDir /etc
/IfModule

IfModule mod_mime.c
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php4
AddType application/x-httpd-php .php5
AddType application/x-httpd-php .phtml
AddType application/x-httpd-php-source .phps
IfModule

IfModule mod_php5.c
IfModule mod_php5.c
DirectoryIndex index.php index.phtml index.php3 index.php4 index.php5
/IfModule
/IfModule

-------------
Doesnt that mean that the php files should be procesed? I have tried
adding:

LoadModule php5_module extramodules/mod_php5.so

and also:

AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php4
AddType application/x-httpd-php .php5
AddType application/x-httpd-php .phtml
AddType application/x-httpd-php-source .phps

directly onto the httpd.conf file but it still doesnt work. I thank anyone
who can give me a clue as to what is happening...

 
Linegod_7611 : 02/01/06 05:52 PM : Reply received
-   Do the following:

- Remove the additions you made to httpd.conf
- Create a file in '/var/www/html' called 'phptest.php' with the following contents
<?php
phpinfo();
?>
- Open a browser and go to http://localhost/phptest.php

If it works, php is being loaded. If not, submit the output of:

# rpm -qa|grep php

------------
Note: If this answer resolves your problem, please remember to close this
incident.

 
Linegod_7611 : 02/01/06 05:57 PM : Reply received
-   And just to be on the safe side, remove the top 'IfModule mod_php5.c' and bottom
'/IfModule' from your 70_mod_php.conf config file (I assumed it was a typo, but it
may be an error) where it is doubled up. Then restart apache (/etc/rc.d/init.d/httpd
restart)

------------
Note: If this answer resolves your problem, please remember to close this
incident.

 
Patricia_BOH_2783 : 02/01/06 09:47 PM : More info provided
-   Thanks for your help, it works. I assume I must add my .php files to the /var/www/html directory (until I get a grip on the httpd.conf file???) Thanks again.

 
 
Patricia_BOH_2783 : 02/01/06 09:56 PM : Incident closed
-  



This Incident is closed. It can not be edited anymore. You can create a new one by signing up/logging in your Mandriva Expert account.

  Mandriva  |  Contact  |  Legal  |  Privacy  |  Careers