HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- HP-UX apache 2.0.49: php calling ldap_connect core...
Operating System - HP-UX
1826123
Members
4719
Online
109690
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
02-03-2005 08:41 PM
02-03-2005 08:41 PM
HP-UX apache 2.0.49: php calling ldap_connect core dumps
we've got the HP-UX apache-based web-server running (currently at 2.0.49) and are trying to develop ldap queries from PHP scripts.
A call to ldap_connect("ldap.server.com", 389)
just returns an invalid connection, so the initialization fails.
A call to lcap_connect("ldap://ldap.server.com/") even core dumps.
We downloaded this apache from www.software.hp.com and since 2.0.48 the web-server should contain everything necessary to use ldap functions from within PHP.
Any tips, ideas?
Thanks
Herbert
A call to ldap_connect("ldap.server.com", 389)
just returns an invalid connection, so the initialization fails.
A call to lcap_connect("ldap://ldap.server.com/") even core dumps.
We downloaded this apache from www.software.hp.com and since 2.0.48 the web-server should contain everything necessary to use ldap functions from within PHP.
Any tips, ideas?
Thanks
Herbert
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2005 09:37 PM
02-03-2005 09:37 PM
Re: HP-UX apache 2.0.49: php calling ldap_connect core dumps
I do it this way. Using the hostname of the domain controller didn't work even though it resolves fine using nslookup/nsquery, so I used the IP.
#!/opt/perl/bin/perl
use Net::LDAP;
my $uid = $ARGV[0];
$ldap = Net::LDAP->new( 'IP-address-of-Domain-controller' ) or die "$@";
$mesg = $ldap->bind ;
$mesg = $ldap->search(
base => 'c=UK',
scope => 'sub',
filter => "(&(uid=$uid))"
);
my $max = $mesg->count;
for ( $i = 0 ; $i < $max ; $i++ ) {
my $entry = $mesg->entry ( $i );
foreach my $attr ( $entry->attributes ) {
print "$attr : ";
print $entry->get_value( $attr ) . "\n";
}
}
print "\n";
#!/opt/perl/bin/perl
use Net::LDAP;
my $uid = $ARGV[0];
$ldap = Net::LDAP->new( 'IP-address-of-Domain-controller' ) or die "$@";
$mesg = $ldap->bind ;
$mesg = $ldap->search(
base => 'c=UK',
scope => 'sub',
filter => "(&(uid=$uid))"
);
my $max = $mesg->count;
for ( $i = 0 ; $i < $max ; $i++ ) {
my $entry = $mesg->entry ( $i );
foreach my $attr ( $entry->attributes ) {
print "$attr : ";
print $entry->get_value( $attr ) . "\n";
}
}
print "\n";
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2005 12:33 AM
02-04-2005 12:33 AM
Re: HP-UX apache 2.0.49: php calling ldap_connect core dumps
Thanks for the PERL example, it works on the same Unix machine, but as my problem is in PHP, it did not really help solve my problem.
In the meantime apache/PHP is upgraded to the latest version 2.0.52/4.3.8 from software.hp.com.
Situation did not really improve, the ldap_connect now get a resource identifier with ldap_connect("servername", 389) but then the ldap_bind fails with "can't connect to the LDAP server". The ldap_connect("ldap://servername/") still core-dumps.
I'm not using secure ldap, no SSL, just plain unprotected LDAP connection.
As mentioned above: the LDAP server itself definitely works, it'd the company main LDAP, and can be connected from my PC with a LDAP-browser applet and with the PERL tool in the other reply. Just not with PHP.
Any clues?
Herbert
In the meantime apache/PHP is upgraded to the latest version 2.0.52/4.3.8 from software.hp.com.
Situation did not really improve, the ldap_connect now get a resource identifier with ldap_connect("servername", 389) but then the ldap_bind fails with "can't connect to the LDAP server". The ldap_connect("ldap://servername/") still core-dumps.
I'm not using secure ldap, no SSL, just plain unprotected LDAP connection.
As mentioned above: the LDAP server itself definitely works, it'd the company main LDAP, and can be connected from my PC with a LDAP-browser applet and with the PERL tool in the other reply. Just not with PHP.
Any clues?
Herbert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2005 10:26 AM
12-10-2005 10:26 AM
Re: HP-UX apache 2.0.49: php calling ldap_connect core dumps
Ups, I forgot to post the resolution here that I found a few week later after I had give up at first.
...
order of PHP module includes!
We are using a PHP module to access an Oracle Database. Obviously the oracle shared libraries also contain a function ldap_connect.... so when the Oracle module was included FIRST in the PHP configuration, before the LDAP include, the ldap functions wouldn't work. Or better probably the Oracle functions have a different syntax, maybe they would work if I used the right function parameters.
Changing the ORDER solves my problem: first include the LDAP functions and then Oracle. In this order both the Oracle Database access functions and my LDAP code works well!
Regards
Herbert
...
order of PHP module includes!
We are using a PHP module to access an Oracle Database. Obviously the oracle shared libraries also contain a function ldap_connect.... so when the Oracle module was included FIRST in the PHP configuration, before the LDAP include, the ldap functions wouldn't work. Or better probably the Oracle functions have a different syntax, maybe they would work if I used the right function parameters.
Changing the ORDER solves my problem: first include the LDAP functions and then Oracle. In this order both the Oracle Database access functions and my LDAP code works well!
Regards
Herbert
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP