note 82918 added to function.ldap-connect
| From: | geigersatbinghamtondotedu at osu1 dot php dot net | Date: | Thu, 01 May 2008 20:04:54 +0000 |
| Subject: | note 82918 added to function.ldap-connect | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-138978@lists.php.net to get a copy of this message | ||
If you have oci8 and are trying to use openldap for ldap you *may* run into a problem. I have an
Oracle database that I connect to from apache. Oracle also has ldap libs which were taking
precedence over the openldap libs. This would cause a seg fault when calling ldap_connect with a
uri style connect string; e.g. ldap_connect("ldaps://myldapserver.host");
After using gdb to debug a core dump and a lot of googling I found that the solution was to add an
env-var to apachectl startup.
I am using Apache 2.2.8 with PHP 5.2.5 on RHEL. I added:
LD_PRELOAD=/path/to/libldap.so
export LD_PRELOAD
in /usr/sbin/envvars which is read when apachectl starts. You can read more on this here: http://www.mail-archive.com/php-bugs@lists.php.net/msg02201.html
Scott Geiger
----
Server IP: 69.147.83.197
Probable Submitter: 128.226.61.204
----
Manual Page -- http://www.php.net/manual/en/function.ldap-connect.php
Edit -- https://master.php.net/note/edit/82918
Del: integrated -- https://master.php.net/note/delete/82918/integrated
Del: useless -- https://master.php.net/note/delete/82918/useless
Del: bad code -- https://master.php.net/note/delete/82918/bad+code
Del: spam -- https://master.php.net/note/delete/82918/spam
Del: non-english -- https://master.php.net/note/delete/82918/non-english
Del: in docs -- https://master.php.net/note/delete/82918/in+docs
Del: other reasons-- https://master.php.net/note/delete/82918
Reject -- https://master.php.net/note/reject/82918
Search -- https://master.php.net/manage/user-notes.php