dcparham Posted July 1, 2009 Share Posted July 1, 2009 forgive if this's alread posted, found nothing, and precious little on the internet regarding LDAP not in phpinfo(). am getting errormsg "call to undefined function ldap_connect". i installed using "sudo apt-get install php5-ldap" and restarted Apache; ALSO there is no LDAP section in phpinfo(). what files need what settings/configurations to ensure LDAP is working? i feel like i am spending way too much time on this step! Link to comment https://forums.phpfreaks.com/topic/164410-call-to-undefined-function-ldap_connect-and-ldap-section-not-in-phpinfo/ Share on other sites More sharing options...
flyhoney Posted July 1, 2009 Share Posted July 1, 2009 Are you on a Windows or *nix machine? You probably need to add the ldap extension to your php.ini file. Link to comment https://forums.phpfreaks.com/topic/164410-call-to-undefined-function-ldap_connect-and-ldap-section-not-in-phpinfo/#findComment-867288 Share on other sites More sharing options...
dcparham Posted July 1, 2009 Author Share Posted July 1, 2009 hello, fly - BTW "Ubuntu 8.04" [sorry did not specify before!]; i added to the correct php.ini file, in the area that looks like where the extension statement would go, by simply pasting: "extension=mod_ldap.so" no quotes. here is the section of the php.ini: ;;;;;;;;;;;;;;;;;;;;;; ; Dynamic Extensions ; ;;;;;;;;;;;;;;;;;;;;;; ; ; If you wish to have an extension loaded automatically, use the following ; syntax: ; ; extension=modulename.extension ; ; For example, on Windows: ; ; extension=msql.dll ; ; ... or under UNIX: ; ; extension=msql.so extension=mod_ldap.so ; ; Note that it should be the name of the module only; no directory information ; needs to go here. Specify the location of the extension with the ; extension_dir directive above. THEN restarted apache, reran phpinfo(), and there is no LDAP section. i even added to my code what your salutation footer shows: "error_reporting(E_ALL);" and "ini_set('display_errors', 1);" the phpinfo() when searching for LDAP via ctl-f and by eye - no LDAP section; mention of some ldap files but no ldap section. any ideas? Link to comment https://forums.phpfreaks.com/topic/164410-call-to-undefined-function-ldap_connect-and-ldap-section-not-in-phpinfo/#findComment-867375 Share on other sites More sharing options...
flyhoney Posted July 1, 2009 Share Posted July 1, 2009 Is mod_ldap.so in your php extensions directory? Link to comment https://forums.phpfreaks.com/topic/164410-call-to-undefined-function-ldap_connect-and-ldap-section-not-in-phpinfo/#findComment-867407 Share on other sites More sharing options...
dcparham Posted July 1, 2009 Author Share Posted July 1, 2009 hi, Fly - one would think a simple "where is Ubuntu extensions directory?" would yield something, but so far i do not know where that directory is - is it different that the Extensions section of php.ini? ["Dynamic Extensions"]. see the code i posted: it is in the "Dynamic Extensions" section, yes - not sure URL's are allowed but if so, this url showed the syntax as i entered it: http://www.linuxquestions.org/questions/ubuntu-63/just-installed-ubuntu...-got-a-question-ldapphp-505689/. i had added the extension=mod_ldap.so in the php.ini file. thx again for your help! Link to comment https://forums.phpfreaks.com/topic/164410-call-to-undefined-function-ldap_connect-and-ldap-section-not-in-phpinfo/#findComment-867421 Share on other sites More sharing options...
dcparham Posted July 1, 2009 Author Share Posted July 1, 2009 ok - using your terminology exactly got me farther, and found in /usr/lib/php5/ldap.so - so i added in php.ini Dynamic Extensions section stmt: extension=ldap.so - and now i am [!viola!] at least seeing this in the phpinfo() [will copy and paste from the "ldap" section that now exists in phpinfo()]: ldap LDAP Support enabled RCS Version $Id: ldap.c,v 1.161.2.3.2.11 2007/07/17 09:09:42 jani Exp $ Total Links 0/unlimited API Version 3001 Vendor Name OpenLDAP Vendor Version 20409 SASL Support Enabled now, the "undefined function ldap_connect" has disappeared, and in its place is [again]: "Search: Can't contact LDAP server" - round and round we go. the line that causes the error is: $results = ldap_search($ldapLink, $dn, "givenName=[person's first name here]"); [shifting wall-banging helmet due to poor scalp-padding] ((([8]))) Link to comment https://forums.phpfreaks.com/topic/164410-call-to-undefined-function-ldap_connect-and-ldap-section-not-in-phpinfo/#findComment-867428 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.