#39003 [Com]: __autoload unnecessarily called for type hinting

2006-10-01 Thread judas dot iscariote at gmail dot com
 ID:   39003
 Comment by:   judas dot iscariote at gmail dot com
 Reported By:  christoph at ziegenberg dot de
 Status:   Open
 Bug Type: Performance problem
 Operating System: WinXP SP2
 PHP Version:  5.1.6
 New Comment:

if this is the expected behaviuor ( at least, not the behaviuor I
expect ;) ) it is not mentioned in the manual, so either the manual or
the engine needs to be corrected ;-)


Previous Comments:


[2006-09-30 10:05:56] christoph at ziegenberg dot de

Description:

if i check if a variable is an instance of specific class with
instanceof and the class i check for has not been loaded,
__autoloader() is not called (as expected).

if i do the same check by type hinting, the __autoloader() function
is called, which normally leads to including the required class file
and so unnecessarily consumes memory and time.

Reproduce code:
---
?php
error_reporting(E_ALL);
class ClassName
{
public $var = 'bla';
}
function test (OtherClassName $object)
{

}
function __autoload($class)
{
print try to load class $class;
}
$obj = new ClassName;
if (!($obj instanceof OtherClassName))
{
echo no instance of OtherClassNamebr /;
}
test($obj);
?

Expected result:

no instance of OtherClassName

Actual result:
--
no instance of OtherClassName
try to load class OtherClassName
Fatal error: Class 'OtherClassName' not found in [...] on line 7





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


#39003 [Opn]: __autoload unnecessarily called for type hinting

2006-10-01 Thread christoph at ziegenberg dot de
 ID:   39003
 User updated by:  christoph at ziegenberg dot de
 Reported By:  christoph at ziegenberg dot de
 Status:   Open
 Bug Type: Performance problem
 Operating System: WinXP SP2
 PHP Version:  5.1.6
 New Comment:

My version of the manual says this (from the example code):

// Fatal Error: Argument 1 must be an instance of OtherClass
$foo = new stdClass;
$myclass-test($foo);

So I should get the error Fatal error: Argument 1 passed to test()
must be an instance of OtherClassName, called in [...], but I get the
error Fatal error: Class 'OtherClassName' not found in [...].

Of course these are both fatal errors, but the one hand I expect
another behaviour for the autoloader function as described and on the
other hand the correct error message would help to debug the code,
because the current error only refers to the __autoloader() function
(so you have to use debug_backtrace()/debug_print_backtrace()).


Previous Comments:


[2006-10-01 06:07:57] judas dot iscariote at gmail dot com

if this is the expected behaviuor ( at least, not the behaviuor I
expect ;) ) it is not mentioned in the manual, so either the manual or
the engine needs to be corrected ;-)



[2006-09-30 10:05:56] christoph at ziegenberg dot de

Description:

if i check if a variable is an instance of specific class with
instanceof and the class i check for has not been loaded,
__autoloader() is not called (as expected).

if i do the same check by type hinting, the __autoloader() function
is called, which normally leads to including the required class file
and so unnecessarily consumes memory and time.

Reproduce code:
---
?php
error_reporting(E_ALL);
class ClassName
{
public $var = 'bla';
}
function test (OtherClassName $object)
{

}
function __autoload($class)
{
print try to load class $class;
}
$obj = new ClassName;
if (!($obj instanceof OtherClassName))
{
echo no instance of OtherClassNamebr /;
}
test($obj);
?

Expected result:

no instance of OtherClassName

Actual result:
--
no instance of OtherClassName
try to load class OtherClassName
Fatal error: Class 'OtherClassName' not found in [...] on line 7





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


#38819 [Opn]: segfault in ldap_get_entries()

2006-10-01 Thread madcoder at gmail dot com
 ID:   38819
 User updated by:  madcoder at gmail dot com
 Reported By:  madcoder at gmail dot com
 Status:   Open
 Bug Type: LDAP related
-Operating System: 2.6.15-gentoo linux amd64
+Operating System: 2.6.17-gentoo linux amd64
 PHP Version:  5.1.6
 New Comment:

For reference, I'm cross-posting a bug report I've opened with OpenLDAP
(ITS# 4690) in case they can provide any further information:
http://www.openldap.org/its/index.cgi/Incoming?id=4690;expression=ldap_get_values;statetype=-1


Previous Comments:


[2006-09-30 03:37:13] madcoder at gmail dot com

Any other ideas?  This problem is kind of a blocker for me right now...
 I still don't understand why it works fine inside valgrind, but it
segfaults on its own and inside gdb.  I know it's segfaulting because
of the message Cannot access memory at address 0x55a0bfe0, so the for
loop checking vals[i] obviously fails.  But what steps can I take to
debug this further?

It could be a problem in openldap, since the line in php's ldap.c just
before it calls the openldap function 'ldap_count_values' is
ldap_get_values(), which is what is returning the memory address of
0x55a0bfe0.  But if it were in fact a problem with openldap, would the
cli ldapsearch fail as well?



[2006-09-26 11:08:50] madcoder at gmail dot com

I've tried, but the program doesn't segfault, so it exits normally. 
I'm not very experienced with gdb, so I'm not sure how to give it a
breakpoint of ldap_count_values (I tried 'break ldap_count_values' and
'break ldap_count_values()', and it doesn't break).

It does still return the information as expected.



[2006-09-26 10:57:53] [EMAIL PROTECTED]

Is it possible to perform the same actions using ldapsearch utility in
console?



[2006-09-26 10:43:23] madcoder at gmail dot com

Program received signal SIGSEGV, Segmentation fault.
0x2af2b2e5f0ab in ldap_count_values (vals=0x55a07f90) at
getvalues.c:153
153 for ( i = 0; vals[i] != NULL; i++ )
(gdb) p vals
$1 = (char **) 0x55a07f90
(gdb) p 0
$2 = 0
(gdb) p vals[0]
Cannot access memory at address 0x55a07f90

The memory address is the same.  Can't access memory?  It seems like
its a problem in php's ldap_get_entries still (or further up the stack)
because ldap_count_entries(), which calls the same function, works fine
and returns '1'.



[2006-09-26 10:38:38] [EMAIL PROTECTED]

And what is in vals[0] ?
(gdb) p vals[0]



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/38819

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


#37103 [Asn-Fbk]: libmbfl headers not installed

2006-10-01 Thread hirokawa
 ID:   37103
 Updated by:   [EMAIL PROTECTED]
 Reported By:  Fedora at FamilleCollet dot com
-Status:   Assigned
+Status:   Feedback
 Bug Type: mbstring related
 Operating System: Linux (Fedora)
 PHP Version:  5.1.6
 Assigned To:  hirokawa
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip




Previous Comments:


[2006-09-26 22:23:00] [EMAIL PROTECTED]

Assigned to the maintainer.



[2006-09-19 16:26:40] Fedora at FamilleCollet dot com

For php-5.2.0

I don't understand permissions on ext/mbstring/libmbfl/mbfl/mbfl_defs.h
(rwxr-xr-x) while other headers are rw-r--r--

I think the '*' in the config.m4 file is the problem.
So i change my previous patch to simply remove it and the packaging is
complete with all the headers (and mailparse pecl extension build
fine).

--- ext/mbstring/config.m4.orig 2006-09-18 17:46:08.0 +0200
+++ ext/mbstring/config.m4  2006-09-18 17:47:08.0 +0200
@@ -302,7 +302,7 @@
   dnl libmbfl is required
   PHP_MBSTRING_SETUP_LIBMBFL
   PHP_MBSTRING_EXTENSION
-  PHP_INSTALL_HEADERS([ext/mbstring], [libmbfl/config.h
libmbfl/mbfl/eaw_table.h libmbfl/mbfl/mbfilter.h
libmbfl/mbfl/mbfilter_8bit.h libmbfl/mbfl/mbfilter_pass.h
libmbfl/mbfl/mbfilter_wchar.h libmbfl/mbfl/mbfl_allocators.h
libmbfl/mbfl/mbfl_consts.h libmbfl/mbfl/mbfl_convert.h
libmbfl/mbfl/mbfl_defs.h* libmbfl/mbfl/mbfl_encoding.h
libmbfl/mbfl/mbfl_filter_output.h libmbfl/mbfl/mbfl_ident.h
libmbfl/mbfl/mbfl_language.h libmbfl/mbfl/mbfl_memory_device.h
libmbfl/mbfl/mbfl_string.h ])
+  PHP_INSTALL_HEADERS([ext/mbstring], [libmbfl/config.h
libmbfl/mbfl/eaw_table.h libmbfl/mbfl/mbfilter.h
libmbfl/mbfl/mbfilter_8bit.h libmbfl/mbfl/mbfilter_pass.h
libmbfl/mbfl/mbfilter_wchar.h libmbfl/mbfl/mbfl_allocators.h
libmbfl/mbfl/mbfl_consts.h libmbfl/mbfl/mbfl_convert.h
libmbfl/mbfl/mbfl_defs.h  libmbfl/mbfl/mbfl_encoding.h
libmbfl/mbfl/mbfl_filter_output.h libmbfl/mbfl/mbfl_ident.h
libmbfl/mbfl/mbfl_language.h libmbfl/mbfl/mbfl_memory_device.h
libmbfl/mbfl/mbfl_string.h ])
 fi

 # vim600: sts=2 sw=2 et



[2006-09-18 15:55:09] Fedora at FamilleCollet dot com

Still present in php-5.1.6 (only half corrected)

Patch :
--- ext/mbstring/config.m4.orig 2006-07-24 18:07:44.0 +0200
+++ ext/mbstring/config.m4  2006-07-24 18:08:03.0 +0200
@@ -293,7 +293,7 @@
   dnl libmbfl is required
   PHP_MBSTRING_SETUP_LIBMBFL
   PHP_MBSTRING_EXTENSION
-  PHP_INSTALL_HEADERS([ext/mbstring], [libmbfl/ libmbfl/mbfl])
+  PHP_INSTALL_HEADERS([ext/mbstring], [libmbfl/ libmbfl/mbfl/])
 fi
 
 # vim600: sts=2 sw=2 et


Even present in php-5.2.0RC5-dev (missing only one file : mbfl_defs.h)

Patch :
--- ext/mbstring/config.m4.orig 2006-09-18 17:46:08.0 +0200
+++ ext/mbstring/config.m4  2006-09-18 17:47:08.0 +0200
@@ -302,7 +302,7 @@
   dnl libmbfl is required
   PHP_MBSTRING_SETUP_LIBMBFL
   PHP_MBSTRING_EXTENSION
-  PHP_INSTALL_HEADERS([ext/mbstring], [libmbfl/config.h
libmbfl/mbfl/eaw_table.h libmbfl/mbfl/mbfilter.h
libmbfl/mbfl/mbfilter_8bit.h libmbfl/mbfl/mbfilter_pass.h
libmbfl/mbfl/mbfilter_wchar.h libmbfl/mbfl/mbfl_allocators.h
libmbfl/mbfl/mbfl_consts.h libmbfl/mbfl/mbfl_convert.h
libmbfl/mbfl/mbfl_defs.h* libmbfl/mbfl/mbfl_encoding.h
libmbfl/mbfl/mbfl_filter_output.h libmbfl/mbfl/mbfl_ident.h
libmbfl/mbfl/mbfl_language.h libmbfl/mbfl/mbfl_memory_device.h
libmbfl/mbfl/mbfl_string.h ])
+  PHP_INSTALL_HEADERS([ext/mbstring], [libmbfl/ libmbfl/mbfl/])
 fi
 
 # vim600: sts=2 sw=2 et



[2006-04-17 22:14:35] [EMAIL PROTECTED]

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.





[2006-04-17 12:07:35] Fedora at FamilleCollet dot com

Here is the little patch i use witch solve the problem
Hope this help.

--- ext/mbstring/config.m4.orig 2006-04-17 12:41:13.0 +0200
+++ ext/mbstring/config.m4  2006-04-17 12:42:55.0 +0200
@@ -293,7 +293,7 @@
   dnl libmbfl is required
   PHP_MBSTRING_SETUP_LIBMBFL
   PHP_MBSTRING_EXTENSION
-  PHP_INSTALL_HEADERS([ext/mbstring], [libmbfl libmbfl/mbfl])
+  PHP_INSTALL_HEADERS([ext/mbstring], [libmbfl/ libmbfl/mbfl/])
 fi

 # vim600: sts=2 sw=2 et



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

#39006 [NEW]: PHP crashes at shutdown if browscap is on

2006-10-01 Thread alt2k4 at yandex dot ru
From: alt2k4 at yandex dot ru
Operating system: windows (xp sp2)
PHP version:  5.2.0RC4
PHP Bug Type: Reproducible crash
Bug description:  PHP crashes at shutdown if browscap is on

Description:

PHP crashes at shutdown if browscap file is specified(even if
get_browser() not used). (tested on CGI)

Reproduce code:
---
ANYTHING, browscap enabled

Expected result:

normal shutdown.

Actual result:
--
php crash.
(I am REALLY sorry if this is not php problem, but mine installation)

-- 
Edit bug report at http://bugs.php.net/?id=39006edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=39006r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=39006r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=39006r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=39006r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=39006r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=39006r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=39006r=needscript
Try newer version:http://bugs.php.net/fix.php?id=39006r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=39006r=support
Expected behavior:http://bugs.php.net/fix.php?id=39006r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=39006r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=39006r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=39006r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=39006r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=39006r=dst
IIS Stability:http://bugs.php.net/fix.php?id=39006r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=39006r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=39006r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=39006r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=39006r=mysqlcfg


#39007 [NEW]: Crash while writing to nonexistent element

2006-10-01 Thread ladislav dot prosek at matfyz dot cz
From: ladislav dot prosek at matfyz dot cz
Operating system: Windows XP Pro SP2
PHP version:  5.1.6
PHP Bug Type: SimpleXML related
Bug description:  Crash while writing to nonexistent element

Description:

The following piece of code crashes PHP CLI.

Reproduce code:
---
?
  $x = new SimpleXMLElement(root/);
  $y = $x-whatever;
  $y-z[a] = b;
?


Expected result:

You decide ;)

Actual result:
--
* CRASH *

-- 
Edit bug report at http://bugs.php.net/?id=39007edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=39007r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=39007r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=39007r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=39007r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=39007r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=39007r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=39007r=needscript
Try newer version:http://bugs.php.net/fix.php?id=39007r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=39007r=support
Expected behavior:http://bugs.php.net/fix.php?id=39007r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=39007r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=39007r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=39007r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=39007r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=39007r=dst
IIS Stability:http://bugs.php.net/fix.php?id=39007r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=39007r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=39007r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=39007r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=39007r=mysqlcfg


#39007 [Opn-Fbk]: Crash while writing to nonexistent element

2006-10-01 Thread bjori
 ID:   39007
 Updated by:   [EMAIL PROTECTED]
 Reported By:  ladislav dot prosek at matfyz dot cz
-Status:   Open
+Status:   Feedback
 Bug Type: SimpleXML related
 Operating System: Windows XP Pro SP2
 PHP Version:  5.1.6
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

Can't reproduce


Previous Comments:


[2006-10-01 10:39:35] ladislav dot prosek at matfyz dot cz

Description:

The following piece of code crashes PHP CLI.

Reproduce code:
---
?
  $x = new SimpleXMLElement(root/);
  $y = $x-whatever;
  $y-z[a] = b;
?


Expected result:

You decide ;)

Actual result:
--
* CRASH *





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


#39007 [Fbk-Opn]: Crash while writing to nonexistent element

2006-10-01 Thread ladislav dot prosek at matfyz dot cz
 ID:   39007
 User updated by:  ladislav dot prosek at matfyz dot cz
 Reported By:  ladislav dot prosek at matfyz dot cz
-Status:   Feedback
+Status:   Open
 Bug Type: SimpleXML related
 Operating System: Windows XP Pro SP2
 PHP Version:  5.1.6
 New Comment:

Works OK with the snapshot. The Node no longer exists warning seems
quite appropriate. Thanks and sorry for reporting something that is
already fixed.


Previous Comments:


[2006-10-01 14:01:49] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

Can't reproduce



[2006-10-01 10:39:35] ladislav dot prosek at matfyz dot cz

Description:

The following piece of code crashes PHP CLI.

Reproduce code:
---
?
  $x = new SimpleXMLElement(root/);
  $y = $x-whatever;
  $y-z[a] = b;
?


Expected result:

You decide ;)

Actual result:
--
* CRASH *





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


#37103 [Fbk-Opn]: libmbfl headers not installed

2006-10-01 Thread Fedora at FamilleCollet dot com
 ID:   37103
 User updated by:  Fedora at FamilleCollet dot com
 Reported By:  Fedora at FamilleCollet dot com
-Status:   Feedback
+Status:   Open
 Bug Type: mbstring related
 Operating System: Linux (Fedora)
 PHP Version:  5.1.6
 Assigned To:  hirokawa
 New Comment:

Seems ok for the headers with php5.2-200610011230.

What about php 5.1 branch ?


Previous Comments:


[2006-10-01 08:35:26] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip





[2006-09-26 22:23:00] [EMAIL PROTECTED]

Assigned to the maintainer.



[2006-09-19 16:26:40] Fedora at FamilleCollet dot com

For php-5.2.0

I don't understand permissions on ext/mbstring/libmbfl/mbfl/mbfl_defs.h
(rwxr-xr-x) while other headers are rw-r--r--

I think the '*' in the config.m4 file is the problem.
So i change my previous patch to simply remove it and the packaging is
complete with all the headers (and mailparse pecl extension build
fine).

--- ext/mbstring/config.m4.orig 2006-09-18 17:46:08.0 +0200
+++ ext/mbstring/config.m4  2006-09-18 17:47:08.0 +0200
@@ -302,7 +302,7 @@
   dnl libmbfl is required
   PHP_MBSTRING_SETUP_LIBMBFL
   PHP_MBSTRING_EXTENSION
-  PHP_INSTALL_HEADERS([ext/mbstring], [libmbfl/config.h
libmbfl/mbfl/eaw_table.h libmbfl/mbfl/mbfilter.h
libmbfl/mbfl/mbfilter_8bit.h libmbfl/mbfl/mbfilter_pass.h
libmbfl/mbfl/mbfilter_wchar.h libmbfl/mbfl/mbfl_allocators.h
libmbfl/mbfl/mbfl_consts.h libmbfl/mbfl/mbfl_convert.h
libmbfl/mbfl/mbfl_defs.h* libmbfl/mbfl/mbfl_encoding.h
libmbfl/mbfl/mbfl_filter_output.h libmbfl/mbfl/mbfl_ident.h
libmbfl/mbfl/mbfl_language.h libmbfl/mbfl/mbfl_memory_device.h
libmbfl/mbfl/mbfl_string.h ])
+  PHP_INSTALL_HEADERS([ext/mbstring], [libmbfl/config.h
libmbfl/mbfl/eaw_table.h libmbfl/mbfl/mbfilter.h
libmbfl/mbfl/mbfilter_8bit.h libmbfl/mbfl/mbfilter_pass.h
libmbfl/mbfl/mbfilter_wchar.h libmbfl/mbfl/mbfl_allocators.h
libmbfl/mbfl/mbfl_consts.h libmbfl/mbfl/mbfl_convert.h
libmbfl/mbfl/mbfl_defs.h  libmbfl/mbfl/mbfl_encoding.h
libmbfl/mbfl/mbfl_filter_output.h libmbfl/mbfl/mbfl_ident.h
libmbfl/mbfl/mbfl_language.h libmbfl/mbfl/mbfl_memory_device.h
libmbfl/mbfl/mbfl_string.h ])
 fi

 # vim600: sts=2 sw=2 et



[2006-09-18 15:55:09] Fedora at FamilleCollet dot com

Still present in php-5.1.6 (only half corrected)

Patch :
--- ext/mbstring/config.m4.orig 2006-07-24 18:07:44.0 +0200
+++ ext/mbstring/config.m4  2006-07-24 18:08:03.0 +0200
@@ -293,7 +293,7 @@
   dnl libmbfl is required
   PHP_MBSTRING_SETUP_LIBMBFL
   PHP_MBSTRING_EXTENSION
-  PHP_INSTALL_HEADERS([ext/mbstring], [libmbfl/ libmbfl/mbfl])
+  PHP_INSTALL_HEADERS([ext/mbstring], [libmbfl/ libmbfl/mbfl/])
 fi
 
 # vim600: sts=2 sw=2 et


Even present in php-5.2.0RC5-dev (missing only one file : mbfl_defs.h)

Patch :
--- ext/mbstring/config.m4.orig 2006-09-18 17:46:08.0 +0200
+++ ext/mbstring/config.m4  2006-09-18 17:47:08.0 +0200
@@ -302,7 +302,7 @@
   dnl libmbfl is required
   PHP_MBSTRING_SETUP_LIBMBFL
   PHP_MBSTRING_EXTENSION
-  PHP_INSTALL_HEADERS([ext/mbstring], [libmbfl/config.h
libmbfl/mbfl/eaw_table.h libmbfl/mbfl/mbfilter.h
libmbfl/mbfl/mbfilter_8bit.h libmbfl/mbfl/mbfilter_pass.h
libmbfl/mbfl/mbfilter_wchar.h libmbfl/mbfl/mbfl_allocators.h
libmbfl/mbfl/mbfl_consts.h libmbfl/mbfl/mbfl_convert.h
libmbfl/mbfl/mbfl_defs.h* libmbfl/mbfl/mbfl_encoding.h
libmbfl/mbfl/mbfl_filter_output.h libmbfl/mbfl/mbfl_ident.h
libmbfl/mbfl/mbfl_language.h libmbfl/mbfl/mbfl_memory_device.h
libmbfl/mbfl/mbfl_string.h ])
+  PHP_INSTALL_HEADERS([ext/mbstring], [libmbfl/ libmbfl/mbfl/])
 fi
 
 # vim600: sts=2 sw=2 et



[2006-04-17 22:14:35] [EMAIL PROTECTED]

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.





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/37103

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


#39007 [Opn-Bgs]: Crash while writing to nonexistent element

2006-10-01 Thread johannes
 ID:   39007
 Updated by:   [EMAIL PROTECTED]
 Reported By:  ladislav dot prosek at matfyz dot cz
-Status:   Open
+Status:   Bogus
 Bug Type: SimpleXML related
 Operating System: Windows XP Pro SP2
 PHP Version:  5.1.6
 New Comment:

Already fixed - report was bogus


Previous Comments:


[2006-10-01 14:20:34] ladislav dot prosek at matfyz dot cz

Works OK with the snapshot. The Node no longer exists warning seems
quite appropriate. Thanks and sorry for reporting something that is
already fixed.



[2006-10-01 14:01:49] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

Can't reproduce



[2006-10-01 10:39:35] ladislav dot prosek at matfyz dot cz

Description:

The following piece of code crashes PHP CLI.

Reproduce code:
---
?
  $x = new SimpleXMLElement(root/);
  $y = $x-whatever;
  $y-z[a] = b;
?


Expected result:

You decide ;)

Actual result:
--
* CRASH *





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


#39009 [NEW]: phpinfo('imap') return nothing

2006-10-01 Thread mad at dactar dot ch
From: mad at dactar dot ch
Operating system: irrelevant
PHP version:  5.1.6
PHP Bug Type: *General Issues
Bug description:  phpinfo('imap') return nothing

Description:

echo phpinfo('imap') return nothing

Reproduce code:
---
?
echo phpversion('imap');
?


Expected result:

2001

Actual result:
--
nothing

-- 
Edit bug report at http://bugs.php.net/?id=39009edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=39009r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=39009r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=39009r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=39009r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=39009r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=39009r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=39009r=needscript
Try newer version:http://bugs.php.net/fix.php?id=39009r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=39009r=support
Expected behavior:http://bugs.php.net/fix.php?id=39009r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=39009r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=39009r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=39009r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=39009r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=39009r=dst
IIS Stability:http://bugs.php.net/fix.php?id=39009r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=39009r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=39009r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=39009r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=39009r=mysqlcfg


#39009 [Opn]: phpversion('imap') return nothing

2006-10-01 Thread mad at dactar dot ch
 ID:   39009
 User updated by:  mad at dactar dot ch
-Summary:  phpinfo('imap') return nothing
 Reported By:  mad at dactar dot ch
 Status:   Open
 Bug Type: *General Issues
 Operating System: irrelevant
 PHP Version:  5.1.6
 New Comment:

.


Previous Comments:


[2006-10-01 15:18:02] mad at dactar dot ch

Description:

echo phpinfo('imap') return nothing

Reproduce code:
---
?
echo phpversion('imap');
?


Expected result:

2001

Actual result:
--
nothing





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


#39009 [Opn]: phpversion('imap') return nothing

2006-10-01 Thread mad at dactar dot ch
 ID:   39009
 User updated by:  mad at dactar dot ch
 Reported By:  mad at dactar dot ch
 Status:   Open
 Bug Type: *General Issues
 Operating System: irrelevant
 PHP Version:  5.1.6
 New Comment:

phpversion('imap') return nothing


Previous Comments:


[2006-10-01 15:18:51] mad at dactar dot ch

.



[2006-10-01 15:18:02] mad at dactar dot ch

Description:

echo phpinfo('imap') return nothing

Reproduce code:
---
?
echo phpversion('imap');
?


Expected result:

2001

Actual result:
--
nothing





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


#39010 [NEW]: create_function leaks memory

2006-10-01 Thread djgrrr at gmail dot com
From: djgrrr at gmail dot com
Operating system: *
PHP version:  5.1.6
PHP Bug Type: Performance problem
Bug description:  create_function leaks memory

Description:

The PHP version is actually Irrelevant

If you use create_function many times in a script to make lambda
functions, it will use more and more memory.

Now, I know that this is the expected result, but it would be really good
to have a function like free_function or delete_function that could be
used to remove the lambda functions, and free up the memory they use.

Obviously this function would have to be limited to only lambda function,
and it not be possible to use it on normal functions.

Personally, I think this is VERY essential to the CLI version of PHP as
many CLI PHP programs do not often restart, but keep running, simply
rehashing its config and any modules (using lambda functions)


-- 
Edit bug report at http://bugs.php.net/?id=39010edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=39010r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=39010r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=39010r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=39010r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=39010r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=39010r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=39010r=needscript
Try newer version:http://bugs.php.net/fix.php?id=39010r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=39010r=support
Expected behavior:http://bugs.php.net/fix.php?id=39010r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=39010r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=39010r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=39010r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=39010r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=39010r=dst
IIS Stability:http://bugs.php.net/fix.php?id=39010r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=39010r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=39010r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=39010r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=39010r=mysqlcfg


#39009 [Opn-Bgs]: phpversion('imap') return nothing

2006-10-01 Thread bjori
 ID:   39009
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mad at dactar dot ch
-Status:   Open
+Status:   Bogus
 Bug Type: *General Issues
 Operating System: irrelevant
 PHP Version:  5.1.6
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

returns the version of that extension, or FALSE if there 
is no version information associated


Previous Comments:


[2006-10-01 15:19:55] mad at dactar dot ch

phpversion('imap') return nothing



[2006-10-01 15:18:51] mad at dactar dot ch

.



[2006-10-01 15:18:02] mad at dactar dot ch

Description:

echo phpinfo('imap') return nothing

Reproduce code:
---
?
echo phpversion('imap');
?


Expected result:

2001

Actual result:
--
nothing





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


#39009 [Bgs-Opn]: phpversion('imap') return nothing

2006-10-01 Thread mad at dactar dot ch
 ID:   39009
 User updated by:  mad at dactar dot ch
 Reported By:  mad at dactar dot ch
-Status:   Bogus
+Status:   Open
 Bug Type: *General Issues
 Operating System: irrelevant
 PHP Version:  5.1.6
 New Comment:

If the information is available via phpinfo(), the information could be
associated with phpversion, no ?


Previous Comments:


[2006-10-01 15:50:02] [EMAIL PROTECTED]

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

returns the version of that extension, or FALSE if there 
is no version information associated



[2006-10-01 15:19:55] mad at dactar dot ch

phpversion('imap') return nothing



[2006-10-01 15:18:51] mad at dactar dot ch

.



[2006-10-01 15:18:02] mad at dactar dot ch

Description:

echo phpinfo('imap') return nothing

Reproduce code:
---
?
echo phpversion('imap');
?


Expected result:

2001

Actual result:
--
nothing





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


#39009 [Opn-Bgs]: phpversion('imap') return nothing

2006-10-01 Thread bjori
 ID:   39009
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mad at dactar dot ch
-Status:   Open
+Status:   Bogus
 Bug Type: *General Issues
 Operating System: irrelevant
 PHP Version:  5.1.6
 New Comment:

It's not the extension version you see in phpinfo(), it's 
the c-client version as clearly stated.
The extension itself has no version information.


Previous Comments:


[2006-10-01 15:53:56] mad at dactar dot ch

If the information is available via phpinfo(), the information could be
associated with phpversion, no ?



[2006-10-01 15:50:02] [EMAIL PROTECTED]

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

returns the version of that extension, or FALSE if there 
is no version information associated



[2006-10-01 15:19:55] mad at dactar dot ch

phpversion('imap') return nothing



[2006-10-01 15:18:51] mad at dactar dot ch

.



[2006-10-01 15:18:02] mad at dactar dot ch

Description:

echo phpinfo('imap') return nothing

Reproduce code:
---
?
echo phpversion('imap');
?


Expected result:

2001

Actual result:
--
nothing





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



#39011 [NEW]: foreach($_GET as $key = $value) causes later bugs passing $_GET as a paramete

2006-10-01 Thread php_bug dot email at email dot digiways dot com
From: php_bug dot email at email dot digiways dot com
Operating system: Windows XP
PHP version:  5.1.6
PHP Bug Type: Arrays related
Bug description:  foreach($_GET as $key = $value) causes later bugs passing 
$_GET as a paramete

Description:

if we iterate over $_GET using references (see the example) and pass $_GET
to a function, function modifies $_GET and not the local copy.
For example, save the example code in test.php and open

test.php?mykey=foo
.

Reproduce code:
---
?php
function doit($http_get_params)
{
$http_get_params['mykey'] = 'bar';
echo 'br/'.$_GET['mykey'];
}

foreach($_GET as $key = $value) {}

echo 'br/'.$_GET['mykey'];
doit($_GET);
echo 'br/'.$_GET['mykey'];
?


Expected result:

When we open test.php?mykey=foo I expect to see
foo
foo
foo

Actual result:
--
When we open test.php?mykey=foo we actually see
foo
bar
bar

-- 
Edit bug report at http://bugs.php.net/?id=39011edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=39011r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=39011r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=39011r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=39011r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=39011r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=39011r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=39011r=needscript
Try newer version:http://bugs.php.net/fix.php?id=39011r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=39011r=support
Expected behavior:http://bugs.php.net/fix.php?id=39011r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=39011r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=39011r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=39011r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=39011r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=39011r=dst
IIS Stability:http://bugs.php.net/fix.php?id=39011r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=39011r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=39011r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=39011r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=39011r=mysqlcfg


#39012 [NEW]: Incorrect gmdate('U') and date_default_timezone_set()

2006-10-01 Thread djmaze at planet dot nl
From: djmaze at planet dot nl
Operating system: Windows
PHP version:  5.1.6
PHP Bug Type: Date/time related
Bug description:  Incorrect gmdate('U') and date_default_timezone_set()

Description:

gmdate('U') shows the incorrect unix epoch.

http://php.net/gmdate: 'Format a GMT/UTC date/time'
http://php.net/date: 'U = Seconds since the Unix Epoch (January 1 1970
00:00:00 GMT)'

After calling date_default_timezone_set() everything is messed up, or is
that the whole purpose but someone forgot to document it?


Reproduce code:
---
?php
function get_unixts()
{
return array(
'time()'   = time(),
'date(\'U\')' = date('U'),
'date(\'Z\')'  = date('Z'),
'gmtime' = (time()-date('Z')),
'gmdate(\'U\')' = gmdate('U'),
'gmdate(\'Z\')' = gmdate('Z'),
'date_default_timezone' = date_default_timezone_get(),
);
}
$def = get_unixts();
date_default_timezone_set('UTC');
$set = get_unixts();

echo 'htmlbodytable
border=1trtdtype/tdtdnormal/tdtdafter set UTC/td/tr';
foreach ($def as $t = $v)
{
echo trtd$t/tdtd$v/tdtd{$set[$t]}/td/tr;
}
echo '/table/body/html';
?

Expected result:

typenormal  after set UTC
time()  1159732108  1159724908
date('U')   1159732108  1159724908
date('Z')   72000
gmtime  1159724908  1159724908
gmdate('U') 1159724908  1159724908
gmdate('Z') 0   0


Actual result:
--
typenormal  after set UTC
time()  1159732108  1159732108
date('U')   1159732108  1159732108
date('Z')   72000
gmtime  1159724908  1159732108
gmdate('U') 1159732108  1159732108
gmdate('Z') 0   0


-- 
Edit bug report at http://bugs.php.net/?id=39012edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=39012r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=39012r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=39012r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=39012r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=39012r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=39012r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=39012r=needscript
Try newer version:http://bugs.php.net/fix.php?id=39012r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=39012r=support
Expected behavior:http://bugs.php.net/fix.php?id=39012r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=39012r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=39012r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=39012r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=39012r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=39012r=dst
IIS Stability:http://bugs.php.net/fix.php?id=39012r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=39012r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=39012r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=39012r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=39012r=mysqlcfg


#39011 [Com]: foreach($_GET as $key = $value) causes later bugs passing $_GET as a paramete

2006-10-01 Thread sitnikov at infonet dot ee
 ID:   39011
 Comment by:   sitnikov at infonet dot ee
 Reported By:  php_bug dot email at email dot digiways dot com
 Status:   Open
 Bug Type: Arrays related
 Operating System: Windows XP
 PHP Version:  5.1.6
 New Comment:

confirmed with PHP Version 5.2.0RC5-dev


Previous Comments:


[2006-10-01 19:25:34] php_bug dot email at email dot digiways dot com

Description:

if we iterate over $_GET using references (see the example) and pass
$_GET to a function, function modifies $_GET and not the local copy.
For example, save the example code in test.php and open

test.php?mykey=foo
.

Reproduce code:
---
?php
function doit($http_get_params)
{
$http_get_params['mykey'] = 'bar';
echo 'br/'.$_GET['mykey'];
}

foreach($_GET as $key = $value) {}

echo 'br/'.$_GET['mykey'];
doit($_GET);
echo 'br/'.$_GET['mykey'];
?


Expected result:

When we open test.php?mykey=foo I expect to see
foo
foo
foo

Actual result:
--
When we open test.php?mykey=foo we actually see
foo
bar
bar





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


#39011 [Com]: foreach($_GET as $key = $value) causes later bugs passing $_GET as a paramete

2006-10-01 Thread judas dot iscariote at gmail dot com
 ID:   39011
 Comment by:   judas dot iscariote at gmail dot com
 Reported By:  php_bug dot email at email dot digiways dot com
 Status:   Open
 Bug Type: Arrays related
 Operating System: Windows XP
 PHP Version:  5.1.6
 New Comment:

this is the expected behaviuor, and not a bug. :P

the reasons are clearly explained by gardan at gmx dot de on this
report, please do a search before reporting

http://bugs.php.net/bug.php?id=29992


Previous Comments:


[2006-10-01 20:13:53] sitnikov at infonet dot ee

confirmed with PHP Version 5.2.0RC5-dev



[2006-10-01 19:25:34] php_bug dot email at email dot digiways dot com

Description:

if we iterate over $_GET using references (see the example) and pass
$_GET to a function, function modifies $_GET and not the local copy.
For example, save the example code in test.php and open

test.php?mykey=foo
.

Reproduce code:
---
?php
function doit($http_get_params)
{
$http_get_params['mykey'] = 'bar';
echo 'br/'.$_GET['mykey'];
}

foreach($_GET as $key = $value) {}

echo 'br/'.$_GET['mykey'];
doit($_GET);
echo 'br/'.$_GET['mykey'];
?


Expected result:

When we open test.php?mykey=foo I expect to see
foo
foo
foo

Actual result:
--
When we open test.php?mykey=foo we actually see
foo
bar
bar





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


#39004 [Opn-Fbk]: Configure Command './configure' 'dummy' 'grep' 'ggrep' !?

2006-10-01 Thread iliaa
 ID:   39004
 Updated by:   [EMAIL PROTECTED]
 Reported By:  phpbugs at thequod dot de
-Status:   Open
+Status:   Feedback
 Bug Type: *General Issues
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2006-09-30 (CVS)
 New Comment:

What version of autoconf are you using?


Previous Comments:


[2006-09-30 14:50:02] phpbugs at thequod dot de

Description:

I've just configured PHP_5_2 through the following script 
(wrapper for configure) and now 
get './configure' 'dummy' 'grep' 'ggrep' as 
the Configure Command in phpinfo().

Reproduce code:
---
#!/bin/bash

./configure \
--enable-calendar \
--enable-exif \
--enable-force-cgi-redirect  \
--enable-gd-native-ttf \
--enable-inline-optimization \
--enable-mbstring=all \
--enable-mbregex \
--enable-memcache \
--enable-memory-limit \
--enable-sockets \
--enable-track-vars \
--with-bz2 \
--with-dom \
--with-freetype-dir \
--with-gd \
--with-gettext \
--with-iconv \
--with-imap \
--with-imap-ssl \
--with-jpeg-6b \
--with-jpeg-dir \
--with-kerberos \
--with-ldap \
--with-ldap-sasl \
--with-mcrypt \
--with-mysql \
--with-openssl \
--with-png-dir \
--without-mm \
--with-sqlite \
--with-pcre-regex \
--with-ttf \
--with-zlib \
--with-zlib-dir=/bin \
--with-apxs2=/usr/bin/apxs2

make
make install
php -i | grep Configure Command

Expected result:

The configure line/options.

Actual result:
--
Configure Command =  './configure' 'dummy' 'grep' 'ggrep'





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


#39011 [Opn-Bgs]: foreach($_GET as $key = $value) causes later bugs passing $_GET as a paramete

2006-10-01 Thread iliaa
 ID:   39011
 Updated by:   [EMAIL PROTECTED]
 Reported By:  php_bug dot email at email dot digiways dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Arrays related
 Operating System: Windows XP
 PHP Version:  5.1.6
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

bogus


Previous Comments:


[2006-10-01 20:24:34] judas dot iscariote at gmail dot com

this is the expected behaviuor, and not a bug. :P

the reasons are clearly explained by gardan at gmx dot de on this
report, please do a search before reporting

http://bugs.php.net/bug.php?id=29992



[2006-10-01 20:13:53] sitnikov at infonet dot ee

confirmed with PHP Version 5.2.0RC5-dev



[2006-10-01 19:25:34] php_bug dot email at email dot digiways dot com

Description:

if we iterate over $_GET using references (see the example) and pass
$_GET to a function, function modifies $_GET and not the local copy.
For example, save the example code in test.php and open

test.php?mykey=foo
.

Reproduce code:
---
?php
function doit($http_get_params)
{
$http_get_params['mykey'] = 'bar';
echo 'br/'.$_GET['mykey'];
}

foreach($_GET as $key = $value) {}

echo 'br/'.$_GET['mykey'];
doit($_GET);
echo 'br/'.$_GET['mykey'];
?


Expected result:

When we open test.php?mykey=foo I expect to see
foo
foo
foo

Actual result:
--
When we open test.php?mykey=foo we actually see
foo
bar
bar





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


#39004 [Fbk-Opn]: Configure Command './configure' 'dummy' 'grep' 'ggrep' !?

2006-10-01 Thread phpbugs at thequod dot de
 ID:   39004
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
-Status:   Feedback
+Status:   Open
 Bug Type: *General Issues
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2006-09-30 (CVS)
 New Comment:

2.60-1 (Debian/Ubuntu)


Previous Comments:


[2006-10-01 20:37:35] [EMAIL PROTECTED]

What version of autoconf are you using?



[2006-09-30 14:50:02] phpbugs at thequod dot de

Description:

I've just configured PHP_5_2 through the following script 
(wrapper for configure) and now 
get './configure' 'dummy' 'grep' 'ggrep' as 
the Configure Command in phpinfo().

Reproduce code:
---
#!/bin/bash

./configure \
--enable-calendar \
--enable-exif \
--enable-force-cgi-redirect  \
--enable-gd-native-ttf \
--enable-inline-optimization \
--enable-mbstring=all \
--enable-mbregex \
--enable-memcache \
--enable-memory-limit \
--enable-sockets \
--enable-track-vars \
--with-bz2 \
--with-dom \
--with-freetype-dir \
--with-gd \
--with-gettext \
--with-iconv \
--with-imap \
--with-imap-ssl \
--with-jpeg-6b \
--with-jpeg-dir \
--with-kerberos \
--with-ldap \
--with-ldap-sasl \
--with-mcrypt \
--with-mysql \
--with-openssl \
--with-png-dir \
--without-mm \
--with-sqlite \
--with-pcre-regex \
--with-ttf \
--with-zlib \
--with-zlib-dir=/bin \
--with-apxs2=/usr/bin/apxs2

make
make install
php -i | grep Configure Command

Expected result:

The configure line/options.

Actual result:
--
Configure Command =  './configure' 'dummy' 'grep' 'ggrep'





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


#38993 [Opn-Csd]: Extra options in session.save_path cause verification on update to fail

2006-10-01 Thread iliaa
 ID:   38993
 Updated by:   [EMAIL PROTECTED]
 Reported By:  roel at qsp dot nl
-Status:   Open
+Status:   Closed
 Bug Type: Session related
 Operating System: FreeBSD 6
 PHP Version:  5.1.6
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:


[2006-09-29 14:31:32] roel at qsp dot nl

Description:

Introduction


The file based session handler uses the session.save_path ini variable
to determine where to write it's session files.

However, it also attempts to parse two other bits of information out of
session.save_path, iff session.save_path contains one or two
semi-colons. The format is:

[x;[y;]]pathname

Where both x and y are optional and x is a directory hashing depth for
session files (defaults to 0) and y is the create mode for new session
files, defaults to 0700.

Whenever session.save_path is updated, a verification function is
called. For this variable, this is the funtion static
PHP_INI_MH(OnUpdateSaveDir) contained in ext/session/session.c.

There is no verification in this function if PHP is running in regular
mode. However, when in safe-mode, this function performs two
verifications. First, it attempts to check ownership of the directory,
and secondly, it does a php_check_open_basedir() on the path supplied.

Problem description
---

In this function, OnUpdateSaveDir() in ext/session/session.c, no
attempt is made to recognize and take out the optional parameters
contained in the supplied new session.save_path value.

So, when setting session.save_path to 0;0707;/whatever, PHP will
supply php_checkuid() and php_check_open_basedir with the entire
string, not just with /whatever. This causes the check to fail.

Patch
--

The following patch should be applied to ext/session/session.c to fix
this problem:

*** ext/session/session.orig.c  Fri Sep 29 11:35:05 2006
--- ext/session/session.c   Fri Sep 29 12:39:26 2006
***
*** 133,145 
  
  static PHP_INI_MH(OnUpdateSaveDir)
  {
/* Only do the safemode/open_basedir check at runtime */
if (stage == PHP_INI_STAGE_RUNTIME) {
!   if (PG(safe_mode)  (!php_checkuid(new_value, NULL,
CHECKUID_ALLOW_ONLY_DIR))) {
return FAILURE;
}
  
!   if (php_check_open_basedir(new_value TSRMLS_CC)) {
return FAILURE;
}
}
--- 133,150 
  
  static PHP_INI_MH(OnUpdateSaveDir)
  {
+   char *p, *q;
+   int i;
/* Only do the safemode/open_basedir check at runtime */
if (stage == PHP_INI_STAGE_RUNTIME) {
!   /* Parse out optional hash level  file mode */
!   for (i=0, q=new_value; i2  (p=strchr(q, ';'))!=NULL;
q=p+1, i++);
! 
!   if (PG(safe_mode)  (!php_checkuid(q, NULL,
CHECKUID_ALLOW_ONLY_DIR))) {
return FAILURE;
}
  
!   if (php_check_open_basedir(q TSRMLS_CC)) {
return FAILURE;
}
}

Remarks


Both parameters are, at least for the most part, undocumented. It would
not be a bad idea to update
the session.save_path description with information about these two
variables.

Submitted: 29/9/2006
Patch author: Roel Bouwman [EMAIL PROTECTED]

Reproduce code:
---
?php
 /* Preconditions:
  *  - server running in safe mode
  *  - /whatever and this script owned by samed user.
  */

  ini_set(session.save_path,0;0707;/whatever);
?

Expected result:

1. PHP checking wether /whatever is owned by script owner.
2. PHP performing basepath check for /whatever
3. session.save_path set to 0;0707;/whatever.

Actual result:
--
PHP will produce an error claiming that it cannot open the save_path
directory as the uid check is performed not just for /whatever, but for
the entire string.

Result is that session.save_path will not be modified.





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


#39011 [Bgs-Opn]: foreach($_GET as $key = $value) causes later bugs passing $_GET as a paramete

2006-10-01 Thread php_bug dot email at email dot digiways dot com
 ID:   39011
 User updated by:  php_bug dot email at email dot digiways dot com
 Reported By:  php_bug dot email at email dot digiways dot com
-Status:   Bogus
+Status:   Open
 Bug Type: Arrays related
 Operating System: Windows XP
 PHP Version:  5.1.6
 New Comment:

Where exactly is this behaviour documented? Can you point to the
documentation page as I failed to find this.

Also, another defect http://bugs.php.net/bug.php?id=29992 which was
referenced here is a different problem. In my case I do not reuse the
reference variable $value .


Previous Comments:


[2006-10-01 20:39:17] [EMAIL PROTECTED]

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

bogus



[2006-10-01 20:24:34] judas dot iscariote at gmail dot com

this is the expected behaviuor, and not a bug. :P

the reasons are clearly explained by gardan at gmx dot de on this
report, please do a search before reporting

http://bugs.php.net/bug.php?id=29992



[2006-10-01 20:13:53] sitnikov at infonet dot ee

confirmed with PHP Version 5.2.0RC5-dev



[2006-10-01 19:25:34] php_bug dot email at email dot digiways dot com

Description:

if we iterate over $_GET using references (see the example) and pass
$_GET to a function, function modifies $_GET and not the local copy.
For example, save the example code in test.php and open

test.php?mykey=foo
.

Reproduce code:
---
?php
function doit($http_get_params)
{
$http_get_params['mykey'] = 'bar';
echo 'br/'.$_GET['mykey'];
}

foreach($_GET as $key = $value) {}

echo 'br/'.$_GET['mykey'];
doit($_GET);
echo 'br/'.$_GET['mykey'];
?


Expected result:

When we open test.php?mykey=foo I expect to see
foo
foo
foo

Actual result:
--
When we open test.php?mykey=foo we actually see
foo
bar
bar





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


#39011 [Opn]: foreach($_GET as $key = $value) causes later bugs passing $_GET as a paramete

2006-10-01 Thread php_bug dot email at email dot digiways dot com
 ID:   39011
 User updated by:  php_bug dot email at email dot digiways dot com
 Reported By:  php_bug dot email at email dot digiways dot com
 Status:   Open
 Bug Type: Arrays related
 Operating System: Windows XP
 PHP Version:  5.1.6
 New Comment:

This problem affects all the arrays and not just the $_GET one. Please
note that $value is not reused outside of the foreach loop. Effectively
this renders foreach by reference useless.

Another very simple script which reproduces the problem:

$myarray = array( 'mykey' = 'foo' );
function doit($tmp) { $tmp['mykey'] = 'bar'; }
foreach($myarray as $key = $value) {}
echo $myarray['mykey'].\n;
doit($myarray);
echo $myarray['mykey'].\n;

and outputs
   foo
   bar
instead of
   foo
   foo


Previous Comments:


[2006-10-01 21:00:11] php_bug dot email at email dot digiways dot com

Where exactly is this behaviour documented? Can you point to the
documentation page as I failed to find this.

Also, another defect http://bugs.php.net/bug.php?id=29992 which was
referenced here is a different problem. In my case I do not reuse the
reference variable $value .



[2006-10-01 20:39:17] [EMAIL PROTECTED]

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

bogus



[2006-10-01 20:24:34] judas dot iscariote at gmail dot com

this is the expected behaviuor, and not a bug. :P

the reasons are clearly explained by gardan at gmx dot de on this
report, please do a search before reporting

http://bugs.php.net/bug.php?id=29992



[2006-10-01 20:13:53] sitnikov at infonet dot ee

confirmed with PHP Version 5.2.0RC5-dev



[2006-10-01 19:25:34] php_bug dot email at email dot digiways dot com

Description:

if we iterate over $_GET using references (see the example) and pass
$_GET to a function, function modifies $_GET and not the local copy.
For example, save the example code in test.php and open

test.php?mykey=foo
.

Reproduce code:
---
?php
function doit($http_get_params)
{
$http_get_params['mykey'] = 'bar';
echo 'br/'.$_GET['mykey'];
}

foreach($_GET as $key = $value) {}

echo 'br/'.$_GET['mykey'];
doit($_GET);
echo 'br/'.$_GET['mykey'];
?


Expected result:

When we open test.php?mykey=foo I expect to see
foo
foo
foo

Actual result:
--
When we open test.php?mykey=foo we actually see
foo
bar
bar





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


#39011 [Com]: foreach($_GET as $key = $value) causes later bugs passing $_GET as a paramete

2006-10-01 Thread plyrvt at mail dot ru
 ID:   39011
 Comment by:   plyrvt at mail dot ru
 Reported By:  php_bug dot email at email dot digiways dot com
 Status:   Open
 Bug Type: Arrays related
 Operating System: Windows XP
 PHP Version:  5.1.6
 New Comment:

Confirm with 5.1.6:
?php
$a['b']='foo';
function boo($_params){
$_params['b'] = 'bar';
echo $a['b'];
}

foreach($a as $key = $val) {} // ?!

echo $a['b'];
boo($a);
echo $a['b'];
?

If you comment out `foreach` loop or remove  near `$val`, code works
OK. Loop does nothing and $val is *never* mentioned in code elsewhere.


Previous Comments:


[2006-10-01 21:37:06] php_bug dot email at email dot digiways dot com

This problem affects all the arrays and not just the $_GET one. Please
note that $value is not reused outside of the foreach loop. Effectively
this renders foreach by reference useless.

Another very simple script which reproduces the problem:

$myarray = array( 'mykey' = 'foo' );
function doit($tmp) { $tmp['mykey'] = 'bar'; }
foreach($myarray as $key = $value) {}
echo $myarray['mykey'].\n;
doit($myarray);
echo $myarray['mykey'].\n;

and outputs
   foo
   bar
instead of
   foo
   foo



[2006-10-01 21:00:11] php_bug dot email at email dot digiways dot com

Where exactly is this behaviour documented? Can you point to the
documentation page as I failed to find this.

Also, another defect http://bugs.php.net/bug.php?id=29992 which was
referenced here is a different problem. In my case I do not reuse the
reference variable $value .



[2006-10-01 20:39:17] [EMAIL PROTECTED]

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

bogus



[2006-10-01 20:24:34] judas dot iscariote at gmail dot com

this is the expected behaviuor, and not a bug. :P

the reasons are clearly explained by gardan at gmx dot de on this
report, please do a search before reporting

http://bugs.php.net/bug.php?id=29992



[2006-10-01 20:13:53] sitnikov at infonet dot ee

confirmed with PHP Version 5.2.0RC5-dev



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/39011

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


#39004 [Opn-Asn]: Configure Command './configure' 'dummy' 'grep' 'ggrep' !?

2006-10-01 Thread iliaa
 ID:   39004
 Updated by:   [EMAIL PROTECTED]
 Reported By:  phpbugs at thequod dot de
-Status:   Open
+Status:   Assigned
 Bug Type: *General Issues
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2006-09-30 (CVS)
-Assigned To:  
+Assigned To:  iliaa
 New Comment:

Try this patch and let me know if that fixes the problem
http://bb.prohost.org/patch/bug39004.txt


Previous Comments:


[2006-10-01 20:46:35] phpbugs at thequod dot de

2.60-1 (Debian/Ubuntu)



[2006-10-01 20:37:35] [EMAIL PROTECTED]

What version of autoconf are you using?



[2006-09-30 14:50:02] phpbugs at thequod dot de

Description:

I've just configured PHP_5_2 through the following script 
(wrapper for configure) and now 
get './configure' 'dummy' 'grep' 'ggrep' as 
the Configure Command in phpinfo().

Reproduce code:
---
#!/bin/bash

./configure \
--enable-calendar \
--enable-exif \
--enable-force-cgi-redirect  \
--enable-gd-native-ttf \
--enable-inline-optimization \
--enable-mbstring=all \
--enable-mbregex \
--enable-memcache \
--enable-memory-limit \
--enable-sockets \
--enable-track-vars \
--with-bz2 \
--with-dom \
--with-freetype-dir \
--with-gd \
--with-gettext \
--with-iconv \
--with-imap \
--with-imap-ssl \
--with-jpeg-6b \
--with-jpeg-dir \
--with-kerberos \
--with-ldap \
--with-ldap-sasl \
--with-mcrypt \
--with-mysql \
--with-openssl \
--with-png-dir \
--without-mm \
--with-sqlite \
--with-pcre-regex \
--with-ttf \
--with-zlib \
--with-zlib-dir=/bin \
--with-apxs2=/usr/bin/apxs2

make
make install
php -i | grep Configure Command

Expected result:

The configure line/options.

Actual result:
--
Configure Command =  './configure' 'dummy' 'grep' 'ggrep'





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


#39011 [Com]: foreach($_GET as $key = $value) causes later bugs passing $_GET as a paramete

2006-10-01 Thread plyrvt at mail dot ru
 ID:   39011
 Comment by:   plyrvt at mail dot ru
 Reported By:  php_bug dot email at email dot digiways dot com
 Status:   Open
 Bug Type: Arrays related
 Operating System: Windows XP
 PHP Version:  5.1.6
 New Comment:

If you add unset($val) after foreach, original array starts back to
work as expected:

?php
$a['b']='foo';
function boo($_params){
$_params['b'] = 'bar';
echo $_params['b'];
}

foreach($a as $key = $val) {}
unset($val);

echo $a['b'];
boo($a);
echo $a['b'];
/*
foo
bar
foo
*/
?


Previous Comments:


[2006-10-01 21:39:58] plyrvt at mail dot ru

Confirm with 5.1.6:
?php
$a['b']='foo';
function boo($_params){
$_params['b'] = 'bar';
echo $a['b'];
}

foreach($a as $key = $val) {} // ?!

echo $a['b'];
boo($a);
echo $a['b'];
?

If you comment out `foreach` loop or remove  near `$val`, code works
OK. Loop does nothing and $val is *never* mentioned in code elsewhere.



[2006-10-01 21:37:06] php_bug dot email at email dot digiways dot com

This problem affects all the arrays and not just the $_GET one. Please
note that $value is not reused outside of the foreach loop. Effectively
this renders foreach by reference useless.

Another very simple script which reproduces the problem:

$myarray = array( 'mykey' = 'foo' );
function doit($tmp) { $tmp['mykey'] = 'bar'; }
foreach($myarray as $key = $value) {}
echo $myarray['mykey'].\n;
doit($myarray);
echo $myarray['mykey'].\n;

and outputs
   foo
   bar
instead of
   foo
   foo



[2006-10-01 21:00:11] php_bug dot email at email dot digiways dot com

Where exactly is this behaviour documented? Can you point to the
documentation page as I failed to find this.

Also, another defect http://bugs.php.net/bug.php?id=29992 which was
referenced here is a different problem. In my case I do not reuse the
reference variable $value .



[2006-10-01 20:39:17] [EMAIL PROTECTED]

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

bogus



[2006-10-01 20:24:34] judas dot iscariote at gmail dot com

this is the expected behaviuor, and not a bug. :P

the reasons are clearly explained by gardan at gmx dot de on this
report, please do a search before reporting

http://bugs.php.net/bug.php?id=29992



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/39011

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


#39011 [Com]: foreach($_GET as $key = $value) causes later bugs passing $_GET as a paramete

2006-10-01 Thread plyrvt at mail dot ru
 ID:   39011
 Comment by:   plyrvt at mail dot ru
 Reported By:  php_bug dot email at email dot digiways dot com
 Status:   Open
 Bug Type: Arrays related
 Operating System: Windows XP
 PHP Version:  5.1.6
 New Comment:

This bug can be described shortly:
Existance of a reference to the element of an array prevents this
element to be passed by value as long as any reference point to it


Previous Comments:


[2006-10-01 22:02:06] php_bug dot email at email dot digiways dot com

Actually this is not just about foreach, this is the generic problem
with references.
Apparently if you have a reference to an array element, then when you
pass that array to a function and modify that element in the function,
then the external array is modified as well, and not just the copy
passed to the function.

A small example which shows the problem:
$myarray = array( 'mykey' = 'foo' );
function doit($tmp) { $tmp['mykey'] = 'bar'; }
$value = $myarray['mykey'];
echo $myarray['mykey'].\n;
doit($myarray);
echo $myarray['mykey'].\n;

Once again - can anyone point to the documentation page which explains
this behaviour ?



[2006-10-01 21:55:23] plyrvt at mail dot ru

If you add unset($val) after foreach, original array starts back to
work as expected:

?php
$a['b']='foo';
function boo($_params){
$_params['b'] = 'bar';
echo $_params['b'];
}

foreach($a as $key = $val) {}
unset($val);

echo $a['b'];
boo($a);
echo $a['b'];
/*
foo
bar
foo
*/
?



[2006-10-01 21:39:58] plyrvt at mail dot ru

Confirm with 5.1.6:
?php
$a['b']='foo';
function boo($_params){
$_params['b'] = 'bar';
echo $a['b'];
}

foreach($a as $key = $val) {} // ?!

echo $a['b'];
boo($a);
echo $a['b'];
?

If you comment out `foreach` loop or remove  near `$val`, code works
OK. Loop does nothing and $val is *never* mentioned in code elsewhere.



[2006-10-01 21:37:06] php_bug dot email at email dot digiways dot com

This problem affects all the arrays and not just the $_GET one. Please
note that $value is not reused outside of the foreach loop. Effectively
this renders foreach by reference useless.

Another very simple script which reproduces the problem:

$myarray = array( 'mykey' = 'foo' );
function doit($tmp) { $tmp['mykey'] = 'bar'; }
foreach($myarray as $key = $value) {}
echo $myarray['mykey'].\n;
doit($myarray);
echo $myarray['mykey'].\n;

and outputs
   foo
   bar
instead of
   foo
   foo



[2006-10-01 21:00:11] php_bug dot email at email dot digiways dot com

Where exactly is this behaviour documented? Can you point to the
documentation page as I failed to find this.

Also, another defect http://bugs.php.net/bug.php?id=29992 which was
referenced here is a different problem. In my case I do not reuse the
reference variable $value .



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/39011

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


#38988 [Bgs]: Chaning mssql.datetimeconvert has no effect

2006-10-01 Thread wiggum24 at gmail dot com
 ID:   38988
 User updated by:  wiggum24 at gmail dot com
 Reported By:  wiggum24 at gmail dot com
 Status:   Bogus
 Bug Type: MSSQL related
 Operating System: Redhat Enterprise Linux
 PHP Version:  5.1.6
 New Comment:

correct php.ini, the ; character was removed. Nothing that silly :)

Found it, I had a php extension that wasn't working properly. No
settings were applying after the line that enabled it in php.ini, but
php was still working fine and not throwing errors.


Previous Comments:


[2006-09-29 15:03:52] [EMAIL PROTECTED]

Works fine here.

Did you remove ; in front of the line?



[2006-09-29 09:09:28] [EMAIL PROTECTED]

Trying to set mssql.datetimeconvert to Off in php.ini doesn't work.
phpinfo() reports it as On, and the behaviour of the recordset
reflects the same.
Which php.ini is used by PHP according to phpinfo()? Which php.ini did
you change? Did you restart the web-server?




[2006-09-29 06:47:39] wiggum24 at gmail dot com

Description:

Trying to set mssql.datetimeconvert to Off in php.ini doesn't work.
phpinfo() reports it as On, and the behaviour of the recordset reflects
the same.

I've confirmed php is picking up the correct php.ini, and my php.ini
contains no errors.

Calling ini_set(mssql.datetimeconvert,Off); before I do the query
will set the value and the queries will return correctly.

Reproduce code:
---
No errors, the setting just doesn't apply.

Expected result:

datetimes should appear as:
2006-07-20 16:32:00

Actual result:
--
datetimes appear as:
Jul 20 2006 04:32PM





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


#39011 [Com]: foreach($_GET as $key = $value) causes later bugs passing $_GET as a paramete

2006-10-01 Thread judas dot iscariote at gmail dot com
 ID:   39011
 Comment by:   judas dot iscariote at gmail dot com
 Reported By:  php_bug dot email at email dot digiways dot com
 Status:   Open
 Bug Type: Arrays related
 Operating System: Windows XP
 PHP Version:  5.1.6
 New Comment:

again, THIS IS NOT A BUG ¡!

but yes,this behaviuor should be described in the documentation I
think.

I still think this kind of code should raise an E_WARNING or something
( the idea was proposed a while ago, but refused)


Previous Comments:


[2006-10-01 22:12:20] plyrvt at mail dot ru

This bug can be described shortly:
Existance of a reference to the element of an array prevents this
element to be passed by value as long as any reference point to it



[2006-10-01 22:02:06] php_bug dot email at email dot digiways dot com

Actually this is not just about foreach, this is the generic problem
with references.
Apparently if you have a reference to an array element, then when you
pass that array to a function and modify that element in the function,
then the external array is modified as well, and not just the copy
passed to the function.

A small example which shows the problem:
$myarray = array( 'mykey' = 'foo' );
function doit($tmp) { $tmp['mykey'] = 'bar'; }
$value = $myarray['mykey'];
echo $myarray['mykey'].\n;
doit($myarray);
echo $myarray['mykey'].\n;

Once again - can anyone point to the documentation page which explains
this behaviour ?



[2006-10-01 21:55:23] plyrvt at mail dot ru

If you add unset($val) after foreach, original array starts back to
work as expected:

?php
$a['b']='foo';
function boo($_params){
$_params['b'] = 'bar';
echo $_params['b'];
}

foreach($a as $key = $val) {}
unset($val);

echo $a['b'];
boo($a);
echo $a['b'];
/*
foo
bar
foo
*/
?



[2006-10-01 21:39:58] plyrvt at mail dot ru

Confirm with 5.1.6:
?php
$a['b']='foo';
function boo($_params){
$_params['b'] = 'bar';
echo $a['b'];
}

foreach($a as $key = $val) {} // ?!

echo $a['b'];
boo($a);
echo $a['b'];
?

If you comment out `foreach` loop or remove  near `$val`, code works
OK. Loop does nothing and $val is *never* mentioned in code elsewhere.



[2006-10-01 21:37:06] php_bug dot email at email dot digiways dot com

This problem affects all the arrays and not just the $_GET one. Please
note that $value is not reused outside of the foreach loop. Effectively
this renders foreach by reference useless.

Another very simple script which reproduces the problem:

$myarray = array( 'mykey' = 'foo' );
function doit($tmp) { $tmp['mykey'] = 'bar'; }
foreach($myarray as $key = $value) {}
echo $myarray['mykey'].\n;
doit($myarray);
echo $myarray['mykey'].\n;

and outputs
   foo
   bar
instead of
   foo
   foo



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/39011

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


#39006 [Com]: PHP crashes at shutdown if browscap is on

2006-10-01 Thread phpbugs at thequod dot de
 ID:   39006
 Comment by:   phpbugs at thequod dot de
 Reported By:  alt2k4 at yandex dot ru
 Status:   Open
 Bug Type: Reproducible crash
 Operating System: windows (xp sp2)
 PHP Version:  5.2.0RC4
 New Comment:

Have you tried reproducing it with a php.ini file where 
just browscap is defined?


Previous Comments:


[2006-10-01 09:05:30] alt2k4 at yandex dot ru

Description:

PHP crashes at shutdown if browscap file is specified(even if
get_browser() not used). (tested on CGI)

Reproduce code:
---
ANYTHING, browscap enabled

Expected result:

normal shutdown.

Actual result:
--
php crash.
(I am REALLY sorry if this is not php problem, but mine installation)





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


#39011 [Opn]: foreach($_GET as $key = $value) causes later bugs passing $_GET as a paramete

2006-10-01 Thread php_bug dot email at email dot digiways dot com
 ID:   39011
 User updated by:  php_bug dot email at email dot digiways dot com
 Reported By:  php_bug dot email at email dot digiways dot com
 Status:   Open
 Bug Type: Arrays related
 Operating System: Windows XP
 PHP Version:  5.1.6
 New Comment:

Documentation describes that parameters are passed to functions by
value by default. And since the behaviour you are talking about is not
documented anywhere, it is definitely a bug.

So, I suggest you read PHP documentation starting with
http://www.php.net/manual/en/functions.arguments.php
which clearly states:
===
By default, function arguments are passed by value (so that if you
change the value of the argument within the function, it does not get
changed outside of the function). If you wish to allow a function to
modify its arguments, you must pass them by reference.
===

and then explain it again why the problem described above is not a bug
although it does not do what PHP documentation states it does.


Previous Comments:


[2006-10-01 22:34:35] judas dot iscariote at gmail dot com

again, THIS IS NOT A BUG ¡!

but yes,this behaviuor should be described in the documentation I
think.

I still think this kind of code should raise an E_WARNING or something
( the idea was proposed a while ago, but refused)



[2006-10-01 22:12:20] plyrvt at mail dot ru

This bug can be described shortly:
Existance of a reference to the element of an array prevents this
element to be passed by value as long as any reference point to it



[2006-10-01 22:02:06] php_bug dot email at email dot digiways dot com

Actually this is not just about foreach, this is the generic problem
with references.
Apparently if you have a reference to an array element, then when you
pass that array to a function and modify that element in the function,
then the external array is modified as well, and not just the copy
passed to the function.

A small example which shows the problem:
$myarray = array( 'mykey' = 'foo' );
function doit($tmp) { $tmp['mykey'] = 'bar'; }
$value = $myarray['mykey'];
echo $myarray['mykey'].\n;
doit($myarray);
echo $myarray['mykey'].\n;

Once again - can anyone point to the documentation page which explains
this behaviour ?



[2006-10-01 21:55:23] plyrvt at mail dot ru

If you add unset($val) after foreach, original array starts back to
work as expected:

?php
$a['b']='foo';
function boo($_params){
$_params['b'] = 'bar';
echo $_params['b'];
}

foreach($a as $key = $val) {}
unset($val);

echo $a['b'];
boo($a);
echo $a['b'];
/*
foo
bar
foo
*/
?



[2006-10-01 21:39:58] plyrvt at mail dot ru

Confirm with 5.1.6:
?php
$a['b']='foo';
function boo($_params){
$_params['b'] = 'bar';
echo $a['b'];
}

foreach($a as $key = $val) {} // ?!

echo $a['b'];
boo($a);
echo $a['b'];
?

If you comment out `foreach` loop or remove  near `$val`, code works
OK. Loop does nothing and $val is *never* mentioned in code elsewhere.



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/39011

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


#39004 [Asn]: Configure Command './configure' 'dummy' 'grep' 'ggrep' !?

2006-10-01 Thread phpbugs at thequod dot de
 ID:   39004
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
 Status:   Assigned
 Bug Type: *General Issues
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2006-09-30 (CVS)
 Assigned To:  iliaa
 New Comment:

Better. But now all arguments are encapsulated in two 
single quotes, while they were given in one single quote 
before, e.g.:
Configure Command 
=  ''--enable-calendar'' ''--enable-exif'' ...


Previous Comments:


[2006-10-01 21:51:37] [EMAIL PROTECTED]

Try this patch and let me know if that fixes the problem
http://bb.prohost.org/patch/bug39004.txt



[2006-10-01 20:46:35] phpbugs at thequod dot de

2.60-1 (Debian/Ubuntu)



[2006-10-01 20:37:35] [EMAIL PROTECTED]

What version of autoconf are you using?



[2006-09-30 14:50:02] phpbugs at thequod dot de

Description:

I've just configured PHP_5_2 through the following script 
(wrapper for configure) and now 
get './configure' 'dummy' 'grep' 'ggrep' as 
the Configure Command in phpinfo().

Reproduce code:
---
#!/bin/bash

./configure \
--enable-calendar \
--enable-exif \
--enable-force-cgi-redirect  \
--enable-gd-native-ttf \
--enable-inline-optimization \
--enable-mbstring=all \
--enable-mbregex \
--enable-memcache \
--enable-memory-limit \
--enable-sockets \
--enable-track-vars \
--with-bz2 \
--with-dom \
--with-freetype-dir \
--with-gd \
--with-gettext \
--with-iconv \
--with-imap \
--with-imap-ssl \
--with-jpeg-6b \
--with-jpeg-dir \
--with-kerberos \
--with-ldap \
--with-ldap-sasl \
--with-mcrypt \
--with-mysql \
--with-openssl \
--with-png-dir \
--without-mm \
--with-sqlite \
--with-pcre-regex \
--with-ttf \
--with-zlib \
--with-zlib-dir=/bin \
--with-apxs2=/usr/bin/apxs2

make
make install
php -i | grep Configure Command

Expected result:

The configure line/options.

Actual result:
--
Configure Command =  './configure' 'dummy' 'grep' 'ggrep'





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


#39004 [Asn]: Configure Command './configure' 'dummy' 'grep' 'ggrep' !?

2006-10-01 Thread phpbugs at thequod dot de
 ID:   39004
 User updated by:  phpbugs at thequod dot de
 Reported By:  phpbugs at thequod dot de
 Status:   Assigned
 Bug Type: *General Issues
 Operating System: Ubuntu Linux
 PHP Version:  5CVS-2006-09-30 (CVS)
 Assigned To:  iliaa
 New Comment:

Also the initial ./configure command is missing in the 
output after applying the patch.


Previous Comments:


[2006-10-01 22:44:07] phpbugs at thequod dot de

Better. But now all arguments are encapsulated in two 
single quotes, while they were given in one single quote 
before, e.g.:
Configure Command 
=  ''--enable-calendar'' ''--enable-exif'' ...



[2006-10-01 21:51:37] [EMAIL PROTECTED]

Try this patch and let me know if that fixes the problem
http://bb.prohost.org/patch/bug39004.txt



[2006-10-01 20:46:35] phpbugs at thequod dot de

2.60-1 (Debian/Ubuntu)



[2006-10-01 20:37:35] [EMAIL PROTECTED]

What version of autoconf are you using?



[2006-09-30 14:50:02] phpbugs at thequod dot de

Description:

I've just configured PHP_5_2 through the following script 
(wrapper for configure) and now 
get './configure' 'dummy' 'grep' 'ggrep' as 
the Configure Command in phpinfo().

Reproduce code:
---
#!/bin/bash

./configure \
--enable-calendar \
--enable-exif \
--enable-force-cgi-redirect  \
--enable-gd-native-ttf \
--enable-inline-optimization \
--enable-mbstring=all \
--enable-mbregex \
--enable-memcache \
--enable-memory-limit \
--enable-sockets \
--enable-track-vars \
--with-bz2 \
--with-dom \
--with-freetype-dir \
--with-gd \
--with-gettext \
--with-iconv \
--with-imap \
--with-imap-ssl \
--with-jpeg-6b \
--with-jpeg-dir \
--with-kerberos \
--with-ldap \
--with-ldap-sasl \
--with-mcrypt \
--with-mysql \
--with-openssl \
--with-png-dir \
--without-mm \
--with-sqlite \
--with-pcre-regex \
--with-ttf \
--with-zlib \
--with-zlib-dir=/bin \
--with-apxs2=/usr/bin/apxs2

make
make install
php -i | grep Configure Command

Expected result:

The configure line/options.

Actual result:
--
Configure Command =  './configure' 'dummy' 'grep' 'ggrep'





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


#17738 [Com]: SSL support for LDAP

2006-10-01 Thread michael at akatose dot de
 ID:   17738
 Comment by:   michael at akatose dot de
 Reported By:  benoit at gide dot net
 Status:   No Feedback
 Bug Type: LDAP related
 Operating System: Redhat 6.2 7.1 7.2
 PHP Version:  4.2.1
 New Comment:

Ok, this problem vanished, as soon as I replaced the
wildcard-certificate at the LDAP server (CN=*.example.com) with a
simple certificate (CN=ldap.example.com).

I double-checked this with another wildcard-certificate, which is also
accepted by the command line utilities. Again, PHP's ldap_start_tls()
returns false and gives its warning Unable to start TLS: Connect
error.
A capture of the network traffic to the LDAP server reveals, that even
though ldap_start_tls() returns false, the connection is encrypted
afterwards.

So it seems, that the handling of the return code is wrong, when using
wildcard-certificates.


Previous Comments:


[2006-10-01 02:35:13] michael at akatose dot de

This error not only happens with SSL (ldaps), but also when using
StartTLS.

On my system, the correct CA certificate is referenced in
/etc/ldap/ldap.conf and command line utilities can connect without
problems:
~# ldapsearch -v -x -ZZ (objectClass=*)
ldap_initialize( DEFAULT )
filter: (objectClass=*)
requesting: ALL
# extended LDIF
# ...

But the following PHP script fails (on PHP-5.1.2 from Ubuntu-6.06):
?php
$server = ldap_connect(ldap://ldap.example.com;);
ldap_set_option($server, LDAP_OPT_PROTOCOL_VERSION, 3);
$result = ldap_read($server, dc=example,dc=com,
(objectclass=*));
$entry = ldap_get_entries($server, $result);
print_r($entry);
// everything works fine up to this point
// no network problems, we are really talking to the server

ldap_start_tls($server);
// this fails:
// Warning: ldap_start_tls() [function.ldap-start-tls]:
// Unable to start TLS: Connect error in /var/www/ldaptest.php
on line 10

ldap_close($server);
?

As you can see a Connect error is returned, altough this seems to be
an error while checking the server certificate. I can get the command
line utilities to throw the same error by making the CA certificate
unreadable:
~# ldapsearch -v -x -ZZ (objectClass=*)
ldap_initialize( DEFAULT )
ldap_start_tls: Connect error (-11)


The PHP script will work, if I disable the verification of the server
certificate by putting the already mentioned TLS_REQCERT never in
/etc/ldap/ldap.conf



[2004-12-09 09:54:25] sami at sipponen dot com

phpdeveloper at chinese dot university dot hk's  problem seems to be
related an issue with PHP Windows build's not so good documented
features... See the link below:

http://www.ldaphelp.com/viewtopic.php?t=6

It seems that there are some hard coded config file issues with PHP's
ldap extension.

Copypaste from the site which link is above:

create the directory: C:\OpenLDAP\sysconf\ and put there a ldap.conf
file which contains in its first line: 
TLS_REQCERT never



[2003-07-19 00:18:04] phpdeveloper at chinese dot university dot hk

i am using IIS+windows xp+php4.3.2.2 facing the same problem and can
not connect to the ldap except using ldaps://host:636/ but success
using ldap://host/



[2002-09-11 11:19:30] [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.





[2002-06-21 15:17:11] [EMAIL PROTECTED]

If you use the OpenLDAP 2.x.x lib, the script below
should work. At least I don't see anything wrong.
Only error I can think of is that the lib isn't
compiled with SSL, but if this was the lib used when building
ldapsearch, then this should be okay too.

PHP doesn't really do anything clever with LDAP and SSL
here, it only passes the URL to the lib in ldap_connect()
and the lib will/should use SSL since the URL starts with
ldaps. This is exactly what ldapsearch does too. So I
don't really see what's wrong here.

I would try to see what LDAP library is used and check
whether it's compiled with SSL. strace/tcpdump/gdb might
be of use to see what's going on.



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/17738

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


#39011 [Opn]: foreach($_GET as $key = $value) causes later bugs passing $_GET as a paramete

2006-10-01 Thread php_bug dot email at email dot digiways dot com
 ID:   39011
 User updated by:  php_bug dot email at email dot digiways dot com
 Reported By:  php_bug dot email at email dot digiways dot com
 Status:   Open
 Bug Type: Arrays related
 Operating System: Windows XP
 PHP Version:  5.1.6
 New Comment:

Actually this is not just about foreach, this is the generic problem
with references.
Apparently if you have a reference to an array element, then when you
pass that array to a function and modify that element in the function,
then the external array is modified as well, and not just the copy
passed to the function.

A small example which shows the problem:
$myarray = array( 'mykey' = 'foo' );
function doit($tmp) { $tmp['mykey'] = 'bar'; }
$value = $myarray['mykey'];
echo $myarray['mykey'].\n;
doit($myarray);
echo $myarray['mykey'].\n;

Once again - can anyone point to the documentation page which explains
this behaviour ?


Previous Comments:


[2006-10-01 21:55:23] plyrvt at mail dot ru

If you add unset($val) after foreach, original array starts back to
work as expected:

?php
$a['b']='foo';
function boo($_params){
$_params['b'] = 'bar';
echo $_params['b'];
}

foreach($a as $key = $val) {}
unset($val);

echo $a['b'];
boo($a);
echo $a['b'];
/*
foo
bar
foo
*/
?



[2006-10-01 21:39:58] plyrvt at mail dot ru

Confirm with 5.1.6:
?php
$a['b']='foo';
function boo($_params){
$_params['b'] = 'bar';
echo $a['b'];
}

foreach($a as $key = $val) {} // ?!

echo $a['b'];
boo($a);
echo $a['b'];
?

If you comment out `foreach` loop or remove  near `$val`, code works
OK. Loop does nothing and $val is *never* mentioned in code elsewhere.



[2006-10-01 21:37:06] php_bug dot email at email dot digiways dot com

This problem affects all the arrays and not just the $_GET one. Please
note that $value is not reused outside of the foreach loop. Effectively
this renders foreach by reference useless.

Another very simple script which reproduces the problem:

$myarray = array( 'mykey' = 'foo' );
function doit($tmp) { $tmp['mykey'] = 'bar'; }
foreach($myarray as $key = $value) {}
echo $myarray['mykey'].\n;
doit($myarray);
echo $myarray['mykey'].\n;

and outputs
   foo
   bar
instead of
   foo
   foo



[2006-10-01 21:00:11] php_bug dot email at email dot digiways dot com

Where exactly is this behaviour documented? Can you point to the
documentation page as I failed to find this.

Also, another defect http://bugs.php.net/bug.php?id=29992 which was
referenced here is a different problem. In my case I do not reuse the
reference variable $value .



[2006-10-01 20:39:17] [EMAIL PROTECTED]

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

bogus



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/39011

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


#32002 [Com]: FATAL erealloc() Restarts

2006-10-01 Thread automap at gmail dot com
 ID:   32002
 Comment by:   automap at gmail dot com
 Reported By:  tlamay at cte1 dot com
 Status:   No Feedback
 Bug Type: Unknown/Other Function
 Operating System: Windows 2003
 PHP Version:  4CVS-2005-02-17
 New Comment:

I also encounter this problem:
[Sun Oct 01 16:52:03 2006] [notice] Apache/2.0.59 (Win32) mod_jk2/2.0.4
PHP/5.0.4 configured -- resuming normal operations
[Sun Oct 01 16:52:03 2006] [notice] Server built: Jul 27 2006 15:55:03
[Sun Oct 01 16:52:03 2006] [notice] Parent: Created child process 460
[Sun Oct 01 16:52:03 2006] [notice] Disabled use of AcceptEx() WinSock2
API
[Sun Oct 01 16:52:03 2006] [notice] Child 460: Child process is
running
[Sun Oct 01 16:52:03 2006] [notice] Child 460: Acquired the start
mutex.
[Sun Oct 01 16:52:03 2006] [notice] Child 460: Starting 250 worker
threads.
[Sun Oct 01 16:52:03 2006] [notice] Child 460: Listening on port 80.
[Sun Oct 01 18:39:30 2006] [notice] Parent: child process exited with
status 3221225477 -- Restarting.
[Sun Oct 01 18:39:31 2006] [notice] Apache/2.0.59 (Win32) mod_jk2/2.0.4
PHP/5.0.4 configured -- resuming normal operations
[Sun Oct 01 18:39:31 2006] [notice] Server built: Jul 27 2006 15:55:03
[Sun Oct 01 18:39:31 2006] [notice] Parent: Created child process 2272
[Sun Oct 01 18:39:31 2006] [notice] Disabled use of AcceptEx() WinSock2
API
[Sun Oct 01 18:39:32 2006] [notice] Child 2272: Child process is
running
[Sun Oct 01 18:39:32 2006] [notice] Child 2272: Acquired the start
mutex.
[Sun Oct 01 18:39:32 2006] [notice] Child 2272: Starting 250 worker
threads.
[Sun Oct 01 18:39:32 2006] [notice] Child 2272: Listening on port 80.
FATAL:  erealloc():  Unable to allocate 1049288 bytes
[Sun Oct 01 20:15:12 2006] [notice] Parent: child process exited with
status 1 -- Restarting.

Who know how to overcome it?
Please send email to me: [EMAIL PROTECTED]


Previous Comments:


[2006-07-04 13:22:05] vincent dot lepot at smile dot fr

This bug happens for me since I added in httpd.conf the option
Win32DisableAcceptEx (because of the number of warnings appearing).
When I comment it, there are no more memory leak. So it seems to be a
Apache 2 bug.



[2006-05-29 03:20:24] jcink2k at gmail dot com

I get this bug too. Is there any fix at all after all this time?



[2006-04-14 12:23:39] php at softandem dot com

I also noticed this problem 

FATAL:  erealloc():  Unable to allocate  bytes

with various version of windows/php/apache :

Windows 2000 server or Windows server 2003
PHP 4.4.1 (I think 4.3.2 too)
Apache 1.3.19, 1.3.34, 2.0.55

The problem is very critical because I use a php module that   keep
sessions informations of my users in C++ objects which are lost when
apache rotates.
The problem does not occur at regular interval but always. The problem
occurs frequently when there is a lot of query passed from Internet
Explorer 6.0 on a single windows machine (example : refreshing a page
lots of times)

Thank you for your experiments on this issue.



[2006-01-01 12:18:25] vsitforum at yahoo dot com

I also experience this problem with my current home server

windows XP Professional SP2 
 apache 2.0.55 
 PHP 4.4.1 
 Zend optimizer 2.6.0

Hardware is pretty decent 
P4 2.8 CPU 
2GB of DDR400

The symtom is very much alike the very first post.I would like to know
if there's anyway to fix this

Thank you



[2005-11-28 03:26:44] broadmind at magicn dot com

I have also got this problem too. :_(
This is very serious one because sometimes it crashes apache server
totally, causes to non-restart condition.
(I have to restart the computer at this time)

The memory sizs of PHP.ini didn't any effects on it. 

Our platform is:

AMD Opteron 2 CPU (multiprocessor)
Win2K Server
Apache 1.3.34
PHP 5.1.0

FATAL:  erealloc():  Unable to allocate xxx bytes

At this time, the child process is terminated and Apache is restarted
automatically. This results in the loss of POST data or the error of
page connection.



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/32002

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