#26656 [Opn]: ldap_set_option() while LDAP is compiled.

2003-12-17 Thread venaas
 ID:   26656
 Updated by:   [EMAIL PROTECTED]
 Reported By:  herps at raqtweak dot com
 Status:   Open
 Bug Type: LDAP related
 Operating System: RedHat 6.0
 PHP Version:  4.3.4
 New Comment:

I don't remember for sure, but I think you need at least
OpenLDAP 2.0 for ldap_set_option() to be there. If you
don't use this function in your scripts, you shouldn't
worry too much, but in general I would suggest installing
more up to date LDAP libraries. OpenLDAP 1 is getting quite
old.


Previous Comments:


[2003-12-17 16:48:02] herps at raqtweak dot com

Description:

For some reason I keep getting:

Fatal error: Call to undefined function: ldap_set_option()

However, my PHP is compiled with --with-ldap and it compiles just
fine.
A PHP info also shows LDAP just fine...

However, this exact same script, same system, compiled with PHP 4.1.2
same configure options gives a GOOD result...

Can someone please advise?!!
I have installed:
openldap-1.2.9-6
openldap-devel-1.2.9-6








-- 
Edit this bug report at http://bugs.php.net/?id=26656edit=1


#20319 [Opn-Bgs]: array_diff error with array contain NULL values.

2002-11-10 Thread venaas
 ID:   20319
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: Arrays related
 Operating System: Linux RedHat
 PHP Version:  4.2.2
 New Comment:

In PHP '' == NULL, so I think it's correct that array_diff()
treats them the same. It removes all elements from the 1st
argument that are equal (normal PHP equality) to any element
in the other arguments.



Previous Comments:


[2002-11-08 14:36:00] [EMAIL PROTECTED]

This work !!!

$arr1 = array('Color' = '');
$arr2 = array('Img1' = 3, 'Img2' = 2, 'Color' = 'Yellow');
print_r(array_diff($arr1, $arr2));

Return : Array ( [Color] = ) 

This not work!!!

$arr1 = array('Color' = '');
$arr2 = array('Img1' = NULL, 'Img2' = 2, 'Color' = 'Yellow');
print_r(array_diff($arr1, $arr2));

Return : Array () 

This work !!!

$arr1 = array('Color' = 'Red');
$arr2 = array('Img1' = NULL, 'Img2' = 2, 'Color' = 'Yellow');
print_r(array_diff($arr1, $arr2));


When your array contain NULL value the array diff does not recognize
that Color is different. But if Color is not empty and different in
both array the return value is corect.

Sorry for my english !

Yanik




-- 
Edit this bug report at http://bugs.php.net/?id=20319edit=1




#19494 [Opn-Csd]: ldap_bind() fails and doesnt use bind-dn

2002-10-10 Thread venaas

 ID:   19494
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: LDAP related
 Operating System: Linux 2.4.17
 PHP Version:  4.2.2 and 4.3.0-dev
 New Comment:

When you use OpenLDAP 2 or other libraries that use the
new LDAP API, ldap_connect() will only create some state
on the client, the server is not contacted until you later
do an LDAP operation like search or bind. There are no DNS
lookups either, so ldap_connect(jlkdsfjsdk) will be
successful. This means that ldap_connect() will almost
always return true, while later operations might very well fail.

Another difference worth noting, is that for anonymous
access there is no more need for ldap_bind(). You just
do your search.



Previous Comments:


[2002-09-24 04:26:52] [EMAIL PROTECTED]

this is what the config line looks like:
$CONFIG[ldap_server] = ldaps://my.ldap.server;
and then i do:
$ds=ldap_connect($CONFIG[ldap_server]);

even if there would be a difference shouldnt be the result of
ldap_connect be FALSE.
and ldap_error($ds) give an error

From the docs:

 Returns a positive LDAP link identifier on success, or FALSE on error.



[2002-09-24 04:15:52] [EMAIL PROTECTED]

If $CONFIG[ldap-server] is defined as ldaps://my.ldap.server then
it's exactly the same for PHP.
There is NO way that this could be a problem. Are you very sure there
isn't a trailing newline or a \0 somehwere?

Derick



[2002-09-24 04:12:47] [EMAIL PROTECTED]

Well it seems like ldap_connect has some problem.
1. Scenario
$ds=ldap_connect($CONFIG[ldap_server]);
- echo $ldap_error($ds) say Success but ldap_bind fails
(also $ds is true and var_dump says ressource (X) of type (ldap
link))
2. Scenario
$ds=ldap_connect(ldaps://my.ldap.server);
- echo $ldap_error($ds) say success and ldap_bind works.

of course $CONFIG[ldap-server] is defined as ldaps://my.ldap.server
i checked that 3 times.

So is this right that ldap_connect says everything is OK though it is
not really ?

Chris



[2002-09-23 08:54:10] [EMAIL PROTECTED]

very funny, when i use URL-syntax in ldap_connect it works. the state
after the ldap_connect seems to be identical except that the ldap_bind
now works with and without bind-dn



[2002-09-23 01:43:27] [EMAIL PROTECTED]

thought that too after i read that on some other bug here. i tried with
ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3) still no change.



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/19494

-- 
Edit this bug report at http://bugs.php.net/?id=19494edit=1




#12223 [NoF-Csd]: ldap rebind procedure implementation

2002-09-20 Thread venaas

 ID:   12223
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   No Feedback
+Status:   Closed
 Bug Type: LDAP related
 Operating System: any
 PHP Version:  4.0.6
 Assigned To:  venaas
 New Comment:

You need to use OpenLDAP 2.1.x. The OpenLDAP API had two
parameters and was changed to three in 2.1. It's much
more difficult to implement using the old two parameter
call. I suggest you use the 2.1 API.


Previous Comments:


[2002-09-18 00:44:01] [EMAIL PROTECTED]

Attempted to use this function with php 4.2.2 and OpenLDAP 2.0.23-4 and
it did not work.  Apparently, changes to the OpenLDAP API function
declaration of ldap_set_rebind_proc were made from 3 parameters to 2
causing the php function to be excluded from the build.  Anyone have
info on how to fix?



[2002-05-25 08:58:50] [EMAIL PROTECTED]

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to Open. Thank you.





[2001-12-29 12:49:59] [EMAIL PROTECTED]

There is now an experimental implementation. Please test it.
It currently requires you to use the OpenLDAP HEAD library.



[2001-07-18 04:21:41] [EMAIL PROTECTED]

A ldap rebind procedure for automatical referral chase is
not provided in php4. The solution of #9704 doesn't work
for ldap_add et al., as these functions do not return a
ldap result. This is an inherent problem with synchronous
ldap calls.

I have written an implementation of ldap_set_rebind_proc
registering a php rebind callback. A patch is available on
request (or would it be ok to attach a 240-line patch
here?). The patch is vs. ext/ldap/ldap.c 1.90 from CVS.

Enrik





-- 
Edit this bug report at http://bugs.php.net/?id=12223edit=1




#19494 [Opn]: ldap_bind() fails and doesnt use bind-dn

2002-09-20 Thread venaas

 ID:   19494
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: LDAP related
 Operating System: Linux 2.4.17
 PHP Version:  4.2.2 and 4.3.0-dev
 New Comment:

I'm not so sure this is the problem, but are you running
OpenLDAP 2.1 server? By default it only accepts LDAPv3
binds, and the API by default do LDAPv2 binds. IF you do,
try to tell the API to use v3 binds using ldap_set_option().


Previous Comments:


[2002-09-19 07:14:23] [EMAIL PROTECTED]

It's most likely some problem with your ldap server.
Have you tried to connect to some public ldap server?

unlikely because i use it for nss_ldap and pam_ldap login on several
machines also as i wrote in the very beginning it binds but without the
given bind-dn

Also, try adding 'echo ldap_error($ds);' after the ldap_connect()
call.
this prints Success



[2002-09-19 07:00:00] [EMAIL PROTECTED]

It's most likely some problem with your ldap server.
Have you tried to connect to some public ldap server?

Also, try adding 'echo ldap_error($ds);' after the ldap_connect()
call.





[2002-09-19 06:44:31] [EMAIL PROTECTED]

My script calls 
$ds=ldap_connect(my.ldap.server);
ldap_bind($ds); // or ldap_bind($ds,$my_user_dn,$my_user_pass)

I expected PHP to return TRUE on ldap_connect()

It gave me: Warning: ldap_bind(): Unable to bind to server: Can't
contact LDAP server

PHP Version 4.3.0-dev
Configure Command  './configure' '--with-mysql'
'--with-apxs=/usr/local/apache/bin/apxs' '--with-ldap'

MySQL Support enabled
Active Persistent Links 1
Active Links 1
Client API version 3.23.49
MYSQL_MODULE_TYPE builtin
MYSQL_SOCKET /tmp/mysql.sock

LDAP Support enabled
RCS Version $Id: ldap.c,v 1.128 2002/09/05 11:22:20 hyanantha Exp $
Total Links 0/unlimited
API Version 2004
Vendor Name OpenLDAP
Vendor Version 20015



[2002-09-19 05:37:30] [EMAIL PROTECTED]

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to Open.

Thank you for your interest in PHP.






[2002-09-19 05:02:08] [EMAIL PROTECTED]

Alos Tested with 4.3.0-dev.

$ds=ldap_connect(myserver) works var_dump($ds) gives resource(X) of
type (ldap link)
ldap_bind returns Warning: ldap_bind(): Unable to bind to server:
Can't contact LDAP server.
The LDAP Server (OpenLdap) always shows an anonymous bind no matter if
i bind with user or not. After each bind i get a mysql-service-lookup
on that connection. Maybe something 
like in bug #17350 with oracle ?

Chris




-- 
Edit this bug report at http://bugs.php.net/?id=19494edit=1




#19520 [Opn-Bgs]: ldap bind true

2002-09-20 Thread venaas

 ID:   19520
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: LDAP related
 Operating System: Windows NT
 PHP Version:  4.2.2
 New Comment:

Yes, especially if $user_dn is non-empty. PHP returns true
only if the LDAP API's ldap_bind_s() function returns
LDAP_SUCCESS. I'm pretty sure that the API function
behaves the same, so this might be a problem with the
LDAP API implementation. Are you sure that $user_dn is
non-empty? I'm marking this as bogus since I'm pretty sure
it's not a problem in PHP.



Previous Comments:


[2002-09-20 04:21:58] [EMAIL PROTECTED]

$user_ldappassword = ;


  # connect to ldap
  echo brtrying to connect to ldap...;
  $ldap = ldap_connect($ldap_host);
  if(!$ldap)
echo brCan't etablish connection to .$ldap_host;
  else
echo brConnection etablished to .$ldap_host;

  # get dn (if you don't know)
  $bind_dn = ldap_bind($ldap); // anonymous
  $search_dn = ldap_search($ldap,o=awp,uid=.$user_ldapid);
  $result_dn = ldap_get_entries($ldap,$search_dn);
  
  for($i=0; $i  $result_dn['count']; $i++)
$user_dn = $result_dn[$i]['dn'];
  echo brdn: .$user_dn;

  # get authed
  $auth_bind = ldap_bind($ldap,$user_dn,$user_ldappassword);
  if($auth_bind)
echo brYou are in!;
  else
echo brYou are out!;

  # close connection to ldap
  ldap_close($ldap);
___

try to get non-anonymous bind with userpassword =  (empty string),
the bind returns 1 and no error! (like this: LDAP: Unable to bind to
server: Inappropriate authentication in ...)

that's odd, isn't it?




-- 
Edit this bug report at http://bugs.php.net/?id=19520edit=1




Bug #14388 Updated: include_path in virtual breaks SSI

2002-05-02 Thread venaas

 ID:   14388
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Closed
+Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: FreeBSD 4.4-STABLE
 PHP Version:  4.0.6
 New Comment:

This seems to be a real problem and not solved, so I'm
reopening


Previous Comments:


[2002-05-02 04:23:04] [EMAIL PROTECTED]

Apache 1.3.23, php 4.1.2, HP-UX 10.20 and Linux (RedHat 7.1)

I have the same problem. I want to have both PHP and SSI
working on my server. I don't want to use PHP to generate SSI, I just
want to use both PHP and SSI separately
for different things.

I have tried various configurations, but when I use 
'php_value include_path .:/path/htdocs/php-mal' anywhere
in my httpd.conf SSI just stops working. The server outputs
the SSI file unparsed. A typical configuration example 
looks like this:

 Directory /path/htdocs
Options IncludesNOEXEC FollowSymLinks
XBitHack full
php_value include_path .:/path/htdocs/php-mal
 /Directory

I have tried to move php_value around, but this does
not help.

If I set the include_path in php.ini everything works 
as expected and I can use both PHP and SSI. But I _really_
need to assign a different include_path for php for each
of my virtual web-servers, and I need both PHP and SSI.

I have verified this behaviour both on a HP-UX server with 
several virtual hosts, and on a Linux server without 
virtual hosts, both running Apache 1.3.23 and php 4.1.2.

The problem reported at 
URL:http://marc.theaimsgroup.com/?l=apache-httpd-usersm=101233512816689w=2
might be related.

I would be really grateful if someone could try to 
reprocuce this error, and even more grateful for a
solution. But I have not even been able to find out if
this error is caused by php, mod_include or something
in the apache core.

What more could I do to help you solve this problem?



[2002-01-03 18:01:12] [EMAIL PROTECTED]

No feedback. Closing.



[2001-12-13 06:21:46] [EMAIL PROTECTED]

Apache 1.3.x doesn't support multiple filters over one file. You can't
parse the output of a PHP file through SSI. (Apache 2.x can do that)
Are you sure that isn't the case?



[2001-12-09 00:54:29] [EMAIL PROTECTED]

Using the following in VirtualHost in httpd.conf (apache 1.3.22):
php_value include_path .:/path/to/include/dir

breaks SSI for that virtual ... View-Source for pages show include
directives instead of parsing them.

Using XBitHack on.

php recompiled today: mod_php4-4.0.6_5






-- 
Edit this bug report at http://bugs.php.net/?id=14388edit=1