ldap_connect segmentation faults
| From: | Ron Martinez | Date: | Tue, 09 Apr 2002 15:31:39 +0000 |
| Subject: | ldap_connect segmentation faults | ||
| Groups: | php.install | ||
| Request: | Send a blank email to php-install+get-6596@lists.php.net to get a copy of this message | ||
Hi everyone,
Just curious if anyone has come across this problem. I have Apache 1.3.23 installed on my system.
Next, I installed OpenLDAP 2.0.23 on my system and subsequently installed PHP 4.1.2 with LDAP
support.
When I start my webserver, everything appears fine. When I view phpinfo(), it says that it has LDAP
support.
However, when I try to run a small php script where I run PHP's ldap_connect() function, I get
the following segmentation fault in my error_log:
[notice] child pid 14624 exit signal Segmentation fault (11)
Here's the script:
<?php
echo "Connecting...";
$connection=ldap_connect("ldap_server_ip");
echo "connect result is " .$connection."<p>";
?>
The LDAP server I'm trying to connect to is a different box than my webserver.
Another curious thing I noticed is if I try running other LDAP functions in the script, such as
ldap_add() or ldap_bind(), and not give it any parameters; my error log will state the following:
[error] PHP Warning: Wrong parameter count for ldap_add() in
/usr/local/apache_1.3.23/htdocs/test.php on line 6
[error] PHP Warning: Wrong parameter count for ldap_bind() in
/usr/local/apache_1.3.23/htdocs/test.php on line 6
However, if I try the same thing for ldap_connect(), not giving it any parameters, I still get the
segmentation fault above.
My system is as follows:
AIX 4.3.3
Apache 1.3.23
PHP 4.1.2
OpenLDAP 2.0.23
Here's the configure lines:
Apache:
./configure --prefix=/usr/local/apache_1.3.23 --enable-rule=SHARED_CORE --enable-module=so
--enable-shared=max
PHP:
export CC="cc"
export CFLAGS="-g -ma"
./configure --prefix=/usr/local/php_4.1.2 --with-apxs=/usr/local/apache_1.3.23/bin/apxs
--with-ldap=/usr/local/openldap_2.0.23 --without-mysql
OpenLDAP:
./configure --prefix=/usr/local/openldap_2.0.23 --disable-slapd --disable-slurpd
Any help would be appreciated.
Thanks,
Ron