php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14569 Apache crashes with "Illegal instruction"
Submitted: 2001-12-17 17:41 UTC Modified: 2002-01-05 15:03 UTC
From: xalkina at otenet dot gr Assigned:
Status: Not a bug Package: Apache related
PHP Version: 4.1.0 OS: linux
Private report: No CVE-ID: None
 [2001-12-17 17:41 UTC] xalkina at otenet dot gr
PHP/4.1.0 is compiled as a dynamic module for Apache/1.3.22.

When it is compiled --with-mysql=/usr, the server crashes with a SIGILL.

When it is compiled --without-mysql, the server starts normally and waits for requests.

Apache is compiled with dynamic modules and loads them per the default configuration. mod_dav, mod_roaming, mod_php3 are also loaded, but they don't seem to affect the behaviour. I checked the procedure both with & without PHP/3.0.18.

Both PHP/3.0.18 & PHP/4.1.0 are compiled with --enable-versioning.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-12-17 17:42 UTC] derick@php.net
What is your full configur eline fro PHP 4 ?
 [2001-12-17 17:52 UTC] xalkina at otenet dot gr
These are all the options used to configure PHP/4.1.0. It's an excerpt from a script used in an RPM build.

./configure \
	--prefix=/usr \
\
	--with-apxs="`rpm -ql xalkina-apache | grep bin/apxs`" \
\
	--with-exec-dir=/usr/local/lib/php \
	--with-config-file-path=/etc/httpd \
\
	--with-system-regex \
	--enable-versioning \
	--enable-sysvsem \
	--enable-sysvshm \
	--disable-maintainer-mode \
	--disable-dmalloc \
\
	--without-tsrm-pthreads \
	--without-gd \
	--without-gettext \
	--with-ldap=/usr \
	--without-recode \
	--without-ttf \
	--without-xml \
	--without-gdbm \
	--without-ndbm \
	--without-db2 \
	--without-dbm \
	--without-cdb \
	--without-mcrypt \
	--without-mhash \
	--without-yp \
	--without-imap \
	--without-imsp \
	--without-imagick \
	--without-mck \
	--without-openssl \
	--without-snmp \
	--without-hyperwave \
	--without-zlib \
	--without-pdflib \
	--without-cpdflib \
	--without-fdftk \
\
	--without-adabas \
	--without-msql \
	--without-mysql \
	--without-oracle \
	--without-oci8 \
	--without-iodbc \
	--without-openlink \
	--without-sybase \
	--without-sybase-ct \
	--without-pgsql \
	--without-ibm-db2 \
	--without-solid \
	--without-empress \
	--without-velocis \
	--without-informix \
	--without-interbase \
	--without-custom-odbc \
	--without-dbase \
	--without-filepro \
	--without-ovrimos \
\
	--enable-safe-mode \
	--enable-track-vars \
	--enable-memory-limit \
	--disable-display-source \
	--disable-url-fopen-wrapper

 [2001-12-17 17:56 UTC] derick@php.net
You need to compile MySQL support in with this switch:
--enable-mysql=/path/to/mysql

The bundled libraries conflict with the libraries mod_php3 uses.

Not a bug > bogus
 [2001-12-17 18:34 UTC] xalkina at otenet dot gr
Solves the problem, but should I notice that it happened even without php3...

Is there any documentation on this kind of problems? Even now that I know the solution, I cannot find anything in the search.
 [2001-12-17 18:42 UTC] derick@php.net
After ./configure has finished it prints this:

+--------------------------------------------------------------------+
|                        *** WARNING ***                             |
|                                                                    |
| You chose to compile PHP with the built-in MySQL support.  If you  |
| are compiling a server module, and intend to use other server      |
| modules that also use MySQL (e.g, mod_auth_mysql, PHP 3.0,         |
| mod_perl) you must NOT rely on PHP's built-in MySQL support, and   |
| instead build it with your local MySQL support files, by adding    |
| --with-mysql=/path/to/mysql to your configure line.                |
+--------------------------------------------------------------------+

I think that's clear enough :)

Derick
 [2001-12-17 18:57 UTC] xalkina at otenet dot gr
Mind you, but this has nothing to do with it!

First of all, the server crashes even when the only module using MySQL loaded is php4. mod_roaming isn't using MySQL, mod_dav isn't using MySQL, and none of the default Apache modules is using MySQL.

Second, it was never compiled with the bundled MySQL files, it was always, repeat: ALWAYS, compiled --with-mysql=/usr.

Third, the notice does not suggest using the --enable-WHATEVER way :-)

BTW, the change I notice in the new module, is this: it does not link with libmysqlclient.so & libpthread.so anymore. (Same thing happens with PHP/3 that worked correctly). I originally though it had something to do with threads, that's why I added the --without-tsrm-whatever options to configure.
 [2002-01-05 15:03 UTC] xalkina at otenet dot gr
Similar thing happened when trying to include OCI8 support with php4. This time, apache SIGSEGVd.

After doing some search on Google, got to this page http://phpora.sourceforge.net/scenario_401-816.php, suggesting that Apache should be linked with pthread.

Rebuilding apache with -lpthread and than using --with-mysql & --with-oci8 as described in PHP documentation to build php4, everything works just fine!


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Apr 28 22:01:29 2024 UTC