#26976 [Csd]: I can't read pass level one of an array
ID: 26976 User updated by: dylan dot egan at optusnet dot com dot au Reported By: dylan dot egan at optusnet dot com dot au Status: Closed Bug Type: XML related Operating System: * PHP Version: 5CVS-2004-01-20 (dev) New Comment: Anything to help get this through to production level. Great work so far, can't wait for final. Previous Comments: [2004-01-21 06:28:22] [EMAIL PROTECTED] This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. [2004-01-20 20:47:45] dylan dot egan at optusnet dot com dot au Well I tried with PHP 5Beta3 and it worked. Something changed in CVS I guess. Will wait for patches on CVS. Don't know what it could be. [2004-01-20 20:10:40] [EMAIL PROTECTED] Here's simple test: --- --TEST-- Bug #26976 (Can not access array elements using index) --SKIPIF-- ?php if (!extension_loaded(simplexml)) print skip simplexml extension is not loaded; ? --FILE-- ?php $root = simplexml_load_string( '?xml version=1.0? root childa/child childb/child childc/child childd/child /root '); echo $root-child[0], \n; echo $root-child[1], \n; echo $root-child[2], \n; echo $root-child[3], \n; ? --EXPECT-- a b c d --- I get this output: a b b b (foreach works fine though :) [2004-01-20 07:13:11] dylan dot egan at optusnet dot com dot au Description: Trying to read through a parsed XML file with simpleXML, but I can't go past the 2nd level of the array. Reproduce code: --- www.ircphp.com/157 Expected result: Read --OUTPUT-- -- Edit this bug report at http://bugs.php.net/?id=26976edit=1
#27000 [NEW]: Seg Fault when trying to set a value
From: dylan dot egan at optusnet dot com dot au Operating system: Linux PHP version: 5CVS-2004-01-21 (dev) PHP Bug Type: XML related Bug description: Seg Fault when trying to set a value Description: Trying to set a value in a loaded xml file, it returns a seg fault in the log. So I ran gdb. Reproduce code: --- $s = simplexml_load_file('security.xml'); // $s-security[2]-id = 20 $s-security[2]-id = 21; Expected result: It should set that value to 21 from 20. Actual result: -- Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 1077749632 (LWP 29325)] zend_assign_obj_handler (execute_data=0xbfffd170, op_array=0x40832c04) at /usr/local/src/php5-200401211830/Zend/zend_execute.c:64 64 z-refcount--; -- Edit bug report at http://bugs.php.net/?id=27000edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27000r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27000r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=27000r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=27000r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=27000r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=27000r=needscript Try newer version: http://bugs.php.net/fix.php?id=27000r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=27000r=support Expected behavior: http://bugs.php.net/fix.php?id=27000r=notwrong Not enough info:http://bugs.php.net/fix.php?id=27000r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=27000r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=27000r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27000r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=27000r=dst IIS Stability: http://bugs.php.net/fix.php?id=27000r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=27000r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=27000r=float
#27000 [Fbk-Opn]: Seg Fault when trying to set a value
ID: 27000 User updated by: dylan dot egan at optusnet dot com dot au Reported By: dylan dot egan at optusnet dot com dot au -Status: Feedback +Status: Open Bug Type: XML related Operating System: Linux PHP Version: 5CVS-2004-01-21 (dev) New Comment: #0 zend_assign_obj_handler (execute_data=0xbfffd170, op_array=0x4083253c) at /usr/local/src/php5-200401211830/Zend/zend_execute.c:64 #1 0x40619e64 in execute (op_array=0x4083253c) at /usr/local/src/php5-200401211830/Zend/zend_execute.c:1264 #2 0x405fc76e in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /usr/local/src/php5-200401211830/Zend/zend.c:1051 #3 0x405c5cce in php_execute_script (primary_file=0xb410) at /usr/local/src/php5-200401211830/main/main.c:1642 #4 0x40624da3 in php_handler (r=0x81bd670) at /usr/local/src/php5-200401211830/sapi/apache2handler/sapi_apache2.c:531 #5 0x08068700 in ap_invoke_handler () Previous Comments: [2004-01-21 17:43:52] [EMAIL PROTECTED] Can you please also add the output from bt from the GDB command line? (That will generate the backtrace) [2004-01-21 15:46:09] dylan dot egan at optusnet dot com dot au Description: Trying to set a value in a loaded xml file, it returns a seg fault in the log. So I ran gdb. Reproduce code: --- $s = simplexml_load_file('security.xml'); // $s-security[2]-id = 20 $s-security[2]-id = 21; Expected result: It should set that value to 21 from 20. Actual result: -- Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 1077749632 (LWP 29325)] zend_assign_obj_handler (execute_data=0xbfffd170, op_array=0x40832c04) at /usr/local/src/php5-200401211830/Zend/zend_execute.c:64 64 z-refcount--; -- Edit this bug report at http://bugs.php.net/?id=27000edit=1
#26976 [NEW]: I can't read pass level one of an array
From: dylan dot egan at optusnet dot com dot au Operating system: Linux PHP version: 5CVS-2004-01-20 (dev) PHP Bug Type: XML related Bug description: I can't read pass level one of an array Description: Trying to read through a parsed XML file with simpleXML, but I can't go past the 2nd level of the array. Reproduce code: --- www.ircphp.com/157 Expected result: Read --OUTPUT-- -- Edit bug report at http://bugs.php.net/?id=26976edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26976r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26976r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=26976r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=26976r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=26976r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=26976r=needscript Try newer version: http://bugs.php.net/fix.php?id=26976r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=26976r=support Expected behavior: http://bugs.php.net/fix.php?id=26976r=notwrong Not enough info:http://bugs.php.net/fix.php?id=26976r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=26976r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=26976r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26976r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=26976r=dst IIS Stability: http://bugs.php.net/fix.php?id=26976r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=26976r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=26976r=float
#26976 [Asn]: I can't read pass level one of an array
ID: 26976 User updated by: dylan dot egan at optusnet dot com dot au Reported By: dylan dot egan at optusnet dot com dot au Status: Assigned Bug Type: XML related Operating System: * PHP Version: 5CVS-2004-01-20 (dev) Assigned To: sterling New Comment: Well I tried with PHP 5Beta3 and it worked. Something changed in CVS I guess. Will wait for patches on CVS. Don't know what it could be. Previous Comments: [2004-01-20 20:10:40] [EMAIL PROTECTED] Here's simple test: --- --TEST-- Bug #26976 (Can not access array elements using index) --SKIPIF-- ?php if (!extension_loaded(simplexml)) print skip simplexml extension is not loaded; ? --FILE-- ?php $root = simplexml_load_string( '?xml version=1.0? root childa/child childb/child childc/child childd/child /root '); echo $root-child[0], \n; echo $root-child[1], \n; echo $root-child[2], \n; echo $root-child[3], \n; ? --EXPECT-- a b c d --- I get this output: a b b b (foreach works fine though :) [2004-01-20 07:13:11] dylan dot egan at optusnet dot com dot au Description: Trying to read through a parsed XML file with simpleXML, but I can't go past the 2nd level of the array. Reproduce code: --- www.ircphp.com/157 Expected result: Read --OUTPUT-- -- Edit this bug report at http://bugs.php.net/?id=26976edit=1