View previous topic :: View next topic |
Author |
Message |
phex n00b
Joined: 08 Jun 2002 Posts: 32
|
Posted: Tue Apr 01, 2003 10:33 pm Post subject: apache + mod_php |
|
|
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 |
|
|
sebgarden Guru
Joined: 21 Dec 2002 Posts: 353
|
Posted: Tue Apr 01, 2003 10:59 pm Post subject: |
|
|
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 |
|
|
phex n00b
Joined: 08 Jun 2002 Posts: 32
|
Posted: Wed Apr 02, 2003 12:22 am Post subject: |
|
|
naa, im using Apache 1.3.x .. does this mean i need to switch to 2.0? |
|
Back to top |
|
|
KraziKid Tux's lil' helper
Joined: 26 Dec 2002 Posts: 128
|
Posted: Wed Apr 02, 2003 1:34 am Post subject: |
|
|
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 |
|
|
phex n00b
Joined: 08 Jun 2002 Posts: 32
|
Posted: Wed Apr 02, 2003 4:05 am Post subject: |
|
|
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 |
|
|
mikef n00b
Joined: 02 Apr 2003 Posts: 14
|
Posted: Wed Apr 02, 2003 11:08 am Post subject: |
|
|
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 |
|
|
piotraf n00b
Joined: 01 Apr 2003 Posts: 43 Location: Łódź - Poland
|
Posted: Wed Apr 02, 2003 11:48 am Post subject: I have similiar problem with mod_php in Apache2 - not workin |
|
|
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 |
|
|
quikchaos Tux's lil' helper
Joined: 29 Jan 2003 Posts: 107
|
Posted: Wed Apr 02, 2003 12:43 pm Post subject: |
|
|
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 |
|
|
pengi n00b
Joined: 03 Apr 2003 Posts: 54 Location: Sweden
|
Posted: Fri Apr 04, 2003 7:54 pm Post subject: |
|
|
'-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 |
|
|
quikchaos Tux's lil' helper
Joined: 29 Jan 2003 Posts: 107
|
Posted: Wed Apr 09, 2003 8:20 pm Post subject: |
|
|
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 |
|
|
pengi n00b
Joined: 03 Apr 2003 Posts: 54 Location: Sweden
|
Posted: Wed Apr 09, 2003 8:34 pm Post subject: |
|
|
well... I upgraded to apache2, and now it works... |
|
Back to top |
|
|
abstract n00b
Joined: 26 Jun 2003 Posts: 2 Location: Iceland
|
Posted: Thu Jun 26, 2003 12:03 pm Post subject: Same problem |
|
|
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 |
|
|
Tuppu n00b
Joined: 16 Feb 2003 Posts: 56 Location: Vaasa, Finland
|
Posted: Sat Jun 28, 2003 11:14 am Post subject: |
|
|
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 |
|
|
abstract n00b
Joined: 26 Jun 2003 Posts: 2 Location: Iceland
|
Posted: Sat Jun 28, 2003 2:09 pm Post subject: Stupid me |
|
|
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 |
|
Back to top |
|
|
Tuppu n00b
Joined: 16 Feb 2003 Posts: 56 Location: Vaasa, Finland
|
Posted: Sat Jun 28, 2003 2:38 pm Post subject: |
|
|
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.... |
|
Back to top |
|
|
nimrod n00b
Joined: 16 May 2003 Posts: 29
|
Posted: Sat Jun 28, 2003 5:23 pm Post subject: |
|
|
hm ... check what the error_log says (normaly /var/logs/apache) ...
Maybe this helps to understand what is the showstoper! |
|
Back to top |
|
|
Tuppu n00b
Joined: 16 Feb 2003 Posts: 56 Location: Vaasa, Finland
|
Posted: Sat Jun 28, 2003 6:14 pm Post subject: |
|
|
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 |
|
|
nimrod n00b
Joined: 16 May 2003 Posts: 29
|
Posted: Sat Jun 28, 2003 6:29 pm Post subject: |
|
|
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 |
|
|
Tuppu n00b
Joined: 16 Feb 2003 Posts: 56 Location: Vaasa, Finland
|
Posted: Sun Jun 29, 2003 6:45 am Post subject: |
|
|
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 |
|
|
Tuppu n00b
Joined: 16 Feb 2003 Posts: 56 Location: Vaasa, Finland
|
Posted: Sun Jun 29, 2003 3:27 pm Post subject: |
|
|
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 |
|
|
Tuppu n00b
Joined: 16 Feb 2003 Posts: 56 Location: Vaasa, Finland
|
Posted: Sun Jun 29, 2003 10:07 pm Post subject: |
|
|
OK, it works now. It was probably something what I made.....
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 |
|
|
|