Reply to Re: [PHP] ldap_connect error

Your name:

Reply:


Posted by Richard Lynch on 04/19/05 05:34

On Mon, April 18, 2005 2:43 am, Steve Turnbull said:
> I am running a LAMP setup consisting of Debian (testing), PHP4, Apache2,
> and
> MySQL 4.
>
> When I installed php, I used apt-get, and included in the list of modules
> was libapache2_mod_php4 php4 php4-ldap ...
>
> PHP works fine, and a test phpinfo() brings up all of the expected
> parameters (at least I think it does).
>
> The one thing that doesn't work is ldap. I have enabled the ldap modules -
> a2enmod ldap - and this doesn't throw an error, it just prompts for the
> apache restart which in turn restarts fine.
>
> BUT if I run a very simple ldap_connect (see script) I get this error;
>
> Fatal error: Call to undefined function: ldap_connect()
> in /www/stevedev/vhtdocs/ldap/index.php on line 27
>
> So it appears that the ldap hasn't got itself running with php.
>
> The very simple test script I used was;
>
> $ds = ldap_connect('ldap.<our server>.net');
> if ($ds) {
> ldap_bind($ds);
> echo 'connected';
> } else {
> echo 'not connected';
> }
>
> Has any one got any ideas of why this error get thrown?

Sounds to me like you've installed:
LDAP
PHP
but you have *not* installed the PHP-LDAP module.

Search in your apt-get thingie for something like "php_ldap" or "phpldap"
which will be the PHP extension that lets PHP actually use LDAP, as
opposed to just happening to have both LDAP and PHP installed on the same
machine.

--
Like Music?
http://l-i-e.com/artists.htm

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация