View previous topic :: View next topic |
Author |
Message |
paket n00b
Joined: 09 Sep 2004 Posts: 8
|
Posted: Mon Sep 13, 2004 5:15 pm Post subject: PHP not working |
|
|
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 |
|
|
hanj Veteran
Joined: 19 Aug 2003 Posts: 1500
|
Posted: Mon Sep 13, 2004 7:11 pm Post subject: |
|
|
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 |
|
|
nobspangle Veteran
Joined: 23 Mar 2004 Posts: 1318 Location: Manchester, UK
|
Posted: Mon Sep 13, 2004 7:19 pm Post subject: |
|
|
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 |
|
|
paket n00b
Joined: 09 Sep 2004 Posts: 8
|
Posted: Mon Sep 13, 2004 7:59 pm Post subject: |
|
|
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 |
|
|
hanj Veteran
Joined: 19 Aug 2003 Posts: 1500
|
Posted: Mon Sep 13, 2004 8:06 pm Post subject: |
|
|
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 |
|
|
paket n00b
Joined: 09 Sep 2004 Posts: 8
|
Posted: Mon Sep 13, 2004 8:48 pm Post subject: |
|
|
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 |
|
|
|