Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

mod_php no longer loads after apache update [solved]

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
22 posts • Page 1 of 1
Author
Message
andrewd18
Guru
Guru
User avatar
Posts: 364
Joined: Sun Apr 11, 2004 4:21 pm
Location: Wisconsin, USA

mod_php no longer loads after apache update [solved]

  • Quote

Post by andrewd18 » Mon Sep 19, 2005 8:00 am

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.
Last edited by andrewd18 on Tue Sep 20, 2005 2:32 am, edited 1 time in total.
Keep Your Toolchain Stable! - emwrap.sh

There's no place like ::1
Top
102039
Tux's lil' helper
Tux's lil' helper
Posts: 125
Joined: Wed Mar 16, 2005 1:36 pm

  • Quote

Post by 102039 » Mon Sep 19, 2005 8:13 am

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.
Top
llongi
Retired Dev
Retired Dev
User avatar
Posts: 459
Joined: Thu Apr 15, 2004 8:32 pm
Location: Switzerland
Contact:
Contact llongi
Website

  • Quote

Post by llongi » Mon Sep 19, 2005 8:58 am

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.
Top
andrewd18
Guru
Guru
User avatar
Posts: 364
Joined: Sun Apr 11, 2004 4:21 pm
Location: Wisconsin, USA

  • Quote

Post by andrewd18 » Mon Sep 19, 2005 1:17 pm

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
Top
llongi
Retired Dev
Retired Dev
User avatar
Posts: 459
Joined: Thu Apr 15, 2004 8:32 pm
Location: Switzerland
Contact:
Contact llongi
Website

  • Quote

Post by llongi » Mon Sep 19, 2005 2:22 pm

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.
Top
andrewd18
Guru
Guru
User avatar
Posts: 364
Joined: Sun Apr 11, 2004 4:21 pm
Location: Wisconsin, USA

  • Quote

Post by andrewd18 » Mon Sep 19, 2005 7:25 pm

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
Top
andrewd18
Guru
Guru
User avatar
Posts: 364
Joined: Sun Apr 11, 2004 4:21 pm
Location: Wisconsin, USA

  • Quote

Post by andrewd18 » Mon Sep 19, 2005 7:55 pm

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
Top
gcrew
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 82
Joined: Tue Feb 22, 2005 5:40 am
Location: Poughkeepsie, NY

  • Quote

Post by gcrew » Mon Sep 19, 2005 8:06 pm

The upgrading guide says:
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: Select all

APACHE2_OPTS="-D PHP4"
to my httpd.conf, but then I get the following:

Code: Select all

 * 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: Select all

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

Code: Select all

 * 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.
Top
zomps
n00b
n00b
User avatar
Posts: 59
Joined: Wed Dec 08, 2004 7:35 pm

  • Quote

Post by zomps » Mon Sep 19, 2005 8:09 pm

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.
Top
dtremblay
n00b
n00b
User avatar
Posts: 22
Joined: Wed Jan 19, 2005 2:36 pm
Location: Halifax
Contact:
Contact dtremblay
Website

PHP4 setting

  • Quote

Post by dtremblay » Mon Sep 19, 2005 8:11 pm

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

Mine says

Code: Select all

APACHE2_OPTS="-D DEFAULT_VHOST -D SSL -D DOC -D PHP4"
Daniel Tremblay
Halifax, NS Canada
Top
andrewd18
Guru
Guru
User avatar
Posts: 364
Joined: Sun Apr 11, 2004 4:21 pm
Location: Wisconsin, USA

Re: PHP4 setting

  • Quote

Post by andrewd18 » Mon Sep 19, 2005 8:16 pm

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

Mine says

Code: Select all

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
Top
gcrew
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 82
Joined: Tue Feb 22, 2005 5:40 am
Location: Poughkeepsie, NY

  • Quote

Post by gcrew » Mon Sep 19, 2005 8:19 pm

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?
Top
gcrew
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 82
Joined: Tue Feb 22, 2005 5:40 am
Location: Poughkeepsie, NY

  • Quote

Post by gcrew » Mon Sep 19, 2005 8:28 pm

I'm sorry. It is working. My browser was using the broken page from its cache. Thanks for the help.
Top
andrewd18
Guru
Guru
User avatar
Posts: 364
Joined: Sun Apr 11, 2004 4:21 pm
Location: Wisconsin, USA

  • Quote

Post by andrewd18 » Mon Sep 19, 2005 8:31 pm

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
Top
DiStefano
n00b
n00b
User avatar
Posts: 9
Joined: Mon Jan 19, 2004 7:06 pm

  • Quote

Post by DiStefano » Mon Sep 19, 2005 10:19 pm

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.
Top
llongi
Retired Dev
Retired Dev
User avatar
Posts: 459
Joined: Thu Apr 15, 2004 8:32 pm
Location: Switzerland
Contact:
Contact llongi
Website

  • Quote

Post by llongi » Mon Sep 19, 2005 10:45 pm

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.
Top
andrewd18
Guru
Guru
User avatar
Posts: 364
Joined: Sun Apr 11, 2004 4:21 pm
Location: Wisconsin, USA

  • Quote

Post by andrewd18 » Tue Sep 20, 2005 2:32 am

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
Top
Romses
Apprentice
Apprentice
User avatar
Posts: 257
Joined: Tue Jan 20, 2004 2:33 pm
Location: Frankfurt

  • Quote

Post by Romses » Wed Sep 21, 2005 9:19 pm

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
Top
GreenDragon
Guru
Guru
Posts: 319
Joined: Thu Jul 31, 2003 7:16 am

  • Quote

Post by GreenDragon » Thu Sep 22, 2005 8:50 am

I have problem whith compilling mod_php-4.4.0-r3:

Code: Select all

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!!!
Top
llongi
Retired Dev
Retired Dev
User avatar
Posts: 459
Joined: Thu Apr 15, 2004 8:32 pm
Location: Switzerland
Contact:
Contact llongi
Website

  • Quote

Post by llongi » Thu Sep 22, 2005 10:45 am

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.
Top
GreenDragon
Guru
Guru
Posts: 319
Joined: Thu Jul 31, 2003 7:16 am

  • Quote

Post by GreenDragon » Thu Sep 22, 2005 11:42 am

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: Select all


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: Select all

# 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!
Top
llongi
Retired Dev
Retired Dev
User avatar
Posts: 459
Joined: Thu Apr 15, 2004 8:32 pm
Location: Switzerland
Contact:
Contact llongi
Website

  • Quote

Post by llongi » Thu Sep 22, 2005 3:32 pm

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.
Top
Post Reply

22 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic