ID: 34484
User updated by: Sjhutman at xs4all dot nl
Reported By: Sjhutman at xs4all dot nl
-Status: Bogus
+Status: Open
Bug Type: MySQL related
Operating System: HLFS
PHP Version: 5.1.0RC1
New Comment:
a) Mysql 5.x is not released as stable yet.
b) PHP works fine with release versions, like 4.1.x
Both versions of MySQL normally work fine. But I'm using GrSecurity/Pax
in the kernel. Pax prevents ELF text relocations. If I compile php with
the switch --with-mysql=/xxx/xxx/ and if I start apache after the
installation of PHP I get the error:
Apache fails to start when loading libphp5.so. I get the following
error: cannot make segment writable for relocation: Permission denied.
The problem occurred both with MySQL 4.1.x and 5.1
More information is available at this link:
http://bugs.gentoo.org/show_bug.cgi?id=92776
Previous Comments:
------------------------------------------------------------------------
[2005-09-12 23:28:15] sniper@php.net
a) Mysql 5.x is not released as stable yet.
b) PHP works fine with release versions, like 4.1.x
Please contact Mysql about this, it's obviously something wrong with
their libs, not PHP.
------------------------------------------------------------------------
[2005-09-12 22:49:41] Sjhutman at xs4all dot nl
Description:
------------
Mod_php/PaX/apache2 problem: apache2 refuses to load mod_php when ELF
relocations are prevented by PaX
Apache fails to start when loading libphp5.so. I get the following
error: cannot make segment writable for relocation: Permission denied.
I've traced the error back to the switch
--with-mysql=/usr/local/mysql/. If I compile php without that switch I
don't get the error.
The culprit of the error is TEXT RELOCATION. If I use the command:
readelf -d $ /usr/lib/apache/libphp5.so | grep TEXTREL. I can see that
TEXTREL is being used. Which is causing the problems. I'm using the
latest version of mysql (5.0.12)
Switches used to compile PHP:
./configure --prefix=/usr/local/php5 --with-apxs2=/usr/sbin/apxs
--disable-cli --disable-cgi --disable-rpath --disable-short-tags
--disable-ipv6 --disable-all --with-openssl --with-zlib
--enable-mbstring=all --with-pcre-regex -enable-session --without-pear
--with-mysql=/usr/local/mysql/
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34484&edit=1