Req #48352 [Com]: Method registerNodeClass does not work with DOMNodeList
Edit report at https://bugs.php.net/bug.php?id=48352edit=1 ID: 48352 Comment by: troelskn at gmail dot com Reported by:php at xxlwebdesign dot de Summary:Method registerNodeClass does not work with DOMNodeList Status: Assigned Type: Feature/Change Request Package:DOM XML related Operating System: Gentoo PHP Version:5.3CVS-2009-05-21 (snap) Assigned To:rrichards Block user comment: N Private report: N New Comment: @kroccamen While not that elegant, you can create a decorator to solve this issue. Here's a template to use: class MyDomElement extends DOMElement { function xpath($query) { return new DomNodeListDecorator($this-ownerDocument-getXpathSelector()- query($query, $this)); } } class DomNodeListDecorator implements IteratorAggregate { protected $nodeList; function __construct($nodeList) { $this-nodeList = $nodeList; } function getIterator() { return $this-nodeList; } function __get($name) { if ($name == 'length') { return $this-nodeList-length; } throw new Exception(Undefined attribute {$name}); } function item($index) { return $this-nodeList-item($index); } } Previous Comments: [2012-01-03 13:40:12] kroccamen at gmail dot com Iâd like to provide a valid use-case for this bug. I have created an extended DOMDocument that upon __construct also creates an XPath object, that way I can add methods to DOMElement to allow for DOMElement-xpath ('...') instead of using DOMXPath-query ('...', DOMNode). This makes the DOM more chainable and simpler to use without so many temporary variables. What I want to do is extend DOMNodeList so that one function call can apply to all nodes returned from an XPath query, e.g. DOMNode-xpath ('a')-addClass ('link'); Is anybody aware of any other work around that can be used to achieve this same effect? [2011-01-08 05:17:47] mat at homedvd dot ca Any movement on this? The method should probably be called registerNodeListClass [2010-02-15 02:45:10] mail at r-site dot net very helpfull, extending DOMNode's almost implies it, pls hurry, ty [2009-09-20 21:17:12] goetas at lignano dot it this would be really helpful! [2009-05-22 12:53:55] php at xxlwebdesign dot de This would be very nice! 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=48352 -- Edit this bug report at https://bugs.php.net/bug.php?id=48352edit=1
#48990 [Opn-Bgs]: get_magic_quotes_gpc returns true (int 1)
ID: 48990 User updated by: troelskn at gmail dot com Reported By: troelskn at gmail dot com -Status: Open +Status: Bogus Bug Type: PHP options/info functions Operating System: linux PHP Version: 5.3.0 New Comment: Not sure what is going on here, but I've gotten my hands on another build of 5.3 and it doesn't exhibit this behaviour. In any case, I have confused the meaning of magic_quotes_runtime. I'm closing this until I can figure out why I was getting deprecated warnings on my own build of php. Previous Comments: [2009-07-20 19:39:40] troelskn at gmail dot com Description: magic quotes has been deprecated from 5.3 If there is no configuration setting for magic_quotes, the function get_magic_quotes_gpc will return true (int 1). This leads some scripts to believe that magic quotes is on, while they are not. Reproduce code: --- $ php --version PHP 5.3.0 (cli) (built: Jul 19 2009 02:23:09) Copyright (c) 1997-2009 The PHP Group $ php -r 'var_dump(get_magic_quotes_gpc());' int(1) $ php -r 'var_dump(get_magic_quotes_runtime());' int(0) -- Edit this bug report at http://bugs.php.net/?id=48990edit=1
#48990 [NEW]: get_magic_quotes_gpc returns true (int 1)
From: troelskn at gmail dot com Operating system: linux PHP version: 5.3.0 PHP Bug Type: *Configuration Issues Bug description: get_magic_quotes_gpc returns true (int 1) Description: magic quotes has been deprecated from 5.3 If there is no configuration setting for magic_quotes, the function get_magic_quotes_gpc will return true (int 1). This leads some scripts to believe that magic quotes is on, while they are not. Reproduce code: --- $ php --version PHP 5.3.0 (cli) (built: Jul 19 2009 02:23:09) Copyright (c) 1997-2009 The PHP Group $ php -r 'var_dump(get_magic_quotes_gpc());' int(1) $ php -r 'var_dump(get_magic_quotes_runtime());' int(0) -- Edit bug report at http://bugs.php.net/?id=48990edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48990r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48990r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48990r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=48990r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=48990r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=48990r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=48990r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=48990r=needscript Try newer version: http://bugs.php.net/fix.php?id=48990r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=48990r=support Expected behavior: http://bugs.php.net/fix.php?id=48990r=notwrong Not enough info: http://bugs.php.net/fix.php?id=48990r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=48990r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=48990r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48990r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=48990r=dst IIS Stability: http://bugs.php.net/fix.php?id=48990r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=48990r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=48990r=float No Zend Extensions: http://bugs.php.net/fix.php?id=48990r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=48990r=mysqlcfg
#48979 [NEW]: pear2\Pyrus\XMLParser\Exception: Invalid XML document in phar
From: troelskn at gmail dot com Operating system: linux PHP version: 5.3.0 PHP Bug Type: Unknown/Other Function Bug description: pear2\Pyrus\XMLParser\Exception: Invalid XML document in phar Description: I have the current version of pyrus from http://svn.pear.php.net/PEAR2/all When I run pyrus.phar, I get an error. Reproduce code: --- t...@tkn-laptop ~ $ /usr/local/src/pear2-svn/PEAR2/Pyrus/pyrus.phar Pyrus version 2.0.0a1 SHA-1: C9AA2DD926908265A2A5AE96542E9E0CD1071F81 Using PEAR installation found at /home/tkn/pyrus Unable to add all custom roles/tasks/commands: pear2\Pyrus\XMLParser\Exception: Invalid XML document in phar:///usr/local/src/pear2-svn/PEAR2/Pyrus/pyrus.phar/PEAR2_Pyrus-2.0.0a1/php/pear2/Pyrus/XMLParser.php on line 80 pear2\Pyrus\XMLParser\Exception: Line 1: Extra content at the end of the document in phar:///usr/local/src/pear2-svn/PEAR2/Pyrus/pyrus.phar/PEAR2_Pyrus-2.0.0a1/php/pear2/Pyrus/XMLParser.php on line 80 #0 phar:///usr/local/src/pear2-svn/PEAR2/Pyrus/pyrus.phar/PEAR2_Pyrus-2.0.0a1/php/pear2/Pyrus/XMLParser.php(80): pear2\Pyrus\XMLParser-_parse('/home/tkn/.pear...', 'phar:///usr/loc...', true) #1 phar:///usr/local/src/pear2-svn/PEAR2/Pyrus/pyrus.phar/PEAR2_Pyrus-2.0.0a1/php/pear2/Pyrus/PluginRegistry.php(92): pear2\Pyrus\XMLParser-parse('/home/tkn/.pear...', 'phar:///usr/loc...') #2 phar:///usr/local/src/pear2-svn/PEAR2/Pyrus/pyrus.phar/PEAR2_Pyrus-2.0.0a1/php/pear2/Pyrus/ScriptFrontend/Commands.php(246): pear2\Pyrus\PluginRegistry-scan() #3 /usr/local/src/pear2-svn/PEAR2/Pyrus/pyrus.phar(37): pear2\Pyrus\ScriptFrontend\Commands-run(Array) #4 {main} Pyrus, the installer for PEAR2 Usage: php pyrus [/path/to/pear] [options] php pyrus [/path/to/pear] [options] command [options] [args] ...snip... -- Edit bug report at http://bugs.php.net/?id=48979edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48979r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48979r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48979r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=48979r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=48979r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=48979r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=48979r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=48979r=needscript Try newer version: http://bugs.php.net/fix.php?id=48979r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=48979r=support Expected behavior: http://bugs.php.net/fix.php?id=48979r=notwrong Not enough info: http://bugs.php.net/fix.php?id=48979r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=48979r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=48979r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48979r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=48979r=dst IIS Stability: http://bugs.php.net/fix.php?id=48979r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=48979r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=48979r=float No Zend Extensions: http://bugs.php.net/fix.php?id=48979r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=48979r=mysqlcfg
#48979 [Opn-Bgs]: pear2\Pyrus\XMLParser\Exception: Invalid XML document in phar
ID: 48979 User updated by: troelskn at gmail dot com Reported By: troelskn at gmail dot com -Status: Open +Status: Bogus Bug Type: Unknown/Other Function Operating System: linux PHP Version: 5.3.0 New Comment: I've forwarded this issue to pear-dev instead. Previous Comments: [2009-07-19 22:03:10] troelskn at gmail dot com Description: I have the current version of pyrus from http://svn.pear.php.net/PEAR2/all When I run pyrus.phar, I get an error. Reproduce code: --- t...@tkn-laptop ~ $ /usr/local/src/pear2-svn/PEAR2/Pyrus/pyrus.phar Pyrus version 2.0.0a1 SHA-1: C9AA2DD926908265A2A5AE96542E9E0CD1071F81 Using PEAR installation found at /home/tkn/pyrus Unable to add all custom roles/tasks/commands: pear2\Pyrus\XMLParser\Exception: Invalid XML document in phar:///usr/local/src/pear2-svn/PEAR2/Pyrus/pyrus.phar/PEAR2_Pyrus-2.0.0a1/php/pear2/Pyrus/XMLParser.php on line 80 pear2\Pyrus\XMLParser\Exception: Line 1: Extra content at the end of the document in phar:///usr/local/src/pear2-svn/PEAR2/Pyrus/pyrus.phar/PEAR2_Pyrus-2.0.0a1/php/pear2/Pyrus/XMLParser.php on line 80 #0 phar:///usr/local/src/pear2-svn/PEAR2/Pyrus/pyrus.phar/PEAR2_Pyrus-2.0.0a1/php/pear2/Pyrus/XMLParser.php(80): pear2\Pyrus\XMLParser-_parse('/home/tkn/.pear...', 'phar:///usr/loc...', true) #1 phar:///usr/local/src/pear2-svn/PEAR2/Pyrus/pyrus.phar/PEAR2_Pyrus-2.0.0a1/php/pear2/Pyrus/PluginRegistry.php(92): pear2\Pyrus\XMLParser-parse('/home/tkn/.pear...', 'phar:///usr/loc...') #2 phar:///usr/local/src/pear2-svn/PEAR2/Pyrus/pyrus.phar/PEAR2_Pyrus-2.0.0a1/php/pear2/Pyrus/ScriptFrontend/Commands.php(246): pear2\Pyrus\PluginRegistry-scan() #3 /usr/local/src/pear2-svn/PEAR2/Pyrus/pyrus.phar(37): pear2\Pyrus\ScriptFrontend\Commands-run(Array) #4 {main} Pyrus, the installer for PEAR2 Usage: php pyrus [/path/to/pear] [options] php pyrus [/path/to/pear] [options] command [options] [args] ...snip... -- Edit this bug report at http://bugs.php.net/?id=48979edit=1
#46344 [Fbk-Opn]: Possible memory-leak. autoload not always called
ID: 46344 User updated by: troelskn at gmail dot com Reported By: troelskn at gmail dot com -Status: Feedback +Status: Open -Bug Type: SPL related +Bug Type: Unknown/Other Function Operating System: FreeBSD 7.0-RELEASE-p5 PHP Version: 5.2.6 New Comment: I'm not able to reduce the script any further. The behaviour is affected by the code, even when it shouldn't. For example, if I comment out line 13, the behaviour changes, even though this particular line is never executed. Currently, we're just using the latest ports version from bsd. I'll see if I can try without Suhosin, but this is our production server, so I'll have to barter with our Sysadm about recompiling PHP. Since I submitted the bug, I removed the use of spl_autoload_register and replaced with __autoload. This made the bug disappear in this test-script, but I later discovered it elsewhere in the system. This suggests that it has nothing to do with SPL. I'm sorry I can't be more specific -- this is a very evasive bug. Previous Comments: [2008-10-21 00:27:10] [EMAIL PROTECTED] 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 ?php and ends 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 please reduce the reproduce script as short as possible ? Also, try without suhosin and see if you can still reproduce it. [2008-10-20 11:40:47] troelskn at gmail dot com Description: After upgrading to a new server, we started seeing very inexplicable bugs in the system. I *think* I traced it down to the autoload functionality. In some situations, the autoloader doesn't seem to be triggered. Reproducing the bug is extremely hard; If I alter the code of the classloader, the error goes away. Also, I can't reproduce it on other systems. I am not sure if this is a problem with SPL, with PHP or perhaps with PDO, but my guess is that spl_autoload_register somehow allocates memory for the callback wrongly, allowing other code to overwrite it. Full system details follows: $ php --version PHP 5.2.6 with Suhosin-Patch 0.9.6.2 (cli) (built: Aug 29 2008 10:03:19) Copyright (c) 1997-2008 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies $ uname -a FreeBSD xxx.xxx.dk 7.0-RELEASE-p5 FreeBSD 7.0-RELEASE-p5 #0: Wed Oct 1 07:51:58 UTC 2008 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/GENERIC amd64 Reproduce code: --- http://pastebin.com/f4625a564 In addition, you need a file datadictionary.php, containing: class DataDictionary {} Expected result: OK .. class has loaded Actual result: -- PHP Fatal error: Class 'DataDictionary' not found in /usr/home/tkn/test.php on line 89 -- Edit this bug report at http://bugs.php.net/?id=46344edit=1
#46344 [NEW]: Possible memory-leak. autoload not always called
From: troelskn at gmail dot com Operating system: FreeBSD 7.0-RELEASE-p5 PHP version: 5.2.6 PHP Bug Type: SPL related Bug description: Possible memory-leak. autoload not always called Description: After upgrading to a new server, we started seeing very inexplicable bugs in the system. I *think* I traced it down to the autoload functionality. In some situations, the autoloader doesn't seem to be triggered. Reproducing the bug is extremely hard; If I alter the code of the classloader, the error goes away. Also, I can't reproduce it on other systems. I am not sure if this is a problem with SPL, with PHP or perhaps with PDO, but my guess is that spl_autoload_register somehow allocates memory for the callback wrongly, allowing other code to overwrite it. Full system details follows: $ php --version PHP 5.2.6 with Suhosin-Patch 0.9.6.2 (cli) (built: Aug 29 2008 10:03:19) Copyright (c) 1997-2008 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies $ uname -a FreeBSD xxx.xxx.dk 7.0-RELEASE-p5 FreeBSD 7.0-RELEASE-p5 #0: Wed Oct 1 07:51:58 UTC 2008 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/GENERIC amd64 Reproduce code: --- http://pastebin.com/f4625a564 In addition, you need a file datadictionary.php, containing: class DataDictionary {} Expected result: OK .. class has loaded Actual result: -- PHP Fatal error: Class 'DataDictionary' not found in /usr/home/tkn/test.php on line 89 -- Edit bug report at http://bugs.php.net/?id=46344edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46344r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46344r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46344r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46344r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=46344r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46344r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=46344r=needscript Try newer version:http://bugs.php.net/fix.php?id=46344r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46344r=support Expected behavior:http://bugs.php.net/fix.php?id=46344r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46344r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46344r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46344r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46344r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=46344r=dst IIS Stability:http://bugs.php.net/fix.php?id=46344r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46344r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46344r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46344r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=46344r=mysqlcfg
#41457 [NEW]: Quoted fields come back corrupted, using GROUP BY
From: troelskn at gmail dot com Operating system: windows xp PHP version: 5.2.2 PHP Bug Type: SQLite related Bug description: Quoted fields come back corrupted, using GROUP BY Description: When executing a query, where field names are quoted, and using GROUP BY, the field names are returned with quotes around. This error may very well be in sqlite, and not with PHP, but I have no way of verifying that hunch. Using SQLite: SQLite support = enabled PECL Module version = 2.0-dev $Id: sqlite.c,v 1.166.2.13.2.7 2007/03/06 02:17:13 stas Exp $ SQLite Library = 2.8.17 SQLite Encoding = iso8859 Reproduce code: --- ?php $db = sqlite_open(:memory:); sqlite_query($db, ' CREATE TABLE test ( id INTEGER PRIMARY KEY ) '); sqlite_query($db, INSERT INTO test (id) VALUES (1)); $result = sqlite_query($db, 'SELECT id FROM test GROUP BY id'); var_dump(sqlite_fetch_array($result, SQLITE_ASSOC)); Expected result: array(1) { [id]= string(1) 1 } Actual result: -- array(1) { [id]= string(1) 1 } -- Edit bug report at http://bugs.php.net/?id=41457edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41457r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41457r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41457r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=41457r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=41457r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=41457r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=41457r=needscript Try newer version:http://bugs.php.net/fix.php?id=41457r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=41457r=support Expected behavior:http://bugs.php.net/fix.php?id=41457r=notwrong Not enough info: http://bugs.php.net/fix.php?id=41457r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=41457r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=41457r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41457r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=41457r=dst IIS Stability:http://bugs.php.net/fix.php?id=41457r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=41457r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=41457r=float No Zend Extensions: http://bugs.php.net/fix.php?id=41457r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=41457r=mysqlcfg
#39144 [Fbk-Opn]: curl session non-existing file:// corrupts php session
ID: 39144 User updated by: troelskn at gmail dot com Reported By: troelskn at gmail dot com -Status: Feedback +Status: Open Bug Type: cURL related Operating System: windows xp PHP Version: 5.1.6 New Comment: My bad. I didn't update the extensions dir string in php.ini, so it still used my old php_curl.dll. I tried changing this to use the ext dir of the snapshot, and I disabled all other extensions. Now I get the following error (in apache error log) : PHP Warning: PHP Startup: curl: Unable to initialize module\nModule compiled with module API=20060613, debug=0, thread-safety=1\nPHP compiled with module API=20050922, debug=0, thread-safety=1\nThese options need to match\n in Unknown on line 0 As I couldn't get the snapshot to work with php5apache2.dll, I replaced it with php5apache2_2.dll. Maybe this is the reason why curl fails ? I'm using apache 2.2.2 Previous Comments: [2006-10-14 13:09:05] [EMAIL PROTECTED] That's what I did. [2006-10-14 13:01:36] troelskn at gmail dot com You have to reload the page one time to trigger the error. It doesn't happen on first load. [2006-10-13 14:57:24] [EMAIL PROTECTED] This code doesn't produce any errors here. In fact, it doesn't produce anything at all. [2006-10-13 14:45:34] troelskn at gmail dot com Same. You have to hit refresh a single time to trigger the error. [2006-10-13 10:26:26] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.2-win32-latest.zip The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/39144 -- Edit this bug report at http://bugs.php.net/?id=39144edit=1
#39144 [Fbk-Opn]: curl session non-existing file:// corrupts php session
ID: 39144 User updated by: troelskn at gmail dot com Reported By: troelskn at gmail dot com -Status: Feedback +Status: Open Bug Type: cURL related Operating System: windows xp PHP Version: 5.1.6 New Comment: I tried removing the old installation of php - still the same error. My old installation of apache/php has the following line in httpd.conf : LoadModule php5_module c:/apache/php5/php5apache2.dll This doesn't work with the snapshot. I replaced it with : LoadModule php5_module c:/apache/php5/php5apache2_2.dll Does this make any difference ? Previous Comments: [2006-10-15 10:04:48] [EMAIL PROTECTED] Please make sure you've removed all .dll's from the previous PHP installation, including php5ts.dll and reinstall PHP once again. The error message means that you're trying to load a newly compiled module with old PHP (php5ts.dll). [2006-10-15 09:46:01] troelskn at gmail dot com My bad. I didn't update the extensions dir string in php.ini, so it still used my old php_curl.dll. I tried changing this to use the ext dir of the snapshot, and I disabled all other extensions. Now I get the following error (in apache error log) : PHP Warning: PHP Startup: curl: Unable to initialize module\nModule compiled with module API=20060613, debug=0, thread-safety=1\nPHP compiled with module API=20050922, debug=0, thread-safety=1\nThese options need to match\n in Unknown on line 0 As I couldn't get the snapshot to work with php5apache2.dll, I replaced it with php5apache2_2.dll. Maybe this is the reason why curl fails ? I'm using apache 2.2.2 [2006-10-14 13:09:05] [EMAIL PROTECTED] That's what I did. [2006-10-14 13:01:36] troelskn at gmail dot com You have to reload the page one time to trigger the error. It doesn't happen on first load. [2006-10-13 14:57:24] [EMAIL PROTECTED] This code doesn't produce any errors here. In fact, it doesn't produce anything at all. 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/39144 -- Edit this bug report at http://bugs.php.net/?id=39144edit=1
#39144 [Fbk-Opn]: curl session non-existing file:// corrupts php session
ID: 39144 User updated by: troelskn at gmail dot com Reported By: troelskn at gmail dot com -Status: Feedback +Status: Open Bug Type: cURL related Operating System: windows xp PHP Version: 5.1.6 New Comment: You have to reload the page one time to trigger the error. It doesn't happen on first load. Previous Comments: [2006-10-13 14:57:24] [EMAIL PROTECTED] This code doesn't produce any errors here. In fact, it doesn't produce anything at all. [2006-10-13 14:45:34] troelskn at gmail dot com Same. You have to hit refresh a single time to trigger the error. [2006-10-13 10:26:26] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.2-win32-latest.zip [2006-10-13 10:08:43] troelskn at gmail dot com Description: Opening a curl session to non-existing file over the file:// protocol corrupts php's session handler. Reproduce code: --- ?php session_start(); $ch = curl_init(file://C:/filedoesntexist.txt); if ($ch != NULL) { $data = curl_exec($ch); curl_close($ch); } session_write_close(); exit; Expected result: nothing Actual result: -- Warning: session_write_close() [function.session-write-close]: write failed: Bad file descriptor (9) in C:\apache\htdocs\curltest.php on line 8 Call Stack # FunctionLocation 1 {main}()C:\apache\htdocs\curltest.php:0 2 session_write_close () C:\apache\htdocs\curltest.php:8 Warning: session_write_close() [function.session-write-close]: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (C:\Programmer\nusphere\phped\php5\sessions) in C:\apache\htdocs\curltest.php on line 8 Call Stack # FunctionLocation 1 {main}()C:\apache\htdocs\curltest.php:0 2 session_write_close () C:\apache\htdocs\curltest.php:8 -- Edit this bug report at http://bugs.php.net/?id=39144edit=1
#39144 [NEW]: curl session non-existing file:// corrupts php session
From: troelskn at gmail dot com Operating system: windows xp PHP version: 5.1.6 PHP Bug Type: cURL related Bug description: curl session non-existing file:// corrupts php session Description: Opening a curl session to non-existing file over the file:// protocol corrupts php's session handler. Reproduce code: --- ?php session_start(); $ch = curl_init(file://C:/filedoesntexist.txt); if ($ch != NULL) { $data = curl_exec($ch); curl_close($ch); } session_write_close(); exit; Expected result: nothing Actual result: -- Warning: session_write_close() [function.session-write-close]: write failed: Bad file descriptor (9) in C:\apache\htdocs\curltest.php on line 8 Call Stack # FunctionLocation 1 {main}()C:\apache\htdocs\curltest.php:0 2 session_write_close () C:\apache\htdocs\curltest.php:8 Warning: session_write_close() [function.session-write-close]: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (C:\Programmer\nusphere\phped\php5\sessions) in C:\apache\htdocs\curltest.php on line 8 Call Stack # FunctionLocation 1 {main}()C:\apache\htdocs\curltest.php:0 2 session_write_close () C:\apache\htdocs\curltest.php:8 -- Edit bug report at http://bugs.php.net/?id=39144edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39144r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39144r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39144r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=39144r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=39144r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=39144r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=39144r=needscript Try newer version:http://bugs.php.net/fix.php?id=39144r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=39144r=support Expected behavior:http://bugs.php.net/fix.php?id=39144r=notwrong Not enough info: http://bugs.php.net/fix.php?id=39144r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=39144r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=39144r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39144r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=39144r=dst IIS Stability:http://bugs.php.net/fix.php?id=39144r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=39144r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=39144r=float No Zend Extensions: http://bugs.php.net/fix.php?id=39144r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=39144r=mysqlcfg
#39144 [Fbk-Opn]: curl session non-existing file:// corrupts php session
ID: 39144 User updated by: troelskn at gmail dot com Reported By: troelskn at gmail dot com -Status: Feedback +Status: Open Bug Type: cURL related Operating System: windows xp PHP Version: 5.1.6 New Comment: Same. You have to hit refresh a single time to trigger the error. Previous Comments: [2006-10-13 10:26:26] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.2-win32-latest.zip [2006-10-13 10:08:43] troelskn at gmail dot com Description: Opening a curl session to non-existing file over the file:// protocol corrupts php's session handler. Reproduce code: --- ?php session_start(); $ch = curl_init(file://C:/filedoesntexist.txt); if ($ch != NULL) { $data = curl_exec($ch); curl_close($ch); } session_write_close(); exit; Expected result: nothing Actual result: -- Warning: session_write_close() [function.session-write-close]: write failed: Bad file descriptor (9) in C:\apache\htdocs\curltest.php on line 8 Call Stack # FunctionLocation 1 {main}()C:\apache\htdocs\curltest.php:0 2 session_write_close () C:\apache\htdocs\curltest.php:8 Warning: session_write_close() [function.session-write-close]: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (C:\Programmer\nusphere\phped\php5\sessions) in C:\apache\htdocs\curltest.php on line 8 Call Stack # FunctionLocation 1 {main}()C:\apache\htdocs\curltest.php:0 2 session_write_close () C:\apache\htdocs\curltest.php:8 -- Edit this bug report at http://bugs.php.net/?id=39144edit=1
#37167 [NEW]: PDO::FETCH_FUNC doesn't work with a callback
From: troelskn at gmail dot com Operating system: * PHP version: 5.1.2 PHP Bug Type: PDO related Bug description: PDO::FETCH_FUNC doesn't work with a callback Description: Using PDO::FETCH_FUNC with fetchAll() only works with a function. It would be nice if it worked with a normal callback type (as in call_user_func and others). If this can't be fixed, the error message must be changed, since General error: user-supplied function must be a valid callback is misleading. -- Edit bug report at http://bugs.php.net/?id=37167edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37167r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=37167r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37167r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=37167r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=37167r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=37167r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=37167r=needscript Try newer version:http://bugs.php.net/fix.php?id=37167r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=37167r=support Expected behavior:http://bugs.php.net/fix.php?id=37167r=notwrong Not enough info: http://bugs.php.net/fix.php?id=37167r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=37167r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=37167r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37167r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=37167r=dst IIS Stability:http://bugs.php.net/fix.php?id=37167r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=37167r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=37167r=float No Zend Extensions: http://bugs.php.net/fix.php?id=37167r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=37167r=mysqlcfg
#37167 [Fbk-Opn]: PDO::FETCH_FUNC doesn't work with a callback
ID: 37167 User updated by: troelskn at gmail dot com Reported By: troelskn at gmail dot com -Status: Feedback +Status: Open Bug Type: PDO related Operating System: * PHP Version: 5.1.2 New Comment: Reproduce code: --- ?php class Test { protected $connection; function __construct() { $this-connection = new PDO(sqlite::memory:); $this-connection-setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $this-connection-setAttribute(PDO::ATTR_CASE, PDO::CASE_LOWER); $this-connection-query(CREATE TABLE test (a integer primary key)); $this-connection-query(INSERT INTO test VALUES (22)); } function select() { $query = SELECT * FROM test; $result = $this-connection-query($query); return $result-fetchAll(PDO::FETCH_FUNC, Array($this, 'loadRecord')); } function loadRecord($row) { return new ArrayObject($row); } } $test = new Test(); var_dump($test-select()); ? Expected result: no error Actual result: -- Apache crashes. Previous Comments: [2006-04-22 17:44:55] [EMAIL PROTECTED] 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 ?php and ends with ?, is max. 10-20 lines long and does not require any external resources such as databases, etc. If possible, make the script source available online and provide an URL to it here. Try to avoid embedding huge scripts into the report. [2006-04-22 15:30:52] troelskn at gmail dot com Description: Using PDO::FETCH_FUNC with fetchAll() only works with a function. It would be nice if it worked with a normal callback type (as in call_user_func and others). If this can't be fixed, the error message must be changed, since General error: user-supplied function must be a valid callback is misleading. -- Edit this bug report at http://bugs.php.net/?id=37167edit=1
#37154 [NEW]: All strings input must be utf8-encoded
From: troelskn at gmail dot com Operating system: * PHP version: 5.1.2 PHP Bug Type: DOM XML related Bug description: All strings input must be utf8-encoded Description: After some digging around and experimentation, I have found out that the DOM extension needs all input strings to be utf8-encoded. This means that any code using the extension must be spingled with urf8_encode. The problem can probably not be fixed without breaking backward compatibility, so the most sane choice may be to leave it, but atleast update the documentation to state this. -- Edit bug report at http://bugs.php.net/?id=37154edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37154r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=37154r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37154r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=37154r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=37154r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=37154r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=37154r=needscript Try newer version:http://bugs.php.net/fix.php?id=37154r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=37154r=support Expected behavior:http://bugs.php.net/fix.php?id=37154r=notwrong Not enough info: http://bugs.php.net/fix.php?id=37154r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=37154r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=37154r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37154r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=37154r=dst IIS Stability:http://bugs.php.net/fix.php?id=37154r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=37154r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=37154r=float No Zend Extensions: http://bugs.php.net/fix.php?id=37154r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=37154r=mysqlcfg
#37154 [Bgs]: All strings input must be utf8-encoded
ID: 37154 User updated by: troelskn at gmail dot com Reported By: troelskn at gmail dot com Status: Bogus Bug Type: DOM XML related Operating System: * PHP Version: 5.1.2 New Comment: Not true. $mb_detect_charsets = ASCII,UTF-8,ISO-8859-1; $dom = new DOMDocument(1.0, UTF-8); $doc = $dom-appendChild($dom-createElement(document)); $doc-appendChild($dom-createTextNode(utf8_encode(Iñtërnâtiônàlizætiøn))); echo mb_detect_encoding($dom-saveXML(), $mb_detect_charsets) . br; $dom = new DOMDocument(1.0, ISO-8859-1); $doc = $dom-appendChild($dom-createElement(document)); $doc-appendChild($dom-createTextNode(utf8_encode(Iñtërnâtiônàlizætiøn))); echo mb_detect_encoding($dom-saveXML(), $mb_detect_charsets) . br; --- outputs : UTF-8 ISO-8859-1 --- Removing ut8_encode crashes the second example. Previous Comments: [2006-04-21 15:02:53] [EMAIL PROTECTED] Wrong. The *default* input encoding is UTF8. But you can always use ?xml version=1.0 encoding=your encoding?. All the result data are in UTF8 anyway, this is libxml2 feature. [2006-04-21 14:37:34] troelskn at gmail dot com Description: After some digging around and experimentation, I have found out that the DOM extension needs all input strings to be utf8-encoded. This means that any code using the extension must be spingled with urf8_encode. The problem can probably not be fixed without breaking backward compatibility, so the most sane choice may be to leave it, but atleast update the documentation to state this. -- Edit this bug report at http://bugs.php.net/?id=37154edit=1
#37149 [NEW]: is_array doesn't return TRUE on ArrayObject
From: troelskn at gmail dot com Operating system: Any PHP version: 5.1.2 PHP Bug Type: SPL related Bug description: is_array doesn't return TRUE on ArrayObject Description: Using is_array() on an instance of ArrayObject returns FALSE. While strictly speaking this is true, it would make sense to return TRUE in most application-level code. Expected result: A solution could be to add an argument to is_array, which relaxes the check to include ArrayObject. Eg. : bool is_array ( mixed var, [bool strict] ) $obj = new ArrayObject(); is_array($obj, FALSE); // returns TRUE is_array($obj); // returns FALSE -- Edit bug report at http://bugs.php.net/?id=37149edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37149r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=37149r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37149r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=37149r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=37149r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=37149r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=37149r=needscript Try newer version:http://bugs.php.net/fix.php?id=37149r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=37149r=support Expected behavior:http://bugs.php.net/fix.php?id=37149r=notwrong Not enough info: http://bugs.php.net/fix.php?id=37149r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=37149r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=37149r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37149r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=37149r=dst IIS Stability:http://bugs.php.net/fix.php?id=37149r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=37149r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=37149r=float No Zend Extensions: http://bugs.php.net/fix.php?id=37149r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=37149r=mysqlcfg
#37149 [Bgs-Opn]: is_array doesn't return TRUE on ArrayObject
ID: 37149 User updated by: troelskn at gmail dot com Reported By: troelskn at gmail dot com -Status: Bogus +Status: Open -Bug Type: SPL related +Bug Type: Feature/Change Request Operating System: * PHP Version: * Assigned To: helly New Comment: I has the interface of an array. Thus, in a logical sense it _is_ an array. Changed the category to Feature/Change Request. Previous Comments: [2006-04-20 18:18:30] [EMAIL PROTECTED] Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php it is an object not an array, use instanceof ArrayAccess [2006-04-20 16:14:44] troelskn at gmail dot com Description: Using is_array() on an instance of ArrayObject returns FALSE. While strictly speaking this is true, it would make sense to return TRUE in most application-level code. Expected result: A solution could be to add an argument to is_array, which relaxes the check to include ArrayObject. Eg. : bool is_array ( mixed var, [bool strict] ) $obj = new ArrayObject(); is_array($obj, FALSE); // returns TRUE is_array($obj); // returns FALSE -- Edit this bug report at http://bugs.php.net/?id=37149edit=1