#43851 [NEW]: Memory corrution on reuse of assigned value

2008-01-15 Thread dmitry at zend dot com
From: dmitry at zend dot com
Operating system: *
PHP version:  5.3CVS-2008-01-15 (CVS)
PHP Bug Type: Scripting Engine problem
Bug description:  Memory corrution on reuse of assigned value

Description:

Run the following script with valgrind and USE_ZEND_ALLOC=0.

$ USE_ZEND_ALLOC=0 valgrind sapi/cli/php foo.php  

Reproduce code:
---
?php
foo();
function foo() {
  global $LAST;
  ($LAST = $LAST + 0) * 1;
  echo ok\n;
}
?

Expected result:

ok

Actual result:
--
==24239== Conditional jump or move depends on uninitialised value(s)
==24239==at 0x83ED944: zend_pzval_unlock_func (zend_execute.c:69)
==24239==by 0x83EFE9A: _get_zval_ptr_var (zend_execute.c:187)
==24239==by 0x8405823: ZEND_MUL_SPEC_VAR_CONST_HANDLER
(zend_vm_execute.h:8581)
==24239==by 0x83EC05B: execute (zend_vm_execute.h:87)
==24239==by 0x83EC6B4: zend_do_fcall_common_helper_SPEC
(zend_vm_execute.h:221)
==24239==by 0x83ED270: ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER
(zend_vm_execute.h:309)
==24239==by 0x83EC05B: execute (zend_vm_execute.h:87)
==24239==by 0x83C493D: zend_execute_scripts (zend.c:1139)
==24239==by 0x836B15D: php_execute_script (main.c:2010)
==24239==by 0x844BEBB: main (php_cli.c:1140)
==24239==
==24239== Conditional jump or move depends on uninitialised value(s)
==24239==at 0x83ED994: zend_pzval_unlock_func (zend_execute.c:76)
==24239==by 0x83EFE9A: _get_zval_ptr_var (zend_execute.c:187)
==24239==by 0x8405823: ZEND_MUL_SPEC_VAR_CONST_HANDLER
(zend_vm_execute.h:8581)
==24239==by 0x83EC05B: execute (zend_vm_execute.h:87)
==24239==by 0x83EC6B4: zend_do_fcall_common_helper_SPEC
(zend_vm_execute.h:221)
==24239==by 0x83ED270: ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER
(zend_vm_execute.h:309)
==24239==by 0x83EC05B: execute (zend_vm_execute.h:87)
==24239==by 0x83C493D: zend_execute_scripts (zend.c:1139)
==24239==by 0x836B15D: php_execute_script (main.c:2010)
==24239==by 0x844BEBB: main (php_cli.c:1140)
==24239==
==24239== Conditional jump or move depends on uninitialised value(s)
==24239==at 0x83ED9A5: zend_pzval_unlock_func (zend_execute.c:76)
==24239==by 0x83EFE9A: _get_zval_ptr_var (zend_execute.c:187)
==24239==by 0x8405823: ZEND_MUL_SPEC_VAR_CONST_HANDLER
(zend_vm_execute.h:8581)
==24239==by 0x83EC05B: execute (zend_vm_execute.h:87)
==24239==by 0x83EC6B4: zend_do_fcall_common_helper_SPEC
(zend_vm_execute.h:221)
==24239==by 0x83ED270: ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER
(zend_vm_execute.h:309)
==24239==by 0x83EC05B: execute (zend_vm_execute.h:87)
==24239==by 0x83C493D: zend_execute_scripts (zend.c:1139)
==24239==by 0x836B15D: php_execute_script (main.c:2010)
==24239==by 0x844BEBB: main (php_cli.c:1140)


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


#43851 [Opn-Asn]: Memory corrution on reuse of assigned value

2008-01-15 Thread dmitry
 ID:   43851
 Updated by:   [EMAIL PROTECTED]
 Reported By:  dmitry at zend dot com
-Status:   Open
+Status:   Assigned
 Bug Type: Scripting Engine problem
 Operating System: *
 PHP Version:  5.3CVS-2008-01-15 (CVS)
-Assigned To:  
+Assigned To:  dmitry


Previous Comments:


[2008-01-15 08:25:04] dmitry at zend dot com

Description:

Run the following script with valgrind and USE_ZEND_ALLOC=0.

$ USE_ZEND_ALLOC=0 valgrind sapi/cli/php foo.php  

Reproduce code:
---
?php
foo();
function foo() {
  global $LAST;
  ($LAST = $LAST + 0) * 1;
  echo ok\n;
}
?

Expected result:

ok

Actual result:
--
==24239== Conditional jump or move depends on uninitialised value(s)
==24239==at 0x83ED944: zend_pzval_unlock_func (zend_execute.c:69)
==24239==by 0x83EFE9A: _get_zval_ptr_var (zend_execute.c:187)
==24239==by 0x8405823: ZEND_MUL_SPEC_VAR_CONST_HANDLER
(zend_vm_execute.h:8581)
==24239==by 0x83EC05B: execute (zend_vm_execute.h:87)
==24239==by 0x83EC6B4: zend_do_fcall_common_helper_SPEC
(zend_vm_execute.h:221)
==24239==by 0x83ED270: ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER
(zend_vm_execute.h:309)
==24239==by 0x83EC05B: execute (zend_vm_execute.h:87)
==24239==by 0x83C493D: zend_execute_scripts (zend.c:1139)
==24239==by 0x836B15D: php_execute_script (main.c:2010)
==24239==by 0x844BEBB: main (php_cli.c:1140)
==24239==
==24239== Conditional jump or move depends on uninitialised value(s)
==24239==at 0x83ED994: zend_pzval_unlock_func (zend_execute.c:76)
==24239==by 0x83EFE9A: _get_zval_ptr_var (zend_execute.c:187)
==24239==by 0x8405823: ZEND_MUL_SPEC_VAR_CONST_HANDLER
(zend_vm_execute.h:8581)
==24239==by 0x83EC05B: execute (zend_vm_execute.h:87)
==24239==by 0x83EC6B4: zend_do_fcall_common_helper_SPEC
(zend_vm_execute.h:221)
==24239==by 0x83ED270: ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER
(zend_vm_execute.h:309)
==24239==by 0x83EC05B: execute (zend_vm_execute.h:87)
==24239==by 0x83C493D: zend_execute_scripts (zend.c:1139)
==24239==by 0x836B15D: php_execute_script (main.c:2010)
==24239==by 0x844BEBB: main (php_cli.c:1140)
==24239==
==24239== Conditional jump or move depends on uninitialised value(s)
==24239==at 0x83ED9A5: zend_pzval_unlock_func (zend_execute.c:76)
==24239==by 0x83EFE9A: _get_zval_ptr_var (zend_execute.c:187)
==24239==by 0x8405823: ZEND_MUL_SPEC_VAR_CONST_HANDLER
(zend_vm_execute.h:8581)
==24239==by 0x83EC05B: execute (zend_vm_execute.h:87)
==24239==by 0x83EC6B4: zend_do_fcall_common_helper_SPEC
(zend_vm_execute.h:221)
==24239==by 0x83ED270: ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER
(zend_vm_execute.h:309)
==24239==by 0x83EC05B: execute (zend_vm_execute.h:87)
==24239==by 0x83C493D: zend_execute_scripts (zend.c:1139)
==24239==by 0x836B15D: php_execute_script (main.c:2010)
==24239==by 0x844BEBB: main (php_cli.c:1140)






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


#43852 [NEW]: serialize() uses \0 in its output

2008-01-15 Thread lapo at lapo dot it
From: lapo at lapo dot it
Operating system: *
PHP version:  5.2.5
PHP Bug Type: Strings related
Bug description:  serialize() uses \0 in its output

Description:

It seems that bug #29865 is back: in release 5.2.5 serialize() uses ASCII
0 to serialize private property names.

Reproduce code:
---
% php -r 'class A { private $t;} echo serialize(new A());'|hexdump -C

Expected result:

  4f 3a 31 3a 22 41 22 3a  31 3a 7b 73 3a 34 3a 22 
|O:1:A:1:{s:4:|
0010  ** 41 ** 74 22 3b 4e 3b  7d   |.A.t;N;}|

Actual result:
--
  4f 3a 31 3a 22 41 22 3a  31 3a 7b 73 3a 34 3a 22 
|O:1:A:1:{s:4:|
0010  00 41 00 74 22 3b 4e 3b  7d   |.A.t;N;}|

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


#43853 [NEW]: Some IP addresses are note resolved by gethostbyaddr()

2008-01-15 Thread radonov at ecad dot tu-sofia dot bg
From: radonov at ecad dot tu-sofia dot bg
Operating system: Solaris 8
PHP version:  4.4.8
PHP Bug Type: Network related
Bug description:  Some IP addresses are note resolved by gethostbyaddr()

Description:

Some IP addresses are note resolved by gethostbyaddr() under Solaris 8.
Solrais nslookup resolves the addresses normaly.

Reproduce code:
---
var_dump(gethostbyaddr('78.130.136.12'));
The result is:
string(13) 78.130.136.12

Expected result:

The result should be:
string(22) atlantis.botevgrad.com


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


#43842 [Opn]: register_globals randomise switching value On/Off

2008-01-15 Thread dan at eskhosting dot com
 ID:   43842
 User updated by:  dan at eskhosting dot com
 Reported By:  dan at eskhosting dot com
 Status:   Open
 Bug Type: *Configuration Issues
 Operating System: Linux Red Hat ES 4
 PHP Version:  5.2.5
 New Comment:

See here: http://blog.nefedov.org/phpinfo.php
Now php.ini value is On. In .htaccess - Off.

Local Master
OnOn
Off   On
Off   On
Off   On
OnOn
OnOn
OnOn
Off   On
Off   On
OnOn
OnOn
OnOn
OnOn
OnOn
OnOn
Off   On
OnOn
Off   On
OnOn
(interval - 1 min)


Previous Comments:


[2008-01-14 17:05:01] dan at eskhosting dot com

Apache 1.3.37 PHP as module.
5.2.3 worked without this problem..



[2008-01-14 16:54:29] dan at eskhosting dot com

Description:

Set up value for gerister_globals take a random effect.

Reproduce code:
---
php.ini:
register_globals = Off

.htaccess:
php_flag register_globals On





Expected result:

register_globals On

Actual result:
--
? 
 phpinfo();
?
reports:

register_globals On/Off - randomise!





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


#43852 [Opn]: serialize() uses \0 in its output

2008-01-15 Thread lapo at lapo dot it
 ID:   43852
 User updated by:  lapo at lapo dot it
 Reported By:  lapo at lapo dot it
 Status:   Open
 Bug Type: Strings related
 Operating System: *
 PHP Version:  5.2.5
 New Comment:

On the other hand, (since 5.0.0) there is a testcase that specifically
checks that the output *does indeed* use zero bytes in privateprotected
methods (tests/classes/bug26737.phpt).

If that testcase always succeded, I wonder how version 5.0.5 could
possibly have solved the problem outlined in bug #29865 (that is, the
fact that \0 is used by serialize, the same as this bug does).


Previous Comments:


[2008-01-15 08:52:46] lapo at lapo dot it

Description:

It seems that bug #29865 is back: in release 5.2.5 serialize() uses
ASCII 0 to serialize private property names.

Reproduce code:
---
% php -r 'class A { private $t;} echo serialize(new A());'|hexdump -C

Expected result:

  4f 3a 31 3a 22 41 22 3a  31 3a 7b 73 3a 34 3a 22 
|O:1:A:1:{s:4:|
0010  ** 41 ** 74 22 3b 4e 3b  7d   |.A.t;N;}|

Actual result:
--
  4f 3a 31 3a 22 41 22 3a  31 3a 7b 73 3a 34 3a 22 
|O:1:A:1:{s:4:|
0010  00 41 00 74 22 3b 4e 3b  7d   |.A.t;N;}|





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


#43854 [NEW]: Wrong length calculation in serialize S type

2008-01-15 Thread tomasz dot rutkowski at domeny dot pl
From: tomasz dot rutkowski at domeny dot pl
Operating system: Linux
PHP version:  5.2.5
PHP Bug Type: Arrays related
Bug description:  Wrong length calculation in serialize S type

Description:

PHP 5.2.5 bad serialize string into multiarray.
This bug is only into PHP 5.2.5 .
PHP 5.2.4 is good.


Reproduce code:
---
$bad_serialized_multiarray =
'a:3:{i:0;a:4:{i:0;a:7:{i:0;i:69;i:1;s:30:Lakier do wzork#243;w czarny
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:82;}i:1;a:7:{i:0;i:70;i:1;s:43:Lakier
do wzork#243;w czarny per#322;owy
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:99;}i:2;a:7:{i:0;i:65;i:1;s:34:Lakier
do wzork#243;w bia#322;y
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:85;}i:3;a:7:{i:0;i:75;i:1;s:28:Lakier
utrwalaj#261;cy
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:92;}}i:1;a:3:{i:0;s:2:75;i:1;s:28:Lakier
utrwalaj#261;cy
10ml;i:2;d:12.9902131628207280300557613372802734375;}i:2;i:13;}';

$fix_serialized_multiarray =
'a:3:{i:0;a:4:{i:0;a:7:{i:0;i:69;i:1;s:34:Lakier do wzork#243;w czarny
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:82;}i:1;a:7:{i:0;i:70;i:1;s:47:Lakier
do wzork#243;w czarny per#322;owy
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:99;}i:2;a:7:{i:0;i:65;i:1;s:38:Lakier
do wzork#243;w bia#322;y
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:85;}i:3;a:7:{i:0;i:75;i:1;s:28:Lakier
utrwalaj#261;cy
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:92;}}i:1;a:3:{i:0;s:2:75;i:1;s:28:Lakier
utrwalaj#261;cy
10ml;i:2;d:12.9902131628207280300557613372802734375;}i:2;i:13;}';



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


#43854 [Opn-Fbk]: Wrong length calculation in serialize S type

2008-01-15 Thread felipe
 ID:   43854
 Updated by:   [EMAIL PROTECTED]
 Reported By:  tomasz dot rutkowski at domeny dot pl
-Status:   Open
+Status:   Feedback
 Bug Type: Arrays related
 Operating System: Linux
 PHP Version:  5.2.5
 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ?php and ends with ?,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.


Previous Comments:


[2008-01-15 11:44:25] tomasz dot rutkowski at domeny dot pl

Description:

PHP 5.2.5 bad serialize string into multiarray.
This bug is only into PHP 5.2.5 .
PHP 5.2.4 is good.


Reproduce code:
---
$bad_serialized_multiarray =
'a:3:{i:0;a:4:{i:0;a:7:{i:0;i:69;i:1;s:30:Lakier do wzork#243;w czarny
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:82;}i:1;a:7:{i:0;i:70;i:1;s:43:Lakier
do wzork#243;w czarny per#322;owy
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:99;}i:2;a:7:{i:0;i:65;i:1;s:34:Lakier
do wzork#243;w bia#322;y
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:85;}i:3;a:7:{i:0;i:75;i:1;s:28:Lakier
utrwalaj#261;cy
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:92;}}i:1;a:3:{i:0;s:2:75;i:1;s:28:Lakier
utrwalaj#261;cy
10ml;i:2;d:12.9902131628207280300557613372802734375;}i:2;i:13;}';

$fix_serialized_multiarray =
'a:3:{i:0;a:4:{i:0;a:7:{i:0;i:69;i:1;s:34:Lakier do wzork#243;w czarny
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:82;}i:1;a:7:{i:0;i:70;i:1;s:47:Lakier
do wzork#243;w czarny per#322;owy
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:99;}i:2;a:7:{i:0;i:65;i:1;s:38:Lakier
do wzork#243;w bia#322;y
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:85;}i:3;a:7:{i:0;i:75;i:1;s:28:Lakier
utrwalaj#261;cy
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:92;}}i:1;a:3:{i:0;s:2:75;i:1;s:28:Lakier
utrwalaj#261;cy
10ml;i:2;d:12.9902131628207280300557613372802734375;}i:2;i:13;}';







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


#43855 [NEW]: Apache crashes when creating large number of instances in static function

2008-01-15 Thread dzonny dot dz at gmail dot com
From: dzonny dot dz at gmail dot com
Operating system: Windows XP Pro SP2 CZ 
PHP version:  5.2.5
PHP Bug Type: Class/Object related
Bug description:  Apache crashes when creating large number of instances in 
static function

Description:

Code below always makes my Apache (2.2) to crash.
It's class with static function. Thet static function creates instance of
the class and call some method on it. It also appends string to static
variable and produces output.
It is called in a loop 1000 times. When called 999 times - no crash.

The crash occurs AFTER the code is evaluated (it means when called 2500,
there are 2500 outputs and the crash report).  

Reproduced also on Windows Vista Business EN, Apache 2.2.
NOT reproduced on any Linux I have access to.

Reproduce code:
---
class X{
public function __construct(){}
public static function DoSthStatic(){$inst=new X();$inst-DoSth();return
$inst;}
static $st;
public function DoSth(){
static $st;
@$st++;
echo Done $st, ;
self::$st.=Some string like this;\r\n;
}
}
for($i=0;$i1000;$i++)
X::DoSthStatic();

Expected result:

No crash.

Actual result:
--
Crash. 
The was an error in Apache HTP Server Application ... message.

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


#43851 [Asn-Csd]: Memory corrution on reuse of assigned value

2008-01-15 Thread dmitry
 ID:   43851
 Updated by:   [EMAIL PROTECTED]
 Reported By:  dmitry at zend dot com
-Status:   Assigned
+Status:   Closed
 Bug Type: Scripting Engine problem
 Operating System: *
 PHP Version:  5.3CVS-2008-01-15 (CVS)
 Assigned To:  dmitry
 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:


[2008-01-15 08:25:04] dmitry at zend dot com

Description:

Run the following script with valgrind and USE_ZEND_ALLOC=0.

$ USE_ZEND_ALLOC=0 valgrind sapi/cli/php foo.php  

Reproduce code:
---
?php
foo();
function foo() {
  global $LAST;
  ($LAST = $LAST + 0) * 1;
  echo ok\n;
}
?

Expected result:

ok

Actual result:
--
==24239== Conditional jump or move depends on uninitialised value(s)
==24239==at 0x83ED944: zend_pzval_unlock_func (zend_execute.c:69)
==24239==by 0x83EFE9A: _get_zval_ptr_var (zend_execute.c:187)
==24239==by 0x8405823: ZEND_MUL_SPEC_VAR_CONST_HANDLER
(zend_vm_execute.h:8581)
==24239==by 0x83EC05B: execute (zend_vm_execute.h:87)
==24239==by 0x83EC6B4: zend_do_fcall_common_helper_SPEC
(zend_vm_execute.h:221)
==24239==by 0x83ED270: ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER
(zend_vm_execute.h:309)
==24239==by 0x83EC05B: execute (zend_vm_execute.h:87)
==24239==by 0x83C493D: zend_execute_scripts (zend.c:1139)
==24239==by 0x836B15D: php_execute_script (main.c:2010)
==24239==by 0x844BEBB: main (php_cli.c:1140)
==24239==
==24239== Conditional jump or move depends on uninitialised value(s)
==24239==at 0x83ED994: zend_pzval_unlock_func (zend_execute.c:76)
==24239==by 0x83EFE9A: _get_zval_ptr_var (zend_execute.c:187)
==24239==by 0x8405823: ZEND_MUL_SPEC_VAR_CONST_HANDLER
(zend_vm_execute.h:8581)
==24239==by 0x83EC05B: execute (zend_vm_execute.h:87)
==24239==by 0x83EC6B4: zend_do_fcall_common_helper_SPEC
(zend_vm_execute.h:221)
==24239==by 0x83ED270: ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER
(zend_vm_execute.h:309)
==24239==by 0x83EC05B: execute (zend_vm_execute.h:87)
==24239==by 0x83C493D: zend_execute_scripts (zend.c:1139)
==24239==by 0x836B15D: php_execute_script (main.c:2010)
==24239==by 0x844BEBB: main (php_cli.c:1140)
==24239==
==24239== Conditional jump or move depends on uninitialised value(s)
==24239==at 0x83ED9A5: zend_pzval_unlock_func (zend_execute.c:76)
==24239==by 0x83EFE9A: _get_zval_ptr_var (zend_execute.c:187)
==24239==by 0x8405823: ZEND_MUL_SPEC_VAR_CONST_HANDLER
(zend_vm_execute.h:8581)
==24239==by 0x83EC05B: execute (zend_vm_execute.h:87)
==24239==by 0x83EC6B4: zend_do_fcall_common_helper_SPEC
(zend_vm_execute.h:221)
==24239==by 0x83ED270: ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER
(zend_vm_execute.h:309)
==24239==by 0x83EC05B: execute (zend_vm_execute.h:87)
==24239==by 0x83C493D: zend_execute_scripts (zend.c:1139)
==24239==by 0x836B15D: php_execute_script (main.c:2010)
==24239==by 0x844BEBB: main (php_cli.c:1140)






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


#43752 [Com]: PDO bindParam Mangles bound objects

2008-01-15 Thread mjs at beebo dot org
 ID:   43752
 Comment by:   mjs at beebo dot org
 Reported By:  motoma at gmail dot com
 Status:   Open
 Bug Type: PDO related
 Operating System: Windows
 PHP Version:  5.2CVS-2008-01-04 (snap)
 New Comment:

Does the mangling happen without the ATTR_PERSISTENT?  It looks like
this may be related to:

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

which concerns $this getting mangled


Previous Comments:


[2008-01-04 18:32:58] motoma at gmail dot com

Description:

I built a class with a __toString() member function. When I pass an
instance of this class to bindParam(), the object is overwritten with
the result of __toString().

The result from the code sample suggests that bindParam is overwriting
the value of the object with the object's __toString() value.

Reproduce code:
---
?php
class test
{
private $a = 1;

public function __toString()
{
return strval($this-a);
}
}

$db = new PDO('mysql:host=localhost;dbname=test', 'root', '',
array(PDO::ATTR_PERSISTENT = true));
$obj = new test();

$prepared = $db-prepare('SELECT * FROM table1 WHERE 1 = :test');

var_dump($obj);
$prepared-bindParam('test', $obj);
var_dump($obj);
?

Expected result:

object(test)#2 (1) {
  [a:private]=
  int(1)
}
object(test)#2 (1) {
  [a:private]=
  int(1)
}

Actual result:
--
object(test)#2 (1) {
  [a:private]=
  int(1)
}
string(1) 1





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


#43856 [NEW]: mktime and strftime use different timezones

2008-01-15 Thread john at jcoppens dot com
From: john at jcoppens dot com
Operating system: Linux
PHP version:  5.2.5
PHP Bug Type: Date/time related
Bug description:  mktime and strftime use different timezones

Description:

mktime() and strftime use different timezones...

Reproduce code:
---
echo time() =  . time() .
  \nstrftime = , strftime(%T %Z %z) .
  \nGMT offset =  . mktime(0, 0, 0, 1, 1, 1970) .
 \n;;


Expected result:

time() = 1200409896 
strftime = 13:11:36 ARST -0200 
GMT offset = 7200

Actual result:
--
time() = 1200409896 
strftime = 13:11:36 ARST -0200 
GMT offset = 10800

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


#42443 [Opn-Ana]: PDO SQLite3 lacks integer type support

2008-01-15 Thread scottmac
 ID:   42443
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Analyzed
 Bug Type: SQLite related
 Operating System: *
 PHP Version:  6CVS-2007-08-27 (CVS)
 New Comment:

I have a patch to deal with both of these issues here, just waiting to
here back from Wez about adding it.
http://server.macvicar.net/patches/php-bug42443.patch


Previous Comments:


[2008-01-14 22:27:08] lapo at lapo dot it

Even worse than the integer case (which leads to inefficience) is the
case of BLOBs, which leads to corruption of data: text values can't
contain \0, while blob data can.

E.g. from command line sqlite3:
sqlite SELECT LENGTH(X'1200');
4
sqlite SELECT LENGTH(CAST(X'1200' AS text));
1

Because case PDO_PARAM_LOB falls through to case PDO_PARAM_STR,
which uses sqlite3_bind_text... using PDO is impossible to store BLOB
data in Sqlite3.



[2007-08-27 10:42:16] [EMAIL PROTECTED]

Description:

PDO SQLite3 calls sqlite3_bind_text() for all non-blob and non-null
parameter types regardless of whether integer data is provided. Integer
data can be bound with sqlite3_bind_int(), which saves memory space and
improves efficiency, as well as storing the intended type in a database
which uses SQLite3's value typing. Patch is at:
http://news.php.net/php.internals/31935

Reproduce code:
---
Difficult to show reproduction.

Expected result:

Difficult to show reproduction.

Actual result:
--
Difficult to show reproduction.





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


#43854 [Fbk-Opn]: Wrong length calculation in serialize S type

2008-01-15 Thread tomasz dot rutkowski at domeny dot pl
 ID:   43854
 User updated by:  tomasz dot rutkowski at domeny dot pl
 Reported By:  tomasz dot rutkowski at domeny dot pl
-Status:   Feedback
+Status:   Open
 Bug Type: Arrays related
 Operating System: Linux
 PHP Version:  5.2.5
 New Comment:

Sorry but I can't reconstruct this bug.
Admin change PHP verions on my demand.
This is productive server and they can't back to error version.

On similar server this bug is not reported :(
Perhaps it is liberty problem.


Example code:

?php
/* Error string from DB */
$bad_serialize = 'a:3:{i:0;a:4:{i:0;a:7:{i:0;i:69;i:1;s:30:Lakier do
wzork#243;w czarny
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:82;}i:1;a:7:{i:0;i:70;i:1;s:43:Lakier
do wzork#243;w czarny per#322;owy
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:99;}i:2;a:7:{i:0;i:65;i:1;s:34:Lakier
do wzork#243;w bia#322;y
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:85;}i:3;a:7:{i:0;i:75;i:1;s:28:Lakier
utrwalaj#261;cy
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:92;}}i:1;a:3:{i:0;s:2:75;i:1;s:28:Lakier
utrwalaj#261;cy
10ml;i:2;d:12.9902131628207280300557613372802734375;}i:2;i:13;}';
var_dump( unserialize( $bad_serialize ) );
echo 'br /';

/* Good - fixed by me */
$fix_serialize = 'a:3:{i:0;a:4:{i:0;a:7:{i:0;i:69;i:1;s:34:Lakier do
wzork#243;w czarny
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:82;}i:1;a:7:{i:0;i:70;i:1;s:47:Lakier
do wzork#243;w czarny per#322;owy
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:99;}i:2;a:7:{i:0;i:65;i:1;s:38:Lakier
do wzork#243;w bia#322;y
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:85;}i:3;a:7:{i:0;i:75;i:1;s:28:Lakier
utrwalaj#261;cy
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:92;}}i:1;a:3:{i:0;s:2:75;i:1;s:28:Lakier
utrwalaj#261;cy
10ml;i:2;d:12.9902131628207280300557613372802734375;}i:2;i:13;}';
var_dump( unserialize( $fix_serialize ) );
echo 'br /';

/* Prepared array */
$prepare_array = array( 
  array( 
array( 69, (string) Lakier do wzork#243;w czarny 10ml, (float)
19.98, 1, (float) 19.98, (string) , (string) 82 ),
array( 70, (string) Lakier do wzork#243;w czarny per#322;owy
10ml, (float) 19.98, 1, (float) 19.98, (string) , (string) 99 ),
array( 65, Lakier do wzork#243;w bia#322;y 10ml, (float) 19.98,
1, (float) 19.98, (string) ,(string) 85 ),
array( 75, (string) Lakier utrwalaj#261;cy 10ml, (float) 19.98,
1, (float) 19.98, (string) , (string) 92 )
  ),
  array( (string) 75, (string) Lakier utrwalaj#261;cy 10ml,
(float) 12.99 ),
  2= 13
);

$tmp = serialize( $prepare_array );
var_dump( unserialize( $tmp ) );
?


Previous Comments:


[2008-01-15 12:12:39] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ?php and ends with ?,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.



[2008-01-15 11:44:25] tomasz dot rutkowski at domeny dot pl

Description:

PHP 5.2.5 bad serialize string into multiarray.
This bug is only into PHP 5.2.5 .
PHP 5.2.4 is good.


Reproduce code:
---
$bad_serialized_multiarray =
'a:3:{i:0;a:4:{i:0;a:7:{i:0;i:69;i:1;s:30:Lakier do wzork#243;w czarny
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:82;}i:1;a:7:{i:0;i:70;i:1;s:43:Lakier
do wzork#243;w czarny per#322;owy
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:99;}i:2;a:7:{i:0;i:65;i:1;s:34:Lakier
do wzork#243;w bia#322;y

#43854 [Opn]: Wrong length calculation in serialize S type

2008-01-15 Thread tomasz dot rutkowski at domeny dot pl
 ID:   43854
 User updated by:  tomasz dot rutkowski at domeny dot pl
 Reported By:  tomasz dot rutkowski at domeny dot pl
 Status:   Open
 Bug Type: Arrays related
 Operating System: Linux
 PHP Version:  5.2.5
 New Comment:

Sorry

Bad: Perhaps it is liberty problem.
Good: Probably it is a library problem.


Previous Comments:


[2008-01-15 15:24:56] tomasz dot rutkowski at domeny dot pl

Sorry but I can't reconstruct this bug.
Admin change PHP verions on my demand.
This is productive server and they can't back to error version.

On similar server this bug is not reported :(
Perhaps it is liberty problem.


Example code:

?php
/* Error string from DB */
$bad_serialize = 'a:3:{i:0;a:4:{i:0;a:7:{i:0;i:69;i:1;s:30:Lakier do
wzork#243;w czarny
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:82;}i:1;a:7:{i:0;i:70;i:1;s:43:Lakier
do wzork#243;w czarny per#322;owy
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:99;}i:2;a:7:{i:0;i:65;i:1;s:34:Lakier
do wzork#243;w bia#322;y
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:85;}i:3;a:7:{i:0;i:75;i:1;s:28:Lakier
utrwalaj#261;cy
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:92;}}i:1;a:3:{i:0;s:2:75;i:1;s:28:Lakier
utrwalaj#261;cy
10ml;i:2;d:12.9902131628207280300557613372802734375;}i:2;i:13;}';
var_dump( unserialize( $bad_serialize ) );
echo 'br /';

/* Good - fixed by me */
$fix_serialize = 'a:3:{i:0;a:4:{i:0;a:7:{i:0;i:69;i:1;s:34:Lakier do
wzork#243;w czarny
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:82;}i:1;a:7:{i:0;i:70;i:1;s:47:Lakier
do wzork#243;w czarny per#322;owy
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:99;}i:2;a:7:{i:0;i:65;i:1;s:38:Lakier
do wzork#243;w bia#322;y
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:85;}i:3;a:7:{i:0;i:75;i:1;s:28:Lakier
utrwalaj#261;cy
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:92;}}i:1;a:3:{i:0;s:2:75;i:1;s:28:Lakier
utrwalaj#261;cy
10ml;i:2;d:12.9902131628207280300557613372802734375;}i:2;i:13;}';
var_dump( unserialize( $fix_serialize ) );
echo 'br /';

/* Prepared array */
$prepare_array = array( 
  array( 
array( 69, (string) Lakier do wzork#243;w czarny 10ml, (float)
19.98, 1, (float) 19.98, (string) , (string) 82 ),
array( 70, (string) Lakier do wzork#243;w czarny per#322;owy
10ml, (float) 19.98, 1, (float) 19.98, (string) , (string) 99 ),
array( 65, Lakier do wzork#243;w bia#322;y 10ml, (float) 19.98,
1, (float) 19.98, (string) ,(string) 85 ),
array( 75, (string) Lakier utrwalaj#261;cy 10ml, (float) 19.98,
1, (float) 19.98, (string) , (string) 92 )
  ),
  array( (string) 75, (string) Lakier utrwalaj#261;cy 10ml,
(float) 12.99 ),
  2= 13
);

$tmp = serialize( $prepare_array );
var_dump( unserialize( $tmp ) );
?



[2008-01-15 12:12:39] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ?php and ends with ?,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.



[2008-01-15 11:44:25] tomasz dot rutkowski at domeny dot pl

Description:

PHP 5.2.5 bad serialize string into multiarray.
This bug is only into PHP 5.2.5 .
PHP 5.2.4 is good.


Reproduce code:
---
$bad_serialized_multiarray =
'a:3:{i:0;a:4:{i:0;a:7:{i:0;i:69;i:1;s:30:Lakier do wzork#243;w czarny
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:82;}i:1;a:7:{i:0;i:70;i:1;s:43:Lakier
do wzork#243;w czarny per#322;owy

#43854 [Opn]: Wrong length calculation in serialize S type

2008-01-15 Thread felipe
 ID:   43854
 Updated by:   [EMAIL PROTECTED]
 Reported By:  tomasz dot rutkowski at domeny dot pl
 Status:   Open
 Bug Type: Arrays related
 Operating System: Linux
 PHP Version:  5.2.5
 New Comment:

The example works fine in PHP5.2.5, 5.2.6, 5.3.


Previous Comments:


[2008-01-15 15:32:04] tomasz dot rutkowski at domeny dot pl

Sorry

Bad: Perhaps it is liberty problem.
Good: Probably it is a library problem.



[2008-01-15 15:24:56] tomasz dot rutkowski at domeny dot pl

Sorry but I can't reconstruct this bug.
Admin change PHP verions on my demand.
This is productive server and they can't back to error version.

On similar server this bug is not reported :(
Perhaps it is liberty problem.


Example code:

?php
/* Error string from DB */
$bad_serialize = 'a:3:{i:0;a:4:{i:0;a:7:{i:0;i:69;i:1;s:30:Lakier do
wzork#243;w czarny
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:82;}i:1;a:7:{i:0;i:70;i:1;s:43:Lakier
do wzork#243;w czarny per#322;owy
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:99;}i:2;a:7:{i:0;i:65;i:1;s:34:Lakier
do wzork#243;w bia#322;y
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:85;}i:3;a:7:{i:0;i:75;i:1;s:28:Lakier
utrwalaj#261;cy
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:92;}}i:1;a:3:{i:0;s:2:75;i:1;s:28:Lakier
utrwalaj#261;cy
10ml;i:2;d:12.9902131628207280300557613372802734375;}i:2;i:13;}';
var_dump( unserialize( $bad_serialize ) );
echo 'br /';

/* Good - fixed by me */
$fix_serialize = 'a:3:{i:0;a:4:{i:0;a:7:{i:0;i:69;i:1;s:34:Lakier do
wzork#243;w czarny
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:82;}i:1;a:7:{i:0;i:70;i:1;s:47:Lakier
do wzork#243;w czarny per#322;owy
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:99;}i:2;a:7:{i:0;i:65;i:1;s:38:Lakier
do wzork#243;w bia#322;y
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:85;}i:3;a:7:{i:0;i:75;i:1;s:28:Lakier
utrwalaj#261;cy
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:92;}}i:1;a:3:{i:0;s:2:75;i:1;s:28:Lakier
utrwalaj#261;cy
10ml;i:2;d:12.9902131628207280300557613372802734375;}i:2;i:13;}';
var_dump( unserialize( $fix_serialize ) );
echo 'br /';

/* Prepared array */
$prepare_array = array( 
  array( 
array( 69, (string) Lakier do wzork#243;w czarny 10ml, (float)
19.98, 1, (float) 19.98, (string) , (string) 82 ),
array( 70, (string) Lakier do wzork#243;w czarny per#322;owy
10ml, (float) 19.98, 1, (float) 19.98, (string) , (string) 99 ),
array( 65, Lakier do wzork#243;w bia#322;y 10ml, (float) 19.98,
1, (float) 19.98, (string) ,(string) 85 ),
array( 75, (string) Lakier utrwalaj#261;cy 10ml, (float) 19.98,
1, (float) 19.98, (string) , (string) 92 )
  ),
  array( (string) 75, (string) Lakier utrwalaj#261;cy 10ml,
(float) 12.99 ),
  2= 13
);

$tmp = serialize( $prepare_array );
var_dump( unserialize( $tmp ) );
?



[2008-01-15 12:12:39] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ?php and ends with ?,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.



[2008-01-15 11:44:25] tomasz dot rutkowski at domeny dot pl

Description:

PHP 5.2.5 bad serialize string into multiarray.
This bug is only into PHP 5.2.5 .
PHP 5.2.4 is good.


Reproduce code:
---
$bad_serialized_multiarray =
'a:3:{i:0;a:4:{i:0;a:7:{i:0;i:69;i:1;s:30:Lakier do wzork#243;w czarny
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:82;}i:1;a:7:{i:0;i:70;i:1;s:43:Lakier
do wzork#243;w czarny per#322;owy

#43857 [NEW]: --program-suffix not always reflected everywhere

2008-01-15 Thread bjoern at xrow dot de
From: bjoern at xrow dot de
Operating system: linux
PHP version:  5.2.5
PHP Bug Type: *Configuration Issues
Bug description:  --program-suffix not always reflected everywhere

Description:

Hi,

I used 

./configure --program-suffix=5 --prefix=/usr/local/php5

when i try to run stuff like bin/pecl it fails since the script created by
the installer didn`t take the suffix in account for pecl

- lines from bin/pecl
  if test /usr/local/php5/bin/php = '@'php_bin'@'; then
PHP=php
  else
PHP=/usr/local/php5/bin/php
  fi


after fixing that manually i tryied it again and it seems also the correct
path to phpize is missing with is phpize5

/usr/local/php5/bin/pecl install xdebug

^[[A^[[Adownloading xdebug-2.0.2.tgz ...
Starting to download xdebug-2.0.2.tgz (279,621 bytes)
.done: 279,621 bytes
65 source files, building
running: phpize
Configuring for:
PHP Api Version: 20020918
Zend Module Api No:  20020429
Zend Extension Api No:   20050606
ERROR: `phpize' failed


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


#43680 [Opn-Csd]: OnUpdateUTF8String problems in PHP 6

2008-01-15 Thread tony2001
 ID:   43680
 Updated by:   [EMAIL PROTECTED]
 Reported By:  christopher dot jones at oracle dot com
-Status:   Open
+Status:   Closed
 Bug Type: Unicode Engine related
 Operating System: n/a
 PHP Version:  6CVS-2007-12-26 (CVS)
 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.

Committed =)


Previous Comments:


[2007-12-26 19:36:00] christopher dot jones at oracle dot com

Description:

Problem reported to me as:

  The problems I faced when unicode.semantics=On were:
 
  1) Any OnUpdateUTF8String php.ini variable is seen as NULL in
  oci_globals.
 
  2) If the above is resolved, the memory of the variable is wiped
out,
  by the time we come to execution of the script, after module inits.
 
  3) We still convert to UTF-16 when unicode.semantics=Off.


Patch is in: http://news.php.net/php.internals/32817

Andrei was OK with the change: http://news.php.net/php.internals/32949






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


#43856 [Opn-Asn]: mktime and strftime use different timezones

2008-01-15 Thread tony2001
 ID:   43856
 Updated by:   [EMAIL PROTECTED]
 Reported By:  john at jcoppens dot com
-Status:   Open
+Status:   Assigned
 Bug Type: Date/time related
 Operating System: Linux
 PHP Version:  5.2.5
-Assigned To:  
+Assigned To:  derick


Previous Comments:


[2008-01-15 15:17:14] john at jcoppens dot com

Description:

mktime() and strftime use different timezones...

Reproduce code:
---
echo time() =  . time() .
  \nstrftime = , strftime(%T %Z %z) .
  \nGMT offset =  . mktime(0, 0, 0, 1, 1, 1970) .
 \n;;


Expected result:

time() = 1200409896 
strftime = 13:11:36 ARST -0200 
GMT offset = 7200

Actual result:
--
time() = 1200409896 
strftime = 13:11:36 ARST -0200 
GMT offset = 10800





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


#43854 [Opn]: Wrong length calculation in serialize S type

2008-01-15 Thread felipe
 ID:   43854
 Updated by:   [EMAIL PROTECTED]
 Reported By:  tomasz dot rutkowski at domeny dot pl
 Status:   Open
 Bug Type: Arrays related
 Operating System: Linux
 PHP Version:  5.2.5
 New Comment:

Clarifying... The last code. (Prepared array)


Previous Comments:


[2008-01-15 16:12:04] [EMAIL PROTECTED]

The example works fine in PHP5.2.5, 5.2.6, 5.3.



[2008-01-15 15:32:04] tomasz dot rutkowski at domeny dot pl

Sorry

Bad: Perhaps it is liberty problem.
Good: Probably it is a library problem.



[2008-01-15 15:24:56] tomasz dot rutkowski at domeny dot pl

Sorry but I can't reconstruct this bug.
Admin change PHP verions on my demand.
This is productive server and they can't back to error version.

On similar server this bug is not reported :(
Perhaps it is liberty problem.


Example code:

?php
/* Error string from DB */
$bad_serialize = 'a:3:{i:0;a:4:{i:0;a:7:{i:0;i:69;i:1;s:30:Lakier do
wzork#243;w czarny
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:82;}i:1;a:7:{i:0;i:70;i:1;s:43:Lakier
do wzork#243;w czarny per#322;owy
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:99;}i:2;a:7:{i:0;i:65;i:1;s:34:Lakier
do wzork#243;w bia#322;y
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:85;}i:3;a:7:{i:0;i:75;i:1;s:28:Lakier
utrwalaj#261;cy
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:92;}}i:1;a:3:{i:0;s:2:75;i:1;s:28:Lakier
utrwalaj#261;cy
10ml;i:2;d:12.9902131628207280300557613372802734375;}i:2;i:13;}';
var_dump( unserialize( $bad_serialize ) );
echo 'br /';

/* Good - fixed by me */
$fix_serialize = 'a:3:{i:0;a:4:{i:0;a:7:{i:0;i:69;i:1;s:34:Lakier do
wzork#243;w czarny
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:82;}i:1;a:7:{i:0;i:70;i:1;s:47:Lakier
do wzork#243;w czarny per#322;owy
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:99;}i:2;a:7:{i:0;i:65;i:1;s:38:Lakier
do wzork#243;w bia#322;y
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:85;}i:3;a:7:{i:0;i:75;i:1;s:28:Lakier
utrwalaj#261;cy
10ml;i:2;d:19.980426325641456060111522674560546875;i:3;i:1;i:4;d:19.980426325641456060111522674560546875;i:5;s:0:;i:6;s:2:92;}}i:1;a:3:{i:0;s:2:75;i:1;s:28:Lakier
utrwalaj#261;cy
10ml;i:2;d:12.9902131628207280300557613372802734375;}i:2;i:13;}';
var_dump( unserialize( $fix_serialize ) );
echo 'br /';

/* Prepared array */
$prepare_array = array( 
  array( 
array( 69, (string) Lakier do wzork#243;w czarny 10ml, (float)
19.98, 1, (float) 19.98, (string) , (string) 82 ),
array( 70, (string) Lakier do wzork#243;w czarny per#322;owy
10ml, (float) 19.98, 1, (float) 19.98, (string) , (string) 99 ),
array( 65, Lakier do wzork#243;w bia#322;y 10ml, (float) 19.98,
1, (float) 19.98, (string) ,(string) 85 ),
array( 75, (string) Lakier utrwalaj#261;cy 10ml, (float) 19.98,
1, (float) 19.98, (string) , (string) 92 )
  ),
  array( (string) 75, (string) Lakier utrwalaj#261;cy 10ml,
(float) 12.99 ),
  2= 13
);

$tmp = serialize( $prepare_array );
var_dump( unserialize( $tmp ) );
?



[2008-01-15 12:12:39] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ?php and ends with ?,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.



[2008-01-15 11:44:25] tomasz dot rutkowski at domeny dot pl

Description:

PHP 5.2.5 bad serialize string into multiarray.
This bug is only into PHP 5.2.5 .
PHP 5.2.4 is good.


Reproduce code:
---
$bad_serialized_multiarray =
'a:3:{i:0;a:4:{i:0;a:7:{i:0;i:69;i:1;s:30:Lakier do wzork#243;w czarny

#43497 [Asn]: OCI8 XML/getClobVal leaks UGA memory

2008-01-15 Thread ghosh at q-one dot com
 ID:   43497
 User updated by:  ghosh at q-one dot com
 Reported By:  ghosh at q-one dot com
 Status:   Assigned
 Bug Type: OCI8 related
 Operating System: Linux 2.6.22-14-server
 PHP Version:  5.2.5
 Assigned To:  sixd
 New Comment:

Sorry. I have been on vacation. I will try to check the new patch 
this week if possible. Definitely next week otherwise.


Previous Comments:


[2008-01-15 02:30:42] [EMAIL PROTECTED]

An enhanced patch was sent to the bug filer and Tony on 8th Jan.  I'm
still waiting for feedback . . .



[2008-01-06 23:17:34] ghosh at q-one dot com

Temporary LOBs are created in UGA memory. This is per-session, so 
the leak appears on a per-session basis. Nevertheless this is a 
problem, because PHP scripts dont necessarily have to run for a few 
seconds. PHP is a full-featured scripting language and can also be 
used from the command-line or to implement longer-running 
import-scripts. Even if not, the limit is quickly reached, when 
reading many rows like in my example.



[2008-01-06 20:42:52] [EMAIL PROTECTED]

What I don't understand: I thought OCI_RETURN_LOBS is just a short-
cut for those who don't want to write:

That's what I don't understand either: does the leak appear only on
per-session basis or Oracle doesn't free those LOBs at all?
If the leak is only per-session, then users are not supposed even to
notice it, since PHP requests are not supposed to take more than several
seconds.



[2007-12-29 22:37:21] ghosh at q-one dot com

Really great! Thanks a lot!! This patch works. What I don't understand:
I thought OCI_RETURN_LOBS is just a short-cut for those who don't want
to write:

$s=$result[0]-load();
$result[0]-free();
$result[0]=$s;

If you use OCI_RETURN_LOBS you dont want to care about lobs but get the
result as a string and forget about lobs altogether. So IMHO this should
work as well. My specific problem is solved though.



[2007-12-27 21:44:07] [EMAIL PROTECTED]

This is really an issue with temporary LOBS since getClobVal()
returns a temporary LOB.

There are two parts to the fix: changing the script and patching
the OCI8 extension.  Also don't forget to apply the patch for
http://bugs.php.net/bug.php?id=42496

Please test this suggestion and report any issues.

Thanks to Krishna  Shankar for the solution.

1. Change the test to get the results as LOBs, not as
strings. This allows the script to free temporary LOBs.

In the supplied testcase change:

$query = select extract(xml, '/').getclobval() from ugatest;
$stmt = oci_parse($conn, $query);
if (oci_execute($stmt))
while ($result = oci_fetch_array($stmt,
OCI_NUM+OCI_RETURN_LOBS))
;

to:

$query = select extract(xml, '/').getclobval() from ugatest;
$stmt = oci_parse($conn, $query);
if (oci_execute($stmt))
while ($result = oci_fetch_array($stmt, OCI_NUM)) {
// echo $result[0]-load(), \n; // do something with the
XML
$result[0]-free();  // free the temporary LOB
}

The connection must be open when LOB-free() is called, as the
underlying OCILobFreeTemporary() call does a roundtrip to the
database.


2.  Patch oci8_lob.c.  The change copies some LOB freeing code
from php_oci_lob_close() into php_oci_lob_free():

--- oci8_lob.c.orig2007-07-31 12:21:08.0 -0700
+++ oci8_lob.c2007-12-27 12:33:19.0 -0800
@@ -647,6 +647,9 @@
  Close LOB descriptor and free associated resources */
 void php_oci_lob_free (php_oci_descriptor *descriptor TSRMLS_DC)
 {
+#ifdef HAVE_OCI8_TEMP_LOB
+int is_temporary;
+#endif
 
 if (!descriptor || !descriptor-connection) {
 return;
@@ -662,6 +665,40 @@
 php_oci_lob_flush(descriptor, OCI_LOB_BUFFER_FREE TSRMLS_CC);
 }
 
+#ifdef HAVE_OCI8_TEMP_LOB
+if (descriptor-type == OCI_DTYPE_LOB) {
+PHP_OCI_CALL_RETURN(descriptor-connection-errcode,
+OCILobIsTemporary,
+(
+descriptor-connection-env,
+descriptor-connection-err,
+descriptor-descriptor,
+is_temporary
+ )
+);
+if (descriptor-connection-errcode != OCI_SUCCESS) {
+php_oci_error(descriptor-connection-err,
descriptor-connection-errcode TSRMLS_CC);
+PHP_OCI_HANDLE_ERROR(descriptor-connection,
descriptor-connection-errcode);
+return 1;
+}
+if (is_temporary) {
+PHP_OCI_CALL_RETURN(descriptor-connection-errcode,
+OCILobFreeTemporary,
+(
+

#43752 [Opn]: PDO bindParam Mangles bound objects

2008-01-15 Thread motoma at gmail dot com
 ID:   43752
 User updated by:  motoma at gmail dot com
 Reported By:  motoma at gmail dot com
 Status:   Open
 Bug Type: PDO related
 Operating System: Windows
 PHP Version:  5.2CVS-2008-01-04 (snap)
 New Comment:

I will have to check later.
I doubt that this is the same error, this error is related directly to
the utilization of __toString() in PDO's bindParam() function.


Previous Comments:


[2008-01-15 15:14:06] mjs at beebo dot org

Does the mangling happen without the ATTR_PERSISTENT?  It looks like
this may be related to:

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

which concerns $this getting mangled



[2008-01-04 18:32:58] motoma at gmail dot com

Description:

I built a class with a __toString() member function. When I pass an
instance of this class to bindParam(), the object is overwritten with
the result of __toString().

The result from the code sample suggests that bindParam is overwriting
the value of the object with the object's __toString() value.

Reproduce code:
---
?php
class test
{
private $a = 1;

public function __toString()
{
return strval($this-a);
}
}

$db = new PDO('mysql:host=localhost;dbname=test', 'root', '',
array(PDO::ATTR_PERSISTENT = true));
$obj = new test();

$prepared = $db-prepare('SELECT * FROM table1 WHERE 1 = :test');

var_dump($obj);
$prepared-bindParam('test', $obj);
var_dump($obj);
?

Expected result:

object(test)#2 (1) {
  [a:private]=
  int(1)
}
object(test)#2 (1) {
  [a:private]=
  int(1)
}

Actual result:
--
object(test)#2 (1) {
  [a:private]=
  int(1)
}
string(1) 1





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


#43858 [NEW]: Bug in date generation with mktime and strtotime

2008-01-15 Thread nicollasrs at gmail dot com
From: nicollasrs at gmail dot com
Operating system: Windows XP Professional SP2
PHP version:  5.2.5
PHP Bug Type: Date/time related
Bug description:  Bug in date generation with mktime and strtotime

Description:

When i try convert date Jan 15 2008, 19:28:09 CET to unix timestamp and
convert again to date, php show incorrect date.

Reproduce code:
---
$Temp = Jan 15 2008, 19:28:09 CET;
echo Date: $Tempbrbr;
echo Trying strtotime: .strtotime($Temp).br;
echo Date: .date(d/m/Y - H:m:s, strtotime($Temp)).brbr;

function fixTime($Date) {
$Date = str_replace(,, null, $Date);
$Date = explode( , $Date);
$DateTemp = strtotime($Date[0].$Date[1].$Date[2]);
$Dia = date(d, $DateTemp); $Mes = date(m, $DateTemp); $Ano =
date(Y, $DateTemp);
$Time = explode(:, $Date[3]);
$Hora = $Time[0]; $Minuto = $Time[1]; $Segundo = $Time[2];
$CEST = $Date[4];
echo mktime($Hora, $Minuto, $Segundo, $Mes, $Dia, $Ano)brbr;
return mktime($Hora, $Minuto, $Segundo, $Mes, $Dia, $Ano);
}

$Temp = fixTime($Temp);
echo Trying mktime: $Tempbr;
echo Date: .date(d/m/Y - H:m:s, $Temp).br;

Expected result:

Date: Jan 15 2008, 19:28:09 CET

Trying strtotime: ??
Date: 15/01/2008 - 19:28:09

mktime(19, 28, 09, 01, 15, 2008)

Trying mktime: ?
Date: 15/01/2008 - 19:28:09

Actual result:
--
Date: Jan 15 2008, 19:28:09 CET

Trying strtotime: 1200421689
Date: 15/01/2008 - 16:01:09

mktime(19, 28, 09, 01, 15, 2008)

Trying mktime: 1200432489
Date: 15/01/2008 - 19:01:09

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


#43858 [Opn-Csd]: Bug in date generation with mktime and strtotime

2008-01-15 Thread nicollasrs at gmail dot com
 ID:   43858
 User updated by:  nicollasrs at gmail dot com
 Reported By:  nicollasrs at gmail dot com
-Status:   Open
+Status:   Closed
 Bug Type: Date/time related
 Operating System: Windows XP Professional SP2
 PHP Version:  5.2.5
 New Comment:

sorry... my bad


Previous Comments:


[2008-01-15 20:01:21] nicollasrs at gmail dot com

Description:

When i try convert date Jan 15 2008, 19:28:09 CET to unix timestamp
and convert again to date, php show incorrect date.

Reproduce code:
---
$Temp = Jan 15 2008, 19:28:09 CET;
echo Date: $Tempbrbr;
echo Trying strtotime: .strtotime($Temp).br;
echo Date: .date(d/m/Y - H:m:s, strtotime($Temp)).brbr;

function fixTime($Date) {
$Date = str_replace(,, null, $Date);
$Date = explode( , $Date);
$DateTemp = strtotime($Date[0].$Date[1].$Date[2]);
$Dia = date(d, $DateTemp); $Mes = date(m, $DateTemp); $Ano =
date(Y, $DateTemp);
$Time = explode(:, $Date[3]);
$Hora = $Time[0]; $Minuto = $Time[1]; $Segundo = $Time[2];
$CEST = $Date[4];
echo mktime($Hora, $Minuto, $Segundo, $Mes, $Dia, $Ano)brbr;
return mktime($Hora, $Minuto, $Segundo, $Mes, $Dia, $Ano);
}

$Temp = fixTime($Temp);
echo Trying mktime: $Tempbr;
echo Date: .date(d/m/Y - H:m:s, $Temp).br;

Expected result:

Date: Jan 15 2008, 19:28:09 CET

Trying strtotime: ??
Date: 15/01/2008 - 19:28:09

mktime(19, 28, 09, 01, 15, 2008)

Trying mktime: ?
Date: 15/01/2008 - 19:28:09

Actual result:
--
Date: Jan 15 2008, 19:28:09 CET

Trying strtotime: 1200421689
Date: 15/01/2008 - 16:01:09

mktime(19, 28, 09, 01, 15, 2008)

Trying mktime: 1200432489
Date: 15/01/2008 - 19:01:09





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


#43859 [NEW]: Wrong comparison

2008-01-15 Thread seocar at gmail dot com
From: seocar at gmail dot com
Operating system: Fedora Core
PHP version:  5.2.5
PHP Bug Type: Unknown/Other Function
Bug description:  Wrong comparison

Description:

Wrong comparison between two strings.
(Yes, I know about strict comparison, but I want to know about this case)

Reproduce code:
---
if ( == 0e01)
echo BUG;
else
echo OK;

Expected result:

OK

Actual result:
--
BUG

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


#43860 [NEW]: compile fails with curl version 7.16.4 and gd

2008-01-15 Thread pierre dot grandmaison at gmail dot com
From: pierre dot grandmaison at gmail dot com
Operating system: Centos 5
PHP version:  5.2.5
PHP Bug Type: Compile Failure
Bug description:  compile fails with curl version 7.16.4 and gd

Description:

Hi,

On a clean system, I am installing from source:

openssl:

cd /usr/local/src
wget [mirror]/openssl-0.9.8g.tar.gz
tar xfz openssl-0.9.8g.tar.gz
cd openssl-0.9.8g
./config --openssldir=/usr/local/ssl
make; make install

curl version 7.16.4:

cd /usr/local/src
wget [mirror]/curl-7.16.4.tar.gz
tar xfz curl-7.16.4.tar.gz
cd curl-7.16.4
./configure --disable-ipv6 --with-ssl=/usr/local/ssl; make; make install


Then PHP:

cd /usr/local/src
wget [mirror]/php-5.2.5.tar.gz
tar xfz php-5.2.5.tar.gz
cd php-5.2.5

Then, The following WORKS:
rm config.cache ; ./configure --disable-all --disable-cgi --with-gd

The following also WORKS:
rm config.cache ; ./configure --disable-all --disable-cgi
--with-curl=/usr/local/lib


Howether, the following does NOT work:
rm config.cache ; ./configure --disable-all --disable-cgi --with-gd
--with-curl=/usr/local/lib

The error message is:

checking for GD support... yes
checking for the location of libjpeg... no
checking for the location of libpng... no
checking for the location of libXpm... no
checking for FreeType 1.x support... no
checking for FreeType 2... no
checking for T1lib support... no
checking whether to enable truetype string function in GD... no
checking whether to enable JIS-mapped Japanese font support in GD... no
checking for fabsf... yes
checking for floorf... yes
If configure fails try --with-jpeg-dir=DIR
checking for png_write_image in -lpng... yes
If configure fails try --with-xpm-dir=DIR
If configure fails try --with-freetype-dir=DIR
configure: error: GD build test failed. Please check the config.log for
details.

Expected result:

PHP should compile


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


#43860 [Opn]: compile fails with curl version 7.16.4 and gd

2008-01-15 Thread pierre dot grandmaison at gmail dot com
 ID:   43860
 User updated by:  pierre dot grandmaison at gmail dot com
 Reported By:  pierre dot grandmaison at gmail dot com
 Status:   Open
 Bug Type: Compile Failure
 Operating System: Centos 5
 PHP Version:  5.2.5
 New Comment:

Even though there are line breaks in the configure commands show in the
php bug page, in reality I did type it correctly in the system.


Previous Comments:


[2008-01-15 20:39:16] pierre dot grandmaison at gmail dot com

Description:

Hi,

On a clean system, I am installing from source:

openssl:

cd /usr/local/src
wget [mirror]/openssl-0.9.8g.tar.gz
tar xfz openssl-0.9.8g.tar.gz
cd openssl-0.9.8g
./config --openssldir=/usr/local/ssl
make; make install

curl version 7.16.4:

cd /usr/local/src
wget [mirror]/curl-7.16.4.tar.gz
tar xfz curl-7.16.4.tar.gz
cd curl-7.16.4
./configure --disable-ipv6 --with-ssl=/usr/local/ssl; make; make
install


Then PHP:

cd /usr/local/src
wget [mirror]/php-5.2.5.tar.gz
tar xfz php-5.2.5.tar.gz
cd php-5.2.5

Then, The following WORKS:
rm config.cache ; ./configure --disable-all --disable-cgi --with-gd

The following also WORKS:
rm config.cache ; ./configure --disable-all --disable-cgi
--with-curl=/usr/local/lib


Howether, the following does NOT work:
rm config.cache ; ./configure --disable-all --disable-cgi --with-gd
--with-curl=/usr/local/lib

The error message is:

checking for GD support... yes
checking for the location of libjpeg... no
checking for the location of libpng... no
checking for the location of libXpm... no
checking for FreeType 1.x support... no
checking for FreeType 2... no
checking for T1lib support... no
checking whether to enable truetype string function in GD... no
checking whether to enable JIS-mapped Japanese font support in GD...
no
checking for fabsf... yes
checking for floorf... yes
If configure fails try --with-jpeg-dir=DIR
checking for png_write_image in -lpng... yes
If configure fails try --with-xpm-dir=DIR
If configure fails try --with-freetype-dir=DIR
configure: error: GD build test failed. Please check the config.log for
details.

Expected result:

PHP should compile






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


#43860 [Opn]: compile fails with curl version 7.16.4 and gd

2008-01-15 Thread pierre dot grandmaison at gmail dot com
 ID:   43860
 User updated by:  pierre dot grandmaison at gmail dot com
 Reported By:  pierre dot grandmaison at gmail dot com
 Status:   Open
 Bug Type: Compile Failure
 Operating System: Centos 5
 PHP Version:  5.2.5
 New Comment:

I have just tested the following versions of PHP using the same method.
Here are my results:

With:
rm config.cache ; ./configure --disable-all --disable-cgi --with-gd
--with-curl=/usr/local/lib

FAILED: PHP latest snapshot (
FAILED: PHP 5.2.4
FAILED: PHP 5.2.3
SUCCESS: PHP 5.2.2

So I think something has changed from PHP version 5.2.2 to PHP version
5.2.3 that makes compiling PHP with curl versions 7.16.4 (and I'm
guessing lower versions as well not work)

Do you need anything else to help in resolving this?

Thanks,


Previous Comments:


[2008-01-15 20:42:44] pierre dot grandmaison at gmail dot com

Even though there are line breaks in the configure commands show in the
php bug page, in reality I did type it correctly in the system.



[2008-01-15 20:39:16] pierre dot grandmaison at gmail dot com

Description:

Hi,

On a clean system, I am installing from source:

openssl:

cd /usr/local/src
wget [mirror]/openssl-0.9.8g.tar.gz
tar xfz openssl-0.9.8g.tar.gz
cd openssl-0.9.8g
./config --openssldir=/usr/local/ssl
make; make install

curl version 7.16.4:

cd /usr/local/src
wget [mirror]/curl-7.16.4.tar.gz
tar xfz curl-7.16.4.tar.gz
cd curl-7.16.4
./configure --disable-ipv6 --with-ssl=/usr/local/ssl; make; make
install


Then PHP:

cd /usr/local/src
wget [mirror]/php-5.2.5.tar.gz
tar xfz php-5.2.5.tar.gz
cd php-5.2.5

Then, The following WORKS:
rm config.cache ; ./configure --disable-all --disable-cgi --with-gd

The following also WORKS:
rm config.cache ; ./configure --disable-all --disable-cgi
--with-curl=/usr/local/lib


Howether, the following does NOT work:
rm config.cache ; ./configure --disable-all --disable-cgi --with-gd
--with-curl=/usr/local/lib

The error message is:

checking for GD support... yes
checking for the location of libjpeg... no
checking for the location of libpng... no
checking for the location of libXpm... no
checking for FreeType 1.x support... no
checking for FreeType 2... no
checking for T1lib support... no
checking whether to enable truetype string function in GD... no
checking whether to enable JIS-mapped Japanese font support in GD...
no
checking for fabsf... yes
checking for floorf... yes
If configure fails try --with-jpeg-dir=DIR
checking for png_write_image in -lpng... yes
If configure fails try --with-xpm-dir=DIR
If configure fails try --with-freetype-dir=DIR
configure: error: GD build test failed. Please check the config.log for
details.

Expected result:

PHP should compile






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


#43860 [Opn-Fbk]: compile fails with curl version 7.16.4 and gd

2008-01-15 Thread pajoye
 ID:   43860
 Updated by:   [EMAIL PROTECTED]
 Reported By:  pierre dot grandmaison at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Compile Failure
 Operating System: Centos 5
 PHP Version:  5.2.5
-Assigned To:  
+Assigned To:  pajoye
 New Comment:

Specify the options for the dependencies (xpm, png and jpeg libraries
for ex.)

The compile tests fail for a reason, this reason is in your config.log,
please paste the relevant part here.


Previous Comments:


[2008-01-15 20:57:03] pierre dot grandmaison at gmail dot com

I have just tested the following versions of PHP using the same method.
Here are my results:

With:
rm config.cache ; ./configure --disable-all --disable-cgi --with-gd
--with-curl=/usr/local/lib

FAILED: PHP latest snapshot (
FAILED: PHP 5.2.4
FAILED: PHP 5.2.3
SUCCESS: PHP 5.2.2

So I think something has changed from PHP version 5.2.2 to PHP version
5.2.3 that makes compiling PHP with curl versions 7.16.4 (and I'm
guessing lower versions as well not work)

Do you need anything else to help in resolving this?

Thanks,



[2008-01-15 20:42:44] pierre dot grandmaison at gmail dot com

Even though there are line breaks in the configure commands show in the
php bug page, in reality I did type it correctly in the system.



[2008-01-15 20:39:16] pierre dot grandmaison at gmail dot com

Description:

Hi,

On a clean system, I am installing from source:

openssl:

cd /usr/local/src
wget [mirror]/openssl-0.9.8g.tar.gz
tar xfz openssl-0.9.8g.tar.gz
cd openssl-0.9.8g
./config --openssldir=/usr/local/ssl
make; make install

curl version 7.16.4:

cd /usr/local/src
wget [mirror]/curl-7.16.4.tar.gz
tar xfz curl-7.16.4.tar.gz
cd curl-7.16.4
./configure --disable-ipv6 --with-ssl=/usr/local/ssl; make; make
install


Then PHP:

cd /usr/local/src
wget [mirror]/php-5.2.5.tar.gz
tar xfz php-5.2.5.tar.gz
cd php-5.2.5

Then, The following WORKS:
rm config.cache ; ./configure --disable-all --disable-cgi --with-gd

The following also WORKS:
rm config.cache ; ./configure --disable-all --disable-cgi
--with-curl=/usr/local/lib


Howether, the following does NOT work:
rm config.cache ; ./configure --disable-all --disable-cgi --with-gd
--with-curl=/usr/local/lib

The error message is:

checking for GD support... yes
checking for the location of libjpeg... no
checking for the location of libpng... no
checking for the location of libXpm... no
checking for FreeType 1.x support... no
checking for FreeType 2... no
checking for T1lib support... no
checking whether to enable truetype string function in GD... no
checking whether to enable JIS-mapped Japanese font support in GD...
no
checking for fabsf... yes
checking for floorf... yes
If configure fails try --with-jpeg-dir=DIR
checking for png_write_image in -lpng... yes
If configure fails try --with-xpm-dir=DIR
If configure fails try --with-freetype-dir=DIR
configure: error: GD build test failed. Please check the config.log for
details.

Expected result:

PHP should compile






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


#43497 [Asn-Csd]: OCI8 XML/getClobVal leaks UGA memory

2008-01-15 Thread sixd
 ID:   43497
 Updated by:   [EMAIL PROTECTED]
 Reported By:  ghosh at q-one dot com
-Status:   Assigned
+Status:   Closed
 Bug Type: OCI8 related
 Operating System: Linux 2.6.22-14-server
 PHP Version:  5.2.5
 Assigned To:  sixd
 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.


+--
| Fixed in 5.2.6, 5.3, 6.  Queries with OCI_RETURN_LOBS will
| automatically free the DB's Temporary LOBs.  Fetches
| returning LOB locators need to use LOB-free().  See
| oci8/tests/bug43497.phpt for examples.
+---



Previous Comments:


[2008-01-15 17:30:32] ghosh at q-one dot com

Sorry. I have been on vacation. I will try to check the new patch 
this week if possible. Definitely next week otherwise.



[2008-01-15 02:30:42] [EMAIL PROTECTED]

An enhanced patch was sent to the bug filer and Tony on 8th Jan.  I'm
still waiting for feedback . . .



[2008-01-06 23:17:34] ghosh at q-one dot com

Temporary LOBs are created in UGA memory. This is per-session, so 
the leak appears on a per-session basis. Nevertheless this is a 
problem, because PHP scripts dont necessarily have to run for a few 
seconds. PHP is a full-featured scripting language and can also be 
used from the command-line or to implement longer-running 
import-scripts. Even if not, the limit is quickly reached, when 
reading many rows like in my example.



[2008-01-06 20:42:52] [EMAIL PROTECTED]

What I don't understand: I thought OCI_RETURN_LOBS is just a short-
cut for those who don't want to write:

That's what I don't understand either: does the leak appear only on
per-session basis or Oracle doesn't free those LOBs at all?
If the leak is only per-session, then users are not supposed even to
notice it, since PHP requests are not supposed to take more than several
seconds.



[2007-12-29 22:37:21] ghosh at q-one dot com

Really great! Thanks a lot!! This patch works. What I don't understand:
I thought OCI_RETURN_LOBS is just a short-cut for those who don't want
to write:

$s=$result[0]-load();
$result[0]-free();
$result[0]=$s;

If you use OCI_RETURN_LOBS you dont want to care about lobs but get the
result as a string and forget about lobs altogether. So IMHO this should
work as well. My specific problem is solved though.



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

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


#41941 [Asn-Csd]: oci8 extension not lib64 savvy

2008-01-15 Thread sixd
 ID:   41941
 Updated by:   [EMAIL PROTECTED]
 Reported By:  wdierkes at 5dollarwhitebox dot org
-Status:   Assigned
+Status:   Closed
 Bug Type: OCI8 related
 Operating System: Redhat Enterprise Linux
 PHP Version:  5.2.3
 Assigned To:  sixd
 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.

+
| Fixed in PHP 5.2.6, 5.3 and 6.  Support for
| Oracle-provided, 64bit Linux RPMs has been added.
|
| Also, --with-oci8=instantclient will now search for the
| most recent version of the Instant Client RPMs if no
| directory is specified.
+



Previous Comments:


[2007-12-12 06:02:30] Fedora at FamilleCollet dot com

Here is a little patch for this issue.

It handle /usr/lib64 and client64 in both oci8 and pdo_oci extension.

http://remi.collet.free.fr/files/php-5.2.5-oci8conf.patch

Regards



[2007-12-12 05:59:08] Fedora at FamilleCollet dot com

Oracle now provides RPM for i386, x86_64 and even ppc

With new version 11.1, install path is client64 and only client is
test during configure.



[2007-11-29 22:56:36] [EMAIL PROTECTED]

We're not going to add support for any unofficial Instant Client rpms
(there is enough hassle with the official ones, so please don't add even
more).

The support for official 64bit OIC rpms is currently being tested.



[2007-11-29 21:28:09] [EMAIL PROTECTED]

Update: Oracle has released Instant Client x86_64 RPMs on the OTN
website.  OCI8 should use the directory structure in these official
RPMs. 



[2007-07-23 18:03:17] [EMAIL PROTECTED]

Status update: I'm pushing for official Oracle 64 bit RPMs to be
released and am waiting to see what directory structure they will have.



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

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


#43861 [NEW]: suhosin patch detects heap overflow on mssql_free_result()

2008-01-15 Thread skennedy at vcn dot com
From: skennedy at vcn dot com
Operating system: FreeBSD 6.2
PHP version:  5.2.5
PHP Bug Type: MSSQL related
Bug description:  suhosin patch detects heap overflow on mssql_free_result()

Description:

Getting an ALERT - canary mismatch on efree() - heap overflow detected
error when running two certain queries.  This seems to be triggered when
the second query runs.  The error indicates the mssql_free_result() is the
offender, but it happens even when mssql_free_result() is omitted (however
does not show the offending line number).  This bug is the similar, if not
the same, as #40119.

Reproduce code:
---
http://bandwidthbuilders.com/php_mssql_suhosin_bug.phps

Expected result:

To run without error and exit cleanly.

Actual result:
--
ALERT - canary mismatch on efree() - heap overflow detected (attacker
'REMOTE_ADDR not set', file '/usr/home/bwbuilders/test.php', line 33)

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


#37964 [Asn]: Reflection shows private methods of parent class

2008-01-15 Thread felipe
 ID:   37964
 Updated by:   [EMAIL PROTECTED]
 Reported By:  lavin dot peter at gmail dot com
 Status:   Assigned
 Bug Type: Scripting Engine problem
 Operating System: Windows XP
 PHP Version:  5.1.4
 Assigned To:  tony2001
 New Comment:

Simple fix:

Index: php_reflection.c
===
RCS file: /repository/php-src/ext/reflection/php_reflection.c,v
retrieving revision 1.164.2.33.2.45.2.6
diff -u -r1.164.2.33.2.45.2.6 php_reflection.c
--- php_reflection.c31 Dec 2007 07:17:13 - 
1.164.2.33.2.45.2.6
+++ php_reflection.c16 Jan 2008 02:14:41 -
@@ -519,7 +519,8 @@
   
zend_hash_internal_pointer_reset_ex(ce-function_table, pos);
 
while
(zend_hash_get_current_data_ex(ce-function_table, (void **) mptr,
pos) == SUCCESS) {
-   if (!(mptr-common.fn_flags 
ZEND_ACC_STATIC)) {
+   if (!((mptr-common.fn_flags 
ZEND_ACC_STATIC) || 
+   ((mptr-common.fn_flags 
ZEND_ACC_PRIVATE)  mptr-common.scope != ce))) {
char *key;
uint key_len;
ulong num_index;



Previous Comments:


[2006-08-20 13:36:43] ruslan dot kyrychuk at gmail dot com

Maybe it is not valid to have private variables of parent class in
Reflection. Then it is only my own custom serialization problem.



[2006-08-20 12:39:18] ruslan dot kyrychuk at gmail dot com

With this serializing interface (if you mean __sleep and __wakeup
method) and with reflection can not work with private variables, I can
not write serialization method that can be used in all child classes .In
every child class Reflection will have child instance and will not have
access for private variables of parent. 

Reproduce code:
---
class A
{
public function __sleep() 
{
$refl = new ReflectionObject($this);
$props = $refl-getProperties();
$result = array();
foreach($props as $prop)
$result[] = $prop-getName();
return $result ;
}
private $privateVar = 'Test Private';
public $publicVar = 'Test Public';

public function setPublic($value)
{
$this-publicVar = $value;
}
public function setPrivate($value)
{
$this-privateVar = $value;
}
}

class B extends A{}

$instance = new B();
$instance-setPrivate('Set Test Private');
$instance-setPublic('Set Test Private');

var_dump($instance);
var_dump(unserialize(serialize($instance)));

Expected result:

Object before serializing and after is same.

Actual result:
--
object(B)#1 (2) {
  [privateVar:private]=
  string(16) Set Test Private
  [publicVar]=
  string(16) Set Test Private
}
object(B)#3 (2) {
  [privateVar:private]=
  string(12) Test Private
  [publicVar]=
  string(16) Set Test Private
}


--
When writing 
public function __sleep(){return array('privateVar', 'publicVar');} In
B class
Than you'll get 

Notice: serialize() [function.serialize]: privateVar returned as
member variable from __sleep() but does not exist.

So you can't write custom serializing for child object when private
properties exists in parent class.



[2006-08-20 11:07:59] [EMAIL PROTECTED]

That is why we have a new serializing interface which allows you to
call a serializing function in the base class which then can deal with
the private properties in that base class.



[2006-08-20 09:31:05] ruslan dot kyrychuk at gmail dot com

I'd say it is not correct. Properties and methods defined as private
are inherited but you have no access to this properties in child class.
If for example during serializing if you ommit private properties of
base class - you'll get wrong object.

class Base{
  private $basevar;
  public function baseFunction(){return $this-basevar;}
}
class Derived extends Base{}

if private properties are not inherited - than calling baseFunction
will cause null result and this is not correct in class inheritance.



[2006-07-04 14:13:08] lavin dot peter at gmail dot com

The getMethods method of ReflectionClass also returns the private
methods of the parent class.



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

#27946 [Bgs-WFx]: Stack overflow on IIS 6 and PHP ISAPI running PHPWiki 1.3.7

2008-01-15 Thread aidan
 ID:   27946
 Updated by:   [EMAIL PROTECTED]
 Reported By:  bugs dot php dot net at moritz-naumann dot com
-Status:   Bogus
+Status:   Wont fix
 Bug Type: Reproducible crash
 Operating System: Windows 2003 Server
 PHP Version:  4.3.4
 New Comment:

A quick check with google shows this is obviously not a phpwiki issie:

http://www.google.com.au/search?q=PHP+has+encountered+a+Stack+overflow

One can quickly reproduce this error message with PHP5.2 and Windows
Server 2003 with the following:

?php
function a() { a(); }
a();
?

The above recursion issue is already known to the PHP team, and is
currently regarded as unfixable, though this error message does not
appear on Apache servers. It thus appears that IIS is generating the
error message.


Previous Comments:


[2004-04-10 16:53:02] [EMAIL PROTECTED]

PHP does not give this message ever, it must be a phpwiki error
messages and thus you'll have to contact its authors.



[2004-04-10 16:49:39] bugs dot php dot net at moritz-naumann dot com

Description:

While generating the virgin wiki page (the first dynamically generated
page of a wiki which is created after configuring the config files), PHP
exits with a stack overflow:
PHP has encountered a Stack overflow.

This may also be a script error, but from the error message I assume it
is rather not so I am posting this here as well.

http://www.boliviahosting.com/wiki/

The PHP version in use is 4.3.4, running on IIS 6 (on Win 2003 Server)
as ISAPI module. Further information on the PHP configuration is
available on request. However the installation is mostly based
php.ini-recommended.

As all the other bug reports mentioning a stack overflow are  rather
old I assume this may be a new one, otherwise I am sorry and would
really welcome a hint.

FYI: I reported the same bug to PHPWikis bug tracker at
http://sourceforge.net/tracker/index.php?func=detailaid=932950group_id=6121atid=106121






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


#42850 [Csd]: array_walk_recursive() leaves references

2008-01-15 Thread ltaupiac at lfdj dot com
 ID:   42850
 User updated by:  ltaupiac at lfdj dot com
 Reported By:  ltaupiac at lfdj dot com
 Status:   Closed
 Bug Type: Arrays related
 Operating System: windows/solaris
 PHP Version:  5.3.0-dev
 New Comment:

I check on win32 snaps built on 16 jan 2008

Everything is correct now.

Thx a lot.


Previous Comments:


[2008-01-14 22:51:46] [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.





[2007-11-26 08:00:18] ltaupiac at lfdj dot com

I have tested on window with apache 2.2.6 the snap.zip you given.

The bug is still there.
A  for reference is still leaved after call array_walk_recursive on
val2 and original array can't be duplicate anymore after.

Reproduce code:
--
echo PHP_VERSION;
$data = array ('key1' = 'val1', array('key2' = 'val2'));
echo 'pre';
function foo2($item, $key) {}; // dumb callback function
var_dump($data);
array_walk_recursive($data, 'foo2');
$data2 = $data;  // Duplicate array
$data2[0] = 'altered'; // Alter copy
var_dump($data);
var_dump($data2);

Expected result:

5.3.0-dev

array(2) {
  [key1]=
  string(4) val1
  [0]=
  array(1) {
[key2]=
string(4) val2
  }
}
array(2) {
  [key1]=
  string(4) val1
  [0]=
  string(7) val2
}
array(2) {
  [key1]=
  string(4) val1
  [0]=
  string(7) altered
}

Actual result:
--
5.3.0-dev

array(2) {
  [key1]=
  string(4) val1
  [0]=
  array(1) {
[key2]=
string(4) val2
  }
}
array(2) {
  [key1]=
  string(4) val1
  [0]=
  string(7) altered
}
array(2) {
  [key1]=
  string(4) val1
  [0]=
  string(7) altered
}



[2007-11-25 17:35:35] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

For Windows (installer):

  http://snaps.php.net/win32/php5.3-win32-installer-latest.msi





[2007-10-04 08:10:34] ltaupiac at lfdj dot com

Description:

I have to reopen this bug http://bugs.php.net/bug.php?id=42655 because
it was incorrectly closed and tony2001 doesn't seem to receive email.

Here Copy/paste email i send him.

This is not the same bug.

In #34982, an array is modified outside the function func() that call
array_walk_recursive. This bug doesn't exist anymore in 5.2.4

The bug i report is when calling array_walk_recursive on an array
(callback function doesn't even have reference  for array input and
does nothing).
Original array shouldn't be modified, but if you var_dump it, you can
see reference on subarray

[0]= array(1)

instead of

[0]=  array(1)

The array shouldn't have been modified but array_walk_recursive leaves
references.
This can cause trouble, eg you cant duplicate the original array
anymore. Look at following example

$data = array ('key1' = 'val1', array('key2' = 'val2'));

function foo($item, $key) {}; // dumb callback function
var_dump($data);
array_walk_recursive($data, 'foo');
$data2 = $data;  // Duplicate array
$data2[0] = 'altered'; // Alter copy
var_dump($data);
var_dump($data2);

array(2) {
  [key1]= string(4) val1
  [0]= string(5) bingo
}
array(2) {
  [key1]= string(4) val1
  [0]= string(5) bingo
}

both $data and $data2 are altered;


Reproduce code:
---
$data = array ('key1' = 'val1', array('key2' = 'val2'));

function dumb($i, $k){}

var_dump($data);
array_walk_recursive($data,'foo');

// Double check the [0]=array(1) in actual  result
var_dump($data);

Expected result:

Expected result:

array(2) {
  [key1]= string(4) val1
  [0]= array(1) {
[key2]= string(4) val2
  }
}
array(2) {
  [key1]= string(4) val1
  [0]= array(1) {
[key2]= string(4) val2
  }
}

Actual result:
--
Actual result:
--
array(2) {
  [key1]= string(4) val1
  [0]= array(1) {
[key2]= string(4) val2
  }
}
array(2) {
  [key1]= string(4) val1
  [0]= array(1) {
[key2]= string(4) val2
  }
}





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


#43863 [NEW]: str_word_count and russian chars in locale cp1251

2008-01-15 Thread phprus at gmail dot com
From: phprus at gmail dot com
Operating system: OpenSuSE 10.2
PHP version:  5.2.5
PHP Bug Type: Strings related
Bug description:  str_word_count and russian chars in locale cp1251

Description:

str_word_count return wrong number, if char #1103; is
contained in the word.

Problem code (in file ext/standard/string.c):
while (p  e  (isalpha(*p) || (char_list  ch[(unsigned char)*p]) || *p
== '\'' || *p == '-')) {

Corrected code:
while (p  e  (isalpha((unsigned char)*p) || (char_list  ch[(unsigned
char)*p]) || *p == '\'' || *p == '-')) {

Description of bug fixes in Russian language:
http://phpclub.ru/talk/showthread.php?postid=746475#post746475

Reproduce code:
---
?php
setlocale(LC_ALL, 'ru_RU.cp-1251', 'ru_RU.CP1251');
var_dump(str_word_count('#1088;#1091;#1089;#1089;#1082;#1080;#1081;
#1090;#1077;#1082;#1089;#1090;. #1103;
#1090;#1077;#1089;#1090;#1077;#1088;.
#1072;#1103;#1073;#1072;#1075;. #1103;#1072;#1087;.
#1072;#1074;#1103;', 2));
?

Expected result:

array(7) {
  [0]=
  string(7) #1088;#1091;#1089;#1089;#1082;#1080;#1081;
  [8]=
  string(5) #1090;#1077;#1082;#1089;#1090;
  [15]=
  string(1) #1103;
  [17]=
  string(6) #1090;#1077;#1089;#1090;#1077;#1088;
  [25]=
  string(5) #1072;#1103;#1073;#1072;#1075;
  [32]=
  string(3) #1103;#1072;#1087;
  [37]=
  string(3) #1072;#1074;#1103;
}

Actual result:
--
array(7) {
  [0]=
  string(7) #1088;#1091;#1089;#1089;#1082;#1080;#1081;
  [8]=
  string(5) #1090;#1077;#1082;#1089;#1090;
  [17]=
  string(6) #1090;#1077;#1089;#1090;#1077;#1088;
  [25]=
  string(1) #1072;
  [27]=
  string(3) #1073;#1072;#1075;
  [33]=
  string(2) #1072;#1087;
  [37]=
  string(2) #1072;#1074;
}

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