[PHP-BUG] Bug #61531 [NEW]: Integer Overflow in all printf functions

2012-03-27 Thread iblue at gmx dot net
From: 
Operating system: GNU/Linux
PHP version:  5.4.0
Package:  Strings related
Bug Type: Bug
Bug description:Integer Overflow in all printf functions

Description:

There is an integer overflow in *printf.

Test script:
---
?php
echo sprintf('%2147483646$s', foo);
echo sprintf('%2147483647$s', foo);


Expected result:

PHP Warning:  sprintf(): Too few arguments in /home/iblue/test.php on line
2
PHP Warning:  sprintf(): Too few arguments in /home/iblue/test.php on line
3


Actual result:
--
PHP Warning:  sprintf(): Too few arguments in /home/iblue/test.php on line
2
PHP Warning:  sprintf(): Argument number must be greater than zero in 
/home/iblue/test.php on line 3


-- 
Edit bug report at https://bugs.php.net/bug.php?id=61531edit=1
-- 
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=61531r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=61531r=trysnapshot53
Try a snapshot (trunk):  
https://bugs.php.net/fix.php?id=61531r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=61531r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=61531r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=61531r=alreadyfixed
Need backtrace:  
https://bugs.php.net/fix.php?id=61531r=needtrace
Need Reproduce Script:   
https://bugs.php.net/fix.php?id=61531r=needscript
Try newer version:   
https://bugs.php.net/fix.php?id=61531r=oldversion
Not developer issue: 
https://bugs.php.net/fix.php?id=61531r=support
Expected behavior:   
https://bugs.php.net/fix.php?id=61531r=notwrong
Not enough info: 
https://bugs.php.net/fix.php?id=61531r=notenoughinfo
Submitted twice: 
https://bugs.php.net/fix.php?id=61531r=submittedtwice
register_globals:
https://bugs.php.net/fix.php?id=61531r=globals
PHP 4 support discontinued:  
https://bugs.php.net/fix.php?id=61531r=php4
Daylight Savings:https://bugs.php.net/fix.php?id=61531r=dst
IIS Stability:   
https://bugs.php.net/fix.php?id=61531r=isapi
Install GNU Sed: 
https://bugs.php.net/fix.php?id=61531r=gnused
Floating point limitations:  
https://bugs.php.net/fix.php?id=61531r=float
No Zend Extensions:  
https://bugs.php.net/fix.php?id=61531r=nozend
MySQL Configuration Error:   
https://bugs.php.net/fix.php?id=61531r=mysqlcfg



[PHP-BUG] Bug #61532 [NEW]: Apostrophe modifier in *printf is broken

2012-03-27 Thread iblue at gmx dot net
From: 
Operating system: GNU/Linux
PHP version:  5.4.0
Package:  Strings related
Bug Type: Bug
Bug description:Apostrophe modifier in *printf is broken

Description:

When I use the apostrophe (') modifier to select a padding character in
printf, 
it behaves buggy, when the padding length itself is prefixed by zeroes.

Test script:
---
?php
echo sprintf(%'.9s\n, foo);
echo sprintf(%'.09s\n, foo);

Expected result:

..foo
..foo


Actual result:
--
..foo
00foo


-- 
Edit bug report at https://bugs.php.net/bug.php?id=61532edit=1
-- 
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=61532r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=61532r=trysnapshot53
Try a snapshot (trunk):  
https://bugs.php.net/fix.php?id=61532r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=61532r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=61532r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=61532r=alreadyfixed
Need backtrace:  
https://bugs.php.net/fix.php?id=61532r=needtrace
Need Reproduce Script:   
https://bugs.php.net/fix.php?id=61532r=needscript
Try newer version:   
https://bugs.php.net/fix.php?id=61532r=oldversion
Not developer issue: 
https://bugs.php.net/fix.php?id=61532r=support
Expected behavior:   
https://bugs.php.net/fix.php?id=61532r=notwrong
Not enough info: 
https://bugs.php.net/fix.php?id=61532r=notenoughinfo
Submitted twice: 
https://bugs.php.net/fix.php?id=61532r=submittedtwice
register_globals:
https://bugs.php.net/fix.php?id=61532r=globals
PHP 4 support discontinued:  
https://bugs.php.net/fix.php?id=61532r=php4
Daylight Savings:https://bugs.php.net/fix.php?id=61532r=dst
IIS Stability:   
https://bugs.php.net/fix.php?id=61532r=isapi
Install GNU Sed: 
https://bugs.php.net/fix.php?id=61532r=gnused
Floating point limitations:  
https://bugs.php.net/fix.php?id=61532r=float
No Zend Extensions:  
https://bugs.php.net/fix.php?id=61532r=nozend
MySQL Configuration Error:   
https://bugs.php.net/fix.php?id=61532r=mysqlcfg



[PHP-BUG] Bug #52114 [NEW]: Array key moves when using func_get_args()

2010-06-17 Thread iblue at gmx dot net
From: 
Operating system: Ubuntu Linux 10.04
PHP version:  5.3.2
Package:  Scripting Engine problem
Bug Type: Bug
Bug description:Array key moves when using func_get_args()

Description:

Arrays get scrambled when using func_get_args(). See code sample below.

Test script:
---
?php

function foo(/* ... */) {

  $arguments = func_get_args();

  if(isset($arguments[0]['key'])) {

var_dump($arguments[0]);

var_dump($arguments[1]);

echo You see that \$arguments[0] is a string, while \$arguments[1] is
an array.\n;

echo So this code should never get executed.\n;

  } else {

echo Correct behaviour;

  }

}



foo(some string, array(key = value));

Expected result:

Script output:

Correct behaviour

Actual result:
--
Script output:

string(11) some string

array(1) {

  [key]=

  string(5) value

}

string(1) s

You see that $arguments[0] is a string, while $arguments[1] is an array.

So this code should never get execute.

-- 
Edit bug report at http://bugs.php.net/bug.php?id=52114edit=1
-- 
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=52114r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=52114r=trysnapshot53
Try a snapshot (trunk):  
http://bugs.php.net/fix.php?id=52114r=trysnapshottrunk
Fixed in SVN:
http://bugs.php.net/fix.php?id=52114r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=52114r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=52114r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=52114r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=52114r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=52114r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=52114r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=52114r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=52114r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=52114r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=52114r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=52114r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=52114r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=52114r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=52114r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=52114r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=52114r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=52114r=mysqlcfg



#35496 [Bgs]: Segfault in mcrypt_generic()

2005-11-30 Thread iblue at gmx dot net
 ID:   35496
 User updated by:  iblue at gmx dot net
 Reported By:  iblue at gmx dot net
 Status:   Bogus
 Bug Type: Reproducible crash
 Operating System: Linux 2.6.14-iblue0
 PHP Version:  5.1.1
 New Comment:

You are right, I have not read the manual and thought this 
would be a real bug.
But, in my opinion, when php crashes it is a bug, regardless 
of what I did.

It would be nice to have a warning or an error instead of a 
segfault.


Previous Comments:


[2005-11-30 21:31:47] [EMAIL PROTECTED]

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

The problem is due to you attempting to encrypt a string without
calling mcrypt_generic_init() function first.



[2005-11-30 19:15:31] iblue at gmx dot net

Description:

php segfaults when executing the reproduce code.

Reproduce code:
---
?php
  $x = foobar;
  
  $td = mcrypt_module_open('rijndael-256', '', 'ofb', '');
  $iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($td),
MCRYPT_DEV_RANDOM);
  $ks = mcrypt_enc_get_key_size($td);

  $key = md5(foobar);
  
  $encrypted = mcrypt_generic($td, $x);
?

Expected result:

No output and a clean exit.

Actual result:
--
(gdb) run -q bug.php
Starting program: /home/iblue/src/php-5.1.1/sapi/cli/php -q bug.php
[Thread debugging using libthread_db enabled]
[New Thread -1214781760 (LWP 17768)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1214781760 (LWP 17768)]
0xb7f22b70 in mcrypt_mutex_register () from /usr/lib/libmcrypt.so.4
(gdb) bt
#0  0xb7f22b70 in mcrypt_mutex_register () from
/usr/lib/libmcrypt.so.4
#1  0xb7f20203 in mcrypt_enc_get_algorithms_name () from
/usr/lib/libmcrypt.so.4
#2  0xb7f1f197 in mcrypt_generic () from /usr/lib/libmcrypt.so.4
#3  0x080ec88b in zif_mcrypt_generic (ht=2, return_value=0x84f17bc,
return_value_ptr=0x0, this_ptr=0x0,
return_value_used=1, tsrm_ls=0x83ed018) at
/home/iblue/src/php-5.1.1/ext/mcrypt/mcrypt.c:489
#4  0x0825d2cd in zend_do_fcall_common_helper_SPEC
(execute_data=0xbfacdc48, tsrm_ls=0x83ed018)
at /home/iblue/src/php-5.1.1/Zend/zend_vm_execute.h:188
#5  0x082630bf in ZEND_DO_FCALL_SPEC_CONST_HANDLER
(execute_data=0xbfacdc48, tsrm_ls=0x83ed018)
at /home/iblue/src/php-5.1.1/Zend/zend_vm_execute.h:1578
#6  0x0825cbfc in execute (op_array=0x84fc0ac, tsrm_ls=0x83ed018) at
/home/iblue/src/php-5.1.1/Zend/zend_vm_execute.h:88#7  0x08238816 in
zend_execute_scripts (type=8, tsrm_ls=0x83ed018, retval=0x0,
file_count=3)
at /home/iblue/src/php-5.1.1/Zend/zend.c:1090
#8  0x081fc32b in php_execute_script (primary_file=0xbfacffe4,
tsrm_ls=0x83ed018)
at /home/iblue/src/php-5.1.1/main/main.c:1704
#9  0x082e26ca in main (argc=3, argv=0xbfad0084) at
/home/iblue/src/php-5.1.1/sapi/cli/php_cli.c:1039






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


#34110 [NEW]: debug_print_backtrace prints wrong arguments

2005-08-12 Thread iblue at gmx dot net
From: iblue at gmx dot net
Operating system: Linux 
PHP version:  5.0.4
PHP Bug Type: Unknown/Other Function
Bug description:  debug_print_backtrace prints wrong arguments

Description:

debug_print_backtrace() and debug_backtrace() give both the same wrong
results in combination with set_error_handler().
-
php5 -v
PHP 5.0.4-1.dotdeb.2 (cli) (built: Jun 28 2005 12:17:46)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.0.4-dev, Copyright (c) 1998-2004 Zend Technologies
- 

Reproduce code:
---
?php
  set_error_handler(errorhandler);
  function errorhandler($errno, $errstr, $errfile, $errline
  {
debug_print_backtrace();
  }
  test(20,0);
  function test($x,$z)
  {
echo $x/$z;
  }
?

Expected result:

#0  errorhandler(2, Division by zero,
/home/iblue/public_html/the_engine/index.php, 8) called at
[/home/iblue/public_html/the_engine/index.php:8]
#1  test(20, 0) called at
[/home/iblue/public_html/the_engine/index.php:6]


Actual result:
--
#0  errorhandler() called at
[/home/iblue/public_html/the_engine/index.php:8]
#1  test() called at [/home/iblue/public_html/the_engine/index.php:8]
#2  test(2, Division by zero,
/home/iblue/public_html/the_engine/index.php, 8, Array ([x] = 20,[z] =
0)) called at [/home/iblue/public_html/the_engine/index.php:6]



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


#34110 [Fbk-Opn]: debug_print_backtrace prints wrong arguments

2005-08-12 Thread iblue at gmx dot net
 ID:   34110
 User updated by:  iblue at gmx dot net
 Reported By:  iblue at gmx dot net
-Status:   Feedback
+Status:   Open
 Bug Type: Unknown/Other Function
 Operating System: Linux
 PHP Version:  5.0.4
 New Comment:

[EMAIL PROTECTED]:~/php5-200508122030$ ./sapi/cli/php -q
~/public_html/bug.php
#0  errorhandler(2, Division by zero,
/home/iblue/public_html/the_engine/index.php, 8, Array ([x] = 20,[z]
= 0)) called at [/home/iblue/public_html/the_engine/index.php:8]
#1  test(20, 0) called at
[/home/iblue/public_html/the_engine/index.php:6]

better, but not right ;)


Previous Comments:


[2005-08-12 23:08:46] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2005-08-12 23:04:57] iblue at gmx dot net

Description:

debug_print_backtrace() and debug_backtrace() give both the same wrong
results in combination with set_error_handler().
-
php5 -v
PHP 5.0.4-1.dotdeb.2 (cli) (built: Jun 28 2005 12:17:46)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.0.4-dev, Copyright (c) 1998-2004 Zend Technologies
- 

Reproduce code:
---
?php
  set_error_handler(errorhandler);
  function errorhandler($errno, $errstr, $errfile, $errline
  {
debug_print_backtrace();
  }
  test(20,0);
  function test($x,$z)
  {
echo $x/$z;
  }
?

Expected result:

#0  errorhandler(2, Division by zero,
/home/iblue/public_html/the_engine/index.php, 8) called at
[/home/iblue/public_html/the_engine/index.php:8]
#1  test(20, 0) called at
[/home/iblue/public_html/the_engine/index.php:6]


Actual result:
--
#0  errorhandler() called at
[/home/iblue/public_html/the_engine/index.php:8]
#1  test() called at [/home/iblue/public_html/the_engine/index.php:8]
#2  test(2, Division by zero,
/home/iblue/public_html/the_engine/index.php, 8, Array ([x] = 20,[z]
= 0)) called at [/home/iblue/public_html/the_engine/index.php:6]







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


#34110 [Fbk-Opn]: debug_print_backtrace prints wrong arguments

2005-08-12 Thread iblue at gmx dot net
 ID:   34110
 User updated by:  iblue at gmx dot net
 Reported By:  iblue at gmx dot net
-Status:   Feedback
+Status:   Open
 Bug Type: Unknown/Other Function
 Operating System: Linux
 PHP Version:  5.0.4
 New Comment:

The difference is
Array ([x] = 20,[z] =0)

Actual result:
#0  errorhandler(2, Division by zero,
/home/iblue/public_html/the_engine/index.php, 8, Array ([x] = 20,[z]
=
0)) called at [/home/iblue/public_html/the_engine/index.php:8]

Expected result:
#0  errorhandler(2, Division by zero,
/home/iblue/public_html/the_engine/index.php, 8) called at
[/home/iblue/public_html/the_engine/index.php:8]
#1  test(20, 0) called at
[/home/iblue/public_html/the_engine/index.php:6]

Do you see the addictional arguments in #0 after ...index.php, 8?

Seen it?


Previous Comments:


[2005-08-12 23:39:26] [EMAIL PROTECTED]

I can't find any differencies between the expected result and what
you've just posted.



[2005-08-12 23:33:19] iblue at gmx dot net

[EMAIL PROTECTED]:~/php5-200508122030$ ./sapi/cli/php -q
~/public_html/bug.php
#0  errorhandler(2, Division by zero,
/home/iblue/public_html/the_engine/index.php, 8, Array ([x] = 20,[z]
= 0)) called at [/home/iblue/public_html/the_engine/index.php:8]
#1  test(20, 0) called at
[/home/iblue/public_html/the_engine/index.php:6]

better, but not right ;)



[2005-08-12 23:08:46] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2005-08-12 23:04:57] iblue at gmx dot net

Description:

debug_print_backtrace() and debug_backtrace() give both the same wrong
results in combination with set_error_handler().
-
php5 -v
PHP 5.0.4-1.dotdeb.2 (cli) (built: Jun 28 2005 12:17:46)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.0.4-dev, Copyright (c) 1998-2004 Zend Technologies
- 

Reproduce code:
---
?php
  set_error_handler(errorhandler);
  function errorhandler($errno, $errstr, $errfile, $errline
  {
debug_print_backtrace();
  }
  test(20,0);
  function test($x,$z)
  {
echo $x/$z;
  }
?

Expected result:

#0  errorhandler(2, Division by zero,
/home/iblue/public_html/the_engine/index.php, 8) called at
[/home/iblue/public_html/the_engine/index.php:8]
#1  test(20, 0) called at
[/home/iblue/public_html/the_engine/index.php:6]


Actual result:
--
#0  errorhandler() called at
[/home/iblue/public_html/the_engine/index.php:8]
#1  test() called at [/home/iblue/public_html/the_engine/index.php:8]
#2  test(2, Division by zero,
/home/iblue/public_html/the_engine/index.php, 8, Array ([x] = 20,[z]
= 0)) called at [/home/iblue/public_html/the_engine/index.php:6]







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


#34110 [Bgs]: debug_print_backtrace prints wrong arguments

2005-08-12 Thread iblue at gmx dot net
 ID:   34110
 User updated by:  iblue at gmx dot net
 Reported By:  iblue at gmx dot net
 Status:   Bogus
 Bug Type: Unknown/Other Function
 Operating System: Linux
 PHP Version:  5.0.4
 New Comment:

My errorhandler()-function only uses 4 parameters, but 5 printed, this
is a bug.


Previous Comments:


[2005-08-13 00:14:18] [EMAIL PROTECTED]

This is expected:

The fifth parameter is optional, errcontext , which is an array that
points to the active symbol table at the point the error occurred. In
other words, errcontext will contain an array of every variable that
existed in the scope the error was triggered in.
(c) http://www.php.net/set_error_handler



[2005-08-12 23:45:45] iblue at gmx dot net

The difference is
Array ([x] = 20,[z] =0)

Actual result:
#0  errorhandler(2, Division by zero,
/home/iblue/public_html/the_engine/index.php, 8, Array ([x] = 20,[z]
=
0)) called at [/home/iblue/public_html/the_engine/index.php:8]

Expected result:
#0  errorhandler(2, Division by zero,
/home/iblue/public_html/the_engine/index.php, 8) called at
[/home/iblue/public_html/the_engine/index.php:8]
#1  test(20, 0) called at
[/home/iblue/public_html/the_engine/index.php:6]

Do you see the addictional arguments in #0 after ...index.php, 8?

Seen it?



[2005-08-12 23:39:26] [EMAIL PROTECTED]

I can't find any differencies between the expected result and what
you've just posted.



[2005-08-12 23:33:19] iblue at gmx dot net

[EMAIL PROTECTED]:~/php5-200508122030$ ./sapi/cli/php -q
~/public_html/bug.php
#0  errorhandler(2, Division by zero,
/home/iblue/public_html/the_engine/index.php, 8, Array ([x] = 20,[z]
= 0)) called at [/home/iblue/public_html/the_engine/index.php:8]
#1  test(20, 0) called at
[/home/iblue/public_html/the_engine/index.php:6]

better, but not right ;)



[2005-08-12 23:08:46] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





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

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


#31916 [Bgs-Csd]: Problem with int/string array indexing/converting

2005-02-11 Thread iblue at gmx dot net
 ID:   31916
 User updated by:  iblue at gmx dot net
 Reported By:  iblue at gmx dot net
-Status:   Bogus
+Status:   Closed
 Bug Type: Scripting Engine problem
 Operating System: Linux 2.6
 PHP Version:  5.0.3
 New Comment:

Turck MMCache 2.0.3 is buggy for PHP5.
Sorry


Previous Comments:


[2005-02-10 19:47:22] [EMAIL PROTECTED]

Do not file bugs when you have Zend extensions (zend_extension=)
loaded. Examples are Zend Optimizer, Zend Debugger, Turck MM Cache,
APC, Xdebug and ionCube loader.  These extensions often modify engine
behavior which is not related to PHP itself.





[2005-02-10 19:43:01] iblue at gmx dot net

Description:

php -v gives:
PHP 5.0.3 (cli) (built: Dec 19 2004 15:05:29)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.0.3, Copyright (c) 1998-2004 Zend Technologies
with Turck MMCache v2.4.6, Copyright (c) 2002-2003 TurckSoft, St.
Petersburg, by Dmitry Stogov
with Zend Extension Manager v1.0.7, Copyright (c) 2003-2004, by
Zend Technologies
with Zend Debugger v3.5.2, Copyright (c) 1999-2004, by Zend
Technologies
Configure line:
'./configure' '--prefix=/usr' '--sysconfdir=/etc' '--with-gmp'
'--with-mysql' '--with-bz2' '--with-gd' '--with-zlib'
'--with-zlib-dir=/usr' '--with-apxs2=/usr/sbin/apxs'
/usr/sbin/httpd -v
Server version: Apache/2.0.49
Server built:   Jul 28 2004 17:29:16

The bug only occures, when you open the file with a browser on the
server (apache). When you start the file with php -q or debug it with
Zend Studio, the bug does not occur.

Reproduce code:
---
?php
$x = array(1 = 5, 2 = 7, 3 = 9);
$y = array(2 = 1);
$i=2;
$x[$i] -= $y[$i];
print_r($x);
?

Expected result:

Array
(
[1] = 5
[2] = 6
[3] = 9
)

Actual result:
--
6





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


#31916 [NEW]: Problem with int/string array indexing/converting

2005-02-10 Thread iblue at gmx dot net
From: iblue at gmx dot net
Operating system: Linux 2.6
PHP version:  5.0.3
PHP Bug Type: Scripting Engine problem
Bug description:  Problem with int/string array indexing/converting

Description:

php -v gives:
PHP 5.0.3 (cli) (built: Dec 19 2004 15:05:29)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.0.3, Copyright (c) 1998-2004 Zend Technologies
with Turck MMCache v2.4.6, Copyright (c) 2002-2003 TurckSoft, St.
Petersburg, by Dmitry Stogov
with Zend Extension Manager v1.0.7, Copyright (c) 2003-2004, by Zend
Technologies
with Zend Debugger v3.5.2, Copyright (c) 1999-2004, by Zend
Technologies
Configure line:
'./configure' '--prefix=/usr' '--sysconfdir=/etc' '--with-gmp'
'--with-mysql' '--with-bz2' '--with-gd' '--with-zlib'
'--with-zlib-dir=/usr' '--with-apxs2=/usr/sbin/apxs'
/usr/sbin/httpd -v
Server version: Apache/2.0.49
Server built:   Jul 28 2004 17:29:16

The bug only occures, when you open the file with a browser on the server
(apache). When you start the file with php -q or debug it with Zend
Studio, the bug does not occur.

Reproduce code:
---
?php
$x = array(1 = 5, 2 = 7, 3 = 9);
$y = array(2 = 1);
$i=2;
$x[$i] -= $y[$i];
print_r($x);
?

Expected result:

Array
(
[1] = 5
[2] = 6
[3] = 9
)

Actual result:
--
6

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