#37709 [NEW]: valgrind reports invalid reads in PDO::errorCode()

2006-06-06 Thread tony2001 at phpclub dot net
From: tony2001 at phpclub dot net
Operating system: Linux
PHP version:  5CVS-2006-06-06 (CVS)
PHP Bug Type: PDO related
Bug description:  valgrind reports invalid reads in PDO::errorCode()

Description:

==22003== Invalid read of size 1
==22003==at 0x4906752: strlen (mac_replace_strmem.c:243)
==22003==by 0x4F776E: zim_PDO_errorCode (pdo_dbh.c:955)
==22003==by 0x69B845: zend_do_fcall_common_helper_SPEC
(zend_vm_execute.h:200)
==22003==by 0x69B072: execute (zend_vm_execute.h:92)
==22003==by 0x67A634: zend_execute_scripts (zend.c:1100)
==22003==by 0x632AC0: php_execute_script (main.c:1747)
==22003==by 0x70130D: main (php_cli.c:1089)
==22003==  Address 0x730A474 is 148 bytes inside a block of size 344
free'd
==22003==at 0x49055DD: free (vg_replace_malloc.c:235)
==22003==by 0x697867: zend_objects_store_del_ref_by_handle
(zend_objects_API.c:196)
==22003==by 0x69787D: zend_objects_store_del_ref
(zend_objects_API.c:158)
==22003==by 0x4F7B4F: zim_PDO_query (zend_variables.h:35)
==22003==by 0x69B845: zend_do_fcall_common_helper_SPEC
(zend_vm_execute.h:200)
==22003==by 0x69B072: execute (zend_vm_execute.h:92)
==22003==by 0x67A634: zend_execute_scripts (zend.c:1100)
==22003==by 0x632AC0: php_execute_script (main.c:1747)
==22003==by 0x70130D: main (php_cli.c:1089)

==22003== Invalid read of size 1
==22003==at 0x4906AF7: memcpy (mac_replace_strmem.c:394)
==22003==by 0x65D557: zend_strndup (zend_alloc.c:439)
==22003==by 0x4F7710: zim_PDO_errorCode (pdo_dbh.c:958)
==22003==by 0x69B845: zend_do_fcall_common_helper_SPEC
(zend_vm_execute.h:200)
==22003==by 0x69B072: execute (zend_vm_execute.h:92)
==22003==by 0x67A634: zend_execute_scripts (zend.c:1100)
==22003==by 0x632AC0: php_execute_script (main.c:1747)
==22003==by 0x70130D: main (php_cli.c:1089)
==22003==  Address 0x730A478 is 152 bytes inside a block of size 344
free'd
==22003==at 0x49055DD: free (vg_replace_malloc.c:235)
==22003==by 0x697867: zend_objects_store_del_ref_by_handle
(zend_objects_API.c:196)
==22003==by 0x69787D: zend_objects_store_del_ref
(zend_objects_API.c:158)
==22003==by 0x4F7B4F: zim_PDO_query (zend_variables.h:35)
==22003==by 0x69B845: zend_do_fcall_common_helper_SPEC
(zend_vm_execute.h:200)
==22003==by 0x69B072: execute (zend_vm_execute.h:92)
==22003==by 0x67A634: zend_execute_scripts (zend.c:1100)
==22003==by 0x632AC0: php_execute_script (main.c:1747)
==22003==by 0x70130D: main (php_cli.c:1089)

Note that PDO::query() *destroys* statement object as well as statement
handle when query fails. So PDO::errorCode() operates on already destroyed
statement handle.


Reproduce code:
---
See ext/pdo/tests/bug_34687.phpt.
I've reproduced it with sqlite2::memory, but that shouldn't matter.

Expected result:

No invalid reads?


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


#32437 [NEW]: two leaks in zend_execute.c when executing bug22836.phpt

2005-03-23 Thread tony2001 at phpclub dot net
From: tony2001 at phpclub dot net
Operating system: SuSE 9.2
PHP version:  5CVS-2005-03-23 (dev)
PHP Bug Type: Zend Engine 2 problem
Bug description:  two leaks in zend_execute.c when executing bug22836.phpt

Description:

Found 2 leaks in zend_execute.c when executing Zend/tests/bug22836.phpt.

/usr/src/dev/php-src_5_0_clean/Zend/zend_execute.c(616) :  Freeing
0x1BF0F544 (4 bytes), script=/www/index.php
/usr/src/dev/php-src_5_0_clean/Zend/zend_variables.c(137) : Actual
location (location was relayed)
/usr/src/dev/php-src_5_0_clean/Zend/zend_execute.c(271) :  Freeing
0x1BF0FBB4 (16 bytes), script=/www/index.php


Reproduce code:
---
The same as in bug #22836.
Pasting it here for additional convenience.




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


#32010 [NEW]: memleaks in mssql_fetch_batch()

2005-02-17 Thread tony2001 at phpclub dot net
From: tony2001 at phpclub dot net
Operating system: Linux
PHP version:  5CVS-2005-02-17 (dev)
PHP Bug Type: MSSQL related
Bug description:  memleaks in mssql_fetch_batch()

Description:

mssql_fetch_batch() leaks in several places.

Reproduce code:
---


Expected result:

Done

Actual result:
--
/home/dev/php-src/ext/mssql/php_mssql.c(1065) :  Freeing 0x082C0BE4 (3
bytes), script=/www/index.php
/home/dev/php-src/ext/mssql/php_mssql.c(1052) :  Freeing 0x082C0BAC (3
bytes), script=/www/index.php


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


#32009 [NEW]: mssql_bind() causes buffer overruns & memleaks

2005-02-17 Thread tony2001 at phpclub dot net
From: tony2001 at phpclub dot net
Operating system: Linux
PHP version:  5CVS-2005-02-17 (dev)
PHP Bug Type: MSSQL related
Bug description:  mssql_bind() causes buffer overruns & memleaks

Description:

mssql_bind() causes some buffer overruns & memleaks if you try to bind the
same parameter *several times*.


Reproduce code:
---


Expected result:

Done

Actual result:
--
[Thu Feb 17 16:18:27 2005]  Script:  '/www/index.php'
---
/home/dev/php-src/Zend/zend_execute.h(127) : Block 0x082C2FF0 status:
/home/dev/php-src/Zend/zend_execute.h(64) : Actual location (location was
relayed)
Beginning:  OK (allocated on
/home/dev/php-src/Zend/zend_vm_execute.h:157, 16 bytes)
  End:  Overflown (magic=0x082C3764 instead of 0x2A8FCC84)
At least 4 bytes overflown
---
Done
/home/dev/php-src/Zend/zend_vm_execute.h(157) :  Freeing 0x082BF87C (16
bytes), script=/www/qa/tests/ext/mssql/030.php
Last leak repeated 1 time
/home/dev/php-src/Zend/zend_vm_execute.h(17922) :  Freeing 0x082C3764 (16
bytes), script=/www/qa/tests/ext/mssql/030.php
=== Total 3 memory leaks detected ===

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


#31346 [NEW]: ArrayIterator::next segfaults

2004-12-30 Thread tony2001 at phpclub dot net
From: tony2001 at phpclub dot net
Operating system: Linux 2.6.9
PHP version:  5CVS-2004-12-30 (dev)
PHP Bug Type: SPL related
Bug description:  ArrayIterator::next segfaults

Description:

ArrayIterator::next() segfaults when called after
ArrayIterator::offsetUnset().


Reproduce code:
---
var1=1;

$ao = new ArrayObject($obj);

$i = $ao->getIterator();

$ao->offsetUnset($i->key());
$i->next();
echo "Done";
?>

Expected result:

Done

Actual result:
--
Program received signal SIGSEGV, Segmentation fault.
0x0818148b in zend_hash_get_current_key_ex (ht=0x82e44ac,
str_index=0xbfffd1c4, str_length=0xbfffd1c0,
num_index=0xbfffd1bc, duplicate=0 '\0', pos=0x82e919c) at
/home/dev/php-src/Zend/zend_hash.c:1055
1055if (p->nKeyLength) {
(gdb) bt
#0  0x0818148b in zend_hash_get_current_key_ex (ht=0x82e44ac,
str_index=0xbfffd1c4, str_length=0xbfffd1c0,
num_index=0xbfffd1bc, duplicate=0 '\0', pos=0x82e919c) at
/home/dev/php-src/Zend/zend_hash.c:1055
#1  0x080aff15 in spl_array_skip_protected (intern=0x82e918c) at
/home/dev/php-src/ext/spl/spl_array.c:479
#2  0x080b000b in spl_array_next (intern=0x82e918c) at
/home/dev/php-src/ext/spl/spl_array.c:502
#3  0x080b0d8e in zif_spl_Array_next (ht=0, return_value=0x82e9054,
this_ptr=0x82e90f4, return_value_used=0)
at /home/dev/php-src/ext/spl/spl_array.c:857
#4  0x0819c493 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbfffd430) at zend_vm_execute.h:155
#5  0x0819ca01 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER
(execute_data=0xbfffd430) at zend_vm_execute.h:268
#6  0x0819c1ab in execute (op_array=0x82e43ec) at zend_vm_execute.h:58
#7  0x081793b7 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
at /home/dev/php-src/Zend/zend.c:1062
#8  0x08139647 in php_execute_script (primary_file=0xb840) at
/home/dev/php-src/main/main.c:1639
#9  0x081e92b5 in main (argc=2, argv=0xb8d4) at
/home/dev/php-src/sapi/cli/php_cli.c:944
#10 0x420157a4 in __libc_start_main () from /lib/tls/libc.so.6

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


#31348 [NEW]: CachingIterator::rewind() leaks

2004-12-30 Thread tony2001 at phpclub dot net
From: tony2001 at phpclub dot net
Operating system: Linux 2.6.9
PHP version:  5CVS-2004-12-30 (dev)
PHP Bug Type: SPL related
Bug description:  CachingIterator::rewind() leaks 

Description:

CachingIterator::rewind() leaks some memory.
I can propose this small patch, but I'm almost sure it's not the real
solution.

Index: spl_iterators.c
===
RCS file: /repository/php-src/ext/spl/spl_iterators.c,v
retrieving revision 1.61
diff -u -r1.61 spl_iterators.c
--- spl_iterators.c 29 Dec 2004 16:11:42 -  1.61
+++ spl_iterators.c 30 Dec 2004 09:43:14 -
@@ -752,7 +752,8 @@
}
if (intern->dit_type == DIT_CachingIterator || intern->dit_type ==
DIT_CachingRecursiveIterator) {
if (intern->u.caching.zstr) {
-   zval_ptr_dtor(&intern->u.caching.zstr);
+   zval_dtor(intern->u.caching.zstr);
+   FREE_ZVAL(intern->u.caching.zstr);
intern->u.caching.zstr = NULL;
}
if (intern->u.caching.zchildren) {

Reproduce code:
---
rewind();

echo "Done\n";
?>

Expected result:

Done

Actual result:
--
Done
/home/dev/php-src/ext/spl/spl_iterators.c(1276) :  Freeing 0x082E9064 (16
bytes), script=/www/index.php
/home/dev/php-src/Zend/zend_variables.h(45) :  Freeing 0x082E8E9C (5
bytes), script=/www/index.php
/home/dev/php-src/Zend/zend_variables.c(120) : Actual location (location
was relayed)
=== Total 2 memory leaks detected ===

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


#31137 [NEW]: stream_filter_remove() segfaults when stream is already closed

2004-12-16 Thread tony2001 at phpclub dot net
From: tony2001 at phpclub dot net
Operating system: Linux
PHP version:  5CVS-2004-12-16 (dev)
PHP Bug Type: Filesystem function related
Bug description:  stream_filter_remove() segfaults when stream is already closed

Description:

Segfault when trying to remove stream filter *after* closing the stream
itself.
Wez, please, look into this, I don't have much time to debug it myself
ATM.

Reproduce code:
---


Expected result:

.

Actual result:
--
Program received signal SIGSEGV, Segmentation fault.
0x08141ef2 in _php_stream_filter_flush (filter=0x82c54bc, finish=1) at
/home/dev/php-src/main/streams/filter.c:418
418 if (!filter->chain || !filter->chain->stream) {
(gdb) bt
#0  0x08141ef2 in _php_stream_filter_flush (filter=0x82c54bc, finish=1) at
/home/dev/php-src/main/streams/filter.c:418
#1  0x081213c5 in zif_stream_filter_remove (ht=1, return_value=0x82b2bfc,
this_ptr=0x0, return_value_used=0)
at /home/dev/php-src/ext/standard/streamsfuncs.c:1143
#2  0x0818fb03 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbfffd3c0) at zend_vm_execute.h:155
#3  0x08192531 in ZEND_DO_FCALL_SPEC_CONST_HANDLER
(execute_data=0xbfffd3c0) at zend_vm_execute.h:1514
#4  0x0818f81b in execute (op_array=0x82c0814) at zend_vm_execute.h:58
#5  0x0816cba7 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
at /home/dev/php-src/Zend/zend.c:1062
#6  0x0812ce37 in php_execute_script (primary_file=0xb7d0) at
/home/dev/php-src/main/main.c:1639
#7  0x081dcb25 in main (argc=2, argv=0xb864) at
/home/dev/php-src/sapi/cli/php_cli.c:943
#8  0x420157a4 in __libc_start_main () from /lib/tls/libc.so.6

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


#29209 [NEW]: imap_fetchbody() doesn't check message index

2004-07-16 Thread tony2001 at phpclub dot net
From: tony2001 at phpclub dot net
Operating system: Irrelevant
PHP version:  5CVS-2004-07-16 (dev)
PHP Bug Type: IMAP related
Bug description:  imap_fetchbody() doesn't check message index

Description:

imap_fetchbody() doesn't check message index, causing PHP to segfault (in
fact segfault happens in imap lib).

patches to fix the problem can be found here:
http://tony2004.phpclub.net/dev/tmp/imap_4_3.diff
http://tony2004.phpclub.net/dev/tmp/imap_PHP_5.diff

Reproduce code:
---


Expected result:

-

Actual result:
--
segfault

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



#29108 [Fbk->Opn]: xslt segfaults when ze1_compatibility_mode is on

2004-07-12 Thread tony2001 at phpclub dot net
 ID:   29108
 User updated by:  tony2001 at phpclub dot net
 Reported By:  tony2001 at phpclub dot net
-Status:   Feedback
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: Linux 2.4.23
 PHP Version:  5CVS-2004-07-12 (dev)
 New Comment:

Yep, this patch fixes the problem.
At least it doesn't segfault anymore.


Previous Comments:


[2004-07-12 14:52:32] [EMAIL PROTECTED]

Could you try the patch at 
http://trash.chregu.tv/php_xsl.c.diff.txt
and see if it helps
(patch by Rob)



[2004-07-12 12:37:09] tony2001 at phpclub dot net

Description:

XSLT segfaults when trying to execute rather simple script and
zend.ze1_compatibility_mode is On.
Turning zend.ze1_compatibility_mode = Off it works ok.

Reproduce code:
---
preserveWhiteSpace = false;
$f=$document->load('test.xslt');
$xslt->importStyleSheet($document);

?>

Expected result:

Found a top-level element xslutput with null namespace URI

Actual result:
--
Program received signal SIGSEGV, Segmentation fault.
0x081ec1d2 in zif_xsl_xsltprocessor_import_stylesheet (ht=1,
return_value=0x83a69dc, this_ptr=0x83b8eec,
return_value_used=0) at
/home/tony/CVS/php-src/ext/xsl/xsltprocessor.c:369
369 if (((xsltStylesheetPtr) intern->ptr)->_private
!= NULL) {
(gdb) bt
#0  0x081ec1d2 in zif_xsl_xsltprocessor_import_stylesheet (ht=1,
return_value=0x83a69dc, this_ptr=0x83b8eec,
return_value_used=0) at
/home/tony/CVS/php-src/ext/xsl/xsltprocessor.c:369
#1  0x0826a938 in zend_do_fcall_common_helper (execute_data=0xbfffd3b0,
opline=0x83b8dd4, op_array=0x83b4374)
at /home/tony/CVS/php-src/Zend/zend_execute.c:2699
#2  0x0826b014 in zend_do_fcall_by_name_handler
(execute_data=0xbfffd3b0, opline=0x83b8dd4, op_array=0x83b4374)
at /home/tony/CVS/php-src/Zend/zend_execute.c:2810
#3  0x08266a02 in execute (op_array=0x83b4374) at
/home/tony/CVS/php-src/Zend/zend_execute.c:1391
#4  0x0823f417 in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /home/tony/CVS/php-src/Zend/zend.c:1061
#5  0x081f1d81 in php_execute_script (primary_file=0xb7f0) at
/home/tony/CVS/php-src/main/main.c:1627
#6  0x082750ca in main (argc=3, argv=0xb884) at
/home/tony/CVS/php-src/sapi/cli/php_cli.c:943
#7  0x40cc6af7 in __libc_start_main () from /lib/i686/libc.so.6






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


#29108 [NEW]: xslt segfaults when ze1_compatibility_mode is on

2004-07-12 Thread tony2001 at phpclub dot net
From: tony2001 at phpclub dot net
Operating system: Linux 2.4.23
PHP version:  5CVS-2004-07-12 (dev)
PHP Bug Type: Reproducible crash
Bug description:  xslt segfaults when ze1_compatibility_mode is on

Description:

XSLT segfaults when trying to execute rather simple script and
zend.ze1_compatibility_mode is On.
Turning zend.ze1_compatibility_mode = Off it works ok.

Reproduce code:
---
preserveWhiteSpace = false;
$f=$document->load('test.xslt');
$xslt->importStyleSheet($document);

?>

Expected result:

Found a top-level element xslutput with null namespace URI

Actual result:
--
Program received signal SIGSEGV, Segmentation fault.
0x081ec1d2 in zif_xsl_xsltprocessor_import_stylesheet (ht=1,
return_value=0x83a69dc, this_ptr=0x83b8eec,
return_value_used=0) at
/home/tony/CVS/php-src/ext/xsl/xsltprocessor.c:369
369 if (((xsltStylesheetPtr) intern->ptr)->_private !=
NULL) {
(gdb) bt
#0  0x081ec1d2 in zif_xsl_xsltprocessor_import_stylesheet (ht=1,
return_value=0x83a69dc, this_ptr=0x83b8eec,
return_value_used=0) at
/home/tony/CVS/php-src/ext/xsl/xsltprocessor.c:369
#1  0x0826a938 in zend_do_fcall_common_helper (execute_data=0xbfffd3b0,
opline=0x83b8dd4, op_array=0x83b4374)
at /home/tony/CVS/php-src/Zend/zend_execute.c:2699
#2  0x0826b014 in zend_do_fcall_by_name_handler (execute_data=0xbfffd3b0,
opline=0x83b8dd4, op_array=0x83b4374)
at /home/tony/CVS/php-src/Zend/zend_execute.c:2810
#3  0x08266a02 in execute (op_array=0x83b4374) at
/home/tony/CVS/php-src/Zend/zend_execute.c:1391
#4  0x0823f417 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
at /home/tony/CVS/php-src/Zend/zend.c:1061
#5  0x081f1d81 in php_execute_script (primary_file=0xb7f0) at
/home/tony/CVS/php-src/main/main.c:1627
#6  0x082750ca in main (argc=3, argv=0xb884) at
/home/tony/CVS/php-src/sapi/cli/php_cli.c:943
#7  0x40cc6af7 in __libc_start_main () from /lib/i686/libc.so.6


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


#29061 [NEW]: soap extension segfaults

2004-07-08 Thread tony2001 at phpclub dot net
From: tony2001 at phpclub dot net
Operating system: Linux 2.4.23
PHP version:  5CVS-2004-07-08 (dev)
PHP Bug Type: SOAP related
Bug description:  soap extension segfaults 

Description:

SOAP ext segfaults with following backtrace:
---
Program received signal SIGSEGV, Segmentation fault.
0x401746a3 in strlen () from /lib/i686/libc.so.6
(gdb) bt
#0  0x401746a3 in strlen () from /lib/i686/libc.so.6
#1  0x402e49ee in do_request (this_ptr=0x817a044, request=0x817a1dc,
location=0x8 ,
action=0x1 , version=135789172,
response=0x817f85c)
at /home/tony/CVS/php-src/ext/soap/soap.c:1958
#2  0x402e4f37 in do_soap_call (this_ptr=0x817a044, function=0x817a1dc
"getQuote", function_len=8, arg_count=1,
real_args=0x817fa74, return_value=0x817f85c, soap_action=0x0,
call_uri=0x0, soap_headers=0x0, output_headers=0x0)
at /home/tony/CVS/php-src/ext/soap/soap.c:2033
#3  0x402e65e1 in zif_SoapClient___call (ht=2, return_value=0x817f85c,
this_ptr=0x817a044, return_value_used=1)
at /home/tony/CVS/php-src/ext/soap/soap.c:2200
#4  0x40410d63 in zend_call_function (fci=0xbfffbc70, fci_cache=0x0) at
/home/tony/CVS/php-src/Zend/zend_execute_API.c:853
#5  0x4040faf0 in call_user_function_ex (function_table=0x0,
object_pp=0xbfffbd58, function_name=0xbfffbd00,
retval_ptr_ptr=0xbfffbcec, param_count=2, params=0xbfffbcf0,
no_separation=0, symbol_table=0x0)
at /home/tony/CVS/php-src/Zend/zend_execute_API.c:550
#6  0x40435726 in zend_std_call_user_call (ht=1, return_value=0x817f76c,
this_ptr=0x817a044, return_value_used=1)
at /home/tony/CVS/php-src/Zend/zend_object_handlers.c:565
#7  0x404490e8 in zend_do_fcall_common_helper (execute_data=0xbfffcf80,
opline=0x818a4a4, op_array=0x8179f94)
at /home/tony/CVS/php-src/Zend/zend_execute.c:2699
#8  0x404497c4 in zend_do_fcall_by_name_handler (execute_data=0xbfffcf80,
opline=0x818a4a4, op_array=0x8179f94)
at /home/tony/CVS/php-src/Zend/zend_execute.c:2810
#9  0x404451b2 in execute (op_array=0x8179f94) at
/home/tony/CVS/php-src/Zend/zend_execute.c:1391
#10 0x4041dbdb in zend_execute_scripts (type=8, retval=0x0, file_count=3)
at /home/tony/CVS/php-src/Zend/zend.c:1061
#11 0x403d0611 in php_execute_script (primary_file=0xb310) at
/home/tony/CVS/php-src/main/main.c:1632
#12 0x40451ffa in apache_php_module_main (r=0x8169584,
display_source_mode=0)
at /home/tony/CVS/php-src/sapi/apache/sapi_apache.c:54
#13 0x40453075 in send_php (r=0x8169584, display_source_mode=0,
filename=0x8169b6c "/www/index.php")
at /home/tony/CVS/php-src/sapi/apache/mod_php5.c:621
#14 0x40453106 in send_parsed_php (r=0x8169584) at
/home/tony/CVS/php-src/sapi/apache/mod_php5.c:636
#15 0x08074542 in ap_invoke_handler ()
#16 0x0808a56a in process_request_internal ()
#17 0x0808a9d4 in ap_internal_redirect ()
#18 0x0806024a in handle_dir ()
#19 0x08074542 in ap_invoke_handler ()
#20 0x0808a56a in process_request_internal ()
#21 0x0808a5c7 in ap_process_request ()
#22 0x08080f80 in child_main ()
#23 0x08081132 in make_child ()
#24 0x080812b1 in startup_children ()
#25 0x0808199b in standalone_main ()
#26 0x08082235 in main ()
#27 0x4010faf7 in __libc_start_main () from /lib/i686/libc.so.6
--

Reproduce code:
---
$client = new SoapClient("stocks.wsdl"); 
try {
print($client->getQuote("ibm")); 
} catch (SoapFault $exception) { 
echo $exception; 
}

stocks.wsdl:
http://schemas.xmlsoap.org/wsdl/";
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:http="http://
schemas.xmlsoap.org/wsdl/http/"
xmlns:xs="http://www.w3.org/2001/XMLSchema";
xmlns:soapenc="http://schemas.xmlsoap.org/soap/e
ncoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/";
xmlns:y="http://new.webservice.namespace"; targetNamespace="http
://new.webservice.namespace">
















http://schemas.xmlsoap.org/soap/http"/>











http://xrs.spdllc.com/server2.php"/>





Expected result:

-

Actual result:
--
-

-- 
Edit bug report at http://bugs.php.net/?id=29061&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=29061&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=29061&r=trysnapshot5
Fixed in CVS:   http://bugs.php.net/fix.php?id=29061&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=29061&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=29061&r=needtrace
Need Reproduce Script:  http://bugs.php.net/fix.php?id=29061&r=needscript
Try newer version:  http://bugs.php.net/fix.php?id=29061&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=29061&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=29061&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=29061&r=notenoughinfo
Su

#28801 [NEW]: Internal compiler error with self::$array[$i]();

2004-06-16 Thread tony2001 at phpclub dot net
From: tony2001 at phpclub dot net
Operating system: Linux 2.4.23
PHP version:  5CVS-2004-06-16 (dev)
PHP Bug Type: Zend Engine 2 problem
Bug description:  Internal compiler error with self::$array[$i]();

Description:

Internal compiler error.

Reproduce code:
---


Expected result:

I'm even not expect it to work, but error message asked it to be reported,
so here I am =)


Actual result:
--
Fatal error: Internal compiler error - please report! in /www/index.php on
line 5

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


#28506 [NEW]: imagearc() doesn't like negative value of the s parameter

2004-05-24 Thread tony2001 at phpclub dot net
From: tony2001 at phpclub dot net
Operating system: Linux 2.4.23
PHP version:  5CVS-2004-05-24 (dev)
PHP Bug Type: GD related
Bug description:  imagearc() doesn't like negative value of the s parameter

Description:

imagearc() draws broken arc, when using negative value as s parameter.
It could be GDlib bug, at least I found a couple of words in GD man:
http://www.boutell.com/gd/manual2.0.23.html about unspecified bugs in
gdImageArc().
Also, there can be simple workaround: just don't accept negative values,
reduce them to zero.

Reproduce code:
---
// result image is here: http://tony2001.phpclub.net/temp/imagearc.png
//
// create a 200*200 image
$img = imagecreate(200, 200);

// allocate some colors
$white = imagecolorallocate($img, 255, 255, 255);
$black = imagecolorallocate($img, 0, 50, 200);
   
// draw a white circle 
imagearc($img, 100, 100, 150, 150, -1, 200, $black);

// output image in the browser
header("Content-type: image/png");
imagepng($img);
   
// free memory
imagedestroy($img);


Expected result:

a flat arc

Actual result:
--
a broken arc with some crosslines

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


#28086 [NEW]: overload() segfaults

2004-04-21 Thread tony2001 at phpclub dot net
From: tony2001 at phpclub dot net
Operating system: Linux 2.4.23
PHP version:  4CVS-2004-04-21 (stable)
PHP Bug Type: Reproducible crash
Bug description:  overload() segfaults

Description:

Segfault in overload extension.
Backtrace:

0x4037bb1d in fetch_overloaded_element (result=0x8146c4c, op1=0x8146c5c,
op2=0x8146c6c, Ts=0xbfffbe9c, type=1,
retval=0xbfffbf60, overloaded_element_type=1) at
/home/tony/CVS/php_src_PHP_4_3_debug/Zend/zend_execute.c:735
735 overloaded_element.element = *get_zval_ptr(op2, Ts,
&EG(free_op2), type);
(gdb) bt
#0  0x4037bb1d in fetch_overloaded_element (result=0x8146c4c,
op1=0x8146c5c, op2=0x8146c6c, Ts=0xbfffbe9c, type=1,
retval=0xbfffbf60, overloaded_element_type=1) at
/home/tony/CVS/php_src_PHP_4_3_debug/Zend/zend_execute.c:735
#1  0x4037bc98 in zend_fetch_dimension_address (result=0x8146c4c,
op1=0x8146c5c, op2=0x8146c6c, Ts=0xbfffbe9c, type=1)
at /home/tony/CVS/php_src_PHP_4_3_debug/Zend/zend_execute.c:758
#2  0x4037e052 in execute (op_array=0x813ab5c) at
/home/tony/CVS/php_src_PHP_4_3_debug/Zend/zend_execute.c:1301
#3  0x4036c520 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
at /home/tony/CVS/php_src_PHP_4_3_debug/Zend/zend.c:886
#4  0x4033162e in php_execute_script (primary_file=0xb310) at
/home/tony/CVS/php_src_PHP_4_3_debug/main/main.c:1731
#5  0x4038527a in apache_php_module_main (r=0x81309f4,
display_source_mode=0)
at /home/tony/CVS/php_src_PHP_4_3_debug/sapi/apache/sapi_apache.c:54
#6  0x40386309 in send_php (r=0x81309f4, display_source_mode=0,
filename=0x8130f5c "/www/index.php")
at /home/tony/CVS/php_src_PHP_4_3_debug/sapi/apache/mod_php4.c:620
#7  0x4038639a in send_parsed_php (r=0x81309f4) at
/home/tony/CVS/php_src_PHP_4_3_debug/sapi/apache/mod_php4.c:635
#8  0x08074542 in ap_invoke_handler ()
#9  0x0808a56a in process_request_internal ()
#10 0x0808a9d4 in ap_internal_redirect ()
#11 0x0806024a in handle_dir ()
#12 0x08074542 in ap_invoke_handler ()
#13 0x0808a56a in process_request_internal ()
#14 0x0808a5c7 in ap_process_request ()
#15 0x08080f80 in child_main ()
#16 0x08081132 in make_child ()
#17 0x080812b1 in startup_children ()
#18 0x0808199b in standalone_main ()
#19 0x08082235 in main ()
#20 0x4010eaf7 in __libc_start_main () from /lib/i686/libc.so.6



Reproduce code:
---
bar[$prop_name] = $prop_value; 
} 
} 

overload('Foo'); 

$foo = new Foo; 

$foo->blabla[] = '123'; 

?>



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


#27519 [Com]: Reflection_Function constructor crashes with non-existant function's name

2004-03-26 Thread tony2001 at phpclub dot net
 ID:   27519
 Comment by:   tony2001 at phpclub dot net
 Reported By:  su1d at phpclub dot net
 Status:   Open
 Bug Type: Zend Engine 2 problem
 Operating System: Win32
 PHP Version:  5CVS-2004-03-10
 New Comment:

I can confirm this bug with latest snapshot (php5-win32-200403261130).

I've no ideas how to debug it under win32, so if you tell me how to get
the backtrace or something more useful, than this silly error message,
I'll try to help, of course.


Previous Comments:


[2004-03-09 20:01:37] su1d at phpclub dot net

PHP 5.0.0RC1-dev (cli) (built: Mar 10 2004 00:17:49)

I'm sorry, but I have to admit that the bug remains in the newest
build.



We need someone else to check the issue out on a Windows system.



[2004-03-07 16:16:18] su1d at phpclub dot net

Just a common Windows system MessageBox appears notifying me about an
error:



php.exe - Application Error

The instruction at "0x17164" referenced memory at "0xfff8". The
memory could not be "read".

Click "OK" to terminate the program

blah-blah-blah...



[2004-03-07 15:39:43] [EMAIL PROTECTED]

Can't reproduce this on Linux. What is the full error message you get?



[2004-03-07 14:13:17] su1d at phpclub dot net

Description:

E:\>php -v

PHP 5.0.0b4 (cli) (built: Feb 12 2004 18:00:13)

Copyright (c) 1997-2004 The PHP Group

Zend Engine v2.0.0-dev, Copyright (c) 1998-2004 Zend Technologies



E:\>php -r "$F = new Reflection_Function('abs');"



E:\>php -r "$F = new Reflection_Function('no_function');"

** BANG! **



Reproduce code:
---
$F = new Reflection_Function('no_function');








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


#26133 [Com]: OCIDescriptorFree segfault PHP

2003-12-08 Thread tony2001 at phpclub dot net
 ID:   26133
 Comment by:   tony2001 at phpclub dot net
 Reported By:  msanmartin at seamus dot es
 Status:   Analyzed
 Bug Type: OCI8 related
 Operating System: Linux
 PHP Version:  4CVS, 5CVS
 New Comment:

if you replace this:
$db_log_rowid = OCINewDescriptor($db_log,OCI_D_ROWID);

with that:
$db_log_rowid = OCINewDescriptor($db_log,OCI_D_LOB);

you'll get another one segfault, but this one is initiated by
OciExecute();

isn't it an OCI bug?
it seems, that Oracle allocates memory for descriptor, but can't
initialize while executing the query and should return an error in this
case.


Previous Comments:


[2003-12-08 05:55:28] [EMAIL PROTECTED]

no need to allocate a descriptor for that.
 
see:






[2003-11-05 04:08:07] msanmartin at seamus dot es

Description:

If I call OCINewDescriptor for create a OCI_D_ROWID
when I free this descriptor or php free at the 
end it crash.
It happens in Oracle  9.2.0.1.0 
In Oracle 9.0.1.0.0 the code works.

I make a program in C that makes similar calls to
OCI8 but it works well.

The crash is in the call to OCIDescriptorFree.

I reproduce this in php4-200311050830 php-4.3.2 php-4.3.4
In php-4.2.2 the code works.


Reproduce code:
---
free();
?>


Actual result:
--
$ gdb /usr/local/src/php-4.3.4/sapi/cli/php 
GNU gdb 5.3
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "i386-slackware-linux"...
(gdb) set args x2.php 
(gdb) run
Starting program: /usr/local/src/php-4.3.4/sapi/cli/php x2.php 
[New Thread 16384 (LWP 11411)]
end
** Internal heap ERROR 17112 addr=0x81d4278 *

* Dump of memory around addr 0x81d4278: 
81D4070      []
81D4080      []
Repeat 30 times
81D4270   8022 081D405C  ["[EMAIL PROTECTED]
81D4280 40921CBD 000A15CD D701 000D009F  [EMAIL PROTECTED]
81D4290 00DA2501 0059 8032 081D4278  [.%..Y...2...xB..]
81D42A0 408FAAA0 000A15CD    [EMAIL PROTECTED]
81D42B0      []
81D42C0   8052 081D4298  [RB..]
81D42D0 408FAAA0 000A15CD 081D42A8 0005  [EMAIL PROTECTED]
81D42E0  4000 4040   [EMAIL PROTECTED]@@]
81D42F0      []
81D4300 0010 402B29E0 402B2A30 081C29D8  [.)[EMAIL PROTECTED]@.)..]
81D4310   8032 081D42C8  [2B..]
81D4320 408FAAA0 000A15CD    [EMAIL PROTECTED]
81D4330      []
81D4340   8052 081D4318  [RC..]
81D4350 408FAAA0 000A15CD 081D4328 0005  [EMAIL PROTECTED](C..]
81D4360  4000 4040 402B2AE0  [EMAIL PROTECTED]@@[EMAIL PROTECTED]
81D4370 402B2B20     [ [EMAIL PROTECTED]
81D4380 0014 402B29E0 402B2A30 081C29D8  [.)[EMAIL PROTECTED]@.)..]
81D4390   8032 081D4348  [2...HC..]
81D43A0 408FAAA0 000A15CD    [EMAIL PROTECTED]
81D43B0      []
81D43C0   8052 081D4398  [RC..]
81D43D0 408FAAA0 000A15CD 081D43A8 0005  [EMAIL PROTECTED]
81D43E0  4000 4040 402B2A70  [EMAIL PROTECTED]@@[EMAIL PROTECTED]
81D43F0 402B2AA0     [EMAIL PROTECTED]
81D4400 005C 402B29E0 402B2A30 081C29D8  [\)[EMAIL PROTECTED]@.)..]
81D4410   8832 081D43C8  [2C..]
81D4420 408FAAA0 000A15CD  081D43D8  [EMAIL PROTECTED]
81D4430 081D42D8 081D4358    [.B..XC..]
81D4440    1041  [A...]
81D4450 081C63D8 081D3410 10001031   [.c...4..1...]
81D4460 081C63D8 081C6370 081CC7A0 8AF9  [.c..pc..]
81D4470  []

***HEAP DUMP heap name="Alloc environm"  desc=0x820bc78
 extent sz=0x1024 alt=32767 het=32767 rec=0 flg=3 opc=3
 parent=0x820bce0 owner=(nil) nex=(nil) xsz=0x1024
EXTENT 0 addr=0x8251914
  Chunk  825191c sz= 4124free  "   "
EXTENT 1 addr=0x82508d4
  Chunk  82508dc sz= 2808free  "   "
  Chunk  82513d4 sz= 1316freeable assoc with mark prv=(nil)
nxt=(nil)
EXTENT 2 addr=0x8

#20006 [Com]: cannot use 2 database connections

2003-12-08 Thread tony2001 at phpclub dot net
 ID:   20006
 Comment by:   tony2001 at phpclub dot net
 Reported By:  kezal at mail dot ru
 Status:   Verified
 Bug Type: OCI8 related
 Operating System: Linux (RH)
 PHP Version:  4.3.3RC4-dev
 New Comment:

I can't reproduce this bug neither with HEAD, nor with PHP_4_3 branch.
does it still exist?


Previous Comments:


[2003-11-12 01:39:45] ash at deakin dot edu dot au

Just a question.. are the dates correct for this bug?  The version this
bug applies to is 4.3.3RC4 which is reasonably current (well, last few
months).

I did come across the problem, and was glad to know the cause of the
problem.

Thanks!



[2002-10-21 08:48:34] [EMAIL PROTECTED]

Also,

once you're there, Thies, what could we about maintaining the
connections over the database reloads as reported in several posts
earlier.

I am, refering for the cases when, after restarting Oracle you'd need
to necessarely restart apache. I tried to research on it and it seems
to me that this is doable by controlling the connection via Zend
handlers (or something like that) but I am still learning about Zend
Engine, so couldn't fix that part yet.

Maxim Maletsky



[2002-10-21 05:29:05] [EMAIL PROTECTED]

i could verfy that indeed there is a problem. please add a 
2nd tnsname for the same database and do 
$a = ocilogon(.., .., tns1); 
$b = ocilogon(.., .., tns2); 
to get two independent database connections. 
 
i really hope that i find some time to fix this soon!! 
 



[2002-10-21 04:08:02] kezal at mail dot ru

If you have created 2nd connection, you cannot use
1st connection. I think 2nd connection doesn't create its own Oracle
cursor till first oraparse/exec executed

=== cut ===
//1. Connect and exec OK.
$conn_id1 = ociLogon("test","test123");
$stmt1 = ociparse($conn_id1,"select count(*) from tbl_lang_");
ociexecute($stmt1);

//2. Connect OK.
$conn_id2 = ociLogon("book1","book123");

//3. Exec fails!
$stmt1 = ociparse($conn_id1,"select count(*) from tbl_lang_");
ociexecute($stmt1);
=== cut ===





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


#24278 [Com]: error while trying to save LOB

2003-11-26 Thread tony2001 at phpclub dot net
 ID:   24278
 Comment by:   tony2001 at phpclub dot net
 Reported By:  trent at low dot ru
 Status:   No Feedback
 Bug Type: OCI8 related
 Operating System: Linux, Win32
 PHP Version:  4CVS-2003-08-15 (stable)
 New Comment:

this warning appears only when you did not initalize CLOB with
EMPTY_CLOB();
so, it's not a bug imho.


Previous Comments:


[2003-10-28 04:48:08] [EMAIL PROTECTED]

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





[2003-10-18 17:15:40] [EMAIL PROTECTED]

Have you tried using the sample code provided in the php manual?

http://www.php.net/manual/en/function.ocinewdescriptor.php



[2003-06-21 10:28:43] trent at low dot ru

Description:

I got these errors while trying to inputing string to LOB using LOB's
method save(); :

Warning: save() [function.save.html]: OCILobWrite: OCI_INVALID_HANDLE
in /www/sample.php on line 15

Warning: load() [function.load.html]: OCILobGetLength:
OCI_INVALID_HANDLE in /www/sample.php on line 19

This was tested with:
4.3.1-win32
4.3.1-linux
Latest snapshot on Linux.

Note: in oracle function there is in/out parameter used.
Additional exception from Oracle: ORA-22275: invalid LOB locator
specified.

Reproduce code:
---
//logging in
$conn = OCILogon('user', 'pass', 'srvname');
//creating new LOB locator
$clob = OCINewDescriptor($conn, OCI_D_LOB);
$sql = 'begin :ret:=test(lob_object=>:lob_object_param); end;';
//parsing query - ok
$stmt = OCIParse($conn, $sql);
//binding variables - ok
OCIBindByName($stmt, ':lob_object_param', &$clob, -1, OCI_B_CLOB);
OCIDefineByName($stmt, ':lob_object_param', $clob, OCI_B_CLOB);
OCIBindByName($stmt, ':ret', $return, 4);
OCIExecute($stmt, OCI_DEFAULT);

if($clob->save($param)) { // Warning: OCILobWrite: OCI_INVALID_HANDLE
in sample.php on line 15
OCICommit($conn); // this warning appears only when using method
save(); of LOB locator
}

print $clob->load(); // Warning: OCILobGetLength: OCI_INVALID_HANDLE
in sample.php on line 19
 // when using load method in LOB locator
$clob->free();
OCIFreeStatement($stmt);

Expected result:

I'm trying to save string as CLOB using Oracle function.
I do expect it to work fine =)
Maybe I'm doing something extremely wrong?
If so, please, correct me.

Thanx in advance.






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


#26384 [NEW]: domxslt->process causes segfault

2003-11-24 Thread tony2001 at phpclub dot net
From: tony2001 at phpclub dot net
Operating system: Linux
PHP version:  4.3.4
PHP Bug Type: Reproducible crash
Bug description:  domxslt->process causes segfault

Description:

PHP segfaults when domxslt->process() is called.
It seems to me, that this error is caused by memory corruption, cause I
can see, using printf(), in node_wrapper_free(), that wrapper contains
some html-code sometimes.

Reproduce code:
---
//full code could be grabbed from:
//http://tony2001.phpclub.net/temp/domxslt.tar.gz

$xml = domxml_open_mem(file_get_contents("./area_name.xml"));
$xslt = domxml_xslt_stylesheet_file('./area_list.xsl');
$xslt->process($xml, Array());

Actual result:
--
Program received signal SIGSEGV, Segmentation fault.
0x4033ebdb in zend_hash_index_find (ht=0x, h=0, pData=0x)
at /root/CVS/php-src_PHP_4_3/Zend/zend_hash.c:960
960 nIndex = h & ht->nTableMask;
(gdb) bt
#0  0x4033ebdb in zend_hash_index_find (ht=0x, h=0,
pData=0x)
at /root/CVS/php-src_PHP_4_3/Zend/zend_hash.c:960
#1  0x4024615a in node_wrapper_free (node=0x8180788) at
/root/CVS/php-src_PHP_4_3/ext/domxml/php_domxml.c:622
#2  0x40246270 in node_list_wrapper_dtor (node=0x8180788, destroyref=1)
at /root/CVS/php-src_PHP_4_3/ext/domxml/php_domxml.c:670
#3  0x40238ca3 in php_free_xml_doc (rsrc=0x) at
/root/CVS/php-src_PHP_4_3/ext/domxml/php_domxml.c:653
#4  0x4033f650 in list_entry_destructor (ptr=0x81ab9c4) at
/root/CVS/php-src_PHP_4_3/Zend/zend_list.c:177
#5  0x4033e188 in zend_hash_apply_deleter (ht=0x40466ac0, p=0x81ab9c4) at
/root/CVS/php-src_PHP_4_3/Zend/zend_hash.c:608
#6  0x4033e22c in zend_hash_graceful_reverse_destroy (ht=0x40466ac0) at
/root/CVS/php-src_PHP_4_3/Zend/zend_hash.c:674
#7  0x4033f80f in zend_destroy_rsrc_list (ht=0x) at
/root/CVS/php-src_PHP_4_3/Zend/zend_list.c:233
#8  0x40330e96 in shutdown_executor () at
/root/CVS/php-src_PHP_4_3/Zend/zend_execute_API.c:213
#9  0x40338f76 in zend_deactivate () at
/root/CVS/php-src_PHP_4_3/Zend/zend.c:665
#10 0x4030c836 in php_request_shutdown (dummy=0x0) at
/root/CVS/php-src_PHP_4_3/main/main.c:998
#11 0x4034ba8c in apache_php_module_main (r=0x817c8ec,
display_source_mode=0)
at /root/CVS/php-src_PHP_4_3/sapi/apache/sapi_apache.c:60
#12 0x4034c656 in send_php (r=0x817c8ec, display_source_mode=0,
filename=0x0)
at /root/CVS/php-src_PHP_4_3/sapi/apache/mod_php4.c:620
#13 0x4034c815 in send_parsed_php (r=0x817c8ec) at
/root/CVS/php-src_PHP_4_3/sapi/apache/mod_php4.c:635
#14 0x08068eee in ap_invoke_handler ()
#15 0x0807e83e in process_request_internal ()
#16 0x0807ec74 in ap_internal_redirect ()
#17 0x0805e39a in handle_dir ()
#18 0x08068eee in ap_invoke_handler ()
#19 0x0807e83e in process_request_internal ()
#20 0x0807e89b in ap_process_request ()
#21 0x0807535f in child_main ()
#22 0x08075511 in make_child ()
#23 0x08075690 in startup_children ()
#24 0x08075d00 in standalone_main ()
#25 0x0807659a in main ()
#26 0x400d1af7 in __libc_start_main () from /lib/i686/libc.so.6


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


#25976 [Com]: $array[] = $otherarray does not work as expected

2003-10-24 Thread tony2001 at phpclub dot net
 ID:   25976
 Comment by:   tony2001 at phpclub dot net
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Arrays related
 Operating System: Linux
 PHP Version:  5CVS-2003-10-24 (dev)
 New Comment:

Try to update your PHP from CVS, to run ./cvsclean and to build it once
more.
I can't reproduce this with latest CVS.


Previous Comments:


[2003-10-24 09:46:10] [EMAIL PROTECTED]

Description:

See expected and actual result to find out the difference. With CGI
build from same source both examples work as expected.

Reproduce code:
---
example 1:
';
var_dump($aTestOuter);
echo '';
?>

example 2:
';
var_dump($aTestOuter);
echo '';
?>

Expected result:

example 1:
array(3) {
  [0]=>
  array(2) {
["foo"]=>
string(29) "content of $aTestInner['foo']"
["bar"]=>
string(29) "content of $aTestInner['bar']"
  }
  [1]=>
  array(2) {
["foo"]=>
string(29) "content of $aTestInner['foo']"
["bar"]=>
string(29) "content of $aTestInner['bar']"
  }
  [2]=>
  array(2) {
["foo"]=>
string(29) "content of $aTestInner['foo']"
["bar"]=>
string(29) "content of $aTestInner['bar']"
  }
}

example 2:
array(3) {
  [0]=>
  array(2) {
["foo"]=>
string(32) "0: content of $aTestInner['foo']"
["bar"]=>
string(32) "0: content of $aTestInner['bar']"
  }
  [1]=>
  array(2) {
["foo"]=>
string(32) "1: content of $aTestInner['foo']"
["bar"]=>
string(32) "1: content of $aTestInner['bar']"
  }
  [2]=>
  array(2) {
["foo"]=>
string(32) "2: content of $aTestInner['foo']"
["bar"]=>
string(32) "2: content of $aTestInner['bar']"
  }
}

Actual result:
--
example 1:
array(3) {
  [0]=>
  array(0) {
  }
  [1]=>
  array(2) {
["foo"]=>
string(29) "content of $aTestInner['foo']"
["bar"]=>
string(29) "content of $aTestInner['bar']"
  }
  [2]=>
  array(2) {
["foo"]=>
string(29) "content of $aTestInner['foo']"
["bar"]=>
string(29) "content of $aTestInner['bar']"
  }
}

example 2:
array(3) {
  [0]=>
  array(0) {
  }
  [1]=>
  array(0) {
  }
  [2]=>
  array(0) {
  }
}





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


#25931 [Com]: changing variables_order in apache conf breaks sessions

2003-10-21 Thread tony2001 at phpclub dot net
 ID:   25931
 Comment by:   tony2001 at phpclub dot net
 Reported By:  adepali at yahoo dot com
 Status:   Open
 Bug Type: Apache2 related
 Operating System: Redhat 9
 PHP Version:  4.3.4RC2
 New Comment:

Rather interesting:
you're trying to use session, but make PHP totally ignore GET & COOKIE
variables.
PHP knows nothing about session ID and creates new session every time.


Previous Comments:


[2003-10-21 05:45:11] adepali at yahoo dot com

Description:

Whenever I change variables_order value in a  or
 directive, sessions get broken. Each time a
session_start() runs, it creates a new session file instead of using
the existing one. I'm using Apache 2.0.47. Snipset of httpd.conf
appears below:


php_value variables_order "ES"
php_flag display_errors  Off
php_flag log_errors  On
php_value error_log  /var/www/log/wfm.log









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


#25930 [Com]: Can't compile snprintf.c

2003-10-20 Thread tony2001 at phpclub dot net
 ID:   25930
 Comment by:   tony2001 at phpclub dot net
 Reported By:  adam at trachtenberg dot com
 Status:   Open
 Bug Type: Compile Failure
 Operating System: Mac OS X
 PHP Version:  5CVS-2003-10-21 (dev)
 New Comment:

Heh. You're not the only one, who suffering from this.
/root/CVS/php-src/main/spprintf.c: In function
`xbuf_format_converter':
/root/CVS/php-src/main/spprintf.c:365: error: parse error before
"uintmax_t"
/root/CVS/php-src/main/spprintf.c:407: error: parse error before
"intmax_t"
/root/CVS/php-src/main/spprintf.c:452: error: parse error before
"uintmax_t"
/root/CVS/php-src/main/spprintf.c:492: error: parse error before
"uintmax_t"

Same situation.
I've already told this at #php.bugs, but guys say, that this  is not
PHP problem, but problem of my system.
To be honest, I don't think so.
I suppose the problem is rather stupid:
1) PHP uses uintmax_t, if SIZEOF_INTMAX_T > 0 (./configure detects,
that on my system it's equal to 8);
2) BUT PHP doesn't include definition of this type (it's in stdint.h).
3) PHP's ./configure _includes_ stdint.h implicitly (using inttypes.h),
so ./configure works well.

So, I've proposed to add to spprintf.c
#if SIZEOF_INTMAX_T
#include inttypes.h (or stdint.h, both of them solve the problem)
#endif
It seems, that guys do not agree with me, but they have not proposed
any other solution, rather then "check your system, the problem is in
it".
The one thing I didn't figured yet - why this problem appeared only on
Friday. I've changed nothing in my system (and php-src doesn't compile
on my servers too, but I didn't touch them at all).

The problem was found at least at these systems:
Linux 2.4.21, RH-based distrib, glibc-2.3.2, libtool-1.5,
autoconf-2.50, automake-1.5
Linux 2.4.18, RH-based distrib, glibc-2.2.5, libtool-1.5,
autoconf-2.50, automake-1.4-p5
In both cases:
config.log:3405:#define SIZEOF_INTMAX_T 8
and errors above.


Previous Comments:


[2003-10-21 01:13:32] adam at trachtenberg dot com

Description:

Trying to compile latest CVS on Mac OS X and PHP is 
barfing on snprint.c. I think this comes from the 
changes made on Sun Sep 14 05:12:54 2003.

Actual result:
--
gcc  -Imain/ -I/usr/local/cvs/php/php-src/main/ -
DPHP_ATOM_INC -I/usr/local/cvs/php/php-src/include -I/
usr/local/cvs/php/php-src/main -I/usr/local/cvs/php/
php-src -I/usr/local/cvs/php/php-src/Zend -I/sw/include 
-I/sw/include/libxml2 -I/usr/local/mysql/include -I/
usr/local/include  -no-cpp-precomp -I/usr/local/cvs/
php/php-src/TSRM  -g -Wall  -c /usr/local/cvs/php/php-
src/main/snprintf.c -o main/snprintf.o  && echo > main/
snprintf.lo
cc1: warning: changing search order for system 
directory "/usr/local/include"
cc1: warning:   as it has already been specified as a 
non-system directory
/usr/local/cvs/php/php-src/main/snprintf.c: In function 
`format_converter':
/usr/local/cvs/php/php-src/main/snprintf.c:750: parse 
error before "uintmax_t"
/usr/local/cvs/php/php-src/main/snprintf.c:792: parse 
error before "intmax_t"
/usr/local/cvs/php/php-src/main/snprintf.c:837: parse 
error before "uintmax_t"
/usr/local/cvs/php/php-src/main/snprintf.c:877: parse 
error before "uintmax_t"
/usr/local/cvs/php/php-src/main/snprintf.c:916: 
warning: use of `long double' type; its size may change 
in a future release
/usr/local/cvs/php/php-src/main/snprintf.c:916: 
warning: (Long double usage is reported only once for 
each file.
/usr/local/cvs/php/php-src/main/snprintf.c:916: 
warning: To disable this warning, use -Wno-long-
double.)
make: *** [main/snprintf.lo] Error 1





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


#25918 [Opn]: Segfault while trying to get mime type of *.cdr file with mime_content_type()

2003-10-20 Thread tony2001 at phpclub dot net
 ID:   25918
 User updated by:  tony2001 at phpclub dot net
 Reported By:  tony2001 at phpclub dot net
 Status:   Open
 Bug Type: Reproducible crash
 Operating System: Linux 2.4.21
 PHP Version:  4CVS-2003-10-20 (stable)
 New Comment:

the bug was reproduced with this file:
http://tony2001.phpclub.net/temp/vp_cmyk.cdr


Previous Comments:


[2003-10-20 04:45:58] tony2001 at phpclub dot net

Description:

PHP segfaults.
This happens because of simple typo in mime_magic.c.
Possible patch:

Index: mime_magic.c
===
RCS file: /repository/php-src/ext/mime_magic/mime_magic.c,v
retrieving revision 1.13.2.9
diff -u -r1.13.2.9 mime_magic.c
--- mime_magic.c9 Feb 2003 19:10:32 -   1.13.2.9
+++ mime_magic.c20 Oct 2003 08:44:43 -
@@ -1848,7 +1848,7 @@
 }

 /* detect memory allocation errors */
-if (!content_type ||
+if (!*content_type ||
(state == rsl_encoding && !*content_encoding)) {
return MIME_MAGIC_ERROR;
 }



Reproduce code:
---
$dh=opendir(".");
while ($fn=readdir($dh))
{
 echo mime_content_type($fn)."";
}


Expected result:

mime_content_type should return False in this case

Actual result:
--
#0  0x401366a3 in strlen () from /lib/i686/libc.so.6
#1  0x40241af3 in zif_mime_content_type (ht=0, return_value=0x8138ab4,
this_ptr=0x0, return_value_used=0)
at /root/CVS/php-src_PHP_4_3/ext/mime_magic/mime_magic.c:332
#2  0x40318e59 in execute (op_array=0x8138a1c) at
/root/CVS/php-src_PHP_4_3/Zend/zend_execute.c:1616
#3  0x4030aa66 in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /root/CVS/php-src_PHP_4_3/Zend/zend.c:885
#4  0x402df501 in php_execute_script (primary_file=0xb300) at
/root/CVS/php-src_PHP_4_3/main/main.c:1729
#5  0x4031cefb in apache_php_module_main (r=0x813177c,
display_source_mode=0)
at /root/CVS/php-src_PHP_4_3/sapi/apache/sapi_apache.c:54
#6  0x4031da96 in send_php (r=0x813177c, display_source_mode=0,
filename=0x0)
at /root/CVS/php-src_PHP_4_3/sapi/apache/mod_php4.c:620
#7  0x4031dc55 in send_parsed_php (r=0x813177c) at
/root/CVS/php-src_PHP_4_3/sapi/apache/mod_php4.c:635
#8  0x08068eee in ap_invoke_handler ()
#9  0x0807e83e in process_request_internal ()
#10 0x0807ec74 in ap_internal_redirect ()
#11 0x0805e39a in handle_dir ()
#12 0x08068eee in ap_invoke_handler ()
#13 0x0807e83e in process_request_internal ()
#14 0x0807e89b in ap_process_request ()
#15 0x0807535f in child_main ()
#16 0x08075511 in make_child ()
#17 0x08075690 in startup_children ()
#18 0x08075d00 in standalone_main ()
#19 0x0807659a in main ()
#20 0x400d1af7 in __libc_start_main () from /lib/i686/libc.so.6






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


#25918 [NEW]: Segfault while trying to get mime type of *.cdr file with mime_content_type()

2003-10-20 Thread tony2001 at phpclub dot net
From: tony2001 at phpclub dot net
Operating system: Linux 2.4.21
PHP version:  4CVS-2003-10-20 (stable)
PHP Bug Type: Reproducible crash
Bug description:  Segfault while trying to get mime type of *.cdr file with 
mime_content_type()

Description:

PHP segfaults.
This happens because of simple typo in mime_magic.c.
Possible patch:

Index: mime_magic.c
===
RCS file: /repository/php-src/ext/mime_magic/mime_magic.c,v
retrieving revision 1.13.2.9
diff -u -r1.13.2.9 mime_magic.c
--- mime_magic.c9 Feb 2003 19:10:32 -   1.13.2.9
+++ mime_magic.c20 Oct 2003 08:44:43 -
@@ -1848,7 +1848,7 @@
 }

 /* detect memory allocation errors */
-if (!content_type ||
+if (!*content_type ||
(state == rsl_encoding && !*content_encoding)) {
return MIME_MAGIC_ERROR;
 }



Reproduce code:
---
$dh=opendir(".");
while ($fn=readdir($dh))
{
 echo mime_content_type($fn)."";
}


Expected result:

mime_content_type should return False in this case

Actual result:
--
#0  0x401366a3 in strlen () from /lib/i686/libc.so.6
#1  0x40241af3 in zif_mime_content_type (ht=0, return_value=0x8138ab4,
this_ptr=0x0, return_value_used=0)
at /root/CVS/php-src_PHP_4_3/ext/mime_magic/mime_magic.c:332
#2  0x40318e59 in execute (op_array=0x8138a1c) at
/root/CVS/php-src_PHP_4_3/Zend/zend_execute.c:1616
#3  0x4030aa66 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
at /root/CVS/php-src_PHP_4_3/Zend/zend.c:885
#4  0x402df501 in php_execute_script (primary_file=0xb300) at
/root/CVS/php-src_PHP_4_3/main/main.c:1729
#5  0x4031cefb in apache_php_module_main (r=0x813177c,
display_source_mode=0)
at /root/CVS/php-src_PHP_4_3/sapi/apache/sapi_apache.c:54
#6  0x4031da96 in send_php (r=0x813177c, display_source_mode=0,
filename=0x0)
at /root/CVS/php-src_PHP_4_3/sapi/apache/mod_php4.c:620
#7  0x4031dc55 in send_parsed_php (r=0x813177c) at
/root/CVS/php-src_PHP_4_3/sapi/apache/mod_php4.c:635
#8  0x08068eee in ap_invoke_handler ()
#9  0x0807e83e in process_request_internal ()
#10 0x0807ec74 in ap_internal_redirect ()
#11 0x0805e39a in handle_dir ()
#12 0x08068eee in ap_invoke_handler ()
#13 0x0807e83e in process_request_internal ()
#14 0x0807e89b in ap_process_request ()
#15 0x0807535f in child_main ()
#16 0x08075511 in make_child ()
#17 0x08075690 in startup_children ()
#18 0x08075d00 in standalone_main ()
#19 0x0807659a in main ()
#20 0x400d1af7 in __libc_start_main () from /lib/i686/libc.so.6


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


#25864 [Com]: sprintf error

2003-10-14 Thread tony2001 at phpclub dot net
 ID:   25864
 Comment by:   tony2001 at phpclub dot net
 Reported By:  heppevonhambach at web dot de
 Status:   Open
 Bug Type: Unknown/Other Function
 Operating System: linux
 PHP Version:  Irrelevant
 New Comment:

pay attention:
var_dump($n); will output float(1234567890120).
i.e. your integer were automagically converted to float.
so you need to use:
$s = sprintf( "%0{$nL}.0f",$n );
to get expected result.

look here for more info:
http://www.php.net/manual/en/language.types.integer.php


Previous Comments:


[2003-10-14 09:14:13] heppevonhambach at web dot de

Description:

looks like sprintf has problems with big numbers 


Reproduce code:
---
$n = 1234567890123;
$nL = 17;
$s = sprintf( "%0{$nL}d",$n );


Expected result:

1234567890123

Actual result:
--
0001912276171





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


#25850 [Com]: SWITCH

2003-10-14 Thread tony2001 at phpclub dot net
 ID:   25850
 Comment by:   tony2001 at phpclub dot net
 Reported By:  jakespotgieter at hotmail dot com
 Status:   Bogus
 Bug Type: Zend Engine 2 problem
 Operating System: Windows
 PHP Version:  5CVS-2003-10-13 (dev)
 New Comment:

I can't find any bug here.
Passing to the script "?method=Bar" in query string and having $i equal
to true it works well under PHP5-CVS.
If you get any errors here - copy/paste it and wrote a letter to
[EMAIL PROTECTED]


Previous Comments:


[2003-10-13 11:58:41] [EMAIL PROTECTED]

The syntax of the header() call is wrong too.




[2003-10-13 08:23:02] jakespotgieter at hotmail dot com

Sorry, I wrote this code quickly, trust me its got nothing to do with a
parse error. It doesnt work on the Zend engine 2. I ported it back to
4.3, and it worked. I didnt change anything in the code.

SWITCH ($_GET['method']){
  CASE 'Foo':
 //do something
  BREAK;
CASE 'Bar':
 if($i == true){
header("location:?method=Foo");
 }else{
  //do something else  
 }
  BREAK;
}



[2003-10-13 07:55:12] [EMAIL PROTECTED]

Not a bug, but wrong syntax.



[2003-10-13 07:42:27] [EMAIL PROTECTED]

There is parse error in your code:
you forgot to add semicolon at the end of line with Header().
This code cannot be parsed correctly neither under PHP5CVS, nor
PHP4.3.3.
Having this error fixed, code works ok (but complies on undefined
variables).
So, this is problem of your code.



[2003-10-13 07:25:43] jakespotgieter at hotmail dot com

Description:

When there are multiple cases within a switch block, if you try to use
the header function, more specifically header("location:$url") it
doesn't work. When I ran the same code under 4.3.3 it worked.

Reproduce code:
---
SWITCH ($_GET['method']){
  CASE 'Foo':
 //do something
  BREAK;
CASE 'Bar':
 if($i == true){
header("location:?method=Foo")
 }else{
  //do something else  
 }
  BREAK;
}






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


#25851 [Com]: empty string evaluation

2003-10-13 Thread tony2001 at phpclub dot net
 ID:   25851
 Comment by:   tony2001 at phpclub dot net
 Reported By:  fabio dot sutto at libero dot it
 Status:   Open
 Bug Type: Variables related
 Operating System: Win
 PHP Version:  4.3.3
 New Comment:

Have you tried this code:

?

I can't reproduce it under PHP5-CVS & PHP4-CVS.


Previous Comments:


[2003-10-13 08:56:07] fabio dot sutto at libero dot it

Description:

Comparison operator "===" doesn't work as it should


while (!feof ($this->link)) {

$line = fgets($this->link, 4096)  ;

var_dump($line) ; //output string(1) " "


/*
'' is identical to false inside if
*/
if($line === false){
var_dump($line) ; 
//output bool(false)

}

}//end while






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


#25836 [Com]: strange behavior magic_quotes with multi-dimensional arrays

2003-10-13 Thread tony2001 at phpclub dot net
 ID:   25836
 Comment by:   tony2001 at phpclub dot net
 Reported By:  sitnikov at infonet dot ee
 Status:   Verified
 Bug Type: *General Issues
 Operating System: Linux
 PHP Version:  4CVS, 5CVS
 New Comment:

I've reproduced it with latest CVS.
Pearsonally I really don't see any reasons to quote array indices in
this case, but there is two possible ways:
PHP should quote
1) all of them;
2) none of them.
and, as you can see, none of these ways are working with
magic_quotes_gpc=On


Previous Comments:


[2003-10-12 23:12:12] [EMAIL PROTECTED]

Nevermind, had of course set magic_quotes_gpc = On.




[2003-10-12 23:03:30] [EMAIL PROTECTED]

Can not reproduce with latest STABLE CVS.
Please provide more information how to reproduce.




[2003-10-11 08:57:34] sitnikov at infonet dot ee

Description:

Only "first level keys" was slashed.




Reproduce code:
---
";print_r($_POST);echo "";
?>





Expected result:

Array
(
[test] => Array
(
[\'aaa\'] => Array
(
[\'bbb\'] => \'
)

)
)

Actual result:
--
Array
(
[test] => Array
(
[\'aaa\'] => Array
(
['bbb'] => \'
)

)
)





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


#24972 [Com]: Apache + php memory crash

2003-08-10 Thread tony2001 at phpclub dot net
 ID:   24972
 Comment by:   tony2001 at phpclub dot net
 Reported By:  belov at iba dot ru
 Status:   Open
 Bug Type: MySQL related
 Operating System: Wndows XP
 PHP Version:  4.3.2
 New Comment:

I can repeat strange behaviour only when XDebug is used.
Imho this is concerned with some XDebug limitations and this bug-report
can be closed as bogus.


Previous Comments:


[2003-08-07 09:38:16] belov at iba dot ru

After installation of the new version
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip the mistake is
not removed. 

I think it is not mysql error because on FreeBsd this code is work. And
FreeBSD Perfectly works with memory.



[2003-08-07 07:52:34] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2003-08-07 04:58:10] belov at iba dot ru

Description:

This code contains an error. OS Windows XP. Php 4.3.2. MySql 3.23.56
PHP there is as module Apache I think a problem with a stack. 

Search words in func.txt code "BUG HERE "

Reproduce code:
---
Start file:
http://www.informab.com/phpbug/0_start.txt

include files:
http://www.informab.com/phpbug/m.txt
http://www.informab.com/phpbug/func.txt

Expected result:

i`am expect stable php version.






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



#24286 [Com]: using array from class as function name

2003-07-31 Thread tony2001 at phpclub dot net
 ID:   24286
 Comment by:   tony2001 at phpclub dot net
 Reported By:  terjeto at stud dot ntnu dot no
 Status:   Verified
 Bug Type: Zend Engine 2 problem
 Operating System: RedHat 9.0
 PHP Version:  5CVS-2003-06-22 (dev)
 New Comment:

ok, here is some workaround on this problem:
in case of
var[0]('bla');
?>
you can avoid Fatal error in last string using this instead:
{$test_obj->var[0]}('bla');
?>

But in case of:

(i.e. you need to call a function, not a method, which name is
contained in objects, attribute) it seems, that there is no way, but
use this temporary variable:
var[0];
$tmp('bla');
?>

And another one important info:
in CVS version of Smarty this trouble is already solved.


Previous Comments:
--------

[2003-07-29 15:38:17] tony2001 at phpclub dot net

Maybe you're right. But this syntax works as I expect with PHP4 and I
suppose this is a BC problem.
I really do not know how implementation of this syntax in ZE2 differs
from ZE1, but I expected it to continue to work in the same way. My
apologies if I was wrong.



[2003-07-27 07:13:03] [EMAIL PROTECTED]

Why with "$object->attribute()"
"$object->method_name()" should be called and not
"$object->attribute()" and how the engine is supposed to tell that? Is
$foo->x() now meaning "call method 'x' of object '$foo'" or "take
property 'x' of object '$foo' and call method with this name on object
'$foo'"? My opinion is that it _always_ should mean the latter and
never the former. 



[2003-07-10 07:57:44] tony2001 at phpclub dot net

I expect that using attribute of the object as method name it will work
as it's already working with PHP4.

That is:
$object->attribute = 'method_name';
and with
$object->attribute();
$object->method_name(); should be called.
Maybe I'm wrong, but in case of $object->obj_attribute->attribute(); we
have the same situation - we're calling
$object->obj_attribite->{method, which name contains
$object->obj_attribute->attribute }();

Am I wrong?



[2003-07-10 07:19:37] [EMAIL PROTECTED]

What is expected to be result of $test_obj->array_var[0][0][0]("simple
test") call?

Which function or method of which object should be called? What with
$test_obj->foo->array_var[0][0][0]("simple test") - should the calling
object be $test_obj and function name array_var[0][0][0] (should it be
global $array_var[0][0][0]? global $foo->array_var[0][0][0]? or
property foo->array_var[0][0][0] of $test_obj?) or the calling object
should be $test_obj->foo and array_var[0][0][0] should be the method
name?



[2003-07-10 06:25:06] tony2001 at phpclub dot net

There is no matter what Smarty version do you use.
PHP complains on this syntax:
array_var[0][0][0] = "test_method";
}
function test_method($echo_var) {
echo $echo_var;
}
}

$test_obj = new test;
$test_obj->array_var[0][0][0]("simple test"); //line 15
?>
Fatal error: Method name must be a string in /www/index.php on line 15

Guys, please, fix this very annoying bug at least in beta2.
On 10 Jul 2003 this bug still exists in CVS.



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

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



#24286 [Com]: using array from class as function name

2003-07-29 Thread tony2001 at phpclub dot net
 ID:   24286
 Comment by:   tony2001 at phpclub dot net
 Reported By:  terjeto at stud dot ntnu dot no
 Status:   Verified
 Bug Type: Zend Engine 2 problem
 Operating System: RedHat 9.0
 PHP Version:  5CVS-2003-06-22 (dev)
 New Comment:

Maybe you're right. But this syntax works as I expect with PHP4 and I
suppose this is a BC problem.
I really do not know how implementation of this syntax in ZE2 differs
from ZE1, but I expected it to continue to work in the same way. My
apologies if I was wrong.


Previous Comments:


[2003-07-27 07:13:03] [EMAIL PROTECTED]

Why with "$object->attribute()"
"$object->method_name()" should be called and not
"$object->attribute()" and how the engine is supposed to tell that? Is
$foo->x() now meaning "call method 'x' of object '$foo'" or "take
property 'x' of object '$foo' and call method with this name on object
'$foo'"? My opinion is that it _always_ should mean the latter and
never the former. 

--------

[2003-07-10 07:57:44] tony2001 at phpclub dot net

I expect that using attribute of the object as method name it will work
as it's already working with PHP4.

That is:
$object->attribute = 'method_name';
and with
$object->attribute();
$object->method_name(); should be called.
Maybe I'm wrong, but in case of $object->obj_attribute->attribute(); we
have the same situation - we're calling
$object->obj_attribite->{method, which name contains
$object->obj_attribute->attribute }();

Am I wrong?



[2003-07-10 07:19:37] [EMAIL PROTECTED]

What is expected to be result of $test_obj->array_var[0][0][0]("simple
test") call?

Which function or method of which object should be called? What with
$test_obj->foo->array_var[0][0][0]("simple test") - should the calling
object be $test_obj and function name array_var[0][0][0] (should it be
global $array_var[0][0][0]? global $foo->array_var[0][0][0]? or
property foo->array_var[0][0][0] of $test_obj?) or the calling object
should be $test_obj->foo and array_var[0][0][0] should be the method
name?



[2003-07-10 06:25:06] tony2001 at phpclub dot net

There is no matter what Smarty version do you use.
PHP complains on this syntax:
array_var[0][0][0] = "test_method";
}
function test_method($echo_var) {
echo $echo_var;
}
}

$test_obj = new test;
$test_obj->array_var[0][0][0]("simple test"); //line 15
?>
Fatal error: Method name must be a string in /www/index.php on line 15

Guys, please, fix this very annoying bug at least in beta2.
On 10 Jul 2003 this bug still exists in CVS.



[2003-07-09 08:09:13] bloso at mailbr dot com dot br

I've got the same error message:

Fatal error: Method name must be a string in
/var/www/htdocs/scorphus/phplab/countracker/tpl/templates_c/%%200/%%2001463753/index.html.php
on line 28

index.html.php line 28:
_plugins['function']['eval'][0](array('var' =>
$this->_config[0]['vars']['credits']), $this) ; ?>

PHP Version: 5.0.0b2-dev (php5-200307071930.tar.gz)
Configure Command: './configure' '--with-mysql' '--with-apxs'
System: Slackware 9 (2.4.20) and Debian 3.0 r1 (2.4.20)
Also unsing: Smarty 2.4.2

Hope it helps,
Pablo.



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

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



#24286 [Com]: using array from class as function name

2003-07-10 Thread tony2001 at phpclub dot net
 ID:   24286
 Comment by:   tony2001 at phpclub dot net
 Reported By:  terjeto at stud dot ntnu dot no
 Status:   Verified
 Bug Type: Zend Engine 2 problem
 Operating System: RedHat 9.0
 PHP Version:  5CVS-2003-06-22 (dev)
 New Comment:

I expect that using attribute of the object as method name it will work
as it's already working with PHP4.

That is:
$object->attribute = 'method_name';
and with
$object->attribute();
$object->method_name(); should be called.
Maybe I'm wrong, but in case of $object->obj_attribute->attribute(); we
have the same situation - we're calling
$object->obj_attribite->{method, which name contains
$object->obj_attribute->attribute }();

Am I wrong?


Previous Comments:


[2003-07-10 07:19:37] [EMAIL PROTECTED]

What is expected to be result of $test_obj->array_var[0][0][0]("simple
test") call?

Which function or method of which object should be called? What with
$test_obj->foo->array_var[0][0][0]("simple test") - should the calling
object be $test_obj and function name array_var[0][0][0] (should it be
global $array_var[0][0][0]? global $foo->array_var[0][0][0]? or
property foo->array_var[0][0][0] of $test_obj?) or the calling object
should be $test_obj->foo and array_var[0][0][0] should be the method
name?

--------------------

[2003-07-10 06:25:06] tony2001 at phpclub dot net

There is no matter what Smarty version do you use.
PHP complains on this syntax:
array_var[0][0][0] = "test_method";
}
function test_method($echo_var) {
echo $echo_var;
}
}

$test_obj = new test;
$test_obj->array_var[0][0][0]("simple test"); //line 15
?>
Fatal error: Method name must be a string in /www/index.php on line 15

Guys, please, fix this very annoying bug at least in beta2.
On 10 Jul 2003 this bug still exists in CVS.



[2003-07-09 08:09:13] bloso at mailbr dot com dot br

I've got the same error message:

Fatal error: Method name must be a string in
/var/www/htdocs/scorphus/phplab/countracker/tpl/templates_c/%%200/%%2001463753/index.html.php
on line 28

index.html.php line 28:
_plugins['function']['eval'][0](array('var' =>
$this->_config[0]['vars']['credits']), $this) ; ?>

PHP Version: 5.0.0b2-dev (php5-200307071930.tar.gz)
Configure Command: './configure' '--with-mysql' '--with-apxs'
System: Slackware 9 (2.4.20) and Debian 3.0 r1 (2.4.20)
Also unsing: Smarty 2.4.2

Hope it helps,
Pablo.



[2003-06-29 10:55:12] [EMAIL PROTECTED]

Works fine in php 4.3.3, so this appears to be a BC issue.



[2003-06-22 10:54:07] terjeto at stud dot ntnu dot no

Description:

When using a string from an array inside an class for 
calling a function it results in a fatal error.

Reproduce code:
---
 array ( 'spacer' => array( 0 =>
'_funk' ) ) );
}

function _funk( $arg ) {
print( $arg );
}

$_out = array( 'function' => array ( 'spacer' => array( 0 => '_funk' )
) );

_funk( "Test string 1" );

$foo = new Foo();

$foofunk = $foo->_array['function']['spacer'][0];

$foofunk( "Test string 2" );

$_out['function']['spacer'][0]( "Test string 3" );
$foo->_array['function']['spacer'][0]( "Test string 4" );
?>

Expected result:

Test string 1
Test string 2
Test string 3
Test string 4

Actual result:
--
Test string 1
Test string 2
Test string 3

 Fatal error:  Method name must be a string in /var/
www/html/test.php on line 22





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



#24286 [Com]: using array from class as function name

2003-07-10 Thread tony2001 at phpclub dot net
 ID:   24286
 Comment by:   tony2001 at phpclub dot net
 Reported By:  terjeto at stud dot ntnu dot no
 Status:   Verified
 Bug Type: Zend Engine 2 problem
 Operating System: RedHat 9.0
 PHP Version:  5CVS-2003-06-22 (dev)
 New Comment:

There is no matter what Smarty version do you use.
PHP complains on this syntax:
array_var[0][0][0] = "test_method";
}
function test_method($echo_var) {
echo $echo_var;
}
}

$test_obj = new test;
$test_obj->array_var[0][0][0]("simple test"); //line 15
?>
Fatal error: Method name must be a string in /www/index.php on line 15

Guys, please, fix this very annoying bug at least in beta2.
On 10 Jul 2003 this bug still exists in CVS.


Previous Comments:


[2003-07-09 08:09:13] bloso at mailbr dot com dot br

I've got the same error message:

Fatal error: Method name must be a string in
/var/www/htdocs/scorphus/phplab/countracker/tpl/templates_c/%%200/%%2001463753/index.html.php
on line 28

index.html.php line 28:
_plugins['function']['eval'][0](array('var' =>
$this->_config[0]['vars']['credits']), $this) ; ?>

PHP Version: 5.0.0b2-dev (php5-200307071930.tar.gz)
Configure Command: './configure' '--with-mysql' '--with-apxs'
System: Slackware 9 (2.4.20) and Debian 3.0 r1 (2.4.20)
Also unsing: Smarty 2.4.2

Hope it helps,
Pablo.



[2003-06-29 10:55:12] [EMAIL PROTECTED]

Works fine in php 4.3.3, so this appears to be a BC issue.



[2003-06-22 10:54:07] terjeto at stud dot ntnu dot no

Description:

When using a string from an array inside an class for 
calling a function it results in a fatal error.

Reproduce code:
---
 array ( 'spacer' => array( 0 =>
'_funk' ) ) );
}

function _funk( $arg ) {
print( $arg );
}

$_out = array( 'function' => array ( 'spacer' => array( 0 => '_funk' )
) );

_funk( "Test string 1" );

$foo = new Foo();

$foofunk = $foo->_array['function']['spacer'][0];

$foofunk( "Test string 2" );

$_out['function']['spacer'][0]( "Test string 3" );
$foo->_array['function']['spacer'][0]( "Test string 4" );
?>

Expected result:

Test string 1
Test string 2
Test string 3
Test string 4

Actual result:
--
Test string 1
Test string 2
Test string 3

 Fatal error:  Method name must be a string in /var/
www/html/test.php on line 22





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