Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
PHP not working
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
paket
n00b
n00b


Joined: 09 Sep 2004
Posts: 8

PostPosted: Mon Sep 13, 2004 5:15 pm    Post subject: PHP not working Reply with quote

Hello all.

I am working on an Apache + php web server (using Gentoo naturally). I installed Apache 1.3 and PHP using emerge, and added "-D PHP4" to APACHE_OPTS in /etc/conf.d/apache. I've verified (with ps) that the argument is being picked up by apache and I have no errors in the log. Yet my test script returns <?php phpinfo(); ?> instead of the PHP status page. A few questions:

1. Is there any way to check to see which dynamic modules are being loaded? apache -l will list compiled-in modules, but I need to confirm that mod_php is being loaded by the server.

2. The Gentoo installation note on php.net recommends a USE flag of "-*". What does that do? Negate all USE flags?

3. Any ideas about my PHP problem?
Back to top
View user's profile Send private message
hanj
Veteran
Veteran


Joined: 19 Aug 2003
Posts: 1500

PostPosted: Mon Sep 13, 2004 7:11 pm    Post subject: Reply with quote

First question.. I have to ask... did you restart Apache?

Second..do you have /etc/apache/conf/modules.d/70_mod_php.conf? And if so, do you have the following available?
Code:
<IfModule mod_mime.c>
        AddType application/x-httpd-php .php
        AddType application/x-httpd-php .phtml
        AddType application/x-httpd-php .php3
        AddType application/x-httpd-php .php4
        AddType application/x-httpd-php-source .phps
    </IfModule>


hanji
Back to top
View user's profile Send private message
nobspangle
Veteran
Veteran


Joined: 23 Mar 2004
Posts: 1318
Location: Manchester, UK

PostPosted: Mon Sep 13, 2004 7:19 pm    Post subject: Reply with quote

you can find out what modules are loaded by going to
http://localhost/server-status
(that only works from localhost)

Failing that go to a page that doesn't exist and you'll get a 404 with the server info.
Back to top
View user's profile Send private message
paket
n00b
n00b


Joined: 09 Sep 2004
Posts: 8

PostPosted: Mon Sep 13, 2004 7:59 pm    Post subject: Reply with quote

nobspangle - the server-status url didn't work for me, but server-info did. It showed me that mod_php isn't being loaded. thanks

hanj - yes, I restarted Apache (1.3.31). My config is a little different than what you show. Here is what I have:

/etc/apache/conf/addon-modules/mod_php.conf

<IfModule mod_php4.c>

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

</IfModule>

As I mentioned before, mod_php doesn't show up on the info page. I will need to resolve that first.

Does anyone have any insight into that USE flag?
Back to top
View user's profile Send private message
hanj
Veteran
Veteran


Joined: 19 Aug 2003
Posts: 1500

PostPosted: Mon Sep 13, 2004 8:06 pm    Post subject: Reply with quote

Did you emerge mod_php.. or just PHP? I did not need to follow that syntax with the USE flag to get PHP working on my system:

Code:
emerge apache mod_php


hanji
Back to top
View user's profile Send private message
paket
n00b
n00b


Joined: 09 Sep 2004
Posts: 8

PostPosted: Mon Sep 13, 2004 8:48 pm    Post subject: Reply with quote

I didn't use that USE flag - I was just wondering what it meant.

I believe that I did a emerge mod_php although that was last week and I don't remember it clearly. I have managed to get mod_php to load (according to the server info page) by editing apache.conf. My phpinfo() script still is not being executed.

This is a test server, so I think that I will purge all php and apache packages and files and re-emerge overnight. I had apache2 installed beforehand, and maybe that messed things up.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum