Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
apache + mod_php
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
phex
n00b
n00b


Joined: 08 Jun 2002
Posts: 32

PostPosted: Tue Apr 01, 2003 10:33 pm    Post subject: apache + mod_php Reply with quote

ok guys , ive been reading these other posts and with all the commands and such. but all i figured out was to install apache. USE="-java -qt" emerge apache

i cant get mod_php working. what exactly to i ened to type to get php runnin ?
Back to top
View user's profile Send private message
sebgarden
Guru
Guru


Joined: 21 Dec 2002
Posts: 353

PostPosted: Tue Apr 01, 2003 10:59 pm    Post subject: Reply with quote

IF you're using apache2 and php4 THEN in your /etc/conf.d/apache2, add "-D PHP4" to your APACHE2_OPTS line. ELSE, I don't know.

:)

Regards,
Sébastien.
Back to top
View user's profile Send private message
phex
n00b
n00b


Joined: 08 Jun 2002
Posts: 32

PostPosted: Wed Apr 02, 2003 12:22 am    Post subject: Reply with quote

naa, im using Apache 1.3.x .. does this mean i need to switch to 2.0?
Back to top
View user's profile Send private message
KraziKid
Tux's lil' helper
Tux's lil' helper


Joined: 26 Dec 2002
Posts: 128

PostPosted: Wed Apr 02, 2003 1:34 am    Post subject: Reply with quote

In /etc/conf.d/apache, add this line:
Code:

APACHE_OPTS="-D PHP4"


Then do this series of commands:
Code:

/etc/init.d/apache stop
/etc/init.d/apache start
Back to top
View user's profile Send private message
phex
n00b
n00b


Joined: 08 Jun 2002
Posts: 32

PostPosted: Wed Apr 02, 2003 4:05 am    Post subject: Reply with quote

well i tried that and it didnt work and i also put that command below in my /etc/apache/conf/apache.conf, and still nothing works..lol all i wanna do is get phpSysInfo working *sigh* :(

<IfDefine PHP4>
LoadModule php4_module extramodules/libphp4.so
</IfDefine>
Back to top
View user's profile Send private message
mikef
n00b
n00b


Joined: 02 Apr 2003
Posts: 14

PostPosted: Wed Apr 02, 2003 11:08 am    Post subject: Reply with quote

Did you notice the einfo that appears at the end of the mod_php build? It's easy to miss it if you are not watching the screen as the commands roll past. It says something like

Execute
ebuild /var/db/pkg/dev-php/mod_php-4.3.1/mod_php-4.3.1.ebuild config

You can check this by reading the ebuild in the pkg_postinst section.
_________________
Michael
Back to top
View user's profile Send private message
piotraf
n00b
n00b


Joined: 01 Apr 2003
Posts: 43
Location: Łódź - Poland

PostPosted: Wed Apr 02, 2003 11:48 am    Post subject: I have similiar problem with mod_php in Apache2 - not workin Reply with quote

I followed AFAIK all the instructions i.e. added the "-D PHP4" and it doesn't seem to work because instead of trying to open the test.php file mozilla wants to save it to file :(
_________________
best regards/ pozdrawiam
PiotrAF
Back to top
View user's profile Send private message
quikchaos
Tux's lil' helper
Tux's lil' helper


Joined: 29 Jan 2003
Posts: 107

PostPosted: Wed Apr 02, 2003 12:43 pm    Post subject: Reply with quote

I know exactly what you are talking about. For some reason, the only way I could get my php4 working w/ my Apache 1.3.x was to manually add the LoadModule lines to my /etc/apache/conf/apache.conf.

Code:
LoadModule php4_module      extramodules/libphp4.so


And then further down.

Code:
AddModule mod_php4.c


This seemed to make it work for the short term. I am not sure why it isn't working even w/ the '-D PHP4' option.
Back to top
View user's profile Send private message
pengi
n00b
n00b


Joined: 03 Apr 2003
Posts: 54
Location: Sweden

PostPosted: Fri Apr 04, 2003 7:54 pm    Post subject: Reply with quote

'-D PHP4' will not work because PHP4 isn't defined in apache.conf or commonapache.conf...

I've tried to insert
Code:
LoadModule php4_module      extramodules/libphp4.so
AddModule mod_php4.c

run php, but it wont work and mozilla want to save the page...

I know the path to the libphp4.so is correct, because when I change it to a wrong path, apache wont start...

Plz help...
Back to top
View user's profile Send private message
quikchaos
Tux's lil' helper
Tux's lil' helper


Joined: 29 Jan 2003
Posts: 107

PostPosted: Wed Apr 09, 2003 8:20 pm    Post subject: Reply with quote

What about adding these to your commonapache.conf? I added them just below the AddType application/x-tar .tgz line.

Code:
AddType  application/x-httpd-php         .php .php4 .php3 .phtml
AddType  application/x-httpd-php-source  .phps
Back to top
View user's profile Send private message
pengi
n00b
n00b


Joined: 03 Apr 2003
Posts: 54
Location: Sweden

PostPosted: Wed Apr 09, 2003 8:34 pm    Post subject: Reply with quote

well... I upgraded to apache2, and now it works...
Back to top
View user's profile Send private message
abstract
n00b
n00b


Joined: 26 Jun 2003
Posts: 2
Location: Iceland

PostPosted: Thu Jun 26, 2003 12:03 pm    Post subject: Same problem Reply with quote

I'm having the exact same problem, I'd rather not be forced to upgrade to apache2 :(

Is there anyone who has had this problem and solved it without upgrading to apache2?
Back to top
View user's profile Send private message
Tuppu
n00b
n00b


Joined: 16 Feb 2003
Posts: 56
Location: Vaasa, Finland

PostPosted: Sat Jun 28, 2003 11:14 am    Post subject: Reply with quote

Me too. Exactly the same problem.

Can anybody help ? I'm getting desperate....


Last edited by Tuppu on Sat Jun 28, 2003 2:27 pm; edited 1 time in total
Back to top
View user's profile Send private message
abstract
n00b
n00b


Joined: 26 Jun 2003
Posts: 2
Location: Iceland

PostPosted: Sat Jun 28, 2003 2:09 pm    Post subject: Stupid me Reply with quote

Actually, I found out after tearing the last hair of my head, that the reason why it didn't work for me was because the APACHE_OPTS="-D PHP4" line was commented out :oops:
Back to top
View user's profile Send private message
Tuppu
n00b
n00b


Joined: 16 Feb 2003
Posts: 56
Location: Vaasa, Finland

PostPosted: Sat Jun 28, 2003 2:38 pm    Post subject: Reply with quote

In my /etc/conf.d/apache

APACHE_OPTS="-D PHP4"

is NOT commented out.

If I try to fire up apache everything looks rosy....:
mybox root # /etc/init.d/apache start
* Starting apache... [ ok ]

But, ps aux reveals that apache is not running. Also stopping the demon tells the same story:
mybox root # /etc/init.d/apache stop
* Stopping apache...
start-stop-daemon: warning: failed to kill 25581: No such process [ ok ]

I am pretty close giving up.... :evil:
Back to top
View user's profile Send private message
nimrod
n00b
n00b


Joined: 16 May 2003
Posts: 29

PostPosted: Sat Jun 28, 2003 5:23 pm    Post subject: Reply with quote

hm ... check what the error_log says (normaly /var/logs/apache) ...

Maybe this helps to understand what is the showstoper!
Back to top
View user's profile Send private message
Tuppu
n00b
n00b


Joined: 16 Feb 2003
Posts: 56
Location: Vaasa, Finland

PostPosted: Sat Jun 28, 2003 6:14 pm    Post subject: Reply with quote

Thanks for responce !

In '/var/log/apache' there are 3 files:
.keep
access_log
error_log

The first 2 are empty. The last entry in error_log is from 23rd June. As I am using metalog as logger I already gave command:

killall -USR1 metalog

in order to turn off buffering.

The last time I started apache was today (28th June).
Back to top
View user's profile Send private message
nimrod
n00b
n00b


Joined: 16 May 2003
Posts: 29

PostPosted: Sat Jun 28, 2003 6:29 pm    Post subject: Reply with quote

hm .. that's a little bit odd ...


first:
Quote:

As I am using metalog as logger I already gave command:


unsure but: think apache logs don't run over syslog (btw metalog) on standart .. so this should have no impact ...

then .. your problem is the following: apache starts but stops (crashs?) immediately, right?

try the following: run /usr/sbin/apachectl configtest if thats ok run /usr/sbin/apachectl start and have a look on the output and if apache stays alive
Back to top
View user's profile Send private message
Tuppu
n00b
n00b


Joined: 16 Feb 2003
Posts: 56
Location: Vaasa, Finland

PostPosted: Sun Jun 29, 2003 6:45 am    Post subject: Reply with quote

Let's see:

Code:
mybox root # /usr/sbin/apachectl configtest
Syntax OK
mybox root # /usr/sbin/apachectl start     
/usr/sbin/apachectl start: httpd started


So far it looks positive ?

Now there is stuff in error log (and obviously it crashed again):
Code:
mybox root # cat /var/log/apache/error_log
[Sun Jun 29 09:27:20 2003] [warn] pid file /var/run/apache.pid overwritten -- Unclean shutdown of previous Apache run?
[Sun Jun 29 09:27:21 2003] [alert] (25)Inappropriate ioctl for device: getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive
[Sun Jun 29 09:27:21 2003] [alert] (25)Inappropriate ioctl for device: getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive
[Sun Jun 29 09:27:21 2003] [alert] (25)Inappropriate ioctl for device: getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive
[Sun Jun 29 09:27:21 2003] [notice] Apache/1.3.27 (Unix)  (Gentoo/Linux) configured -- resuming normal operations
[Sun Jun 29 09:27:21 2003] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sun Jun 29 09:27:21 2003] [notice] Accept mutex: sysvsem (Default: sysvsem)
[Sun Jun 29 09:27:21 2003] [alert] Child 12773 returned a Fatal error...
Apache is exiting!
[Sun Jun 29 09:27:21 2003] [alert] (25)Inappropriate ioctl for device: getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive


OK, there are things to fix. Eh, all the help is appreciated...
Back to top
View user's profile Send private message
Tuppu
n00b
n00b


Joined: 16 Feb 2003
Posts: 56
Location: Vaasa, Finland

PostPosted: Sun Jun 29, 2003 3:27 pm    Post subject: Reply with quote

User directive is set in my /etc/pache/conf/commonapache.conf as follows:

Quote:
User apache
Group apache


I cannot see anything wrong with that ???

I am lost ....
Back to top
View user's profile Send private message
Tuppu
n00b
n00b


Joined: 16 Feb 2003
Posts: 56
Location: Vaasa, Finland

PostPosted: Sun Jun 29, 2003 10:07 pm    Post subject: Reply with quote

OK, it works now. It was probably something what I made..... :oops:

I unmerged apache mod_php and mod_ssl packages and installed them again. I also made sure that I started using the new (original) *.conf files....
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