Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mod_php no longer loads after apache update [solved]
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
andrewd18
Guru
Guru


Joined: 11 Apr 2004
Posts: 364
Location: Wisconsin, USA

PostPosted: Mon Sep 19, 2005 8:00 am    Post subject: mod_php no longer loads after apache update [solved] Reply with quote

I updated apache2 today, and found a few new things. Pretty sure my issue relates to the change from apache2.conf to httpd.conf

1) Everything's been moved from apache2.conf to httpd.conf. Good, but I'm not sure what's been moved where...
2) mod_php no longer loads (see below)
3) I cannot re-compile mod_php, since the stable version of that conflicts with the stable version of apache2. I WAS able to update just "php" to 4.4.0-r1, but it didn't fix anything.

I'll post whatever output you guys need... I do have "-D PHP4" in all the appropriate places and have restarted apache, but whenever I visit a PHP file, Firefox wants to download it, not show it, so mod_php isn't loading.

php 4.4.0-r1
mod_php 4.4.0
apache2 2.0.54-r31

All running on hardened gentoo, x86.

~~ Andrew D.
_________________
Keep Your Toolchain Stable! - emwrap.sh

There's no place like ::1


Last edited by andrewd18 on Tue Sep 20, 2005 2:32 am; edited 1 time in total
Back to top
View user's profile Send private message
102039
Tux's lil' helper
Tux's lil' helper


Joined: 16 Mar 2005
Posts: 125

PostPosted: Mon Sep 19, 2005 8:13 am    Post subject: Reply with quote

Hello,

everything purely apache related has been moved to httpd.conf, you are right about that part. But extensions like mod_php are in /etc/apache2/modules.d. There is a pretty good chance that the mod_php config file has not been installed there, but still resides in /etc/apache2/conf/modules.d. Copy it over manually if you still have it and you should be just fine. The -D PHP4 needs not to be inserted at all appropriate places, but just in /etc/conf.d/apache2.
If you don't have the the mod_php config file in /etc/apache2/conf/modules.d/, just unmerge and reemerge mod_php completly. Afaik only necessary config files will be emerged during a version update, so that might be the reason why it is not in the new location already.
Back to top
View user's profile Send private message
llongi
Retired Dev
Retired Dev


Joined: 15 Apr 2004
Posts: 459
Location: Switzerland

PostPosted: Mon Sep 19, 2005 8:58 am    Post subject: Reply with quote

For mod_php to work with the new Apache releases, you need to use the unstable (4.4.0-r3) mod_php package, since it's the only one compatible with the new Apache config layout, but it's not unstable as in "does not work", it's the same as the stable mod_php package, just with changed configuration paths.
Best regards, CHTEKK.
_________________
Best regards, Luca.
Back to top
View user's profile Send private message
andrewd18
Guru
Guru


Joined: 11 Apr 2004
Posts: 364
Location: Wisconsin, USA

PostPosted: Mon Sep 19, 2005 1:17 pm    Post subject: Reply with quote

CHTEKK wrote:
For mod_php to work with the new Apache releases, you need to use the unstable (4.4.0-r3) mod_php package, since it's the only one compatible with the new Apache config layout, but it's not unstable as in "does not work", it's the same as the stable mod_php package, just with changed configuration paths.
Best regards, CHTEKK.


I'm familiar with the "not unstable as in does not work" idea - I'm running AMD64 on my production box. ^_^

I've got 4.4.0-r3 emerging now... thank you in advance.

~~ Andrew D.
_________________
Keep Your Toolchain Stable! - emwrap.sh

There's no place like ::1
Back to top
View user's profile Send private message
llongi
Retired Dev
Retired Dev


Joined: 15 Apr 2004
Posts: 459
Location: Switzerland

PostPosted: Mon Sep 19, 2005 2:22 pm    Post subject: Reply with quote

andrewd18 wrote:
I'm familiar with the "not unstable as in does not work" idea - I'm running AMD64 on my production box. ^_^

I've got 4.4.0-r3 emerging now... thank you in advance.


Good, no problem. :) Btw we just did stabilize mod_php-4.4.0-r3 on x86, other arches will soon follow when the arch-teams have time to check it out.
Best regards, CHTEKK.
_________________
Best regards, Luca.
Back to top
View user's profile Send private message
andrewd18
Guru
Guru


Joined: 11 Apr 2004
Posts: 364
Location: Wisconsin, USA

PostPosted: Mon Sep 19, 2005 7:25 pm    Post subject: Reply with quote

Well, I emerged mod_php... but it's still not loading... FF still tries to download the php file.

*edit* Gonna play around in the config files for a while...

~~ Andrew D.
_________________
Keep Your Toolchain Stable! - emwrap.sh

There's no place like ::1
Back to top
View user's profile Send private message
andrewd18
Guru
Guru


Joined: 11 Apr 2004
Posts: 364
Location: Wisconsin, USA

PostPosted: Mon Sep 19, 2005 7:55 pm    Post subject: Reply with quote

Yeah, it's still not loading.... any ideas? What needs to go where in order for the mod_php module to be loaded? What file do I check to make sure it is being loaded at all?

~~ Andrew D.
_________________
Keep Your Toolchain Stable! - emwrap.sh

There's no place like ::1
Back to top
View user's profile Send private message
gcrew
Tux's lil' helper
Tux's lil' helper


Joined: 22 Feb 2005
Posts: 82
Location: Poughkeepsie, NY

PostPosted: Mon Sep 19, 2005 8:06 pm    Post subject: Reply with quote

The upgrading guide says:

Quote:
check the module's .conf for IfDefine and add the name to /etc/conf.d/apache{|2} to enable it.


What the heck does this mean?

I tried adding:
Code:
APACHE2_OPTS="-D PHP4"

to my httpd.conf, but then I get the following:

Code:
 * Apache2 has detected a syntax error in your configuration files:
Syntax error on line 1097 of /etc/apache2/httpd.conf:
Invalid command 'APACHE2_OPTS="-D', perhaps mis-spelled or defined by a module not included in the server configuration


I tried adding:
Code:
Define PHP4

to my httpd.conf, but then I get the following:
Code:
 * Apache2 has detected a syntax error in your configuration files:
Syntax error on line 1096 of /etc/apache2/httpd.conf:
Invalid command 'Define', perhaps mis-spelled or defined by a module not included in the server configuration


I'm a little frustrated by the lack of an example here. Any quick help would be greatly appreciated.
Back to top
View user's profile Send private message
zomps
n00b
n00b


Joined: 08 Dec 2004
Posts: 59

PostPosted: Mon Sep 19, 2005 8:09 pm    Post subject: Reply with quote

Quote:

emerge =dev-php/mod_php-4.4.0-r3
ebuild /usr/portage/dev-php/mod_php/mod_php-4.4-0-r3.ebuild config

and add APACHE2_OPTS="-D PHP4" to /etc/conf.d/apache.conf
should help

but i have similar problem with virtual hosts
when i use http://vhost.host.com/ then downloads php file
and with http://vhost.host.com/index.php shows page

Edit: these are example urls, not real ones


Last edited by zomps on Mon Sep 19, 2005 8:18 pm; edited 2 times in total
Back to top
View user's profile Send private message
dtremblay
n00b
n00b


Joined: 19 Jan 2005
Posts: 22
Location: Halifax

PostPosted: Mon Sep 19, 2005 8:11 pm    Post subject: PHP4 setting Reply with quote

You're supposed to put that option in /etc/conf.d/apache2

Mine says
Code:
APACHE2_OPTS="-D DEFAULT_VHOST -D SSL -D DOC -D PHP4"

_________________
Daniel Tremblay
Halifax, NS Canada
Back to top
View user's profile Send private message
andrewd18
Guru
Guru


Joined: 11 Apr 2004
Posts: 364
Location: Wisconsin, USA

PostPosted: Mon Sep 19, 2005 8:16 pm    Post subject: Re: PHP4 setting Reply with quote

dtremblay wrote:
You're supposed to put that option in /etc/conf.d/apache2

Mine says
Code:
APACHE2_OPTS="-D DEFAULT_VHOST -D SSL -D DOC -D PHP4"


Other than the -D DOC one, that's exactly how my line reads. And it still wants to download the file.

http://nextgen.no-ip.org --- the base index.html file works, but going to my personal page (/home/andrew/public_html/personal/welcome.php) doesn't work at all, at least in the browser sense.

~~ Andrew D.
_________________
Keep Your Toolchain Stable! - emwrap.sh

There's no place like ::1
Back to top
View user's profile Send private message
gcrew
Tux's lil' helper
Tux's lil' helper


Joined: 22 Feb 2005
Posts: 82
Location: Poughkeepsie, NY

PostPosted: Mon Sep 19, 2005 8:19 pm    Post subject: Reply with quote

Wow. I can't read. Must be the stress of PHP not working.

I added that, but it still doesn't work.

I have the following versions of everything installed:
mod_php-4.4.0-r3
php-4.4.0-r1
apache-2.0.54-r31

I added the -D PHP4 in the conf.d/apache2 file now.

Any other ideas?
Back to top
View user's profile Send private message
gcrew
Tux's lil' helper
Tux's lil' helper


Joined: 22 Feb 2005
Posts: 82
Location: Poughkeepsie, NY

PostPosted: Mon Sep 19, 2005 8:28 pm    Post subject: Reply with quote

I'm sorry. It is working. My browser was using the broken page from its cache. Thanks for the help.
Back to top
View user's profile Send private message
andrewd18
Guru
Guru


Joined: 11 Apr 2004
Posts: 364
Location: Wisconsin, USA

PostPosted: Mon Sep 19, 2005 8:31 pm    Post subject: Reply with quote

Doing a shift-click (force cache bypass) doesn't fix mine. Suggestions?

~~ Andrew D.
_________________
Keep Your Toolchain Stable! - emwrap.sh

There's no place like ::1
Back to top
View user's profile Send private message
DiStefano
n00b
n00b


Joined: 19 Jan 2004
Posts: 9

PostPosted: Mon Sep 19, 2005 10:19 pm    Post subject: Reply with quote

zomps wrote:


but i have similar problem with virtual hosts
when i use http://vhost.host.com/ then downloads php file
and with http://vhost.host.com/index.php shows page

Edit: these are example urls, not real ones


Very funny mine problem is nearly the same:

http://domain.tld shows the page
http://domain.tld/index.php downloads the php file

Is there any solution?


Edit: Solved. Seems to be a proxy-problem.


Last edited by DiStefano on Tue Sep 20, 2005 10:20 am; edited 1 time in total
Back to top
View user's profile Send private message
llongi
Retired Dev
Retired Dev


Joined: 15 Apr 2004
Posts: 459
Location: Switzerland

PostPosted: Mon Sep 19, 2005 10:45 pm    Post subject: Reply with quote

andrewd18 wrote:
Doing a shift-click (force cache bypass) doesn't fix mine. Suggestions?

~~ Andrew D.


Andrew... Uhmm I just visited your page, the welcome.php works perfectly, displaying a site with the Born To Frag Linux image in the middle.
So it's your cache, many people experienced problems with this... Make sure you do not have caching proxies between yourself and the server, delete the cache of your browser completely, and restart said browser. That should fix it.
Best regards, CHTEKK.
_________________
Best regards, Luca.
Back to top
View user's profile Send private message
andrewd18
Guru
Guru


Joined: 11 Apr 2004
Posts: 364
Location: Wisconsin, USA

PostPosted: Tue Sep 20, 2005 2:32 am    Post subject: Reply with quote

LOL. Okay, so it's just me now. Tried it with a different browser... you're right. TY!
_________________
Keep Your Toolchain Stable! - emwrap.sh

There's no place like ::1
Back to top
View user's profile Send private message
Romses
Apprentice
Apprentice


Joined: 20 Jan 2004
Posts: 257
Location: Frankfurt

PostPosted: Wed Sep 21, 2005 9:19 pm    Post subject: Reply with quote

Hmm I also got some problems with apache2/mod_php

http://127.0.0.1/index.php did not work (try to download)
http://localhost/index.php works.

strange, strange, strange....

Romses
Back to top
View user's profile Send private message
GreenDragon
Guru
Guru


Joined: 31 Jul 2003
Posts: 319

PostPosted: Thu Sep 22, 2005 8:50 am    Post subject: Reply with quote

I have problem whith compilling mod_php-4.4.0-r3:
Code:

checking for fopencookie... yes
configure: error: can not run test program while cross compiling

!!! Please attach the config.log to your bug report:
!!! /var/tmp/portage/mod_php-4.4.0-r3/work/php-4.4.0/config.log

!!! ERROR: dev-php/mod_php-4.4.0-r3 failed.
!!! Function econf, Line 496, Exitcode 0
!!! econf failed

My system:
1) gcc (GCC) 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)
2) apache-2.0.54-r31

What can I do? Thank's!!!
Back to top
View user's profile Send private message
llongi
Retired Dev
Retired Dev


Joined: 15 Apr 2004
Posts: 459
Location: Switzerland

PostPosted: Thu Sep 22, 2005 10:45 am    Post subject: Reply with quote

Hi, I've had a similar problem some time ago.
Please post the content of /etc/make.conf, so I may see if the problem is there.
Best regards, CHTEKK.
_________________
Best regards, Luca.
Back to top
View user's profile Send private message
GreenDragon
Guru
Guru


Joined: 31 Jul 2003
Posts: 319

PostPosted: Thu Sep 22, 2005 11:42 am    Post subject: Reply with quote

CHTEKK wrote:
Hi, I've had a similar problem some time ago.
Please post the content of /etc/make.conf, so I may see if the problem is there.
Best regards, CHTEKK.

Hi, CHTEKK, it's my /etc/make.conf:
Code:


USE="x86 -arts alsa 3dnow aalib apache2 crypt dvd encode flash fbcon -java jpeg -kde -gnome libg++ libwww mikmod mbox mmx mpeg ncurses nls nptl oggvorbis opengl pam pnp perl pdflib png python sasl samba sdl slang spell ssl svga sock5 -qtmt tiff tcpd truetype quicktime readline X xml2 xmms xv zlib"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium2 -O3 -pipe"
CXXFLAGS="${CFLAGS}"
ACCEPT_KEYWORDS="~x86"
DISTDIR= /mnt/disk2/gentoo/distfiles/
GENTOO_MIRRORS="http://gentoo.osuosl.org http://ftp.gentoo.skynet.be/pub/gentoo/ ftp://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
RSYNC_RETRIES="3"
RSYNC_TIMEOUT=180
FEATURES="fixpackages"

and
Code:
# emerge --info
Portage 2.0.52-r1 (default-linux/x86/2005.1, gcc-3.4.4, glibc-2.3.5-r1, 2.6.13-gentoo-r2-yumi i686)
=================================================================
System uname: 2.6.13-gentoo-r2-yumi i686 Pentium II (Deschutes)
Gentoo Base System version 1.12.0_pre8
dev-lang/python:     2.3.5, 2.4.1-r1
sys-apps/sandbox:    1.2.13
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.20
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium2 -O3 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium2 -O3 -pipe"
DISTDIR="/mnt/disk2/gentoo/distfiles/"
FEATURES="autoconfig distlocks fixpackages sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.osuosl.org http://ftp.gentoo.skynet.be/pub/gentoo/ ftp://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/"
LANG="ru_RU.KOI8-R"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow X aalib alsa apache2 apm avi berkdb bitmap-fonts crypt cups curl dvd eds emboss encode fam fbcon flash foomaticdb fortran gd gdbm gif gpm gstreamer gtk gtk2 imagemagick imlib ipv6 jpeg ldap libg++ libwww mad mbox mikmod mmx motif mp3 mpeg mysql ncurses nls nptl ogg oggvorbis opengl oss pam pdflib perl png pnp python qt quicktime readline samba sasl sdl slang sock5 spell ssl svga tcpd tiff truetype truetype-fonts type1-fonts vorbis x86 xml2 xmms xv zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTDIR_OVERLAY


Thank's!
Back to top
View user's profile Send private message
llongi
Retired Dev
Retired Dev


Joined: 15 Apr 2004
Posts: 459
Location: Switzerland

PostPosted: Thu Sep 22, 2005 3:32 pm    Post subject: Reply with quote

Hmm ok then this is not the same problem I had. :) Mine was a -mtune=i686 that conflicted with the -march=pentium3, or at least that's what fixed it for me (deleting the mtune I added for tests).
-O3 may be a possibility, try with -O2, but that should not make much difference.
Can you take a look at the config.log that gets created when attempting to emerge the package? This normally is in /var/tmp/portage/<package>/work/<package>/config.log after a failed attempt at emerging a package.
Try to post only relevant parts of it, like where the word "error" pops up, since normally those files are really long. :)
Best regards, CHTEKK.
_________________
Best regards, Luca.
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