- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Problem with ldap.sl extension for PHP in HPW...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-07-2009 07:04 AM
тАО04-07-2009 07:04 AM
Problem with ldap.sl extension for PHP in HPWS22
I have the next problem,
I am trying to connect to a LDAP(Active Directory) server from PHP using the ldap.sl extension provided in the HPWS distribution of PHP.
The version of HPWS is B3.0, Apache 2.2.8 PHP version 5.2.6. (HPUX 11.23 Itanium64)
I have tested the same code with the same version of PHP running in windows and works perfect.
I have used ldapsearch to test the connection with the ldap server and it works perfect also.
I have made a direct socket connection from php to the server through the 386 port, and works.
But every time that I try to connect to my ldap server through php I receive the same error
Warning: ldap_bind() [function.ldap-bind]: Unable to bind to server: Unknown error
I think that the problem is a bad configuration of the php extension, as the script works in another system, and ldapsearch too, but I don't know where is exactly the problem.
I have uncommented the appropriate line in the php.ini
extension=ldap.sl
and nothing else, this should be enough following the hpws documentation
┬┐There are any more steps necessary to active this extension?
The code is the following:
echo "Connecting ...".$server.":".$port;
ldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, 7);
$ds=ldap_connect($server); // must be a valid LDAP server!
print(" Error Code ".ldap_errno($ds)."\n");
echo "connect result is " . $ds . "
";
if ($ds) {
if (ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3)) {
echo "LDAPv3";
} else {
echo "Erorr setting LDAP version 3";
}
ldap_set_option($ds, LDAP_OPT_REFERRALS, 0);
echo "Binding ...";
$r=ldap_bind($ds,$user,$password)
or die("Can't bind to server.");
ldap_get_option($ds, LDAP_OPT_ERROR_STRING,$error);
print(" Error Code ".ldap_errno($ds)."\n");
print(" Error Code ".$error."\n");
// read-only access
if ($r) {
echo "Bind result is " . $r . "
";
}
}
Any one has idea about this problem? I would appreciate any help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-07-2009 07:17 AM
тАО04-07-2009 07:17 AM
Re: Problem with ldap.sl extension for PHP in HPWS22
Isn't that message just special?
Warning: ldap_bind() [function.ldap-bind]: Unable to bind to server: Unknown error
First check the ldap server for any record of communication. That might be helpful in finding the cause.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-07-2009 07:50 AM
тАО04-07-2009 07:50 AM
Re: Problem with ldap.sl extension for PHP in HPWS22
thanks for your quick response.
that is the message that I receive, the ldap_bind function return a null value.
Unfortunately I can't check the connection in the ldap Server, but if I try with the ldapsearch utility or with the same script from an Apache in a Windows Server it works so the Server is up.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-07-2009 07:59 AM
тАО04-07-2009 07:59 AM
Re: Problem with ldap.sl extension for PHP in HPWS22
thanks for your quick response.
that is the message that I receive, the ldap_bind function return a null value.
In the error_log appears these lines :
ldap_create
ldap_err2string
Unfortunately I can't check the connection in the ldap Server, but if I try with the ldapsearch utility or with the same script from an Apache in a Windows Server it works so the Server is up.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-08-2009 06:57 AM
тАО04-08-2009 06:57 AM
Re: Problem with ldap.sl extension for PHP in HPWS22
I had activated two extesions
oci8.sl and ldap.sl, deactivating the first extension the error(oci) the output change and now i get this error in the error log:
Unsatisfied code symbol 'ldap_bind_s' in load module
Some idea?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-12-2009 10:01 PM
тАО04-12-2009 10:01 PM
Re: Problem with ldap.sl extension for PHP in HPWS22
your service contract. I think the symtom is a defect for Apache
2.2.8.
I was able to reproduce your symptom on 11.23 with Apache
B.2.2.8.01 (HP WSS v3.01) or B.2.2.8.02 (HP WSS v3.02). But I can
not encounter the problem on Apache B.2.0.58.01 (very old
WSS :-).
It seems to me the symbol 'ldap_bind' is undefined in B.2.2.8.
# nm /opt/hpws22/apache/modules/mod_ldap.so | grep ldap_bind
#
# nm /opt/hpws22/apache/php/lib/php/extensions/ldap.sl | grep ldap_bind
[183] | 0| 0|FUNC |GLOB |0| UNDEF|ldap_bind_s
[148] | 4611686018427410144| 912|FUNC |GLOB |0| .text|zif_ldap_bind
#
On the other hand, Apache 2.0.x has it:
# nm /opt/hpws/apache/modules/mod_ldap.so | grep ldap_bind
[3761] | 4611686018428770944| 224|FUNC |GLOB |0| .text|ldap_bind
[4607] | 4611686018428771200| 240|FUNC |GLOB |0| .text|ldap_bind_s
#
# nm /opt/hpws/apache/php/lib/php/extensions/ldap.sl | grep ldap_bind
[710] | 4611686018427572544| 224|FUNC |GLOB |0| .text|ldap_bind
[877] | 4611686018427572832| 240|FUNC |GLOB |0| .text|ldap_bind_s
[701] | 4611686018427511552| 512|FUNC |GLOB |0| .text|zif_ldap_bind
#
Shinji
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-12-2009 10:38 PM
тАО04-12-2009 10:38 PM
Re: Problem with ldap.sl extension for PHP in HPWS22
> nm /opt/hpws22/apache/modules/mod_ldap.so | grep ldap_bind
The proper command for shlibs is "elfdump -n .dynsym -s", not nm. This handles the case of striped shlibs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-15-2009 12:45 AM
тАО04-15-2009 12:45 AM
Re: Problem with ldap.sl extension for PHP in HPWS22
I discussed this symptom with the lab. The lab built a new ldap.sl
for Apache 2.2.8. I confirmed the new ldap.sl works correctly. Now
this defect was filed as QXCR1000920656. I asked the lab the next WSS
release version provide the new ldap.sl.
Shinji
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-15-2009 08:36 AM
тАО04-15-2009 08:36 AM
Re: Problem with ldap.sl extension for PHP in HPWS22
so as i anderstand this is a bug in the ldap.sl of this Apache version, that will be solved in a future HPWS version, isn't it?
In this case i will try to use another strategy to solve my actual problem and i will try again in the future.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-15-2009 01:28 PM
тАО04-15-2009 01:28 PM