ID: 19937
User updated by: ryan.smith@openwave.com
Reported By: ryan.smith@openwave.com
-Status: Feedback
+Status: Open
Bug Type: Dynamic loading
Operating System: AIX 5.1
PHP Version: 4.2.3
New Comment:
No, the libphp4.so loads fine into apache. It's the PHP extensions
which PHP loads, which do not load. For example, ldap. Or the sample
module in the documentation.
I set CC and CXX so that I use the IBM compiler and not gcc.
(Although if I try with gcc, I get a core dump when the extensions
load).
Previous Comments:
------------------------------------------------------------------------
[2002-10-18 16:25:14] sniper@php.net
Exactly which module doesn't load? libphp4.so into apache?
Or some shared extension into PHP?
And why do you set 'CC' and 'CXX' before running configure?
Why do you pass configure '--enable-shared' ??
------------------------------------------------------------------------
[2002-10-16 13:46:31] ryan.smith@openwave.com
I've additionally tried compiling the provided ldap extension as a
shared object, using the PHP build system, but that fails to load as
well.
------------------------------------------------------------------------
[2002-10-16 12:25:51] ryan.smith@openwave.com
Attempting to dynamically load a module fails under AIX. The error
message is:
PHP Warning: Unable to load dynamic library
'/usr/HTTPServer/libexec/firstmod.so' - Invalid argument in Unknown on
line 0
This indicates that the failure occurs during the DL_LOAD.
The module does exist, and can be loaded with dlopen() in a test
program. PHP is being loaded as a dynamic module within the IBM HTTP
server (based on Apache 1.3.12).
PHP was configured with:
CC='cc_r' \
CXX='xlC_r -E' \
'./configure' \
'--enable-c9x-inline' \
'--enable-shared' \
'--with-apxs=/usr/HTTPServer/bin/apxs' \
'--without-mysql' \
'--with-ldap=/users/rysmith/apache/openldap-2.0.25_AIX'
I've tried compiling the module in many ways:
(Simple)
cc -c test2.c
cc -G -o firstmod.so test2.o
(from sample IBM DSO makefile)
xlC_r -c -I /users/rysmith/apache/php-4.2.3/Zend -I
/users/rysmith/apache/php-4.2.3 -I/users/rysmith/apache/php-4.2.3/main
-I/users/rysmith/apache/php-4.2.3/TSRM -DAIX=42 -U__STR__
-DAIX_BIND_PROCESSOR -DUSE_HSREGEX -O2 -DSHARED_MODULE firstmod.c && mv
firstmod.o firstmod.lo
ld -H512 -T512 -bhalt:4 -bM:SRE -bnoentry
-bI:/users/rysmith/apache/php-4.2.3/ext/ryan/libphp4.exp -bE:`echo
firstmod.so|sed -e 's:\.so$:.exp:'` -lc -o firstmod.so firstmod.lo
Attempting to load the module from within a PHP script also fails in
the same way.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=19937&edit=1