Bug #63578 [Com]: is_callable returns false with __call
Edit report at https://bugs.php.net/bug.php?id=63578&edit=1 ID: 63578 Comment by: pierre at pcservice dot co dot za Reported by:pierre at pcservice dot co dot za Summary:is_callable returns false with __call Status: Not a bug Type: Bug Package:*General Issues Operating System: mac & linux PHP Version:Irrelevant Assigned To:dmitry Block user comment: N Private report: N New Comment: so when calling is_callable(array('Foo', 'bar')), if the method doesn't exist, it only looks for a static method? with the following class Controller { public function testAction() { } public static function staticAction() { } public function __call($method, $arguments) { } } is_callable(array(new Controller, 'testAction')); is_callable(array(new Controller, 'staticAction')); is_callable(array(new Controller, 'fooAction')); is_callable(array('Controller', 'testAction')); is_callable(array('Controller', 'staticAction')); is_callable(array('Controller', 'fooAction')); everything returns true except for the last call. Shouldn't it return true as well, since the class has the magic __call method? Or the documentation should then at least specify that is_callable only works with the __call method, if the first parameter of the array is an instance of the object Previous Comments: [2012-11-22 07:08:32] larue...@php.net Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php Class Foo { public function __call($method, $args) {} } Foo::bar(); //result in Fatal error: Call to undefined method Foo::bar() [2012-11-22 06:31:25] pierre at pcservice dot co dot za Description: When you have a class that have a __call magic method, when calling is_callable with an array and the first argument a string, it returns false. Test script: --- Class Foo { public function __call($method, $args) {} } var_dump(is_callable(array('Foo', 'bar'))); var_dump(is_callable(array(new Foo, 'bar'))); Expected result: true true Actual result: -- false true -- Edit this bug report at https://bugs.php.net/bug.php?id=63578&edit=1
Bug #60034 [Com]: Build fails with apxs and readline
Edit report at https://bugs.php.net/bug.php?id=60034&edit=1 ID: 60034 Comment by: phpnet at jigsoft dot co dot za Reported by:notfornoone at gmail dot com Summary:Build fails with apxs and readline Status: Open Type: Bug Package:Compile Failure Operating System: OS X (i386-apple-darwin10.8.0) PHP Version:5.4SVN-2011-10-10 (snap) Block user comment: N Private report: N New Comment: from nickl: I can't take all the credit, thanks goes to Areverie who discovered the solution and documented it on his blog http://weblog.areverie.org/blog/2012/03/18/fun-stuff-about-php/ in March of 2012 What he found was that if we move the variable $(MH_BUNDLE_FLAGS) to the end of the list of compiler flags the build will succeed. The submitted patch modifies Makefile.global, the origin of the bug produced after running the ./configure script. This now successfully completes make and the resulting php binary reports the desired extension correctly, as expected. readline Readline Support => enabled Readline library => 6.2 patch and testing done against PHP 5.4.8 on Mac OS X 10.8.2 nJoy! Previous Comments: [2011-10-10 22:41:18] notfornoone at gmail dot com Description: When compiling on 10.6 with the following configure args the build fails: ./configure '--prefix=/Users/me/Desktop/php54test' '--disable-all' '--with- apxs2=/usr/sbin/apxs' '--with-readline=/usr/local/Cellar/readline/6.2.1' make Fails with this error: Undefined symbols for architecture x86_64: "_rl_on_new_line", referenced from: _zif_readline_on_new_line in readline.o "_history_list", referenced from: _zif_readline_list_history in readline.o "_rl_mark", referenced from: _zif_readline_info in readline.o "_rl_pending_input", referenced from: _zif_readline_info in readline.o ld: symbol(s) not found for architecture x86_64 collect2: ld returned 1 exit status make: *** [libs/libphp5.bundle] Error 1 I've also tried: * Using an earler version of readline (6.1) fails with the same error * Compiling on 10.7 Lion results in the same error * Using the same configure options using the 5.3 branch builds fine * Compiling with configure options "--with-libedit" enabled instead of the "-- with-readline" option builds fine -- Edit this bug report at https://bugs.php.net/bug.php?id=60034&edit=1
Bug #63578 [Opn->Nab]: is_callable returns false with __call
Edit report at https://bugs.php.net/bug.php?id=63578&edit=1 ID: 63578 Updated by: larue...@php.net Reported by:pierre at pcservice dot co dot za Summary:is_callable returns false with __call -Status: Open +Status: Not a bug Type: Bug Package:*General Issues Operating System: mac & linux PHP Version:Irrelevant -Assigned To: +Assigned To:dmitry Block user comment: N Private report: N New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php Class Foo { public function __call($method, $args) {} } Foo::bar(); //result in Fatal error: Call to undefined method Foo::bar() Previous Comments: [2012-11-22 06:31:25] pierre at pcservice dot co dot za Description: When you have a class that have a __call magic method, when calling is_callable with an array and the first argument a string, it returns false. Test script: --- Class Foo { public function __call($method, $args) {} } var_dump(is_callable(array('Foo', 'bar'))); var_dump(is_callable(array(new Foo, 'bar'))); Expected result: true true Actual result: -- false true -- Edit this bug report at https://bugs.php.net/bug.php?id=63578&edit=1
[PHP-BUG] Bug #63578 [NEW]: is_callable returns false with __call
From: pierre at pcservice dot co dot za Operating system: mac & linux PHP version: Irrelevant Package: *General Issues Bug Type: Bug Bug description:is_callable returns false with __call Description: When you have a class that have a __call magic method, when calling is_callable with an array and the first argument a string, it returns false. Test script: --- Class Foo { public function __call($method, $args) {} } var_dump(is_callable(array('Foo', 'bar'))); var_dump(is_callable(array(new Foo, 'bar'))); Expected result: true true Actual result: -- false true -- Edit bug report at https://bugs.php.net/bug.php?id=63578&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=63578&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=63578&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=63578&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=63578&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=63578&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=63578&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=63578&r=needscript Try newer version: https://bugs.php.net/fix.php?id=63578&r=oldversion Not developer issue:https://bugs.php.net/fix.php?id=63578&r=support Expected behavior: https://bugs.php.net/fix.php?id=63578&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=63578&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=63578&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=63578&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63578&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=63578&r=dst IIS Stability: https://bugs.php.net/fix.php?id=63578&r=isapi Install GNU Sed:https://bugs.php.net/fix.php?id=63578&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=63578&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=63578&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=63578&r=mysqlcfg
Bug #60108 [Asn]: GD cannot be compiled with system libgd
Edit report at https://bugs.php.net/bug.php?id=60108&edit=1 ID: 60108 Updated by: larue...@php.net Reported by:ond...@php.net Summary:GD cannot be compiled with system libgd Status: Assigned Type: Bug Package:GD related Operating System: Linux PHP Version:5.4.0beta2 Assigned To:pajoye Block user comment: N Private report: N New Comment: ondrej, seems you have got a fix? could you make a patch for that? thanks Previous Comments: [2012-11-21 22:48:02] public at petergeil dot name Confirmed ... problem still occurs in latest 5.4.8 release when compiled on Ubuntu 10.04 amd64 against libgd2-noxpm 2.0.36~rc1. However, adding a data member to gdIOCtx struct helps. (Thanks Brad) [2012-04-17 19:48:53] bero at bero dot eu Problem still occurs in php 5.4.1-RC2. Given apparently gd is maintained by php people these days, maybe the best fix is to make a new gd release containing all needed bits? [2011-11-16 08:15:06] brad at njoe dot com Confirmed the same build errors against the latest snapshot (php5.4- 201160530) with a system-wide libgd installed (version 2.0.36 versus the bundled 2.0.35). I also noted that the standard libgd version 2.0.35 doesn't include the 'void *data' member in the gdIOCtx struct. Modifying my /usr/include/gd_io.h to include this struct member seems to have also fixed(?) the build error, but that made me wonder... ... Why is the "bundled" libgd more of a "bundled+customized-for-PHP" library? It would seem that the 'void *data' member was introduced by the PHP dev team, unless I'm mistaken. Is this member's data important, and, if so, why is the "bundled" library modified to contain it (meaning that you really don't have an option between using the "bundled" library or your own system-wide version). [2011-10-21 12:13:35] ond...@php.net Description: When compiled with system-wide (not embedded) libgd library the compilation fails with: In file included from /tmp/buildd/php5-5.4.0~beta2/ext/gd/gd.c:103:0: /tmp/buildd/php5-5.4.0~beta2/ext/gd/gd_ctx.c: In function '_php_image_stream_putc': /tmp/buildd/php5-5.4.0~beta2/ext/gd/gd_ctx.c:51:41: error: 'struct gdIOCtx' has no member named 'data' /tmp/buildd/php5-5.4.0~beta2/ext/gd/gd_ctx.c: In function '_php_image_stream_putbuf': /tmp/buildd/php5-5.4.0~beta2/ext/gd/gd_ctx.c:58:41: error: 'struct gdIOCtx' has no member named 'data' /tmp/buildd/php5-5.4.0~beta2/ext/gd/gd_ctx.c: In function '_php_image_stream_ctxfree': /tmp/buildd/php5-5.4.0~beta2/ext/gd/gd_ctx.c:67:8: error: 'struct gdIOCtx' has no member named 'data' /tmp/buildd/php5-5.4.0~beta2/ext/gd/gd_ctx.c:68:3: error: 'struct gdIOCtx' has no member named 'data' /tmp/buildd/php5-5.4.0~beta2/ext/gd/gd_ctx.c:69:6: error: 'struct gdIOCtx' has no member named 'data' In file included from /tmp/buildd/php5-5.4.0~beta2/ext/gd/gd.c:103:0: /tmp/buildd/php5-5.4.0~beta2/ext/gd/gd_ctx.c: In function '_php_image_output_ctx': /tmp/buildd/php5-5.4.0~beta2/ext/gd/gd_ctx.c:153:6: error: 'gdIOCtx' has no member named 'data' You need to wrap the _stream_ stuff inside the #ifdef HAVE_GD_BUNDLED -- Edit this bug report at https://bugs.php.net/bug.php?id=60108&edit=1
[PHP-BUG] Req #63577 [NEW]: Array invert or Array transpose (two dimensional)
From: tagg_maiwald at yahoo dot com Operating system: PHP version: Irrelevant Package: Arrays related Bug Type: Feature/Change Request Bug description:Array invert or Array transpose (two dimensional) Description: Two dimensional array inversion or transposition task is granular enough that it should be included as a PHP array_(name) function, instead of forcing scripters to "re-invent the wheel." "array_invert" and "array_transpose" are two names which seem natural for this. Test script: --- $ary_col ) { foreach( $ary_col as $k_col => $v_node ) { $ret_ary[ $k_col ][ $k_row ] = $v_node ; } } return $ret_ary ; } function f_ary_out( $ary ) { $sz_ret = '' ; foreach( $ary as $k_row => $ary_col ) { foreach( $ary_col as $k_col => $v_node ) { $sz_ret .= $v_node ; } $sz_ret .= "\n" ; } return $sz_ret ; } $ary_test = Array ( 'abc', 'def', 'ghi', '123', '456', '789' ) ; $ary_before = Array( ) ; foreach( $ary_test as $key => $value ) { $value = trim( $value ) ; $value = strtoupper( $value ) ; $ary_before[ ] = str_split( $value ) ; } echo '$ary_before:' . "\n" ; echo f_ary_out( $ary_before ) ; print_r( $ary_before ) ; $ary_after = f_ary_trans_rc( $ary_before ) ; echo "\n\n" . '$ary_after:' . "\n" ; echo f_ary_out( $ary_after ) ; print_r( $ary_after ) ; ?> Expected result: Row and column indices of the returned array will be inverted/transposed from that of the parameter array, with corresponding movement of the referenced nodes/values. Actual result: -- $ary_before: ABC DEF GHI 123 456 789 Array ( [0] => Array ( [0] => A [1] => B [2] => C ) [1] => Array ( [0] => D [1] => E [2] => F ) [2] => Array ( [0] => G [1] => H [2] => I ) [3] => Array ( [0] => 1 [1] => 2 [2] => 3 ) [4] => Array ( [0] => 4 [1] => 5 [2] => 6 ) [5] => Array ( [0] => 7 [1] => 8 [2] => 9 ) ) $ary_after: ADG147 BEH258 CFI369 Array ( [0] => Array ( [0] => A [1] => D [2] => G [3] => 1 [4] => 4 [5] => 7 ) [1] => Array ( [0] => B [1] => E [2] => H [3] => 2 [4] => 5 [5] => 8 ) [2] => Array ( [0] => C [1] => F [2] => I [3] => 3 [4] => 6 [5] => 9 ) ) -- Edit bug report at https://bugs.php.net/bug.php?id=63577&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=63577&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=63577&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=63577&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=63577&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=63577&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=63577&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=63577&r=needscript Try newer version: https://bugs.php.net/fix.php?id=63577&r=oldversion Not developer issue:https://bugs.php.net/fix.php?id=63577&r=support Expected behavior: https://bugs.php.net/fix.php?id=63577&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=63577&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=63577&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=63577&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63577&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=63577&r=dst IIS Stability: https://bugs.php.net/fix.php?id=63577&r=isapi Install GNU Sed:https://bugs.php.net/fix.php?id=63577&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=63577&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=63577&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=63577&r=mysqlcfg
Bug #55737 [Com]: LOAD DATA LOCAL INFILE - The used command is not allowed with this MySQL versio
Edit report at https://bugs.php.net/bug.php?id=55737&edit=1 ID: 55737 Comment by: major_sheisskopf at hotmail dot com Reported by:stefan dot kaifer at hartmann dot info Summary:LOAD DATA LOCAL INFILE - The used command is not allowed with this MySQL versio Status: Not a bug Type: Bug Package:MySQL related Operating System: opensuse 11.0 PHP Version:5.3.8 Assigned To:mysql Block user comment: N Private report: N New Comment: Guys. The answer to this is very easy if you are using the deprecated mysql functions. mysql_connect(HOST,USER,PASS,false,128); Usually, you use mysql_connect without the last 2 optional arguments. But check out the manual page for it and you'll see that 128 enables LOAD DATA INFILE. I don't know what the solution is for PDO, as I have not switched over to using it yet. Previous Comments: [2012-05-06 00:36:40] denis_truffaut at hotmail dot com To : u...@php.net This bug appears when you use both PDO (pdo_mysql) and mysqlnd (the php mysql native driver). The last time I tested PHP 5.4, it was not solved so i tricked the sources to make it work, before compiling php. A dirty fix is : sudo sed -i -e 's/if (mysql_options(H->server, MYSQL_OPT_LOCAL_INFILE/local_infile = 1;if (mysql_options(H->server, MYSQL_OPT_LOCAL_INFILE/g' ext/pdo_mysql/mysql_driver.c [2012-05-04 13:46:45] u...@php.net So, what is this report about? If it's on ext/mysql, I call it not a bug. Thus, closing. If config is correct, things work just fine. -- $host = "localhost:/var/run/mysql/mysql.sock"; $user = "root"; $pass = ""; $flags = 128; $db = "test"; printf("PHP %s\n", PHP_VERSION); $file = getcwd() . DIRECTORY_SEPARATOR . "foo.txt"; if (!($fp = fopen($file, "w"))) die(sprintf("Failed to open '%s' for writing\n", $file)); if (!fwrite($fp, "1;a\n") || !fwrite($fp, "2;b\n")) die(sprintf("Failed to write to '%s'\n", $file)); fclose($fp); $sql = sprintf("LOAD DATA LOCAL INFILE '%s' INTO TABLE test FIELDS TERMINATED BY ';'", $file); if (!($mysql = mysql_connect($host, $user, $pass, true, $flags))) die(sprintf("Failed to connect to MySQL\n")); printf("MySQL %s\n", mysql_get_server_info($mysql)); mysql_select_db($db); mysql_query("DROP TABLE IF EXISTS test", $mysql); mysql_query("CREATE TABLE test(id INT, col_a VARCHAR(255))", $mysql); mysql_close($mysql); if (!($mysql = mysql_connect($host, $user, $pass, true, $flags))) die(sprintf("Failed to connect to MySQL\n")); if (!mysql_db_query($db, $sql, $mysql)) die(sprintf("LOAD DATA failed: %s\n", mysql_error($mysql))); $res = mysql_query("SELECT * FROM test", $mysql); while ($row = mysql_fetch_row($res)) var_dump($row); gives - PHP 5.3.12-dev MySQL 5.5.16-log array(2) { [0]=> string(1) "1" [1]=> string(1) "a" } array(2) { [0]=> string(1) "2"
Bug #63414 [Com]: built-in upload progress mechanism does not work with custom session handler
Edit report at https://bugs.php.net/bug.php?id=63414&edit=1 ID: 63414 Comment by: chad dot scott at gmail dot com Reported by:xergin at gmail dot com Summary:built-in upload progress mechanism does not work with custom session handler Status: Feedback Type: Bug Package:*General Issues Operating System: ubuntu 12.04 x86_64 PHP Version:5.4.8 Block user comment: N Private report: N New Comment: I haven't gone deep enough into the PHP source to identify what's going on, but it appears that PHP writes the upload progress session data using the handler set in "session.save_handler", ignoring any custom session handler. On Ubuntu 12.04 with the default settings, this means the data is going into "/var/lib/php5/sess_". Previous Comments: [2012-11-02 02:57:44] larue...@php.net Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with , is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. could you make a simple test script to illustrate your point? thanks [2012-11-01 18:21:07] xergin at gmail dot com Description: By default php stores sessions in files (default filepath is /var/lib/php5). If we want to store sessions, for example, in database, upload progress info doesn't appears there. Even If we change session_save_path to another directory we will get the same problem. P.S. script example you could get here: https://github.com/ihabunek/php-upload-progress and custom session handler example here: http://durak.org/sean/pubs/software/php-5.4.6/function.session-set-save- handler.html Thanks, Anton -- Edit this bug report at https://bugs.php.net/bug.php?id=63414&edit=1
Bug #60108 [Com]: GD cannot be compiled with system libgd
Edit report at https://bugs.php.net/bug.php?id=60108&edit=1 ID: 60108 Comment by: public at petergeil dot name Reported by:ond...@php.net Summary:GD cannot be compiled with system libgd Status: Assigned Type: Bug Package:GD related Operating System: Linux PHP Version:5.4.0beta2 Assigned To:pajoye Block user comment: N Private report: N New Comment: Confirmed ... problem still occurs in latest 5.4.8 release when compiled on Ubuntu 10.04 amd64 against libgd2-noxpm 2.0.36~rc1. However, adding a data member to gdIOCtx struct helps. (Thanks Brad) Previous Comments: [2012-04-17 19:48:53] bero at bero dot eu Problem still occurs in php 5.4.1-RC2. Given apparently gd is maintained by php people these days, maybe the best fix is to make a new gd release containing all needed bits? [2011-11-16 08:15:06] brad at njoe dot com Confirmed the same build errors against the latest snapshot (php5.4- 201160530) with a system-wide libgd installed (version 2.0.36 versus the bundled 2.0.35). I also noted that the standard libgd version 2.0.35 doesn't include the 'void *data' member in the gdIOCtx struct. Modifying my /usr/include/gd_io.h to include this struct member seems to have also fixed(?) the build error, but that made me wonder... ... Why is the "bundled" libgd more of a "bundled+customized-for-PHP" library? It would seem that the 'void *data' member was introduced by the PHP dev team, unless I'm mistaken. Is this member's data important, and, if so, why is the "bundled" library modified to contain it (meaning that you really don't have an option between using the "bundled" library or your own system-wide version). [2011-10-21 12:13:35] ond...@php.net Description: When compiled with system-wide (not embedded) libgd library the compilation fails with: In file included from /tmp/buildd/php5-5.4.0~beta2/ext/gd/gd.c:103:0: /tmp/buildd/php5-5.4.0~beta2/ext/gd/gd_ctx.c: In function '_php_image_stream_putc': /tmp/buildd/php5-5.4.0~beta2/ext/gd/gd_ctx.c:51:41: error: 'struct gdIOCtx' has no member named 'data' /tmp/buildd/php5-5.4.0~beta2/ext/gd/gd_ctx.c: In function '_php_image_stream_putbuf': /tmp/buildd/php5-5.4.0~beta2/ext/gd/gd_ctx.c:58:41: error: 'struct gdIOCtx' has no member named 'data' /tmp/buildd/php5-5.4.0~beta2/ext/gd/gd_ctx.c: In function '_php_image_stream_ctxfree': /tmp/buildd/php5-5.4.0~beta2/ext/gd/gd_ctx.c:67:8: error: 'struct gdIOCtx' has no member named 'data' /tmp/buildd/php5-5.4.0~beta2/ext/gd/gd_ctx.c:68:3: error: 'struct gdIOCtx' has no member named 'data' /tmp/buildd/php5-5.4.0~beta2/ext/gd/gd_ctx.c:69:6: error: 'struct gdIOCtx' has no member named 'data' In file included from /tmp/buildd/php5-5.4.0~beta2/ext/gd/gd.c:103:0: /tmp/buildd/php5-5.4.0~beta2/ext/gd/gd_ctx.c: In function '_php_image_output_ctx': /tmp/buildd/php5-5.4.0~beta2/ext/gd/gd_ctx.c:153:6: error: 'gdIOCtx' has no member named 'data' You need to wrap the _stream_ stuff inside the #ifdef HAVE_GD_BUNDLED -- Edit this bug report at https://bugs.php.net/bug.php?id=60108&edit=1
Bug #63564 [Fbk->Csd]: Segfault in garbage collector
Edit report at https://bugs.php.net/bug.php?id=63564&edit=1 ID: 63564 User updated by:evert at rooftopsolutions dot nl Reported by:evert at rooftopsolutions dot nl Summary:Segfault in garbage collector -Status: Feedback +Status: Closed Type: Bug Package:Reproducible crash Operating System: OS/X 10.8 PHP Version:5.3.18 Block user comment: N Private report: N New Comment: On first appearance, no crashes with the latest snapshot. I hope that the conditions were identical enough to test this :). If you can think of something that will make it more likely for the segfault to appear, definitely let me know so I can test. Otherwise, feel free to keep this one closed. Hopefully Apple decided to update their package as well. Previous Comments: [2012-11-20 02:29:45] larue...@php.net Please try using this snapshot: http://snaps.php.net/php5.3-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Hey, from the bt, it's very similar to #63055 could you please test with the snapshot? thanks [2012-11-19 22:33:15] evert at rooftopsolutions dot nl Description: I'm getting a segfault when running a rather large PHPUnit testsuite. It's unreproducable with smaller scripts, so I sincerely hope that this is enough info. I must also confess that this segfault occurs with the default PHP package on OS X 10.8, which is currently on PHP 5.3.15. If this is indeed too old to report bugs for, I would like to say sorry for wasting your time, and thanks for looking into this anyway. Note that this is the second mac I've had this particular issue with, but the first time the issue went away after arbitrary source changes. Test script: --- The test script is unfortunately huge, and impossible to really share. The conditions that trigger this is unfortunately also pretty random. Expected result: No segfault Actual result: -- Full GDB output: $ gdb --wait php GNU gdb 6.3.50-20050815 (Apple version gdb-1820) (Sat Jun 16 02:40:11 UTC 2012) Copyright 2004 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 "x86_64-apple-darwin". Waiting for process 'php' to launch. Attaching to process 74467. Reading symbols for shared libraries . done Reading symbols for shared libraries ... done Reading symbols for shared libraries + done 0x7fff8ffba686 in mach_msg_trap () (gdb) continue Continuing. Reading symbols for shared libraries warning: Could not find object file "/private/tmp/pear/install/pear-build-rootxgWREH/libevent-0.0.5/.libs/libevent.o" - no debug information available for "/private/tmp/pear/install/libevent/libevent.c". .. done Reading symbols for shared libraries warning: Could not find object file "/private/tmp/pear/install/pear-build-rootk3Ie9q/memcached-2.1.0/.libs/php_memcached.o" - no debug information available for "/private/tmp/pear/install/memcached/php_memcached.c". warning: Could not find object file "/private/tmp/pear/install/pear-build-rootk3Ie9q/memcached-2.1.0/fastlz/.libs/fastlz.o" - no debug information available for "/private/tmp/pear/install/memcached/fastlz/fastlz.c". warning: Could not find object file "/private/tmp/pear/install/pear-build-rootk3Ie9q/memcached-2.1.0/.libs/g_fmt.o" - no debug information available for "/private/tmp/pear/install/memcached/g_fmt.c". warning: Could not find object file "/private/tmp/pear/install/pear-build-rootk3Ie9q/memcached-2.1.0/.libs/php_memcached_session.o" - no debug information available for "/private/tmp/pear/install/memcached/php_memcached_session.c". .. done Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: 13 at address: 0x 0x000103c60713 in gc_remove_zval_from_buffer () (gdb) backtrace #0 0x000103c60713 in gc_remove_zval_from_buffer () #1 0x000103c6073e in gc_remove_zval_from_buffer () #2 0x000103c5fdf1 in gc_collect_cycles () #3 0x000103c5fad6 in gc_zval_possible_root () #4 0x000103c51b0b in zend_hash_destroy () #5 0x000103c45645 in _zval_dtor_func () #6 0x000103946df8 in php_pcre_match_impl () #7 0x000103949fc1 in php_pcre_grep_impl () #8 0x000103ca6680 in zend_do_fcall () #9 0x000103c66e3a in execute () #10 0x000103c4789e in zend_execute_scripts () #11 0x000103bfc1b8 in php_e
Bug #62378 [Com]: PHP incorrectly encodes null values in SOAP
Edit report at https://bugs.php.net/bug.php?id=62378&edit=1 ID: 62378 Comment by: seth at sethmatics dot com Reported by:webmaster at guestwho dot com Summary:PHP incorrectly encodes null values in SOAP Status: Open Type: Bug Package:SOAP related Operating System: FreeBSD 8.3-RELEASE PHP Version:5.3.14 Block user comment: N Private report: N New Comment: Not sure what version of PHP your using, but my version of PHP is properly setting the xsi:nil on NULL values. I found this bug while searching for issue with "disappearing nodes when value is null". Previous Comments: [2012-06-20 23:24:37] webmaster at guestwho dot com Description: This is a duplicate of #41745 but that's been stuck on "No Feedback" since 2007, so I thought I'd re-post. When null is provided for a SOAP parameter or the field of an object passed as a SOAP parameter, PHP incorrectly encodes the parameter as being empty (e.g. object with all null fields, or empty string) which is different from an actual null. This breaks access to real-world web services. Test script: --- --- $soap = new SoapClient('/path/to/wsdl', array('trace' => true)); $soap->operation(null); echo $soap->__getLastRequest(); Expected result: http://schemas.xmlsoap.org/soap/envelope/"; xmlns:ns1="NAMESPACE" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";> Actual result: -- http://schemas.xmlsoap.org/soap/envelope/"; xmlns:ns1="NAMESPACE"> -- Edit this bug report at https://bugs.php.net/bug.php?id=62378&edit=1
[PHP-BUG] Bug #63575 [NEW]: Cloning are incorrect
From: vadimx at gmail dot com Operating system: Windows/Linux PHP version: 5.3.18 Package: SimpleXML related Bug Type: Bug Bug description:Cloning are incorrect Description: When changing child's in cloned object, it's change in parent object, not in cloned. Test script: --- $xml = ''; $o1 = new SimpleXMlElement($xml); $o2 = clone $o1; $r = current($o2->xpath('/a')); $r->addChild('c',new SimpleXMlElement('')); echo $o1->asXML(); echo PHP_EOL; echo $o2->asXML(); Expected result: Actual result: -- -- Edit bug report at https://bugs.php.net/bug.php?id=63575&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=63575&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=63575&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=63575&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=63575&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=63575&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=63575&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=63575&r=needscript Try newer version: https://bugs.php.net/fix.php?id=63575&r=oldversion Not developer issue:https://bugs.php.net/fix.php?id=63575&r=support Expected behavior: https://bugs.php.net/fix.php?id=63575&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=63575&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=63575&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=63575&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63575&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=63575&r=dst IIS Stability: https://bugs.php.net/fix.php?id=63575&r=isapi Install GNU Sed:https://bugs.php.net/fix.php?id=63575&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=63575&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=63575&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=63575&r=mysqlcfg
Bug #63570 [Opn]: Bogus warning 'Operation now in progress'
Edit report at https://bugs.php.net/bug.php?id=63570&edit=1 ID: 63570 User updated by:kakserpompoyaitsam at gmail dot com Reported by:kakserpompoyaitsam at gmail dot com -Summary:Bonus warning 'Operation now in progress' +Summary:Bogus warning 'Operation now in progress' Status: Open Type: Bug Package:Sockets related Operating System: linux PHP Version:5.4.8 Block user comment: N Private report: N New Comment: It would awesome if you include it to 5.5. Previous Comments: [2012-11-21 05:52:36] kakserpompoyaitsam at gmail dot com Description: When I'm getting annoying warning while working with non-blocking socket, For instance: socket_connect(): unable to connect [115]: Operation now in progress Hence, I have to use @socket_connect and the performance getting compromised. I do use pecl-libevent, and this error makes no sense at all. Please do not ignore this little defect, Thank you in advance. Test script: --- https://bugs.php.net/bug.php?id=63570&edit=1
Bug #62460 [Csd]: php binaries installed as binary.dSYM
Edit report at https://bugs.php.net/bug.php?id=62460&edit=1 ID: 62460 Updated by: re...@php.net Reported by:phpbugs at adam dot gs Summary:php binaries installed as binary.dSYM Status: Closed Type: Bug Package:*Compile Issues Operating System: OSX 10.8 PHP Version:5.3.14 Assigned To:johannes Block user comment: N Private report: N New Comment: @levim Yes, it's ok to just rename it, if you want to run fpm, you may need to rename php-cgi too :) Previous Comments: [2012-11-18 20:40:31] le...@php.net As someone who is showing up late to the party; is it safe to rename the file `php.dSYM` to `php` or should I apply the patch, reconfigure, recompile, etc? [2012-08-06 03:31:39] s...@php.net This bug has been fixed in SVN. 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/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. [2012-08-06 03:28:09] s...@php.net Automatic comment on behalf of reeze@gmail.com Revision: http://git.php.net/?p=php-src.git;a=commit;h=07ee764e5709dc8d9f26382d8e7438696f5bb834 Log: Fixed bug #62460 (php binaries installed as binary.dSYM) [2012-07-20 02:55:21] reeze dot xia at gmail dot com Hi, The new released PHP-5.3.15 still have this bug. you could use the distributed tar package to reproduce. using google to search php.dSYM there are a lot of result about it. Thanks [2012-07-19 06:45:26] larue...@php.net johannes, could you please look at this? thanks 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 https://bugs.php.net/bug.php?id=62460 -- Edit this bug report at https://bugs.php.net/bug.php?id=62460&edit=1
[PHP-BUG] Bug #63574 [NEW]: mssql_field_name => filed truncated to 30 chars
From: aurelien dot lequoy at gmail dot com Operating system: Linux / Debian 6.01 PHP version: 5.3.18 Package: MSSQL related Bug Type: Bug Bug description:mssql_field_name => filed truncated to 30 chars Description: --- >From manual page: http://www.php.net/function.mssql-field-name#refsect1- function.mssql-field-name-seealso --- Still only returns 1st 30 characters of fieldname, I thought this issue was fixed. solution ? : (quick fix) SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='ARKA_PIV_BIZFILE_FULL' order by ORDINAL_POSITION Test script: --- set a filed name > 30 chars, make a query and use mssql_field_name to get the field name CREATE TABLE dbo.[ARKA_PIV_BIZFILE_FULL] ( LegacySystem nvarchar(10) null, Subsidiary nvarchar(25) null, LogoName nvarchar(150) null, AccountRef nvarchar(25) null, Account_name nvarchar(150) null, AccountCreationDate nvarchar(100) null, [Customer TimeZone] nvarchar(100) null, Currency nvarchar(10) null, LastYear_Revenue nvarchar(10) null, Current_Revenue nvarchar(10) null, NbAccess nvarchar(10) null, Is_prospect nvarchar(10) null, AccountStatus nvarchar(10) null, BizFileStatus nvarchar(10) null, Comment nvarchar(10) null, RecordCreationDate nvarchar(20) null, RecordLastModificationDate nvarchar(20) null, RecordLastModifierUserLogin nvarchar(10) null, Line_in_error nvarchar(10) null, Line_error_comment nvarchar(10) null, Subscription_start_date nvarchar(20) null, Subscription_end_date nvarchar(20) null, Subscribed_offer_name nvarchar(10) null, isCloud nvarchar(10) null, Event nvarchar(25) null, Anytime nvarchar(10) null, Anywhere nvarchar(10) null, WebEx nvarchar(25) null, WebCast nvarchar(10) null, isVidyo nvarchar(10) null, GlobalCommitmentAmount nvarchar(10) null, GlobalCommitmentPeriod nvarchar(10) null, OtherFlatRecurringCharge nvarchar(10) null, Anywhere_NH_nbr_of_Licenses nvarchar(10) null, Anywhere_NH_Per_License_Price nvarchar(10) null, AnyWhere_NH_PriceType nvarchar(10) null, AnyWhere_NH_Threshold_Min nvarchar(10) null, AnyWhere_NH_Threshold_Max nvarchar(10) null, AnyWhere_NH_RoomSize nvarchar(10) null, AnyWhere_OverageType nvarchar(10) null, AnyWhere_Overage_Price nvarchar(10) null, WebEx_MeetingCenter nvarchar(10) null, WebEx_EventCenter nvarchar(10) null, WebEx_SupportCenter nvarchar(10) null, WebEx_TrainingCenter nvarchar(10) null, WebEx_MicroSite nvarchar(10) null, WebEx_Admin_Login nvarchar(10) null, WebEx_Admin_PWD nvarchar(10) null, Webex_NH_nbr_of_Licenses nvarchar(10) null, WebEx_NH_PriceType nvarchar(10) null, Webex_NH_Per_License_Price nvarchar(10) null, Webex_NH_Per_License_Threshold_Min nvarchar(10) null, Webex_NH_Per_License_Threshold_Max nvarchar(10) null, WebEx_CP_nbr_of_Licenses nvarchar(10) null, WebEx_CP_PriceType nvarchar(10) null, WebEx_CP_License_Price nvarchar(10) null, WebEx_CP_Threshold_Min nvarchar(10) null, WebEx_CP_Threshold_Max nvarchar(10) null, WebEx_RoomSize nvarchar(10) null, WebEx_Overage_Type nvarchar(10) null, WebEx_Overage_Price nvarchar(10) null, BandDiscount1_BandName nvarchar(10) null, BandDiscount1_MinuteThreshold_Min_1 nvarchar(10) null, BandDiscount1_MinuteThreshold_Max_1 nvarchar(10) null, BandDiscount1_DiscountPercentage_1 nvarchar(10) null, BandDiscount1_MinuteThreshold_Min_2 nvarchar(10) null, BandDiscount1_MinuteThreshold_Max_2 nvarchar(10) null, BandDiscount1_DiscountPercentage_2 nvarchar(10) null, BandDiscount1_MinuteThreshold_Min_3 nvarchar(10) null, BandDiscount1_MinuteThreshold_Max_3 nvarchar(10) null, BandDiscount1_DiscountPercentage_3 nvarchar(10) null, BandDiscount2_BandName nvarchar(10) null, BandDiscount2_MinuteThreshold_Min_1 nvarchar(10) null, BandDiscount2_MinuteThreshold_Max_1 nvarchar(10) null, BandDiscount2_DiscountPercentage_1 nvarchar(10) null, BandDiscount2_MinuteThreshold_Min_2 nvarchar(10) null, BandDiscount2_MinuteThreshold_Max_2 nvarchar(10) null, BandDiscount2_DiscountPercentage_2 nvarchar(10) null, BandDiscount2_MinuteThreshold_Min_3 nvarchar(10) null, BandDiscount2_MinuteThreshold_Max_3 nvarchar(10) null, BandDiscount2_DiscountPercentage_3 nvarchar(10) null, VolumeDiscount_Threshold_Metric nvarchar(10) null, VolumeDiscount_Threshold_Min_1 nvarchar(10) null, VolumeDiscount_Threshold_Max_1 nvarchar(10) null, VolumeDiscount_DiscountPercentage_1 nvarchar(10) null, VolumeDiscount_Threshold_Min_2 nvarchar(10) null, VolumeDiscount_Threshold_Max_2 nvarchar(10) null, VolumeDiscount_DiscountPercentage_2 nvarchar(10) null, VolumeDiscount_Threshold_Min_3 nvarchar(10) null, VolumeDiscount_Threshold_Max_3 nvarchar(10) null, VolumeDiscount_DiscountPercentage_3 nvarchar(10) null, VolumeDiscount_Threshold_Min_4 nvarchar(10) null, VolumeDiscount_Threshold_Max_4 nvarchar(10) null, VolumeDiscount_DiscountPercentage_4 nvarchar(10) null, Is_FlatDiscount_with_condition nvarchar(10) null, Flat_Discount_condition nvarchar(10) null, Flat_Discount_Threshold nvarchar(10) null, Flat_discountAmount nvarchar(10) null, EventId
Bug #63569 [Opn->Csd]: DateTimeZone::listAbbreviations() reports inccorrect offset
Edit report at https://bugs.php.net/bug.php?id=63569&edit=1 ID: 63569 User updated by:zippidyzap at gmail dot com Reported by:zippidyzap at gmail dot com Summary:DateTimeZone::listAbbreviations() reports inccorrect offset -Status: Open +Status: Closed Type: Bug Package:Date/time related Operating System: CentOS 6.3 PHP Version:5.3.18 Block user comment: N Private report: N New Comment: DateTimeZone::listAbbreviations() reports *all* timezones available, not all *current* timezones. Maybe the documentation could use some improvement, but this isn't a bug. Previous Comments: [2012-11-21 00:31:22] zippidyzap at gmail dot com Description: DateTimeZone::listAbbreviations() reports incorrect. When executed on (server time) 2012-11-20T00:00:00-08:00, reported that offset for America/Los_Angeles as -25200. DateTimeZone::getTransitionOffsets reports the offset correctly as -28800. Test script: --- getTransitions(time(), time())); ?> Expected result: Array ( [dst] => 0 [offset] => -28800 [timezone_id] => America/Los_Angeles ) Array ( [0] => Array ( [ts] => 1353457792 [time] => 2012-11-21T00:29:52+ [offset] => -28800 [isdst] => [abbr] => PST ) ) Actual result: -- Array ( [dst] => 1 [offset] => -25200 [timezone_id] => America/Los_Angeles ) Array ( [0] => Array ( [ts] => 1353457792 [time] => 2012-11-21T00:29:52+ [offset] => -28800 [isdst] => [abbr] => PST ) ) -- Edit this bug report at https://bugs.php.net/bug.php?id=63569&edit=1
Bug #55810 [Com]: cannot have more than 1000 entries in the _POST array
Edit report at https://bugs.php.net/bug.php?id=55810&edit=1 ID: 55810 Comment by: contacto at hardcode dot com dot ar Reported by:clemens dot schwaighofer at e-graphics dot com Summary:cannot have more than 1000 entries in the _POST array Status: Not a bug Type: Bug Package:Scripting Engine problem Operating System: Linux PHP Version:5.3.8 Block user comment: N Private report: N New Comment: "max_input_vars = " worked great for me. thanks! i was about to go crazy, in my case it was a screen that stopped working after updating php Previous Comments: [2012-06-15 00:56:16] clemens dot schwaighofer at e-graphics dot com Besides this var and possible suhosin entry, I really do not know. Is this a self compiled PHP? Or from a distribution? What version is it? etc. There could be many factors. [2012-06-14 13:02:55] the dot aloner at gmail dot com Thank you for your reply. Yes, I've added this to php.ini and restarted Apache max_input_vars = 3000 The setting has been changed, but the problem is still there. It doesn't allow more than 1000 vars. :( [2012-06-14 00:48:42] clemens dot schwaighofer at e-graphics dot com @the dot aloner at gmail dot com Yes, in the PHP ini search for "max_input_vars =" and up the value. Or add the entry if it is missing. [2012-06-13 13:52:39] the dot aloner at gmail dot com I'm having this problem on 5.3.13 without Suhosin. Is there anything I can check? Here is the result of the test: PHP VERSION: 50313 Original data: 1010 POST DATA: 1000 ERROR: POST count is smaller than original data count [2011-09-30 01:15:05] clemens dot schwaighofer at e-graphics dot com Actually it is not only the post.max_vars, but also the request.max_vars 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 https://bugs.php.net/bug.php?id=55810 -- Edit this bug report at https://bugs.php.net/bug.php?id=55810&edit=1
Bug #63430 [Csd->Nab]: xml data parsing bug
Edit report at https://bugs.php.net/bug.php?id=63430&edit=1 ID: 63430 Updated by: ras...@php.net Reported by:lussenburg_rm at hotmail dot com Summary:xml data parsing bug -Status: Closed +Status: Not a bug Type: Bug Package:XML Reader Operating System: windows 7 PHP Version:Irrelevant Block user comment: N Private report: N Previous Comments: [2012-11-21 11:33:03] lussenburg_rm at hotmail dot com . [2012-11-21 11:32:16] lussenburg_rm at hotmail dot com That does work indeed, thanks. I guess i misunderstood the explanation of next(). i didn't expect it to skip over the beginning of a new element. i thougt it would only skip over all subtrees of the current element, and that the read at the top of the loop would start at the element. Compliments on the 'super fast' reply also ! [2012-11-20 21:44:29] mail+php at requinix dot net Hate to burst your bubble but there's a flaw in your code. The problem occurs when * There is a node before an with no whitespace (ie, a #text) in between * Said node has children * Said node has an entry in $siblings The last two cause a line of code near the bottom if ( $node->hasChildNodes() && ($mode == 1 || $siblings[$node->nodeName]) ) $xml->next(); to fire. next() will skip over the rest of the node and, in lieu of a subsequent #text, advance to the . But at the top of your loop you have a read(). That will skip over the tag and into the following #text (between the and the ). You can confirm this by outputting the node name at the beginning of the loop - before the switch that would skip over it: , then #text, then . It works for me if I change the while loop into a do/while: * $xml->read() before the loop to initialize * flag=false at the start of the loop * the aforementioned line sets flag=$xml->next() * do/while ( flag || $xml->read() ) If you'd like to know more you can email me at this address. [2012-11-20 20:30:51] lussenburg_rm at hotmail dot com Hi there, This code is for testing purposes so i could learn how XMLReader() works before incorporating it in a RssWebfeed class i've written. In this code the only thing i replace, to work around the bug i got, is the bit that is commented out in this example. 'nosnieuwsalgemeen.xml' is the file I have saved on my pc so i don't have to read it from internet everytime. It is the contents of http://feeds.nos.nl/nosnieuwsalgemeen. Another example is http://www.nasa.gov/rss/breaking_news.rss, but this one doesn't give the bug. In the implementation, I need to get the data that comes before the first into a feed database which identifies different feed id's and its title and description. When i encounter the first these are records that go into a 2nd database which defines items for a particular feed. Here's the code: /* $find = array ( '', '>' ); $repl = array ( '', '','>\r\n' ); */ $file = 'nasa_breaking_news.xml'; $cont = file_get_contents($file); //$cont = str_ireplace($find, $repl, $cont); $nodes = array ( 'rss'=> array( 'version' => 'rss_version' ), 'guid' => true, 'link' => true, 'title' => true, 'description'=> true, 'pubDate'=> true, 'lastBuildDate' => true, 'language' => true, 'image' => true, 'enclosure' => array( 'url' => 'enclosure', 'type' => 'type', 'width' => 'imgwidth' ), 'managingEditor' => true, 'related'=> true, ); $siblings = array ( 'image' => array( 'url' => 'image', 'title' => 'alt', 'link' => 'link', 'description' => 'title' ), ); $xml = new XMLReader(); if ( $xml ) { echo ' xml = new XMLReader() gelukt '; } if ( $xml->xml($cont, THIS_CHARSET, LIBXML_NOERROR|LIBXML_NOWARNING) === true ) { printf( ' xml->open() %s ', $file ); echo ' '; $mode= 0; $element = ''; $itemcount = 0; while ( $xml->read() ) { if ( $xml->name == 'item' ) { switch ( $xml->nodeType ) { case XMLReader::ELEMENT: $itemcount++; $mode = 1; break; case XMLReader::END_ELEMENT: $mode = 0; break; } } $element = '';
Bug #63528 [Com]: Generators crash on Zend\tests\generators\clone_with_stack.phpt
Edit report at https://bugs.php.net/bug.php?id=63528&edit=1 ID: 63528 Comment by: ni...@php.net Reported by:a...@php.net Summary:Generators crash on Zend\tests\generators\clone_with_stack.phpt Status: Assigned Type: Bug Package:*General Issues Operating System: Windows PHP Version:5.5Git-2012-11-15 (Git) Assigned To:nikic Block user comment: N Private report: N New Comment: Is this the only test that is failing for you? I just played around with it on Windows and for me anything involving pushed stack arguments crashes. E.g. the yield_during_function_call test. Previous Comments: [2012-11-15 15:57:05] a...@php.net Btw. there are no valgrind complains on Linux for this test. [2012-11-15 14:35:20] a...@php.net Description: Both TS and NTS crash. On a debug build VS gives the following error: Unhandled exception at 0x102D369E (php5ts_debug.dll) in php.exe: 0xC005: Access violation reading location 0x5A5A5A56. and the debugger stops in zend_execute.h:337 (second line in zend_vm_stack_clear_multiple()). Here is the corresponding BT: php5ts_debug.dll!zend_vm_stack_clear_multiple(void * * * tsrm_ls) Line 337 C php5ts_debug.dll!zend_do_fcall_common_helper_SPEC(_zend_execute_data * execute_data, void * * * tsrm_ls) Line 736 C php5ts_debug.dll!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER(_zend_execute_data * execute_data, void * * * tsrm_ls) Line 879 C php5ts_debug.dll!execute_ex(_zend_execute_data * execute_data, void * * * tsrm_ls) Line 436 C php5ts_debug.dll!execute(_zend_op_array * op_array, void * * * tsrm_ls) Line 461C php5ts_debug.dll!zend_execute_scripts(int type, void * * * tsrm_ls, _zval_struct * * retval, int file_count, ...) Line 1309 C php5ts_debug.dll!php_execute_script(_zend_file_handle * primary_file, void * * * tsrm_ls) Line 2468 C php.exe!do_cli(int argc, char * * argv, void * * * tsrm_ls) Line 988 C php.exe!main(int argc, char * * argv) Line 1364 C php.exe!__tmainCRTStartup() Line 582C php.exe!mainCRTStartup() Line 399 C kernel32.dll!76971866() Unknown [Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll] ntdll.dll!770668f1()Unknown ntdll.dll!7706689d()Unknown Test script: --- Zend\tests\generators\clone_with_stack.phpt Expected result: Test diff: 001+ 001- string(10) "xx" Actual result: -- test pass -- Edit this bug report at https://bugs.php.net/bug.php?id=63528&edit=1
Bug #63430 [Opn->Csd]: xml data parsing bug
Edit report at https://bugs.php.net/bug.php?id=63430&edit=1 ID: 63430 User updated by:lussenburg_rm at hotmail dot com Reported by:lussenburg_rm at hotmail dot com Summary:xml data parsing bug -Status: Open +Status: Closed Type: Bug Package:XML Reader Operating System: windows 7 PHP Version:Irrelevant Block user comment: N Private report: N New Comment: . Previous Comments: [2012-11-21 11:32:16] lussenburg_rm at hotmail dot com That does work indeed, thanks. I guess i misunderstood the explanation of next(). i didn't expect it to skip over the beginning of a new element. i thougt it would only skip over all subtrees of the current element, and that the read at the top of the loop would start at the element. Compliments on the 'super fast' reply also ! [2012-11-20 21:44:29] mail+php at requinix dot net Hate to burst your bubble but there's a flaw in your code. The problem occurs when * There is a node before an with no whitespace (ie, a #text) in between * Said node has children * Said node has an entry in $siblings The last two cause a line of code near the bottom if ( $node->hasChildNodes() && ($mode == 1 || $siblings[$node->nodeName]) ) $xml->next(); to fire. next() will skip over the rest of the node and, in lieu of a subsequent #text, advance to the . But at the top of your loop you have a read(). That will skip over the tag and into the following #text (between the and the ). You can confirm this by outputting the node name at the beginning of the loop - before the switch that would skip over it: , then #text, then . It works for me if I change the while loop into a do/while: * $xml->read() before the loop to initialize * flag=false at the start of the loop * the aforementioned line sets flag=$xml->next() * do/while ( flag || $xml->read() ) If you'd like to know more you can email me at this address. [2012-11-20 20:30:51] lussenburg_rm at hotmail dot com Hi there, This code is for testing purposes so i could learn how XMLReader() works before incorporating it in a RssWebfeed class i've written. In this code the only thing i replace, to work around the bug i got, is the bit that is commented out in this example. 'nosnieuwsalgemeen.xml' is the file I have saved on my pc so i don't have to read it from internet everytime. It is the contents of http://feeds.nos.nl/nosnieuwsalgemeen. Another example is http://www.nasa.gov/rss/breaking_news.rss, but this one doesn't give the bug. In the implementation, I need to get the data that comes before the first into a feed database which identifies different feed id's and its title and description. When i encounter the first these are records that go into a 2nd database which defines items for a particular feed. Here's the code: /* $find = array ( '', '>' ); $repl = array ( '', '','>\r\n' ); */ $file = 'nasa_breaking_news.xml'; $cont = file_get_contents($file); //$cont = str_ireplace($find, $repl, $cont); $nodes = array ( 'rss'=> array( 'version' => 'rss_version' ), 'guid' => true, 'link' => true, 'title' => true, 'description'=> true, 'pubDate'=> true, 'lastBuildDate' => true, 'language' => true, 'image' => true, 'enclosure' => array( 'url' => 'enclosure', 'type' => 'type', 'width' => 'imgwidth' ), 'managingEditor' => true, 'related'=> true, ); $siblings = array ( 'image' => array( 'url' => 'image', 'title' => 'alt', 'link' => 'link', 'description' => 'title' ), ); $xml = new XMLReader(); if ( $xml ) { echo ' xml = new XMLReader() gelukt '; } if ( $xml->xml($cont, THIS_CHARSET, LIBXML_NOERROR|LIBXML_NOWARNING) === true ) { printf( ' xml->open() %s ', $file ); echo ' '; $mode= 0; $element = ''; $itemcount = 0; while ( $xml->read() ) { if ( $xml->name == 'item' ) { switch ( $xml->nodeType ) { case XMLReader::ELEMENT: $itemcount++; $mode = 1; break; case XMLReader::END_ELEMENT: $mode = 0; break; } } $element = ''; switch ( $xml->nodeType ) { case XMLReader::END_ELEMENT: case XMLRea
Bug #63430 [Opn]: xml data parsing bug
Edit report at https://bugs.php.net/bug.php?id=63430&edit=1 ID: 63430 User updated by:lussenburg_rm at hotmail dot com Reported by:lussenburg_rm at hotmail dot com Summary:xml data parsing bug Status: Open Type: Bug Package:XML Reader Operating System: windows 7 PHP Version:Irrelevant Block user comment: N Private report: N New Comment: That does work indeed, thanks. I guess i misunderstood the explanation of next(). i didn't expect it to skip over the beginning of a new element. i thougt it would only skip over all subtrees of the current element, and that the read at the top of the loop would start at the element. Compliments on the 'super fast' reply also ! Previous Comments: [2012-11-20 21:44:29] mail+php at requinix dot net Hate to burst your bubble but there's a flaw in your code. The problem occurs when * There is a node before an with no whitespace (ie, a #text) in between * Said node has children * Said node has an entry in $siblings The last two cause a line of code near the bottom if ( $node->hasChildNodes() && ($mode == 1 || $siblings[$node->nodeName]) ) $xml->next(); to fire. next() will skip over the rest of the node and, in lieu of a subsequent #text, advance to the . But at the top of your loop you have a read(). That will skip over the tag and into the following #text (between the and the ). You can confirm this by outputting the node name at the beginning of the loop - before the switch that would skip over it: , then #text, then . It works for me if I change the while loop into a do/while: * $xml->read() before the loop to initialize * flag=false at the start of the loop * the aforementioned line sets flag=$xml->next() * do/while ( flag || $xml->read() ) If you'd like to know more you can email me at this address. [2012-11-20 20:30:51] lussenburg_rm at hotmail dot com Hi there, This code is for testing purposes so i could learn how XMLReader() works before incorporating it in a RssWebfeed class i've written. In this code the only thing i replace, to work around the bug i got, is the bit that is commented out in this example. 'nosnieuwsalgemeen.xml' is the file I have saved on my pc so i don't have to read it from internet everytime. It is the contents of http://feeds.nos.nl/nosnieuwsalgemeen. Another example is http://www.nasa.gov/rss/breaking_news.rss, but this one doesn't give the bug. In the implementation, I need to get the data that comes before the first into a feed database which identifies different feed id's and its title and description. When i encounter the first these are records that go into a 2nd database which defines items for a particular feed. Here's the code: /* $find = array ( '', '>' ); $repl = array ( '', '','>\r\n' ); */ $file = 'nasa_breaking_news.xml'; $cont = file_get_contents($file); //$cont = str_ireplace($find, $repl, $cont); $nodes = array ( 'rss'=> array( 'version' => 'rss_version' ), 'guid' => true, 'link' => true, 'title' => true, 'description'=> true, 'pubDate'=> true, 'lastBuildDate' => true, 'language' => true, 'image' => true, 'enclosure' => array( 'url' => 'enclosure', 'type' => 'type', 'width' => 'imgwidth' ), 'managingEditor' => true, 'related'=> true, ); $siblings = array ( 'image' => array( 'url' => 'image', 'title' => 'alt', 'link' => 'link', 'description' => 'title' ), ); $xml = new XMLReader(); if ( $xml ) { echo ' xml = new XMLReader() gelukt '; } if ( $xml->xml($cont, THIS_CHARSET, LIBXML_NOERROR|LIBXML_NOWARNING) === true ) { printf( ' xml->open() %s ', $file ); echo ' '; $mode= 0; $element = ''; $itemcount = 0; while ( $xml->read() ) { if ( $xml->name == 'item' ) { switch ( $xml->nodeType ) { case XMLReader::ELEMENT: $itemcount++; $mode = 1; break; case XMLReader::END_ELEMENT: $mode = 0; break; } } $element = ''; switch ( $xml->nodeType ) { case XMLReader::END_ELEMENT: case XMLReader::SIGNIFICANT_WHITESPACE: case XMLReader::WHITESPACE: case XMLReader::TEXT: case XMLReader::CDATA:
Bug #48447 [Com]: After FORK Interbase doesn't work
Edit report at https://bugs.php.net/bug.php?id=48447&edit=1 ID: 48447 Comment by: steffen at kernelguy dot dk Reported by:jjoss at mail dot ru Summary:After FORK Interbase doesn't work Status: Assigned Type: Bug Package:InterBase related Operating System: Ubuntu Linux 2.6.18 PHP Version:5.2.9 Assigned To:mariuz Block user comment: N Private report: N New Comment: I can confirm this problem. I'm using it the same way in a spawned process and normally it works just fine. However: If I restart the firebird process the forked process keeps getting the transaction error message. I have tried everything I can think of when I get the error: ibase_close($db_handle); $db_handle = null; Sleep(2); ibase_connect or ibase_pconnect; // Tried both ibase_trans; // Always fails So for the last year I have been restarting my process, after a firebird restart. Previous Comments: [2012-01-05 09:05:31] steffen at kernelguy dot dk If I only call ibase_connect from the child code it works. What I'm doing: >From a php script run by apache I exec a spawn.php script which again calls >pcntl_fork. I can access the database before the fork, which is successfull. Then after the fork I get the error below when I try to start a new transaction, even after creating a new connection with ibase_connect: "WARNING ibase_trans(): Unable to complete network request to host "localhost". Error writing data to the connection." If I dont access the database before the fork, then the child code works. So that's my workaround for now. [2009-06-01 17:02:33] jjoss at mail dot ru Description: After using the pcntl_fork() function both parent and child are not able to connect to the database. Reproduce code: --- obj->Log->debug('ReportGeneric before fork ('.getmygid().')'); $pid = pcntl_fork(); if ($pid == -1) die('fork error'); if ($pid) { // PARENT dbGet('parent'); posix_kill(getmypid(), 9); } else { // CHILD dbGet('child'); posix_kill(getmypid(), 9); } ?> Expected result: $ php fork_interbase.php grandpa: 27850 grandpa: Array ( [0] => 1 ) child: 27852 child: Array ( [0] => 1 ) parent: 27850 parent: Array ( [0] => 1 ) Killed $ Actual result: -- $ php fork_interbase.php grandpa: 27850 grandpa: Array ( [0] => 1 ) child: 27852 parent: 27850 parent: row empty - Unable to complete network request to host "localhost". Error writing data to the connection. Broken pipe child: query error - Unable to complete network request to host "localhost". Error reading data from the connection. Killed $ -- Edit this bug report at https://bugs.php.net/bug.php?id=48447&edit=1
Bug #63567 [Com]: exec() always yields a 1 return code
Edit report at https://bugs.php.net/bug.php?id=63567&edit=1 ID: 63567 Comment by: circus2 at web dot de Reported by:s...@php.net Summary:exec() always yields a 1 return code Status: Feedback Type: Bug Package:Program Execution Operating System: Windows 7 x64 PHP Version:5.5.0alpha1 Block user comment: N Private report: N New Comment: It's happening on a Win 7 Home Premium 64Bits running with PHP 5.4.8 VC9 x86 Thread Safe edition but I can reproduce it with every PHP (5.2, 5.3, 5.5alpha) edition. Unfortunately I have also this weird syntax error. I have no clue what's going on. I also played with the php-cli.ini, with my system path and so on. Previous Comments: [2012-11-20 17:57:16] paj...@php.net Can't reproduce it here. On which system or PHP version(s) does it happen exactly? [2012-11-20 16:19:56] s...@php.net Description: Running exec() seems to detect a non-zero (and specifically 1) return code/exit code for the process. No matter what process. It also affects the proc_open class of functions so there is not even a decent workaround as far as we know. Works on my machine but @johmue on github has the issue consistently. He tried with all latest 5.2, 5.3 and 5.4, even 5.5-alpha1. They all do the same. Yet on my machine 5.4.8 works fine. At first sight I have exactly the same OS and PHP build that he does, so this makes no sense to me. There must be something wrong in his environment but we are not able to figure out what causes it. Note that trying the same thing in the shell directly yields a correct result, so the issue seems to be in php, for example this works: C:\>dir [snip] C:\>echo %errorlevel% 0 You can find the full thread below, but I tried to sum it up above: https://github.com/composer/composer/issues/613 Test script: --- C:\>php -r "exec('dir', $out, $ret);var_dump($ret);" Expected result: int(0) Actual result: -- Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch. int(1) Interstingly, it does output the wrong return code, and also prints this warning saying that the syntax of the filename/command is wrong. -- Edit this bug report at https://bugs.php.net/bug.php?id=63567&edit=1