#34484 [Fbk->Opn]: mod_php 5/PaX/apache2 problem: apache2 refuses to load mod_php
| From: | Sjhutman at xs4all dot nl | Date: | Tue, 13 Sep 2005 16:22:40 +0000 |
| Subject: | #34484 [Fbk->Opn]: mod_php 5/PaX/apache2 problem: apache2 refuses to load mod_php | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-84997@lists.php.net to get a copy of this message | ||
ID: 34484
User updated by: Sjhutman at xs4all dot nl
Reported By: Sjhutman at xs4all dot nl
-Status: Feedback
+Status: Open
Bug Type: MySQL related
Operating System: HLFS
PHP Version: 5.1.0RC1
New Comment:
Adding --with-pic to the configure line didn't work. I already tried
that and i've given it a second try after your comment. It didn't work.
Libphp5.so still contains TEXTREL
Output of readelf -d /usr/lib/apache/libphp5.so | grep TEXTREL
0x00000016 (TEXTREL) 0x0
Previous Comments:
------------------------------------------------------------------------
[2005-09-13 15:39:58] sniper@php.net
If I understood this correctly, it's caused by the fact that we build
non-PIC by default. So adding --with-pic to your configure line should
"fix" this "bug".
------------------------------------------------------------------------
[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