Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 187131 - dev-lang/php-5.2.3-r3 fails to work with apache-cgi (500 Internal Server Error for all php pages)
Summary: dev-lang/php-5.2.3-r3 fails to work with apache-cgi (500 Internal Server Erro...
Status: RESOLVED DUPLICATE of bug 187120
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-30 13:47 UTC by Paweł Hajdan, Jr. (RETIRED)
Modified: 2007-08-02 04:17 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2007-07-30 13:47:16 UTC
Fragment of apache's error_log:

[Mon Jul 30 11:00:34 2007] [error] [client 192.168.1.5] Premature end of script
headers: php-cgi
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-07-30 13:51:06 UTC
emerge --info is mandatory in bugs. Thanks. :)
Comment 2 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2007-07-30 13:52:12 UTC
Sure, here it is. Reopening.

Portage 2.1.2.9 (default-linux/amd64/2006.1/desktop, gcc-4.1.2, glibc-2.5-r4, 2.6.20-gentoo-r7 x86_64)
=================================================================
System uname: 2.6.20-gentoo-r7 x86_64 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System release 1.12.9
Timestamp of tree: Sun, 29 Jul 2007 15:50:01 +0000
ccache version 2.4 [enabled]
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.4.4-r4
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.23b
virtual/os-headers:  2.6.21
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/php/apache2-php4/ext-active/ /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php4/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php4/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo"
CXXFLAGS="-march=athlon64 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache collision-protect distlocks fixpackages metadata-transfer parallel-fetch sandbox sfperms strict userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://gd.tuwien.ac.at/opsys/linux/gentoo/ http://mirror.qubenet.net/mirror/gentoo/ http://gentoo.prz.rzeszow.pl http://ftp.uni-erlangen.de/pub/mirrors/gentoo http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://gentoo.zie.pg.gda.pl http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://mirror.switch.ch/ftp/mirror/gentoo/ http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ http://gentoo.tiscali.nl/ http://distfiles.gentoo.org"
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
LINGUAS="en pl"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_EXTRA_OPTS="--human-readable --progress"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X acl acpi alsa amd64 apache2 arts audiofile berkdb bitmap-fonts browserplugin bzip2 cairo caps cdparanoia cdr cli cracklib crypt ctype cups curl dbus dri dvd dvdr dvdread emboss encode exif expat fam ffmpeg firefox foomaticdb force-cgi-redirect fortran ftp gdbm gif gimp gimpprint glut gmp gstreamer gtk gtk2 hal iconv ipv6 isdnlog java javascript jpeg kde lame libg++ logrotate mad midi mikmod mmap mng mono mozilla mp3 mpeg mudflap ncurses nls nptl nptlonly nsplugin nvidia ogg oggvorbis opengl openmp oss pam pcre pdf perl php png ppds pppd python qt3 quicktime readline reflection samba scanner sdl session slang soap spell spl sqlite ssl suhosin svg tcpd theora thunderbird tiff truetype truetype-fonts type1-fonts unicode usb utempter utf8 vorbis xattr xcomposite xml xorg xv xvid zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en pl" USERLAND="GNU" VIDEO_CARDS="nvidia nv"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2007-07-30 14:02:21 UTC
Does mod_php work for you? Also, a bit more of the logs output would be useful.
Comment 4 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2007-07-30 15:43:22 UTC
(In reply to comment #3)
> Does mod_php work for you?

Yes, after recompiling php with apache support turned on, and reconfiguring apache to use mod_php for php5 the problem is gone.

> Also, a bit more of the logs output would be useful.

I don't have much more logs from this event, so I'll just paste everything I have (not much) in hope that you can get some info from the context:

[Mon Jul 30 03:17:20 2007] [notice] Digest: generating secret for digest authent
ication ...
[Mon Jul 30 03:17:20 2007] [notice] Digest: done
[Mon Jul 30 03:17:20 2007] [notice] Apache configured -- resuming normal operati
ons
[Mon Jul 30 10:59:55 2007] [error] [client 192.168.1.5] Premature end of script
headers: php-cgi
[Mon Jul 30 11:00:17 2007] [error] [client 192.168.1.5] Premature end of script
headers: php-cgi
[Mon Jul 30 11:00:26 2007] [error] [client 192.168.1.5] Premature end of script
headers: php-cgi
[Mon Jul 30 11:00:34 2007] [error] [client 192.168.1.5] Premature end of script
headers: php-cgi
Comment 5 Flo 2007-07-31 10:09:33 UTC
I get the same errors with a php-fcgi setup. When i downgrade to the former PHP version everything works fine again. The problem only appears with the Drupal installation, everything else using PHP is working fine (Vbulletin, Typo3).

Portage 2.1.2.9 (hardened/amd64, gcc-3.4.6, glibc-2.5-r4, 2.6.20-hardened-r5 x86_64)
=================================================================
System uname: 2.6.20-hardened-r5 x86_64 AMD Athlon(tm) 64 Processor 3700+
Gentoo Base System release 1.12.9
Timestamp of tree: Sun, 29 Jul 2007 13:30:01 +0000
ccache version 2.4 [enabled]
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.4.4-r4
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.23b
virtual/os-headers:  2.6.21
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -pipe -O2 -fomit-frame-pointer -fforce-addr"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/qmail/alias /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=k8 -pipe -O2 -fomit-frame-pointer -fforce-addr"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow acl acpi amd64 bcmath berkdb bzip2 calendar cgi cracklib crypt ctype erandom exif fastcgi force-cgi-redirect gd gdbm geoip glibc-omitfp hardened iconv imagemagick imap ipv6 ithreads jpeg logrotate maildir memlimit mhash mpm-worker mysql mysqli ncurses nls no-htdocs nptl nptlonly pam pcntl pcre php pic png posix python qmail readline session simplexml slang spamassassin sqlite sqlite3 sse sse2 ssl symlink sysvipc tcpd threads tiff tokenizer truetype udev unicode urandom utf8 vhosts xml xml2 xmlrpc xsl zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="mouse keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 6 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2007-08-01 11:17:14 UTC
Interesting thing about mod_php: after some time of working fine, now I'm affected by bug 187120.
Comment 7 Jakub Moc (RETIRED) gentoo-dev 2007-08-02 04:17:04 UTC

*** This bug has been marked as a duplicate of bug 187120 ***