Mandriva Expert
The place where your Mandriva Linux system finds support

PHP in Apache 2

+/- details
User franticbob
Incident Number 78666
Date 2004/04/03 01:32
Status Incident closed
Paid Yes

Product 9.2 (FiveStar)
Architecture x86_32
Scope Web Server

Products owned

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 ]    
 
franticbob : 03/04/04 01:32 AM : Incident created
-   I'm hoping someone will know the answer to this. I need to get an apache 2 server up with PHP, as the website makes great use of php. However, I can't seem to make the two talk to each other and display the php files correctly. They are not being interpreted at all. Does anyone know of a good, easy way to set this up? I had it working in MD 9.0 with Apache 1.3, but it seems like Apache 2 and PHP are different. Please give me all the advice you can on this. Thanks in advance.

 
Linegod_7611 : 03/04/04 02:45 AM : Reply received
-   It should be fairly straight forward. Have you installed 'apache2-mod_php',
'php' and 'php-ini'?

To check, do:

# rpm -qa|grep apache2
# rpm -qa|grep php

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

 
franticbob : 03/04/04 03:42 AM : More info provided
-   It seems like i have all of the proper packages. Does it matter that I am running both of my websites as virtual hosts? Here's the website in question:

missourirain.org, you can see by looking at the source that the php scripting isn't getting read/translated. I guess I should have done more research b4 I went and upgraded to Apache 2.x. I'm still stuck with this...we'll I'll take a short break and come back to this problem in a bit. Any other ideas would be greatly appreciated. Is there actually a seperate php package? I thought php 4 was included in the apache2-mod_php-2.0.47_4.3.2-2mdk package. Also, does the php.ini restrict access in any way? I remember having to make 1 modification to the old php.ini file back when I was using Apache 1.3x, I don't know if I have to do something like that now.


rpm -qa | grep php:
libphp_common432-4.3.3-2mdk
php-ini-4.3.3-1mdk
apache2-mod_php-2.0.47_4.3.2-2mdk
php-imap-4.3.2-3mdk

rpm -qa | grep apache2:
apache2-mod_disk_cache-2.0.47-6.3.92mdk
apache2-mod_ssl-2.0.47-6.3.92mdk
apache2-mod_perl-2.0.47_1.99_09-3mdk
apache2-mod_suexec-2.0.47-2mdk
apache2-modules-2.0.47-6.3.92mdk
apache2-mod_cache-2.0.47-6.3.92mdk
apache2-mod_proxy-2.0.47-6.3.92mdk
apache2-manual-2.0.47-6.3.92mdk
apache2-mod_php-2.0.47_4.3.2-2mdk
apache2-common-2.0.47-6.3.92mdk
apache2-2.0.47-6.3.92mdk

 
franticbob : 03/04/04 07:46 AM : More info provided
-   Okay, after taking a break, I've made more progress, however, I'm still a tad bit stuck. I renamed my test.html file to test.php and the apache 2 web sever rendered the page just fine!!! Now I just have to figure out what directive in the web server will read the php code in regular html files as well.

 
Linegod_7611 : 03/04/04 02:48 PM : Reply received
-   In '/etc/httpd/conf.d/70_mod_php.conf' add the following line below the last
'AddType' entry:

AddType application/x-httpd-php .html

Restart the webserver (/etc/rc.d/init.d/httpd restart) and you should be able
to render php from within .html files.

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

 
RoVri : 03/04/04 02:56 PM : Reply received
-   You might take a look at apache.org and php.org. When installing MAboo server
(CMS) i needed those two as well and got it working very fine. Good luck

 
 
franticbob : 07/04/04 12:55 AM : 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