View previous topic :: View next topic |
Author |
Message |
orange1 n00b

Joined: 04 Sep 2002 Posts: 15
|
Posted: Fri Sep 27, 2002 7:18 pm Post subject: mod_php not working properly... |
|
|
so, i've got apache emerged, and i emerged mod_php, did the ebuild, and my php pages are still showing up and just a bunch of text. the php isn't getting processed.
did i miss something?
i've looked through php.ini, and there didn't appear to be anything that should stop it from working [no exec directories that i noticed]. i've added '-D PHP4' to /etc/conf.d/apache. |
|
Back to top |
|
 |
fyerk Apprentice

Joined: 17 Sep 2002 Posts: 212 Location: Atlanta, GA
|
Posted: Fri Sep 27, 2002 7:41 pm Post subject: |
|
|
Are you loading the modules correctly in your Apache configuration file? And, do you have the application type defined?
To see if the module is being loaded look for LoadModule php4_module and AddModule mod_php4.c.
To see if the application type is defined, look for: AddType application/x-httpd-php .php .php4 .php3 .phtml _________________ -David |
|
Back to top |
|
 |
rac Bodhisattva


Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Fri Sep 27, 2002 7:44 pm Post subject: |
|
|
Did you run the ebuild config command, like mod_php asked you to do when it finished emerging? _________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
 |
orange1 n00b

Joined: 04 Sep 2002 Posts: 15
|
Posted: Fri Sep 27, 2002 7:47 pm Post subject: |
|
|
yes to both. i ran the ebuild, and it added the module lines, and the mime-type lines. the pages use <?php, so it's not the short tag thing either.
permissions on the files look alright [775].
but it's still just displaying everything as plain text. |
|
Back to top |
|
 |
fyerk Apprentice

Joined: 17 Sep 2002 Posts: 212 Location: Atlanta, GA
|
Posted: Fri Sep 27, 2002 8:06 pm Post subject: |
|
|
Does PHP4 actually get loaded?
Code: |
ps -wwwaux | grep httpd
|
Look for -DHAVE_PHP4 _________________ -David |
|
Back to top |
|
 |
grakker Tux's lil' helper

Joined: 17 Apr 2002 Posts: 100
|
Posted: Fri Sep 27, 2002 8:11 pm Post subject: |
|
|
Ummmm.... What do you have in your /etc/apache/conf/apache.conf? Mine looks like:
Code: | > grep mod_php /etc/apache/conf/*
apache.conf:AddModule mod_php4.c
apache.conf:Include conf/addon-modules/mod_php.conf
|
Also, is there anything logged in your /var/log/apache/error_log? |
|
Back to top |
|
 |
orange1 n00b

Joined: 04 Sep 2002 Posts: 15
|
Posted: Fri Sep 27, 2002 8:14 pm Post subject: |
|
|
nope, don't see that.
my /etc/conf.d/apache looks like this:
APACHE_OPTS="-D PHP4"
that seems to be what emerge told me at the end, and what all the forums say to have.
apache.conf says <IfDefine PHP4> et cetera. |
|
Back to top |
|
 |
orange1 n00b

Joined: 04 Sep 2002 Posts: 15
|
Posted: Fri Sep 27, 2002 8:16 pm Post subject: |
|
|
grakker wrote: | Ummmm.... What do you have in your /etc/apache/conf/apache.conf? Mine looks like:
Code: | > grep mod_php /etc/apache/conf/*
apache.conf:AddModule mod_php4.c
apache.conf:Include conf/addon-modules/mod_php.conf
|
Also, is there anything logged in your /var/log/apache/error_log? |
have exactly that.
and nada in the error logs, except for a couple of broken links that other people have hit. |
|
Back to top |
|
 |
fyerk Apprentice

Joined: 17 Sep 2002 Posts: 212 Location: Atlanta, GA
|
Posted: Fri Sep 27, 2002 8:36 pm Post subject: |
|
|
Are you using the init scripts to start Apache, and not the binary?
Code: |
# /etc/init.d/apache start
|
_________________ -David |
|
Back to top |
|
 |
orange1 n00b

Joined: 04 Sep 2002 Posts: 15
|
Posted: Fri Sep 27, 2002 8:43 pm Post subject: |
|
|
i've been doing restart, but yeah, i've been using the init scripts.
but i'll be damned if doing a stop, and then a start would make it work.
i hate simple things. why can't these solutions be more complicated?
anywho, thanks for all the help guys. |
|
Back to top |
|
 |
grakker Tux's lil' helper

Joined: 17 Apr 2002 Posts: 100
|
Posted: Fri Sep 27, 2002 8:44 pm Post subject: |
|
|
Not sure if this will help, but it seems like I had to do something weird in my conf files. Maybe this will help, maybe not.
Code: |
> grep -i php /etc/apache/conf/* | grep -v php.ini
/etc/apache/conf/apache.conf:LoadModule php4_module modules/libphp4.so
/etc/apache/conf/apache.conf:AddModule mod_php4.c
/etc/apache/conf/apache.conf:Include conf/addon-modules/mod_php.conf
/etc/apache/conf/commonapache.conf: DirectoryIndex index.php index.html index.php3 index.shtml index.cgi index.pl index.htm Default.htm default.htm
/etc/apache/conf/commonapache.conf: AddIcon /icons/p.gif .pl .py .php .php3
/etc/apache/conf/commonapache.conf: Addtype application/x-httpd-php3 .php3
/etc/apache/conf/commonapache.conf: Addtype application/x-httpd-php3-source .php3s
/etc/apache/conf/commonapache.conf: Addtype application/x-httpd-php .php
/etc/apache/conf/commonapache.conf: Addtype application/x-httpd-php-source .phps
/etc/apache/conf/mime.types:application/x-httpd-php
|
|
|
Back to top |
|
 |
fyerk Apprentice

Joined: 17 Sep 2002 Posts: 212 Location: Atlanta, GA
|
Posted: Fri Sep 27, 2002 8:47 pm Post subject: |
|
|
Looking at the /etc/init.d/apache file, it appears that a restart only sends a USR1 signal to the daemon. To reload the modules, I'm pretty sure it needs a clean stop and start -- i.e. a TERM signal, and then restarting the binary.
I don't really know why but I'm glad it worked  _________________ -David |
|
Back to top |
|
 |
catalYst Tux's lil' helper


Joined: 02 May 2002 Posts: 119 Location: Appleton, WI USA
|
Posted: Wed Oct 23, 2002 8:56 pm Post subject: |
|
|
Ok, a full stop might have worked for edge...but I'm getting the same problem except the root of it lies in the apache warning:
Code: | [<datestamp>] [warn] module php4_module is already loaded, [ok] |
And I don't know how to fix it...
-colin |
|
Back to top |
|
 |
fyerk Apprentice

Joined: 17 Sep 2002 Posts: 212 Location: Atlanta, GA
|
Posted: Wed Oct 23, 2002 9:21 pm Post subject: |
|
|
Check your apache configuration file to see if you're loading the PHP module in multiple places. _________________ -David |
|
Back to top |
|
 |
dj_choco Tux's lil' helper


Joined: 13 Oct 2002 Posts: 144 Location: North America
|
Posted: Tue Nov 12, 2002 10:28 pm Post subject: mod_php now working! |
|
|
edge wrote: | Are you using the init scripts to start Apache, and not the binary?
Code: |
# /etc/init.d/apache start
|
|
[edit]I was also trying to load mod_php twice [/edit]
Thank you
I was using instead of
Code: | /etc/init.d/apache start |
mod_php working (I guess it really always was ) |
|
Back to top |
|
 |
|