php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27528 Configuring php 5.0.0b4 from source with options below causes Apache2 to hang
Submitted: 2004-03-08 15:51 UTC Modified: 2004-04-07 09:00 UTC
From: josh at netbits dot us Assigned:
Status: Not a bug Package: Apache2 related
PHP Version: 5.0.0RC1 OS: Linux SuSE 8.1
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: josh at netbits dot us
New email:
PHP Version: OS:

 

 [2004-03-08 15:51 UTC] josh at netbits dot us
Description:
------------
I compiled php 5.0.0b4 on a SuSE linux system.

uname -a: Linux langly 2.4.19-4GB #1 Mon Aug 4 23:38:42 UTC 2003 i686 unknown

gcc -v: Reading specs from /usr/lib/gcc-lib/i486-suse-linux/3.2/specs
Configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib --enable-languages=c,c++,f77,objc,java,ada --enable-libgcj --with-gxx-include-dir=/usr/include/g++ --with-slibdir=/lib --with-system-zlib --enable-shared --enable-__cxa_atexit i486-suse-linux
Thread model: posix
gcc version 3.2

The configure command used the following options:

./configure \
--with-config-file-path=/etc/httpd \
--enable-libgcc \
--enable-sigchild \
--enable-track-vars \
--disable-ipv6 \
\
--with-apxs2=/usr/local/apache/bin/apxs \
\
--enable-exif \
--enable-ftp \
--enable-sockets \
--with-mcrypt \
--with-mhash \
--with-openssl \
--with-iconv \
--with-ncurses \
--with-readline \
--with-curl \
\
--with-bz2 \
--with-zip \
--with-zlib \
\
--with-mysql=/usr/local/mysql \
--with-mysql-sock=/usr/local/mysql/mysql.sock \
\
--with-pgsql=/usr/local/pgsql \
\
--with-oci8 \
\
--with-sqlite \
\
--with-gd \
--with-ttf \
--with-freetype \
--with-freetype-dir=/usr/X11/lib \
--with-png-dir=/usr \
--with-jpeg-dir=/usr \
--with-tiff-dir=/usr \
--with-xpm-dir=/usr \
\
--enable-xml \
--enable-wddx \
--with-xsl \
--with-expat-dir=/usr \
--with-libxml-dir=/usr/local \
--with-xmlrpc \
--with-dom \
--with-qtdom \
\
--with-java=/usr/local/java/ 

After installation and restarting apache (2.0.48), only one apache process is spawned - no additional threads are started.  Attempts to access web pages with or without PhP hang until timing out - no messages are generated in the Apache error or access log.  Single Apache process needs to be killed with kill -9.  Re-instating PhP-4.3.4 module causes behavior to return to normal.  

ldd /usr/local/apache/modules/libphp5.so

        libcrypt.so.1 => /lib/libcrypt.so.1 (0x402a7000)
        libexslt.so.0 => /usr/local/lib/libexslt.so.0 (0x402d8000)
        libexpat.so.0 => /usr/lib/libexpat.so.0 (0x402e7000)
        libhistory.so.4 => /lib/libhistory.so.4 (0x40307000)
        libreadline.so.4 => /lib/libreadline.so.4 (0x4030f000)
        libncurses.so.5 => /lib/libncurses.so.5 (0x4033b000)
        libpq.so.3 => /usr/local/pgsql-7.4.1/lib/libpq.so.3 (0x4037e000)
        libpanel.so.5 => /usr/lib/libpanel.so.5 (0x40398000)
        libmysqlclient.so.14 => /usr/local/mysql-5.0.0-alpha/lib/mysql/libmysqlclient.so.14 (0x4039c000)
        libmhash.so.2 => /usr/lib/libmhash.so.2 (0x40484000)
        libmcrypt.so.4 => /usr/local/lib/libmcrypt.so.4 (0x404a6000)
        libltdl.so.3 => /usr/lib/libltdl.so.3 (0x404db000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x404e2000)
        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x40524000)
        libXpm.so.4 => /usr/X11R6/lib/libXpm.so.4 (0x4061c000)
        libpng12.so.0 => /usr/lib/libpng12.so.0 (0x4062b000)
        libz.so.1 => /lib/libz.so.1 (0x4065b000)
        libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x4066a000)
        libbz2.so.1 => /usr/lib/libbz2.so.1 (0x40688000)
        libssl.so.0.9.6 => /usr/lib/libssl.so.0.9.6 (0x40698000)
        libcrypto.so.0.9.6 => /usr/lib/libcrypto.so.0.9.6 (0x406c8000)
        libresolv.so.2 => /lib/libresolv.so.2 (0x4079e000)
        libm.so.6 => /lib/libm.so.6 (0x407b0000)
        libdl.so.2 => /lib/libdl.so.2 (0x407d3000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x407d6000)
        libcurl.so.2 => /usr/local/lib/libcurl.so.2 (0x407eb000)
        libclntsh.so.8.0 => /opt/oracle/product/8i/lib/libclntsh.so.8.0 (0x40815000)
        libxslt.so.1 => /usr/local/lib/libxslt.so.1 (0x40d89000)
        libxml2.so.2 => /usr/local/lib/libxml2.so.2 (0x40db9000)
        libc.so.6 => /lib/libc.so.6 (0x40ea9000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x40fc7000)
        libwtc8.so => /opt/oracle/product/8i/lib/libwtc8.so (0x40fdc000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)

Other information:

MySQL 5.0, curl-7.11.0, libmcrypt-2.5.7, libxml2-2.6.7, and libxslt-1.1.4 built from source.

# java -version
java version "1.4.2_03"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_03-b02)
Java HotSpot(TM) Client VM (build 1.4.2_03-b02, mixed mode)

I will attempt to build from CVS.

Josh

Reproduce code:
---------------
N/A

Expected result:
----------------
N/A

Actual result:
--------------
N/A

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-03-09 08:43 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip

And try this for PHP:

# ./configure --disable-all --with-apxs2=/usr/local/apache/bin/apxs
# make && make install
# /usr/local/apache/bin/apachectl stop
# /usr/local/apache/bin/apachectl start

Also, make sure you're NOT loading any other PHP versions the same time in your apache httpd.conf (some distros come with preinstalled PHP, so..)


 [2004-03-09 11:58 UTC] josh at netbits dot us
# ./configure --disable-all --with-apxs2=/usr/local/apache/bin/apxs
# make && make install
# /usr/local/apache/bin/apachectl stop
# /usr/local/apache/bin/apachectl start

Using the php-5.0.0b4 release with these options works fine.  Of course, it's not very useful.  :)

Also verified that httpd.conf did not contain additional load_module calls.  I do not install any disto software for php/apache/mysql/etc and control all of this by building from source.

Josh
 [2004-03-09 11:59 UTC] josh at netbits dot us
Forgot, I also tried my original configure commands with CVS snapshot from yesterday afternoon - same results.
 [2004-03-09 18:29 UTC] iliaa@php.net
Please isolate the problem to a particular module (by 
adding 1 module at a time to your configure). 
 [2004-03-23 13:39 UTC] josh at trutwins dot homeip dot net
Also, noticed the following in php error log:

[23-Mar-2004 12:39:03] PHP Warning:  PHP Startup: ??j@`?j@: Unable to initialize module
Module compiled with module API=20020429, debug=0, thread-safety=0
PHP    compiled with module API=20040316, debug=0, thread-safety=0
These options need to match
 in Unknown on line 0

This was tried with the following configure options.

./configure \
--with-config-file-path=/etc/httpd \
--enable-libgcc \
--enable-sigchild \
--enable-track-vars \
--disable-ipv6 \
\
--with-apxs2=/usr/local/apache/bin/apxs
 [2004-04-07 04:52 UTC] sniper@php.net
User error, loading an old extension compiled with some older PHP version -> OF COURSE it won't work..

 [2004-04-07 09:00 UTC] josh at netbits dot us
./configure \
--with-config-file-path=/etc/httpd \
--enable-libgcc \
--enable-sigchild \
--enable-track-vars \
--disable-ipv6 \
\
--with-apxs2=/usr/local/apache/bin/apxs

Which of these options would cause: "User error, loading an old extension compiled with some older PHP version".  Based on the configure used above, there are no "extensions" being built into this fresh compilation of PhP.

Last I checked, php was an interpreted language, not a compiler, how would I "compile with some older PHP version"?

I'd be willing to accept this bug being attributed to "user error" with a little more explanation of why instead of "of course it won't work".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jul 01 04:01:29 2024 UTC