Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mod_php not working properly...
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
orange1
n00b
n00b


Joined: 04 Sep 2002
Posts: 15

PostPosted: Fri Sep 27, 2002 7:18 pm    Post subject: mod_php not working properly... Reply with quote

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
View user's profile Send private message
fyerk
Apprentice
Apprentice


Joined: 17 Sep 2002
Posts: 212
Location: Atlanta, GA

PostPosted: Fri Sep 27, 2002 7:41 pm    Post subject: Reply with quote

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
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Fri Sep 27, 2002 7:44 pm    Post subject: Reply with quote

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
View user's profile Send private message
orange1
n00b
n00b


Joined: 04 Sep 2002
Posts: 15

PostPosted: Fri Sep 27, 2002 7:47 pm    Post subject: Reply with quote

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
View user's profile Send private message
fyerk
Apprentice
Apprentice


Joined: 17 Sep 2002
Posts: 212
Location: Atlanta, GA

PostPosted: Fri Sep 27, 2002 8:06 pm    Post subject: Reply with quote

Does PHP4 actually get loaded?

Code:

ps -wwwaux | grep httpd

Look for -DHAVE_PHP4
_________________
-David
Back to top
View user's profile Send private message
grakker
Tux's lil' helper
Tux's lil' helper


Joined: 17 Apr 2002
Posts: 100

PostPosted: Fri Sep 27, 2002 8:11 pm    Post subject: Reply with quote

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
View user's profile Send private message
orange1
n00b
n00b


Joined: 04 Sep 2002
Posts: 15

PostPosted: Fri Sep 27, 2002 8:14 pm    Post subject: Reply with quote

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
View user's profile Send private message
orange1
n00b
n00b


Joined: 04 Sep 2002
Posts: 15

PostPosted: Fri Sep 27, 2002 8:16 pm    Post subject: Reply with quote

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
View user's profile Send private message
fyerk
Apprentice
Apprentice


Joined: 17 Sep 2002
Posts: 212
Location: Atlanta, GA

PostPosted: Fri Sep 27, 2002 8:36 pm    Post subject: Reply with quote

Are you using the init scripts to start Apache, and not the binary?
Code:

# /etc/init.d/apache start

_________________
-David
Back to top
View user's profile Send private message
orange1
n00b
n00b


Joined: 04 Sep 2002
Posts: 15

PostPosted: Fri Sep 27, 2002 8:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
grakker
Tux's lil' helper
Tux's lil' helper


Joined: 17 Apr 2002
Posts: 100

PostPosted: Fri Sep 27, 2002 8:44 pm    Post subject: Reply with quote

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
View user's profile Send private message
fyerk
Apprentice
Apprentice


Joined: 17 Sep 2002
Posts: 212
Location: Atlanta, GA

PostPosted: Fri Sep 27, 2002 8:47 pm    Post subject: Reply with quote

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
View user's profile Send private message
catalYst
Tux's lil' helper
Tux's lil' helper


Joined: 02 May 2002
Posts: 119
Location: Appleton, WI USA

PostPosted: Wed Oct 23, 2002 8:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
fyerk
Apprentice
Apprentice


Joined: 17 Sep 2002
Posts: 212
Location: Atlanta, GA

PostPosted: Wed Oct 23, 2002 9:21 pm    Post subject: Reply with quote

Check your apache configuration file to see if you're loading the PHP module in multiple places.
_________________
-David
Back to top
View user's profile Send private message
dj_choco
Tux's lil' helper
Tux's lil' helper


Joined: 13 Oct 2002
Posts: 144
Location: North America

PostPosted: Tue Nov 12, 2002 10:28 pm    Post subject: mod_php now working! Reply with quote

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 :lol:
I was using
Code:
apachectl start
instead of
Code:
/etc/init.d/apache start


mod_php working (I guess it really always was 8) )
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