[PHP-BUG] Bug #52810 [NEW]: substr() and $string[n] corrupt multi-byte UTF-8 strings
From: Operating system: OS X 10.6.4 PHP version: Irrelevant Package: Strings related Bug Type: Bug Bug description:substr() and $string[n] corrupt multi-byte UTF-8 strings Description: (PHP 5.3.2 (cli) (built: Aug 7 2010 00:04:41) Copyright (c) 1997-2010 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies) When trying to extract a single character from a UTF-8-encoded Japanese string, instead of the expected character, one gets the dreaded black-diamond-question-mark-of-death. Test script: --- $s_string = é岡ã¯è¸ãæãã§ãã; echo $s_string[3], p /; // expected output is è¸ // actual output is � print_r($s_string[3]); // expected output is è¸ // actual output is � echo p /; $sub = substr($s_string, 3, 1); echo $sub, p /; // expected output is è¸ // actual output is � Expected result: Expected output is è¸ Actual result: -- Actual output is � -- Edit bug report at http://bugs.php.net/bug.php?id=52810edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52810r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52810r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52810r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=52810r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52810r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=52810r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=52810r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=52810r=needscript Try newer version: http://bugs.php.net/fix.php?id=52810r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=52810r=support Expected behavior: http://bugs.php.net/fix.php?id=52810r=notwrong Not enough info: http://bugs.php.net/fix.php?id=52810r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=52810r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=52810r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52810r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=52810r=dst IIS Stability: http://bugs.php.net/fix.php?id=52810r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=52810r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=52810r=float No Zend Extensions: http://bugs.php.net/fix.php?id=52810r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=52810r=mysqlcfg
[PHP-BUG] Bug #52811 [NEW]: the notification callback method never gets call when using socket streams
From: Operating system: * PHP version: 5.3.3 Package: Streams related Bug Type: Bug Bug description:the notification callback method never gets call when using socket streams Description: At least when the context is set to 'tcp' and the socket is opened with stream_socket_client, the callback method defined with the notification parameters of stream_context_set_params never get called. And the current documentation is pointless regarding which wrapper actually support the notifications. As far as I can see ftp and http wrappers support it but tcp socket (or even file://) don't. Callback notification function is the way to perform efficient and advanced monitoring on socket. It should be invoked for the following events: STREAM_NOTIFY_RESOLVE Yes STREAM_NOTIFY_CONNECT Yes STREAM_NOTIFY_AUTH_REQUIRED No STREAM_NOTIFY_MIME_TYPE_IS No STREAM_NOTIFY_FILE_SIZE_IS No STREAM_NOTIFY_REDIRECTED No STREAM_NOTIFY_PROGRESS Yes but optional STREAM_NOTIFY_COMPLETED Yes STREAM_NOTIFY_FAILURE Oh Yes STREAM_NOTIFY_AUTH_RESULT No STREAM_NOTIFY_SEVERITY_INFO Yes STREAM_NOTIFY_SEVERITY_WARN Yes STREAM_NOTIFY_SEVERITY_ERR Yes Test script: --- ?php // define our callback method function snc() { var_dump(func_get_args()); } $ctx= stream_context_create(); stream_context_set_params($ctx, array(notification = snc)); $uri= htttp://www.example.net; $socket = stream_socket_client($uri, $errno, $errstr, 0, STREAM_CLIENT_CONNECT, $ctx); // snc should already have been called here for at least connection and resolv. $line =fgets($socket); // get one line. fclose($socket); // close the connection. // Run the above lines and snc() never gets called. Expected result: 1. Update documentation to let developers know the current state of the callback support 2. Have the callback method invoked when using socket streams for the following events (where applicable). Actual result: -- The scn method never gets called. -- Edit bug report at http://bugs.php.net/bug.php?id=52811edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52811r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52811r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52811r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=52811r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52811r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=52811r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=52811r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=52811r=needscript Try newer version: http://bugs.php.net/fix.php?id=52811r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=52811r=support Expected behavior: http://bugs.php.net/fix.php?id=52811r=notwrong Not enough info: http://bugs.php.net/fix.php?id=52811r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=52811r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=52811r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52811r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=52811r=dst IIS Stability: http://bugs.php.net/fix.php?id=52811r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=52811r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=52811r=float No Zend Extensions: http://bugs.php.net/fix.php?id=52811r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=52811r=mysqlcfg
Bug #52637 [Opn]: bug in prepare statement
Edit report at http://bugs.php.net/bug.php?id=52637edit=1 ID: 52637 Updated by: u...@php.net Reported by:angelo dot courtel at laposte dot net Summary:bug in prepare statement Status: Open Type: Bug Package:PDO related Operating System: Debian Lenny PHP Version:5.2.6-1+lenny6 Block user comment: N New Comment: Your //works fine code sample should do exactly nothing because there is no SQL statement run. The SQL statement is commented out. No predifining of any kind should happen. Previous Comments: [2010-09-07 21:44:13] angelo dot courtel at laposte dot net Well, but I want find a way to use a prepared statement, without need to predeclare all paramètres on a sql comment ! It s not a very optimized solution. [2010-09-06 15:13:59] u...@php.net Well, if you comment out your SQL statement, it should work fine regardless what it may look like... -- starts a single line SQL comment. [2010-08-19 10:06:12] angelo dot courtel at laposte dot net A little example for explain my bug : This source works correctly on an Windows WAMP PHP5.2.6 But not on Debian :( ?php //running on PHP Version 5.2.6-1+lenny6 try { $dbh = new PDO('pgsql:host=localhost;port=5432;dbname=db;user=user;password=pass'); } catch (PDOException $e) { echo 'Connexion failed : ' . $e-getMessage();exit; } //list or parameters $id = 40; $id2 = 40; $param = array (':id' = $id, ':id2' = $id2); //query failed $sReq = ' select * from t1 left join t2 on t2.id = :id left join t3 on t3.id = :id where t1.id = :id2'; $rTest1 = $dbh-prepare($sReq); if ($rTest1-execute($param)) echo 'OK'; else var_dump($rTest1-errorInfo()); // -- array(3) { [0]= string(5) 42P18 [1]= int(7) [2]= string(69) ERREUR: n'a pas pu déterminer le type de données du paramètres $2 } $rTest2 = $dbh-prepare($sReq); $rTest2-bindParam(':id', $id); $rTest2-bindParam(':id2', $id2); if ($rTest2-execute()) echo 'OK'; else var_dump($rTest2-errorInfo()); // -- array(3) { [0]= string(5) 42P18 [1]= int(7) [2]= string(69) ERREUR: n'a pas pu déterminer le type de données du paramètres $2 } //query success $sReq = ' -- :id :id2 select * from t1 left join t2 on t2.id = :id left join t3 on t3.id = :id where t1.id = :id2'; $rTest3 = $dbh-prepare($sReq); if ($rTest3-execute($param)) echo 'OK'; else var_dump($rTest3-errorInfo()); // -- OK $rTest4 = $dbh-prepare($sReq); $rTest4-bindParam(':id', $id); $rTest4-bindParam(':id2', $id2); if ($rTest4-execute()) echo 'OK'; else var_dump($rTest4-errorInfo()); // -- OK ? [2010-08-19 06:55:59] angelo dot courtel at laposte dot net Hi, I use PostGreSql Pdo driver Thks [2010-08-19 01:17:32] fel...@php.net What PDO driver are you using? 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/bug.php?id=52637 -- Edit this bug report at http://bugs.php.net/bug.php?id=52637edit=1
Bug #52810 [Opn-Bgs]: substr() and $string[n] corrupt multi-byte UTF-8 strings
Edit report at http://bugs.php.net/bug.php?id=52810edit=1 ID: 52810 Updated by: cataphr...@php.net Reported by:trane at gol dot com Summary:substr() and $string[n] corrupt multi-byte UTF-8 strings -Status: Open +Status: Bogus Type: Bug Package:Strings related Operating System: OS X 10.6.4 PHP Version:Irrelevant Block user comment: N New Comment: This is not a bug. substr and $str[n] or $str{n} treat the string as a byte array. If you want to get the n-th Unicode code point, use mb_substr. Previous Comments: [2010-09-10 12:46:44] trane at gol dot com Description: (PHP 5.3.2 (cli) (built: Aug 7 2010 00:04:41) Copyright (c) 1997-2010 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies) When trying to extract a single character from a UTF-8-encoded Japanese string, instead of the expected character, one gets the dreaded black-diamond-question-mark-of-death. Test script: --- $s_string = é岡ã¯è¸ãæãã§ãã; echo $s_string[3], p /; // expected output is è¸ // actual output is � print_r($s_string[3]); // expected output is è¸ // actual output is � echo p /; $sub = substr($s_string, 3, 1); echo $sub, p /; // expected output is è¸ // actual output is � Expected result: Expected output is è¸ Actual result: -- Actual output is � -- Edit this bug report at http://bugs.php.net/bug.php?id=52810edit=1
Bug #52637 [Opn]: bug in prepare statement
Edit report at http://bugs.php.net/bug.php?id=52637edit=1 ID: 52637 User updated by:angelo dot courtel at laposte dot net Reported by:angelo dot courtel at laposte dot net Summary:bug in prepare statement Status: Open Type: Bug Package:PDO related Operating System: Debian Lenny PHP Version:5.2.6-1+lenny6 Block user comment: N New Comment: I ve commented only first line of my sql statement, not entire statement. Previous Comments: [2010-09-10 13:40:41] u...@php.net Your //works fine code sample should do exactly nothing because there is no SQL statement run. The SQL statement is commented out. No predifining of any kind should happen. [2010-09-07 21:44:13] angelo dot courtel at laposte dot net Well, but I want find a way to use a prepared statement, without need to predeclare all paramètres on a sql comment ! It s not a very optimized solution. [2010-09-06 15:13:59] u...@php.net Well, if you comment out your SQL statement, it should work fine regardless what it may look like... -- starts a single line SQL comment. [2010-08-19 10:06:12] angelo dot courtel at laposte dot net A little example for explain my bug : This source works correctly on an Windows WAMP PHP5.2.6 But not on Debian :( ?php //running on PHP Version 5.2.6-1+lenny6 try { $dbh = new PDO('pgsql:host=localhost;port=5432;dbname=db;user=user;password=pass'); } catch (PDOException $e) { echo 'Connexion failed : ' . $e-getMessage();exit; } //list or parameters $id = 40; $id2 = 40; $param = array (':id' = $id, ':id2' = $id2); //query failed $sReq = ' select * from t1 left join t2 on t2.id = :id left join t3 on t3.id = :id where t1.id = :id2'; $rTest1 = $dbh-prepare($sReq); if ($rTest1-execute($param)) echo 'OK'; else var_dump($rTest1-errorInfo()); // -- array(3) { [0]= string(5) 42P18 [1]= int(7) [2]= string(69) ERREUR: n'a pas pu déterminer le type de données du paramètres $2 } $rTest2 = $dbh-prepare($sReq); $rTest2-bindParam(':id', $id); $rTest2-bindParam(':id2', $id2); if ($rTest2-execute()) echo 'OK'; else var_dump($rTest2-errorInfo()); // -- array(3) { [0]= string(5) 42P18 [1]= int(7) [2]= string(69) ERREUR: n'a pas pu déterminer le type de données du paramètres $2 } //query success $sReq = ' -- :id :id2 select * from t1 left join t2 on t2.id = :id left join t3 on t3.id = :id where t1.id = :id2'; $rTest3 = $dbh-prepare($sReq); if ($rTest3-execute($param)) echo 'OK'; else var_dump($rTest3-errorInfo()); // -- OK $rTest4 = $dbh-prepare($sReq); $rTest4-bindParam(':id', $id); $rTest4-bindParam(':id2', $id2); if ($rTest4-execute()) echo 'OK'; else var_dump($rTest4-errorInfo()); // -- OK ? [2010-08-19 06:55:59] angelo dot courtel at laposte dot net Hi, I use PostGreSql Pdo driver Thks 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/bug.php?id=52637 -- Edit this bug report at http://bugs.php.net/bug.php?id=52637edit=1
Bug #52799 [Com]: Old password authentication with (PDO) MySQL native driver
Edit report at http://bugs.php.net/bug.php?id=52799edit=1 ID: 52799 Comment by: php at diptyque dot net Reported by:php at diptyque dot net Summary:Old password authentication with (PDO) MySQL native driver Status: Bogus Type: Bug Package:PDO related Operating System: FreeBSD PHP Version:5.3.3 Block user comment: N New Comment: Found! [1] IMHO it should also be replicated in the MySQL native driver section [2] [1] http://www.php.net/manual/en/migration53.incompatible.php [2] http://fr.php.net/manual/en/book.mysqlnd.php Previous Comments: [2010-09-08 19:41:44] u...@php.net Thanks for the feedback! I'm quite sure its in the docs. I double check. Closing upon request of the bug reporter. [2010-09-08 19:23:51] php at diptyque dot net Oops, my mistake. Wrote the test script and ext/mysql code cannot effectively connect using old authentication w/ enabled MYSQLND. The ext/mysql code I previously tested wasn't running on the same server (DNS changes for the hostname weren't applied yet; code was still running on the old server platform.) Problem solved. Bogus report. Two alternatives. Either build ext/mysql, ext/mysqli and PDO MySQL w/o MYSQLND option to preserve compatibility with old passwords. Either update all MySQL passwords with enhanced authentication. I believe a note stating that the old authentication scheme is not supported anymore should be added to the MySQL Native Driver manual. [2010-09-08 18:34:09] u...@php.net Because mysqlnd does not support it, ext/mysql - if using mysqlnd - can't support it. Please provide a test script which shows ext/mysql connecting while PDO_MySQL does not. [2010-09-08 18:16:02] php at diptyque dot net Description: Some PHP legacy code no longer works with the 5.3.3 MYSQLND-enabled [1] PDO MySQL driver -- I got 2 warnings and an exception is raised: [07-Sep-2010 14:31:16] PHP Warning: PDO::__construct(): Premature end of data (mysqlnd_wireprotocol.c:554) in /my/path/to/php/auto/append.php on line xx [07-Sep-2010 14:31:16] PHP Warning: PDO::__construct(): OK packet 1 bytes shorter than expected in /my/path/to/php/auto/append.php on line xx Exception says that mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication. This is inconsistent with the behavior of the 5.3.3 MySQL extension built with MYSQLND support: I have even older PHP code that can connect to MySQL 4.1+ using the old insecure authentication scheme (!?) Go figure. Of course, reverting to the PDO MySQL driver w/ classic MySQL client library support works. [1] mysqlnd 5.0.7-dev - 091210 - $Revision: 300533 $ Test script: --- ?php try { $dbh = new PDO($sql-dsn, $sql-username, $sql-password); $dbh-setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } catch (Exception $e) { /* ... */ } // failure ? vs. ?php $dbh = mysql_pconnect( $mysql['hostname'], $mysql['username'], $mysql['password'] ); // success ? Expected result: Why does old password authentication still works with MYSQLND-enabled MySQL extension but not with MYSQLND-enabled PDO MySQL driver? Actual result: -- SQLSTATE[HY000] [2000] mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication. Please use an administration tool to reset your password with the command SET PASSWORD = PASSWORD('your_existing_password'). This will store a new, and more secure, hash value in mysql.user. If this user is used in other scripts executed by PHP 5.2 or earlier you might need to remove the old-passwords flag from your my.cnf file -- Edit this bug report at http://bugs.php.net/bug.php?id=52799edit=1
Bug-Req #51804 [Asn-Csd]: SplFileInfo::getLinkTarget() Fails.
Edit report at http://bugs.php.net/bug.php?id=51804edit=1 ID: 51804 Updated by: paj...@php.net Reported by:v-sumada at microsoft dot com Summary:SplFileInfo::getLinkTarget() Fails. -Status: Assigned +Status: Closed -Type: Bug +Type: Feature/Change Request Package:SPL related Operating System: All Windows OS PHP Version:5.3SVN-2010-05-13 (SVN) Assigned To:pajoye Block user comment: N New Comment: 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/. Thank you for the report, and for helping us make PHP better. Previous Comments: [2010-09-10 16:17:43] paj...@php.net Automatic comment from SVN on behalf of pajoye Revision: http://svn.php.net/viewvc/?view=revisionamp;revision=303258 Log: - Implement bug #51804, splFileInfo::getLinkTarget() on Windows [2010-09-06 17:14:34] paj...@php.net The following patch has been added/updated: Patch Name: add_php_sys_readlink Revision: 1283786074 URL: http://bugs.php.net/patch-display.php?bug=51804patch=add_php_sys_readlinkrevision=1283786074 [2010-08-07 01:56:06] johan...@php.net Pierre, I think you played with symlinks before, can you add the magic needed, here? [2010-05-13 03:36:36] v-sumada at microsoft dot com Description: SplFileInfo::getLinkTarget() fails .we have a filesymlink created for a file (filesymbolic.txt) and tried to read the target of the filesymlink created and it returns an error .This happens for Directory also. When this Function used on accessing symlinks over remote share it returns an error with 'Bad File Descriptor'. Test script: --- ?php $filename = dirname(__FILE__).\\filesymlink; var_dump(file_exists($filename)); $filesyminfo = new SplFileInfo($filename); var_dump($filesyminfo-getLinkTarget()); ? Expected result: bool(true) string(16) filesymbolic.txt Actual result: -- bool(true) Fatal error: Uncaught exception 'RuntimeException' with message 'Unable to read link C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\symlinktodir, error: No such file or directory' in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\getLinkTarget.php:5 Stack trace: #0 C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\getLinkTarget.php(5): SplFileInfo-getLinkTarget() #1 {main} thrown in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\getLinkTarget.php on line 5 -- Edit this bug report at http://bugs.php.net/bug.php?id=51804edit=1
[PHP-BUG] Req #52813 [NEW]: Filter Vars Missing Types (Update Types)
From: Operating system: Irrelevant PHP version: Irrelevant Package: Unknown/Other Function Bug Type: Feature/Change Request Bug description:Filter Vars Missing Types (Update Types) Description: I have been through one of the filter_vars() functions and have found some attributes missing from the list... The documentation states: Returns TRUE for 1, true, on and yes. However I feel this needs to be extended further to allocate two more attributes to be triggered at TRUE there are... T and Y (T = true, Y = Yes) Test script: --- ?php $str = 1; var_dump(filter_var($str, FILTER_VALIDATE_BOOLEAN)); // output: true $str = yes; var_dump(filter_var($str, FILTER_VALIDATE_BOOLEAN)); // output: true $str = on; var_dump(filter_var($str, FILTER_VALIDATE_BOOLEAN)); // output: true $str = true; var_dump(filter_var($str, FILTER_VALIDATE_BOOLEAN)); // output: true // missing (potential bug): $str = t; var_dump(filter_var($str, FILTER_VALIDATE_BOOLEAN)); // output: false (should be true, t = true) $str = y; var_dump(filter_var($str, FILTER_VALIDATE_BOOLEAN)); // output: false (should be true, y = true) -- Edit bug report at http://bugs.php.net/bug.php?id=52813edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52813r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52813r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52813r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=52813r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52813r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=52813r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=52813r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=52813r=needscript Try newer version: http://bugs.php.net/fix.php?id=52813r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=52813r=support Expected behavior: http://bugs.php.net/fix.php?id=52813r=notwrong Not enough info: http://bugs.php.net/fix.php?id=52813r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=52813r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=52813r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52813r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=52813r=dst IIS Stability: http://bugs.php.net/fix.php?id=52813r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=52813r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=52813r=float No Zend Extensions: http://bugs.php.net/fix.php?id=52813r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=52813r=mysqlcfg
Req #52807 [Com]: magic __toArray() for objects
Edit report at http://bugs.php.net/bug.php?id=52807edit=1 ID: 52807 Comment by: jtegwen at gmail dot com Reported by:jtegwen at gmail dot com Summary:magic __toArray() for objects Status: Duplicate Type: Feature/Change Request Package:Class/Object related Operating System: n/a PHP Version:Irrelevant Block user comment: N New Comment: I found that request when researching this one. I read that as casting *to* an object not casting *from* an object. Am I missing something? Previous Comments: [2010-09-10 04:58:39] ahar...@php.net Probably better bundled under request #52583 -- the RFC linked to there is specifically to deal with casting to scalar types, but the syntax suggested in the feature request is general enough to deal with arrays. [2010-09-09 22:33:53] jtegwen at gmail dot com Description: It would be nice to have an analogous method to __toString() for arrays.. maybe __toArray() for customized array return. Test script: --- class myObject { private $data1; private $data2; private $meta1; public function __construct($data1, $data2) { $this-data1 = $data1; $this-data2 = $data2; $this-meta1 = strlen($data1) + strlen($data2); } public function __toArray() { return array('data1'=$this-data1, 'data2'=$this-data2); } } $obj = new myObject('test', 'script'); var_dump($obj); Expected result: array('data1'='test', 'data2'= 'script') Actual result: -- Not implemented -- Edit this bug report at http://bugs.php.net/bug.php?id=52807edit=1
Req #49870 [Ana-Dup]: Installing TS PHP removes non-TS installation of PHP
Edit report at http://bugs.php.net/bug.php?id=49870edit=1 ID: 49870 Updated by: paj...@php.net Reported by:sameer at codecurry dot com Summary:Installing TS PHP removes non-TS installation of PHP -Status: Analyzed +Status: Duplicate Type: Feature/Change Request Package:Windows Installer Operating System: Windows 2008 Server PHP Version:* Assigned To:pajoye Block user comment: N New Comment: Will treated using the bug #50583 Previous Comments: [2009-10-14 08:56:43] paj...@php.net The installer does not support yet multiple install of php. We may support it in a near future, in the meantime you have to install one of them manually. FCGI is the easiest :) [2009-10-14 04:16:43] sameer at codecurry dot com Description: We have been using Apache with PHP. And this new project required developing on IIS+PHP. Issue, is the installing TS version of PHP removes non-TS installation of PHP affecting existing configured servers. I had Apache running with 5.2 and then when setting up IIS7 to run PHP the installer removed the files required by Apache server. Reproduce code: --- no code Expected result: The installer should not tamper the existing installation. Even when choosing to install the non-TS version of PHP, the installer removed the files installed by the previous TS version installer. I have discussed this here as well: http://forums.iis.net/t/1161449.aspx Currently I have IIS and Apache server both running on my Win 2008 x64 version. Actual result: -- Running thread-safe PHP MSI installer removes non-TS installation of PHP and vice-versa. -- Edit this bug report at http://bugs.php.net/bug.php?id=49870edit=1
Bug #49215 [Opn-Csd]: make fails on glob_wrapper
Edit report at http://bugs.php.net/bug.php?id=49215edit=1 ID: 49215 Updated by: fel...@php.net Reported by:jim dot stcyr at gmail dot com Summary:make fails on glob_wrapper -Status: Open +Status: Closed Type: Bug Package:Compile Failure Operating System: RedHat 2.6.9-89.0.3.ELsmp PHP Version:5.3SVN-2009-08-11 (snap) -Assigned To: +Assigned To:felipe Block user comment: N New Comment: 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/. Thank you for the report, and for helping us make PHP better. Previous Comments: [2010-09-10 23:33:52] fel...@php.net Automatic comment from SVN on behalf of felipe Revision: http://svn.php.net/viewvc/?view=revisionamp;revision=303265 Log: - Fixed bug #49215 (make fails on glob_wrapper) [2010-09-01 11:50:48] damien dot gerard at sgcib dot com Still got the same problem with last snapshot: php5.3-201009010830/main/streams/glob_wrapper.c:40: error: expected specifier-qualifier-list before 'glob_t' Red Hat Enterprise Linux Server release 5.4 (Tikanga) gcc version 4.1.2 20080704 (Red Hat 4.1.2-46) [2010-05-09 23:20:42] fel...@php.net Please try using this snapshot: http://snaps.php.net/php5.3-latest.tar.gz For Windows: http://windows.php.net/snapshots/ [2009-11-19 01:58:22] lcmattoso at hotmail dot com Try just rm -f config.cache and your old ./configure params works for me [2009-08-20 01:00:00] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to Open. 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/bug.php?id=49215 -- Edit this bug report at http://bugs.php.net/bug.php?id=49215edit=1
[PHP-BUG] Bug #52814 [NEW]: Using PHPUnit 3.4.15 getMockFromWsdl() causes PHP to segfault
From: Operating system: Ubuntu Linux 10.04 PHP version: 5.3.3 Package: Unknown/Other Function Bug Type: Bug Bug description:Using PHPUnit 3.4.15 getMockFromWsdl() causes PHP to segfault Description: I'm running PHPUnit 3.4.15 (from pear). I use Ubuntu 9.04 and PHP 5.3.2-1ubuntu4.2 with Suhosin-Patch. I have a test in PHPUnit that makes PHP segfault. This could be reproduced on a second Ubuntu system. My colleague tested this on Mac and it works there. I filed the bug at PHPUnit but got redirected here. See: http://github.com/sebastianbergmann/phpunit/issues/issue/19/ I made the segfault dump core, you can find the test and the backtrace below. Please, let me know if you need anything else. Test script: --- $search = $this-getMockFromWsdl( 'http://www.mondialrelay.fr/webservice/Web_Services.asmx?WSDL', 'WSI2_RecherchePointRelais' ); Expected result: PHPUnit 3.4.15 by Sebastian Bergmann. Segmentation fault Actual result: -- GNU gdb (GDB) 7.1-ubuntu Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type show copying and show warranty for details. This GDB was configured as x86_64-linux-gnu. For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/... Reading symbols from /usr/bin/php...(no debugging symbols found)...done. warning: core file may not match specified executable file. [New Thread 10918] warning: Can't read pathname for load map: Input/output error. Reading symbols from /lib/libcrypt.so.1...Reading symbols from /usr/lib/debug/lib/libcrypt-2.11.1.so...done. done. Loaded symbols for /lib/libcrypt.so.1 Reading symbols from /lib/libz.so.1...(no debugging symbols found)...done. Loaded symbols for /lib/libz.so.1 Reading symbols from /usr/lib/libedit.so.2...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libedit.so.2 Reading symbols from /lib/libncurses.so.5...(no debugging symbols found)...done. Loaded symbols for /lib/libncurses.so.5 Reading symbols from /lib/libssl.so.0.9.8...(no debugging symbols found)...done. Loaded symbols for /lib/libssl.so.0.9.8 Reading symbols from /usr/lib/libdb-4.8.so...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libdb-4.8.so Reading symbols from /lib/libbz2.so.1.0...(no debugging symbols found)...done. Loaded symbols for /lib/libbz2.so.1.0 Reading symbols from /lib/libpcre.so.3...(no debugging symbols found)...done. Loaded symbols for /lib/libpcre.so.3 Reading symbols from /lib/librt.so.1...Reading symbols from /usr/lib/debug/lib/librt-2.11.1.so...done. done. Loaded symbols for /lib/librt.so.1 Reading symbols from /lib/libm.so.6...Reading symbols from /usr/lib/debug/lib/libm-2.11.1.so...done. done. Loaded symbols for /lib/libm.so.6 Reading symbols from /lib/libdl.so.2...Reading symbols from /usr/lib/debug/lib/libdl-2.11.1.so...done. done. Loaded symbols for /lib/libdl.so.2 Reading symbols from /lib/libnsl.so.1...Reading symbols from /usr/lib/debug/lib/libnsl-2.11.1.so...done. done. Loaded symbols for /lib/libnsl.so.1 Reading symbols from /usr/lib/libgssapi_krb5.so.2...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libgssapi_krb5.so.2 Reading symbols from /usr/lib/libkrb5.so.3...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libkrb5.so.3 Reading symbols from /usr/lib/libk5crypto.so.3...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libk5crypto.so.3 Reading symbols from /lib/libcom_err.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/libcom_err.so.2 Reading symbols from /usr/lib/libxml2.so.2...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libxml2.so.2 Reading symbols from /lib/libc.so.6...Reading symbols from /usr/lib/debug/lib/libc-2.11.1.so...done. done. Loaded symbols for /lib/libc.so.6 Reading symbols from /lib/libcrypto.so.0.9.8...(no debugging symbols found)...done. Loaded symbols for /lib/libcrypto.so.0.9.8 Reading symbols from /lib/libresolv.so.2...Reading symbols from /usr/lib/debug/lib/libresolv-2.11.1.so...done. done. Loaded symbols for /lib/libresolv.so.2 Reading symbols from /lib/libbsd.so.0...(no debugging symbols found)...done. Loaded symbols for /lib/libbsd.so.0 Reading symbols from /lib/libpthread.so.0...Reading symbols from /usr/lib/debug/lib/libpthread-2.11.1.so...done. done. Loaded symbols for /lib/libpthread.so.0 Reading symbols from /lib64/ld-linux-x86-64.so.2...Reading symbols from /usr/lib/debug/lib/ld-2.11.1.so...done. done. Loaded symbols for /lib64/ld-linux-x86-64.so.2 Reading symbols from /usr/lib/libkrb5support.so.0...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libkrb5support.so.0 Reading symbols
Bug #52814 [Opn-Bgs]: Using PHPUnit 3.4.15 getMockFromWsdl() causes PHP to segfault
Edit report at http://bugs.php.net/bug.php?id=52814edit=1 ID: 52814 Updated by: paj...@php.net Reported by:tom at ctors dot net Summary:Using PHPUnit 3.4.15 getMockFromWsdl() causes PHP to segfault -Status: Open +Status: Bogus Type: Bug Package:Unknown/Other Function Operating System: Ubuntu Linux 10.04 PHP Version:5.3.3 Block user comment: N New Comment: We need a short reproduce script (phpunit is not one :). Also the crash occurs in xdebug, so please report a bug there (pecl.php.net). Not a php bug bogus. Previous Comments: [2010-09-10 23:35:18] tom at ctors dot net Description: I'm running PHPUnit 3.4.15 (from pear). I use Ubuntu 9.04 and PHP 5.3.2-1ubuntu4.2 with Suhosin-Patch. I have a test in PHPUnit that makes PHP segfault. This could be reproduced on a second Ubuntu system. My colleague tested this on Mac and it works there. I filed the bug at PHPUnit but got redirected here. See: http://github.com/sebastianbergmann/phpunit/issues/issue/19/ I made the segfault dump core, you can find the test and the backtrace below. Please, let me know if you need anything else. Test script: --- $search = $this-getMockFromWsdl( 'http://www.mondialrelay.fr/webservice/Web_Services.asmx?WSDL', 'WSI2_RecherchePointRelais' ); Expected result: PHPUnit 3.4.15 by Sebastian Bergmann. Segmentation fault Actual result: -- GNU gdb (GDB) 7.1-ubuntu Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type show copying and show warranty for details. This GDB was configured as x86_64-linux-gnu. For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/... Reading symbols from /usr/bin/php...(no debugging symbols found)...done. warning: core file may not match specified executable file. [New Thread 10918] warning: Can't read pathname for load map: Input/output error. Reading symbols from /lib/libcrypt.so.1...Reading symbols from /usr/lib/debug/lib/libcrypt-2.11.1.so...done. done. Loaded symbols for /lib/libcrypt.so.1 Reading symbols from /lib/libz.so.1...(no debugging symbols found)...done. Loaded symbols for /lib/libz.so.1 Reading symbols from /usr/lib/libedit.so.2...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libedit.so.2 Reading symbols from /lib/libncurses.so.5...(no debugging symbols found)...done. Loaded symbols for /lib/libncurses.so.5 Reading symbols from /lib/libssl.so.0.9.8...(no debugging symbols found)...done. Loaded symbols for /lib/libssl.so.0.9.8 Reading symbols from /usr/lib/libdb-4.8.so...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libdb-4.8.so Reading symbols from /lib/libbz2.so.1.0...(no debugging symbols found)...done. Loaded symbols for /lib/libbz2.so.1.0 Reading symbols from /lib/libpcre.so.3...(no debugging symbols found)...done. Loaded symbols for /lib/libpcre.so.3 Reading symbols from /lib/librt.so.1...Reading symbols from /usr/lib/debug/lib/librt-2.11.1.so...done. done. Loaded symbols for /lib/librt.so.1 Reading symbols from /lib/libm.so.6...Reading symbols from /usr/lib/debug/lib/libm-2.11.1.so...done. done. Loaded symbols for /lib/libm.so.6 Reading symbols from /lib/libdl.so.2...Reading symbols from /usr/lib/debug/lib/libdl-2.11.1.so...done. done. Loaded symbols for /lib/libdl.so.2 Reading symbols from /lib/libnsl.so.1...Reading symbols from /usr/lib/debug/lib/libnsl-2.11.1.so...done. done. Loaded symbols for /lib/libnsl.so.1 Reading symbols from /usr/lib/libgssapi_krb5.so.2...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libgssapi_krb5.so.2 Reading symbols from /usr/lib/libkrb5.so.3...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libkrb5.so.3 Reading symbols from /usr/lib/libk5crypto.so.3...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libk5crypto.so.3 Reading symbols from /lib/libcom_err.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/libcom_err.so.2 Reading symbols from /usr/lib/libxml2.so.2...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libxml2.so.2 Reading symbols from /lib/libc.so.6...Reading symbols from /usr/lib/debug/lib/libc-2.11.1.so...done. done. Loaded symbols for /lib/libc.so.6 Reading symbols from /lib/libcrypto.so.0.9.8...(no debugging symbols found)...done. Loaded symbols for /lib/libcrypto.so.0.9.8 Reading symbols from /lib/libresolv.so.2...Reading symbols from /usr/lib/debug/lib/libresolv-2.11.1.so...done. done. Loaded symbols for /lib/libresolv.so.2 Reading symbols from
Bug #52808 [Asn]: Negative intervals segfault
Edit report at http://bugs.php.net/bug.php?id=52808edit=1 ID: 52808 Updated by: srina...@php.net Reported by:j...@php.net Summary:Negative intervals segfault Status: Assigned Type: Bug Package:Date/time related Operating System: Debian stable PHP Version:trunk-SVN-2010-09-09 (SVN) Assigned To:derick Block user comment: N New Comment: looks like my comment was lost in the previous post while uploading my patch. i was wondering, if dateinterval constructor accepts a general format of date string. looking at the code it does not seem to be as well. manual suggests that you need to provide the input date in format ISO8601 format. for example year 10th may, 2008 would be given as $a = new DateInterval(P2008Y5M11DT15H30M00S); I haven't used this API much.So, I could be wrong. Previous Comments: [2010-09-09 23:45:25] j...@php.net Description: Creating an interval with a negative duration (i.e., start date precedes end date) creates what appears to be a valid DateInterval object, but any attempt to work with the object results in a segfault. Test script: --- ?php $a = new DateInterval(2008-05-11T15:30:00Z/2007-03-01T13:00:00Z); var_dump($a); ? Expected result: At a minimum, Not crashing. Ideally, a DateInterval object with a negative duration, but I don't know of ISO-8601 allows those. Actual result: -- (gdb) r -r '$a = new DateInterval(2008-05-11T15:30:00Z/2007-03-01T13:00:00Z); var_dump($a);' Program received signal SIGSEGV, Segmentation fault. 0x00420faf in date_object_get_properties_interval (object=value optimized out) at /home/joey/src/php/trunk/ext/date/php_date.c:2242 2242PHP_DATE_INTERVAL_ADD_PROPERTY(y, y); bt full output available at http://codepad.org/on7ZS6Qd -- Edit this bug report at http://bugs.php.net/bug.php?id=52808edit=1