php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61450 oci8, open ldap not working
Submitted: 2012-03-20 10:10 UTC Modified: 2013-10-04 23:12 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:2 (100.0%)
From: pratheeshrajan18 at gmail dot com Assigned: sixd (profile)
Status: Closed Package: LDAP related
PHP Version: trunk-SVN-2012-03-20 (SVN) OS: Linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: pratheeshrajan18 at gmail dot com
New email:
PHP Version: OS:

 

 [2012-03-20 10:10 UTC] pratheeshrajan18 at gmail dot com
Description:
------------
ldap functionality is not working when i configure ldap and oci8 together.

I am getting "Out of memory" error while trying ldap. But, when i disabled oci8, it worked well. Could some one help please..

My configuration looks like

'./configure' '--with-apxs2=/appl/apache3/bin/apxs' '--with-mysql=/appl/mysql/' '--with-zlib' '--prefix=/appl/php5.2.9' '--enable-sockets' '--with-ldap' '--with-oci8=instantclient,/usr/lib/oracle/11.1/client64/lib/' '--enable-mbstring' '--with-mysqli' '--with-xmlrpc' '--with-libxml-dir' '--with-openssl' '--with-pcre-dir' '--with-pspell' '--enable-soap' '--with-xmlrpc' '--with-curl' '--enable-exif' '--with-gd' 

I tried changing the order of ldap and oci8 in the config, that also didn't work for me.

All thoughts welcome

Thanks,
Prats

Test script:
---------------
Sample code
-----------

<?php

$ldapServer = "ldap://ldap.example.com";
$ldaprdn = "my user";
$ldappass = "my pass";

$ldap_conn = ldap_connect($ldapServer);

$ldapbind =ldap_bind($ldap_conn);


if($ldapbind) {
echo "success";
} else {

echo "LDAP-Errno: " . ldap_err2str(ldap_errno($ldap_conn)) . "<br />\n";
echo "binding failed"; echo "::::";

Getting the ldap error no: 10.

Could any one have any idea ? 


Thanks in advance :)

Prats.



Patches

Pull Requests

Pull requests:

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-03-20 10:14 UTC] pratheeshrajan18 at gmail dot com
changed to right package
 [2012-03-20 10:14 UTC] pratheeshrajan18 at gmail dot com
-Package: *General Issues +Package: LDAP related
 [2012-03-24 01:56 UTC] sixd@php.net
The best solution is to build PHP without OCI8, and then build OCI8 as a shared 
extension.

There are hack solutions that may or may not work like editing Makefile, 
changing INCLUDES to remove the -I Oracle include directory, and adding that -I 
option explicitly to every oci8*.c file.

Also see the patch https://github.com/cjbj/php-
src/commit/68b1abcd789711586c481feb12b985e5807ebeaa
 [2013-09-30 11:31 UTC] mike@php.net
-Assigned To: +Assigned To: sixd
 [2013-09-30 11:31 UTC] mike@php.net
Hi Chris, could you have a quick look on this PR, please?
 [2013-10-04 23:12 UTC] sixd@php.net
-Status: Assigned +Status: Closed
 [2013-10-04 23:12 UTC] sixd@php.net
I've patched PHP 5.5. and the master branches to allow the ldap
extension to be compiled with Oracle's LDAP implementation, if
desired.  Note the implementations differ so you will see different
ldap behavior.

The patch allows configuration similar to:
--with-ldap=$HOME/instantclient --with-oci8=instantclient,$HOME/instantclient

The patch doesn't support configuration similar to:
--with-ldap --with-oci8=instantclient,$HOME/instantclient
since this would try and mix the default LDAP and Oracle LDAP
implementations.

Regardless of this patch, my recommended way to install both OCI8 and
ldap extensions is to statically configure PHP with ldap, and then add
OCI8 as a shared extension from PECL.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 12 12:01:27 2024 UTC