RE: [PHP-DB] What is a "wrong parameter count" error mean?
| From: | Rich Hutchins | Date: | Fri, 27 Dec 2002 17:10:34 +0000 |
| Subject: | RE: [PHP-DB] What is a "wrong parameter count" error mean? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-24416@lists.php.net to get a copy of this message | ||
Usually it means that you're not passing the expected number of arguments to a function. For
example, the substr() function takes a minimum of two, maximum of three parameters: the string to
search, the start position and the length of the substring to return. To correctly use the function,
you must use the following statement:
substr("my string", 3); which will return "string" OR
substr("my string", 0, 2); which will return "my"
If you only say:
substr("my string") PHP should tell you that you don't have enough parameters to
properly use this function, i.e. the function does not know in what position it should start
returning the substring.
The use of the substr() function in my explanation is not the most important piece of information
here. In fact, it was only used to illustrate a point. What is relevant to your question is
somewhere on line 101 of your code, you are most likely making the mistake of not providing the
proper number of arguments to the ldap_error() function.
For info on the ldap_error function (which only requires one parameter), see:
http://www.php.net/manual/en/function.ldap-error.php
For more info on the substr() function, see http://www.php.net/manual/en/function.substr.php
if you're interested.
Hope this helps.
-----Original Message-----
From: Jody Cleveland [mailto:Cleveland@mail.winnefox.org]
Sent: Friday, December 27, 2002 11:53 AM
To: Php-Db (E-mail)
Subject: [PHP-DB] What is a "wrong parameter count" error mean?
Hello all,
I'm trying to get a php application working that uses ldap. Anyway, when I
try to login, I get this error message:
Warning: Wrong parameter count for ldap_error() in
/var/www/html/mail/mail132/plugins/webcalendar/includes/user-ldap.php on
line 101
What exactly does that mean?
-Jody Cleveland
Winnefox Library System
Computer Support Specialist
cleveland@mail.winnefox.org
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php