#42042 [NEW]: SNMP func's Access Violation if query is timed out.
From: andy_wolk at mail dot ru Operating system: Windows Server 2003 SP2 PHP version: 5.2.3 PHP Bug Type: SNMP related Bug description: SNMP func's Access Violation if query is timed out. Description: 2xXeon(4 cores)= 8 cores + SAS-RAID1 + 2GB MEM Windows 2003 SP2 Enterprise PHP "5.2.2 dev" IIS ISAPI. "PHP has encountered an Access Violation at 02A0B741" if snmp func is timed out. After php.ini->"default_socket_timeout" -> 60 -> All OK! (Default = 3) But if i will use SNMP func's with timeout parameter, less than php.ini 60sec, for instance 0.5 sec 50, bug will appear once again. -- Edit bug report at http://bugs.php.net/?id=42042&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42042&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42042&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42042&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=42042&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=42042&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=42042&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=42042&r=needscript Try newer version:http://bugs.php.net/fix.php?id=42042&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=42042&r=support Expected behavior:http://bugs.php.net/fix.php?id=42042&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=42042&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=42042&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=42042&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42042&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=42042&r=dst IIS Stability:http://bugs.php.net/fix.php?id=42042&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=42042&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=42042&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=42042&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=42042&r=mysqlcfg
#42041 [NEW]: zend_language_scanner.c: No such file or directory
From: ceo at l-i-e dot com Operating system: Gentoo Linux PHP version: 5.2.3 PHP Bug Type: Compile Failure Bug description: zend_language_scanner.c: No such file or directory Description: Compiling from CVS. buildconf seemed to go okay... I'm using: autoconf: 2.13 automake: 1.5 libtool: 1.4.3 as documented here: http://www.php.net/anoncvs.php Though the version numbers of autoconf, automake, and libtool seem irrelevant, as I get the same results with current (according to Gentoo portage tree) versions... Reproduce code: --- Everything from here to the ./configure line may be irrelevant... On Gentoo, I used: emerge automake emerge autoconf emerge wget Then use wget to download libtool-1.4.3 from ftp.gnu.org wget installer requires newer auto[mumble] than php requires. :-( Usual source compile of libtool, since Gentoo has no libtool-1.4.3 in its portage tree. tar -xzvf libtool-1.4.3.tar.gz cd libtool-1.4.3 ./configure make make install Then, you have to symlink /usr/bin/libtool to /usr/local/bin/libtool, and I presumed it would be good to do libtoolize as well, so I did. emerge --unmerge autoconf emerge --unmerge automake emerge =autoconf-2.13 emerge =automake-1.5 Whew. This may or may not be Gentoo build specific, so all the preceding may be irrelevant... Grab -r PHP_5_2 from CVS. ./buildconf ./configure \ --enable-fastcgi \ --enable-debug \ --with-pgsql \ --disable-xml \ --disable-libxml \ --disable-simplexml \ --disable-xmlreader \ --disable-exmlwriter \ --disable-dom \ --without-pear make I really wanted to K.I.S.S. and have just PostgreSQL for this particular build. Expected result: The usual output of make, which I forgot what it is, even though I've seen it dozens of times. Actual result: -- php5/Zend/zend_language_scanner.c: No such file or directory -- Edit bug report at http://bugs.php.net/?id=42041&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42041&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42041&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42041&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=42041&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=42041&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=42041&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=42041&r=needscript Try newer version:http://bugs.php.net/fix.php?id=42041&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=42041&r=support Expected behavior:http://bugs.php.net/fix.php?id=42041&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=42041&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=42041&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=42041&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42041&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=42041&r=dst IIS Stability:http://bugs.php.net/fix.php?id=42041&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=42041&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=42041&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=42041&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=42041&r=mysqlcfg
#42039 [Opn->Bgs]: item function read xml
ID: 42039 Updated by: [EMAIL PROTECTED] Reported By: ichigoxi at gmail dot com -Status: Open +Status: Bogus Bug Type: *XML functions Operating System: ubuntu/linux PHP Version: 5.2.3 New Comment: Please read how DOM works. There are Textnodes between your Elements, which also count as items, so ->item(1) would be the a element in your example and item(3) the b element. I'd advise you to use xpath for much more accurate pinpointing of nodes... Previous Comments: [2007-07-19 03:04:51] ichigoxi at gmail dot com Description: like this xml---> 11 1 0 $dom = new DOMDocument(); $dom->load('test.xml'); $root = $dom->documentElement; $items = $root->childNodes; $item = $items->item(0); $itemChildren = $item->childNodes; $b = $itemChildren->item(1); echo $b->nodeValue; this code can not read $b from the xml but this xml--> 1110 the code can read $b -- Edit this bug report at http://bugs.php.net/?id=42039&edit=1
#42040 [NEW]: cURL cookiejar resets default timezone to GMT
From: lkc at pobox dot sk Operating system: Windows PHP version: 5.2.3 PHP Bug Type: cURL related Bug description: cURL cookiejar resets default timezone to GMT Description: Using cURL with COOKIEJAR option resets timezone setting to GMT. This only occurs if: 1. The default timezone is set using date.timezone in php.ini, NOT through date_default_timezone_set(). 2. The cookie file contains timestamp(s). Reproduce code: --- echo date_default_timezone_get(), "\n"; $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_COOKIEJAR, "cookie.txt"); curl_setopt($ch, CURLOPT_URL, "http://www.google.com";); $f = curl_exec($ch); curl_close($ch); echo date_default_timezone_get(), "\n"; Expected result: Show identical timezones. Actual result: -- Second timezone is always GMT. -- Edit bug report at http://bugs.php.net/?id=42040&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42040&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42040&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42040&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=42040&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=42040&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=42040&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=42040&r=needscript Try newer version:http://bugs.php.net/fix.php?id=42040&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=42040&r=support Expected behavior:http://bugs.php.net/fix.php?id=42040&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=42040&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=42040&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=42040&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42040&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=42040&r=dst IIS Stability:http://bugs.php.net/fix.php?id=42040&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=42040&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=42040&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=42040&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=42040&r=mysqlcfg
#42038 [Opn]: realpath doesn't resolve symbolic link
ID: 42038 User updated by: kraghuba at in dot ibm dot com Reported By: kraghuba at in dot ibm dot com Status: Open Bug Type: Filesystem function related -Operating System: MacOSX +Operating System: MacOSX, FreeBSD PHP Version: 5CVS-2007-07-18 (snap) New Comment: The reference to testcase symlink_link_linkinfo_is_link_variation6.phpt is wrong. The write testcases to check are : ext/standard/tests/file/readlink_realpath_basic1.phpt ext/standard/tests/file/readlink_realpath_variation1.phpt ext/standard/tests/file/readlink_realpath_variation2.phpt The similar failure is also noticed on FreeBSD. (FreeBSD - FreeBSD lindsay.php.is 6.2-STABLE FreeBSD 6.2-STABLE #1: Thu Jun 28 22:12:54 CEST 2007 ) MACOSX details: Darwin - Darwin thought 8.10.1 Darwin Kernel Version 8.10.1: Wed May 23 16:33:00 PDT 2007; root:xnu-792.22.5~1/RELEASE_I386 i386 Previous Comments: [2007-07-18 17:16:51] kraghuba at in dot ibm dot com Description: realpath() doesn't resolve symlink and returns the link file name when input path is a link path. As per the documentation at http://in.php.net/manual/en/function.realpath.php, The resulting path will have no symbolic link, '/./' or '/../' components. Applicable to php5.2.4 only on MacOS X. Please check testcase symlink_link_linkinfo_is_link_variation6.phpt. Reproduce code: --- Expected result: string(%d) "%s/file.tmp" Actual result: -- string(%d) "%s/link.tmp" -- Edit this bug report at http://bugs.php.net/?id=42038&edit=1
#33011 [Asn]: [PATCH] shmop: can still open segment for reading after shmop_delete
ID: 33011 Updated by: [EMAIL PROTECTED] Reported By: joe at bs0 dot com Status: Assigned Bug Type: Semaphore related Operating System: win32 only PHP Version: 5.0.4, 4.3.11 Assigned To: iliaa New Comment: Just noting two things: one, the patch is no longer online and two, Ilia doesn't really 'do' Windows any more. I looked at it but don't have time to play right now, not least because I don't have a current copy of PHP on board. I _think_ it probably just needs a flag setting in shmctl() (in tsrm_win32.c) when it's called from shmop_delete() - not sure. Something like: shm->descriptor->shm_perm.mode = IPC_EXCL; - but again not sure, there's a copy flying around there somewhere. I'd need to test. Previous Comments: [2007-07-13 20:55:38] jmccaskey at gmail dot com I'm experiencing this same issue on PHP 5.2.2 under Apache 2 on windows. How is it that this issue was opened years ago and is not fixed? [2006-04-15 16:43:52] piotrprz at gmail dot com PHP 5.1.2 still has this bug: apache2/php5.1.2 on windows xp [2005-11-07 00:03:11] [EMAIL PROTECTED] Ilia, have you checked the patch in this report yet? [2005-05-19 23:33:39] joe at bs0 dot com patch:http://www.bs0.com/~joe/php/tsrm/tsrm_win32.diff complete: http://www.bs0.com/~joe/php/tsrm/tsrm_win32.c changes: http://www.bs0.com/~joe/php/tsrm/changes.txt [2005-05-15 02:34:02] joe at bs0 dot com as short as I can make it: "; } else { echo "shared memory block marked for deletion."; } shmop_close($shm_id); echo 'block closed.'; $shm_id = shmop_open(0xff3, "a", 0, 0); if($shm_id) { $data = shmop_read($shm_id, 0, $shm_len); shmop_close($shm_id); echo 'ERROR: Previously deleted block able to be opened.'; echo 'Data read : "' . $data . '"'; } else { echo 'Could not open previously deleted block.'; } ?> 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/33011 -- Edit this bug report at http://bugs.php.net/?id=33011&edit=1
#42039 [NEW]: item function read xml
From: ichigoxi at gmail dot com Operating system: ubuntu/linux PHP version: 5.2.3 PHP Bug Type: *XML functions Bug description: item function read xml Description: like this xml---> 11 1 0 $dom = new DOMDocument(); $dom->load('test.xml'); $root = $dom->documentElement; $items = $root->childNodes; $item = $items->item(0); $itemChildren = $item->childNodes; $b = $itemChildren->item(1); echo $b->nodeValue; this code can not read $b from the xml but this xml--> 1110 the code can read $b -- Edit bug report at http://bugs.php.net/?id=42039&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42039&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42039&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42039&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=42039&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=42039&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=42039&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=42039&r=needscript Try newer version:http://bugs.php.net/fix.php?id=42039&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=42039&r=support Expected behavior:http://bugs.php.net/fix.php?id=42039&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=42039&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=42039&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=42039&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42039&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=42039&r=dst IIS Stability:http://bugs.php.net/fix.php?id=42039&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=42039&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=42039&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=42039&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=42039&r=mysqlcfg
#41677 [Com]: Cannot redeclare found after allowed memory exhausted
ID: 41677 Comment by: leo dot geoffrion at sgs dot com Reported By: bobson at rpg dot pl Status: No Feedback Bug Type: Unknown/Other Function Operating System: Linux Gentoo PHP Version: 5.2.3 New Comment: I am encountering the same memory exceeded error message using a script that was known solid on V5.2.0. The basic script runs an Oracle query, waits for the results and stores them into a mysql table. It initially died at the default 128M max_memory. I edited php.ini to raise the max to 256M and same script died with same problem: Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 16 bytes) in ... Environment is Apache2.2.4, Oracle client 10.2.1, mysql 5.0.45, php 5.2.3 Previous Comments: [2007-07-03 01:00:02] 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". [2007-06-25 18:55:02] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi [2007-06-18 10:06:34] bobson at rpg dot pl No. There's no additional zend extensions, xcache or optymizers. Pure PHP5 from gentoo emerge. [2007-06-16 03:02:39] phpbugs at thequod dot de Are you using an opcode cache like xcache, Zend Optimizer, eaccelerator, etc? [2007-06-13 10:34:50] bobson at rpg dot pl Description: I provide this issue as php5.2.3 because it probaby can be noticed on this version too (dont found bugfix in changelog). My configuration is lighttpd + php (on FastCGI). PHP from getnoo emerge (PHP 5.2.2-pl1-gentoo). First apears: PHP Fatal error: Allowed memory size of 18874368 bytes exhausted (tried to allocate 7881777 bytes) in /var/www/sites/partner/deny/lib/new/global_session_handing.php on line 171 (yes, there was bug) After that php start to show such message: PHP Fatal error: Cannot redeclare clearme() in /var/www/sites/partner/index.php on line 6 clearme() is simple function with if's and unset() for unset some vars if exists. So... I move function clearme() a several line (still first in file). PHP said: PHP Fatal error: Cannot redeclare clearme() (previously declared in /var/www/sites/partner/index.php:7) in /var/www/sites/partner/index.php on line 19 ( line 19 is end "}" of clearme() ) Then I move other simple function to begin of file, PHP said: PHP Fatal error: Cannot redeclare translatebeforeregexping() (previously declared in /var/www/sites/partner/index.php:23) in /var/www/sites/partner/index.php on line 18 How "previously declared" line can be higher than declaration line? When I require_once() library used in problematic script to simple php file - PHP shows: Cannot redeclare h2_ajaxvarencode() in /usr/local/share/php/wdgHarvest3_HA/harvest_addons.php on line 4 (this is first function in this lib) Sorry for not attaching code of index.php - copyright issues :/ There is no self inclusions. Function is first declaration in file. After lighttpd restart problem disappear (is this pointing to some kind of interpreter stack problem?). There is hard to makes case study code reproducing this problem. -- Edit this bug report at http://bugs.php.net/?id=41677&edit=1
#41350 [Com]: Error in my_thread_global_end()
ID: 41350 Comment by: aaronbair at hotmail dot com Reported By: graham at directhostinguk dot com Status: Assigned Bug Type: MySQL related Operating System: Windows 2003 PHP Version: 5.2.3 Assigned To: scottmac New Comment: CLI and FAST-CGI can not handle persistent MySQL connections. How can an unloaded processes remember a connection? Turn that option off in php.ini and the error goes away. mysql.allow_persistent = Off The real problem here is that this option is set On in php.ini-recommended Previous Comments: [2007-07-13 10:16:00] [EMAIL PROTECTED] So that we won't forget. http://server.macvicar.net/patches/php-bug41350.patch [2007-06-28 10:02:15] chris at crgs dot co dot uk Scott is already aware of this, but I tried the snapshot from 12:30 27-06-2007 and it didn't fix the problem. However this might be because the fix from the MySQL bug is necessary as well, and currently the PHP snapshots contain libmysql.dll from PHP 5.0.37 rather than 5.0.45 (which is apparently the one we need). We may need to wait for MySQL to release their new version, and for the new libmysql.dll to make its way across to PHP, before the bug will be 'properly' fixed. [2007-06-26 12:00:57] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi I've committed a fix that should have resolved this. [2007-06-26 11:38:18] maxfm at abv dot bg Just go to the end of php.ini Change: [PHP_MYSQL] extension=php_mysql.dll to: ;[PHP_MYSQL] ;extension=php_mysql.dll Then go to: ;extension=php_mysql.dll and enable it: extension=php_mysql.dll [2007-06-24 09:37:28] ysangkok at gmail dot com I'm experiencing the same problem with 5.2.3. Using CGI on IIS5. I fixed it by using the dll from 5.2.1. 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/41350 -- Edit this bug report at http://bugs.php.net/?id=41350&edit=1
#42020 [Opn->Fbk]: curl_multi_select causes php to fail, silently
ID: 42020 Updated by: [EMAIL PROTECTED] Reported By: adz999 at yahoo dot co dot uk -Status: Open +Status: Feedback Bug Type: cURL related Operating System: Free BSD (i386) PHP Version: 5.2.3 New Comment: Ask the webhoster to test it for you? Previous Comments: [2007-07-18 13:03:46] adz999 at yahoo dot co dot uk ...and so I can't install the latest version anyway (on the webhost). [2007-07-18 13:02:23] adz999 at yahoo dot co dot uk Apologies for my ignorance, and noob-ness but I downloaded the cvs snapshot and I have no idea what to do with it!! The bug only occurs on my webhost's server (BSD on i386) and not on my own server (OS X) despite having the same php version. [2007-07-17 19:06:59] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi [2007-07-17 18:58:24] adz999 at yahoo dot co dot uk Some of my submission did not post properly: The "Reproduce code" section should have this at the end: print "4"; The "Expected result" section should continue: ...to loop around again, and therefore print out "2" regardless of whether it then went on to execute curl_multi_exec. [2007-07-17 18:47:26] adz999 at yahoo dot co dot uk Description: I am using (a slight variation of) the user-contributed example on this page:http://uk2.php.net/manual/en/function.curl-multi-exec.php. Sometimes it works and sometimes it causes php to fail, without displaying any error notice (error reporting set to E_WARNING). I cannot work out what it is that causes it to fail or not fail, but if I run the same requests on the script multiple times it behaves the same every time. By getting php to print a message between each line of code I have narrowed the problem down to this line: if (curl_multi_select($mh) != -1) This is the php info for the server: http://phpinfo.hostultra.com/ The problem does NOT occur when the script is executed on my local testing server (Mac OS X 10.4.8, PHP 5.2.1). Reproduce code: --- "; while (@ob_end_flush()); while (@flush()); do { $mrc = curl_multi_exec($mh, $active); } while ($mrc == CURLM_CALL_MULTI_PERFORM && $active>0 && microtime(1)<$time); print "1"; while (@ob_end_flush()); while (@flush()); while ($active>0 and $mrc == CURLM_OK && microtime(1)<$time){ print "2"; while (@ob_end_flush()); while (@flush()); //this gets printed out fine // wait for network if (curl_multi_select($mh) != -1){ // pull in any new data, or at least handle timeouts do { print "3"; while (@ob_end_flush()); while (@flush()); //php never gets this far $mrc = curl_multi_exec($mh, $active); } while ($mrc == CURLM_CALL_MULTI_PERFORM && $active>0 && microtime(1)<$time); } }//end while Expected result: If curl_multi_select($mh) was equal to -1 then I would expect the while loop while ($active>0 and $mrc == CURLM_OK && microtime(1)<$time) Actual result: -- PHP outputs: got as far as executing the curl stuff 1 2 ...and then it stops. The connection to the browser is no longer active. That's it, it just stops there and does no more. No error message. Even if I change the line if (curl_multi_select($mh) != -1) to just if (curl_multi_select($mh)) the result is exactly the same -- Edit this bug report at http://bugs.php.net/?id=42020&edit=1
#41976 [Opn->Csd]: json_encode() ignores CDATA in SimpleXML data
ID: 41976 Updated by: [EMAIL PROTECTED] Reported By: stefan dot priebsch at e-novative dot de -Status: Open +Status: Closed Bug Type: JSON related Operating System: WinXP PHP Version: 5.2.3 New Comment: In latest CVS given proper string casts the code returns the expected: string(4) "test" string(6) ""test"" string(4) "test" string(6) ""test"" output. Previous Comments: [2007-07-18 15:59:55] stefan dot priebsch at e-novative dot de Ok, the problem: I have a SimpleXML object that I want to convert to JSON using json_encode(). According to the manual, json_encode() works on all types. As soon as there is CDATA in the XML, that very node shows up as "" in the JSON encoding. Remove the CDATA section, everything works. Thus I claim that json_encode() does not work properly on CDATA, which I consider a bug. [2007-07-18 08:52:18] [EMAIL PROTECTED] Don't use such texts for 'Summary'. Please write something that describes the problem.. [2007-07-17 19:09:53] stefan dot priebsch at e-novative dot de Johannes, would you please care to actually *read* and try to *understand* my bug report before marking it as bogus? My point is that json_encode() works properly with nested XML, but does NOT work correctly when the nested XML contains CDATA. [2007-07-17 12:36:14] [EMAIL PROTECTED] $xml and (string)$xml are different things. Using different things as arguments for a function gives different results. [2007-07-17 10:46:38] stefan dot priebsch at e-novative dot de I re-opened the bug due to the discussion of bug #42001. json_encode() does not work on nested XML with a string cast, but it does work without a string cast. (Of course except for the CDATA problem that made me file this bug in the first place.) $xml = new SimpleXMLElement('testvaluesomething'); var_dump(json_encode($xml)); var_dump(json_encode((string) $xml)); $xml = new SimpleXMLElement('valuesomething'); var_dump(json_encode($xml)); var_dump(json_encode((string) $xml)); 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/41976 -- Edit this bug report at http://bugs.php.net/?id=41976&edit=1
#42038 [NEW]: realpath doesn't resolve symbolic link
From: kraghuba at in dot ibm dot com Operating system: MACOSX PHP version: 5CVS-2007-07-18 (snap) PHP Bug Type: Filesystem function related Bug description: realpath doesn't resolve symbolic link Description: realpath() doesn't resolve symlink and returns the link file name when input path is a link path. As per the documentation at http://in.php.net/manual/en/function.realpath.php, The resulting path will have no symbolic link, '/./' or '/../' components. Applicable to php5.2.4 only on MacOS X. Please check testcase symlink_link_linkinfo_is_link_variation6.phpt. Reproduce code: --- Expected result: string(%d) "%s/file.tmp" Actual result: -- string(%d) "%s/link.tmp" -- Edit bug report at http://bugs.php.net/?id=42038&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42038&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42038&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42038&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=42038&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=42038&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=42038&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=42038&r=needscript Try newer version:http://bugs.php.net/fix.php?id=42038&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=42038&r=support Expected behavior:http://bugs.php.net/fix.php?id=42038&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=42038&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=42038&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=42038&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42038&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=42038&r=dst IIS Stability:http://bugs.php.net/fix.php?id=42038&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=42038&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=42038&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=42038&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=42038&r=mysqlcfg
#42036 [NEW]: fgetc() sets end of the file flag when reading on write only file
From: kraghuba at in dot ibm dot com Operating system: RHEL 5 PHP version: 5CVS-2007-07-18 (snap) PHP Bug Type: Filesystem function related Bug description: fgetc() sets end of the file flag when reading on write only file Description: fgetc() sets the end of the file flag to ture when reading from a file which opened in write only mode. This failure is applicable on php5 and php6 php version: PHP 6.0.0-dev (cli) (built: Jul 18 2007 20:53:03) (GCOV) Copyright (c) 1997-2007 The PHP Group Zend Engine v3.0.0-dev, Copyright (c) 1998-2007 Zend Technologies & PHP 5.2.4-dev (cli) (built: Jul 18 2007 20:49:53) (GCOV) Copyright (c) 1997-2007 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies OS : RHEL 5 configure setup: ./configure --enable-gcov Reproduce code: --- Expected result: output - php5: -- int(4) bool(true) int(0) bool(false) bool(false) int(0) bool(false) output - php6: -- int(4) bool(true) int(0) bool(false) bool(false) int(0) bool(false) Actual result: -- output - php5: -- int(4) bool(true) int(0) bool(false) bool(false) int(0) bool(true) output - php6: -- int(4) bool(true) int(0) bool(false) string(1) "" int(0) bool(true) output on php6 when run using run-test.php : int(4) bool(true) int(0) bool(false) string(1) "ÿ" int(0) bool(true) -- Edit bug report at http://bugs.php.net/?id=42036&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42036&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42036&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42036&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=42036&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=42036&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=42036&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=42036&r=needscript Try newer version:http://bugs.php.net/fix.php?id=42036&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=42036&r=support Expected behavior:http://bugs.php.net/fix.php?id=42036&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=42036&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=42036&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=42036&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42036&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=42036&r=dst IIS Stability:http://bugs.php.net/fix.php?id=42036&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=42036&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=42036&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=42036&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=42036&r=mysqlcfg
#42037 [NEW]: fgetc() retuns one char when fails to read on php6
From: kraghuba at in dot ibm dot com Operating system: RHEL 5 PHP version: 6CVS-2007-07-18 (snap) PHP Bug Type: Filesystem function related Bug description: fgetc() retuns one char when fails to read on php6 Description: fgets() returns a charecter when it fails to read from file because of following reasons: 1. file pointer already points to end of the file(file opened in mode) 2. File is opened in the write only mode Only applicable to php6. PHP Version: PHP 6.0.0-dev (cli) (built: Jul 18 2007 20:53:03) (GCOV) Copyright (c) 1997-2007 The PHP Group Zend Engine v3.0.0-dev, Copyright (c) 1998-2007 Zend Technologies OS: RHEL 5 Config : ./configure --enable-gcov Reproduce code: --- Expected result: bool(true) int(0) bool(false) bool(false) int(0) bool(false) bool(false) Actual result: -- bool(true) int(0) bool(false) string(1) "" int(0) bool(true) string(1) "" output when run using run-test.php: --- bool(true) int(0) bool(false) string(1) "ÿ" int(0) bool(true) string(1) "ÿ" -- Edit bug report at http://bugs.php.net/?id=42037&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42037&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42037&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42037&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=42037&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=42037&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=42037&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=42037&r=needscript Try newer version:http://bugs.php.net/fix.php?id=42037&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=42037&r=support Expected behavior:http://bugs.php.net/fix.php?id=42037&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=42037&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=42037&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=42037&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42037&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=42037&r=dst IIS Stability:http://bugs.php.net/fix.php?id=42037&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=42037&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=42037&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=42037&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=42037&r=mysqlcfg
#42026 [Opn->Bgs]: Incorrect handling of default namespaces
ID: 42026 Updated by: [EMAIL PROTECTED] Reported By: mail_ben_schmidt at yahoo dot com dot au -Status: Open +Status: Bogus Bug Type: SimpleXML related Operating System: Mac OS X PHP Version: 5.2.3 / 5CVS New Comment: Please don't use the bug system as discussion board. Use email for that. :) Previous Comments: [2007-07-18 16:01:29] mail_ben_schmidt at yahoo dot com dot au (And apologies for opening the bug again, as you have clearly indicated you consider it bogus; wasn't sure whether you'd see my comment if I didn't, though, and keen to discuss it further.) [2007-07-18 15:59:30] mail_ben_schmidt at yahoo dot com dot au Hmmm. OK. I've had a little look at the sources and a little think about the problem as well as a related one which I sent a post to the php.xml.dev newsgroup about, asking a question. Here are some thoughts: 1. Although I believe the current behaviour is definitely wrong, it seems like others may not agree, though I would hope the majority would, because IMHO it has pretty serious implications and undermines the whole notion of the semantics of XML documents and their namespaces. 2. I can see that there are possibly benefits to not checking namespaces, e.g. for efficiency. And also that it may well 'just work' most of the time. It may be wise to at least document the current behaviour, to avoid confusion of others. 3. A another look at the XML namespace spec and I see what you mean about attribute names. I was confused by this sentence in the spec, which I took to mean that an attribute defaulted to the namespace of the element containing it: "Default namespace declarations do not apply directly to attribute names; the interpretation of unprefixed attributes is determined by the element on which they appear." But it is contradicted in the paragraph following it, so it must mean something else, but I can't for the life of me figure out what! 4. Another, more subtle issue is that an XML application is likely to want to deal with one particular namespace regularly throughout its work with an XML document, regardless of whether the XML author chose to make it the default namespace or not. 5. I was also interested in the behaviour described in http://www.onlamp.com/pub/a/php/2004/01/15/simplexml.html?page=2 of a beta version of SimpleXML. It seems to me that this would be quite useful, despite the risks. And if you know the details of the documents you are dealing with, you can evaluate the risks anyway. 6. The upshot of all this is that I think a solution to all these problems could be defining two new methods: setElementNamespaceMode($ns,$is_prefix) setAttributeNamespaceMode($ns,$is_prefix) This would set the namespace for all lookups, iterations, etc. 'from that point onwards'. The behaviour I want could be signalled by passing some constant that evaluates to an internal, illegal namespace name. The current behaviour could be signalled by set...NamespaceMode('',true) to check for an empty prefix (or another constant). Another magic constant could enable an 'ignore namespaces and return everything' behaviour like the beta. And of course a specific namespace could be set by passing it in directly. And you could switch namespaces by calling the methods multiple times. The namespace mode should be stored with the instance the method is called upon and propagated to instances derived from it (I mean returned by it, one way or another, whether by property lookup, array index, iteration, whatever). This means things like this would work: $bunch_of_elems->set...NamespaceMode('a'); foreach ($bunch_of_elems as $elem) { ... do_something_including_changing_namespace_to_b($elem); ... // a is still the namespace mode of $elem, presuming $elem // wasn't passed by reference to the function above, // and also the namespace mode of $bunch_of_elems for the // next iteration of the foreach. } 7. I should also say that in general, I think the SimpleXML extension is wonderful. Definitely has lots of potential. But I think it could be significantly more useful with this addition and have a lot more applications. 8. I would be willing to have a go implementing this, but I would probably benefit from a little guidance, as I have never done anything with Zend or Libxml before. And I haven't done all that much with XML and its namespaces before, either! But pretty much all the stuff I need is already in the SimpleXML source; it just needs a little rearranging and some control flow statements around. It looks like just editing it shouldn't be too steep a learning curve. 9. A bug report probably isn't the best place to have a discussion like this. Should we move it elsewhere? If you are willing to discuss further, that is. I'm quite exc
#42033 [Opn->Bgs]: configure failed (GD)
ID: 42033 Updated by: [EMAIL PROTECTED] Reported By: sh_tanaka at mail dot goo dot ne dot jp -Status: Open +Status: Bogus Bug Type: Compile Failure Operating System: freebsd 6.2 PHP Version: 6CVS-2007-07-18 (snap) -Assigned To: +Assigned To: pajoye New Comment: The development packages are required to compile PHP with GD. That being said, I strongly suggest you to use: "--with-gd" without any option so the bundled version will be used. I close this bug (not a bug > bogus) as I think you did not install the devel pkgs. Feel free to reopen it if it is not the case. Previous Comments: [2007-07-18 15:34:55] sh_tanaka at mail dot goo dot ne dot jp Description: Configure failed when I use not bundled GD '--with-gd=/usr/local' ==> fail. message is configure: error: gdlib-config not found. '--with-gd' ==> succeed. gd package version is gd-2.0.34_1,1 A graphics library for fast creation of images Reproduce code: --- $'./configure' \ '--with-apxs2=/usr/local/apache2/bin/apxs' \ '--with-gd=/usr/local' \ '--with-jpeg-dir=/usr/local' \ '--with-png-dir=/usr/local' \ '--enable-gd-native-ttf' \ '--enable-mbstring' \ '--enable-mbstr-enc-trans' \ '--enable-mbregex' \ '--enable-zend-multibyte' \ '--with-zlib' \ '--with-imap' \ '--with-imap-ssl' \ '--with-freetype-dir=/usr/local' \ '--enable-gd-jis-conv' Actual result: -- . . ommited . checking for FreeType 2... /usr/local checking for T1lib support... no checking whether to enable truetype string function in GD... yes checking whether to enable JIS-mapped Japanese font support in GD... yes configure: error: gdlib-config not found. $ -- Edit this bug report at http://bugs.php.net/?id=42033&edit=1
#42034 [NEW]: Attributes not deleted properly
From: mail_ben_schmidt at yahoo dot com dot au Operating system: Mac OS X PHP version: 5CVS-2007-07-18 (snap) PHP Bug Type: SimpleXML related Bug description: Attributes not deleted properly Description: In SimpleXML, when deleting attributes via 'unset', attributes having the same namespace as the element (or some such wrong namespace) are deleted rather than the non-prefixed one which is the one actually appearing in the 'array' (or not appearing--it can still be deleted if it does not appear). Reproduce code: --- $str=<< http://localhost/a"; xmlns:ns="http://localhost/a"; xmlns:other="http://localhost/b"; > DONE; $xml = simplexml_load_string($str); foreach ($xml->elem as $elem) { unset($elem['attr']); } foreach ($xml->children('http://localhost/a')->elem as $elem) { unset($elem['attr']); } foreach ($xml->children('http://localhost/b')->elem as $elem) { unset($elem['attr']); } echo $xml->asXML(); Expected result: http://localhost/a"; xmlns:ns="http://localhost/a"; xmlns:other="http://localhost/b";> Actual result: -- http://localhost/a"; xmlns:ns="http://localhost/a"; xmlns:other="http://localhost/b";> -- Edit bug report at http://bugs.php.net/?id=42034&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42034&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42034&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42034&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=42034&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=42034&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=42034&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=42034&r=needscript Try newer version:http://bugs.php.net/fix.php?id=42034&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=42034&r=support Expected behavior:http://bugs.php.net/fix.php?id=42034&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=42034&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=42034&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=42034&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42034&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=42034&r=dst IIS Stability:http://bugs.php.net/fix.php?id=42034&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=42034&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=42034&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=42034&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=42034&r=mysqlcfg
#41874 [Asn]: Separate STDOUT and STDERR in exec functions
ID: 41874 User updated by: ckeefer at us dot nomura dot com Reported By: ckeefer at us dot nomura dot com Status: Assigned Bug Type: Feature/Change Request Operating System: Windows XP Pro SP2 PHP Version: 5.2CVS-2007-07-03 Assigned To: jani New Comment: I don't actually see how this is an improvement as output was only mixed if you don't redirect, which is expected. If I do something like php progname.php > logfile.txt, I would previously redirect STDIN to the logfile as expected and stderr would still come to the console so I could monitor the program's progress. This is the usual behavior in shell programs, etc. This is how cmd line php was working through version 5.21. 5.22 on changed behavior in that from Win32, the STDERR disappears completely. If you can tell me where STDERR went and how to get to it from exec, I will happily do that. I have hundreds (if not thousands) of php scripts that do this. This new behavior breaks all of them. If I do php progname.php 2>&1 > logfile.txt, even if this works, I get mixed STDIN and STDERR output in the logfile.txt. This will force me to either stay at version 5.21 or earlier, or revise every script we have that currently uses the exec function. Again I ask: Did anything change with the compiler or other development tools used to create the Window Binary? Microsoft has been known to modify libraries in undocumented ways. Thanks Chip Keefer Previous Comments: [2007-07-18 14:55:27] [EMAIL PROTECTED] Since this is actually improvement from previous behaviour where the output was mixed, I'm changing this to a FR. I'll look into adding an extra parameter to store STDERR in. In the meantime I suggest you use proc_open() or popen() which give you more control over these.. [2007-07-18 13:01:40] ckeefer at us dot nomura dot com >Oddly, 5.2.2+ versions still work correctly with cygwin/bash 3.1 Using the same Win32 binary, not a Cygwin binary. To [EMAIL PROTECTED]: That is a good suggestion for just getting STDERR output and I use it often on Unix and Linux systems when I need, and don't care if outputs are mixed. I haven't tested if this construct works with W32. Unfortunately, I need STDIN and STDERR separate. I also have a question: Did the version of compiler or libraries used to compile the binary change? MS is notorious for making undocumented changes to their development tools. Thanks, Chip Keefer [2007-07-18 08:45:45] [EMAIL PROTECTED] This works fine with *nix (found from the user comments at http://www.php.net/manual/en/function.exec.php : &1", $out, $err); var_dump($out); ?> I don't know if Windows supports something like this, but iirc, it should. [2007-07-03 12:56:37] ckeefer at us dot nomura dot com Thank you for the quick response. The new version still shows no STDERR output from a cmd.exe window. Thanks C:\php5.2fix>php test_exec.php Two exec statements: --- This exec should result in error for non-existant dir: Array ( ) --- This exec works: Array ( [0] => Volume in drive C is LOCAL DISK [1] => Volume Serial Number is 4054-8345 [2] => [3] => Directory of C:\php5.2fix [4] => [5] => 07/03/2007 08:08 AM32,821 php.exe [6] =>1 File(s) 32,821 bytes [7] =>0 Dir(s) 58,549,849,088 bytes free ) C:\php5.2fix> C:\php5.2fix>type test_exec.php [2007-07-03 06:41:22] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi 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/41874 -- Edit this bug report at http://bugs.php.net/?id=41874&edit=1
#42026 [Bgs->Opn]: Incorrect handling of default namespaces
ID: 42026 User updated by: mail_ben_schmidt at yahoo dot com dot au Reported By: mail_ben_schmidt at yahoo dot com dot au -Status: Bogus +Status: Open Bug Type: SimpleXML related Operating System: Mac OS X -PHP Version: 5.2.3 +PHP Version: 5.2.3 / 5CVS New Comment: (And apologies for opening the bug again, as you have clearly indicated you consider it bogus; wasn't sure whether you'd see my comment if I didn't, though, and keen to discuss it further.) Previous Comments: [2007-07-18 15:59:30] mail_ben_schmidt at yahoo dot com dot au Hmmm. OK. I've had a little look at the sources and a little think about the problem as well as a related one which I sent a post to the php.xml.dev newsgroup about, asking a question. Here are some thoughts: 1. Although I believe the current behaviour is definitely wrong, it seems like others may not agree, though I would hope the majority would, because IMHO it has pretty serious implications and undermines the whole notion of the semantics of XML documents and their namespaces. 2. I can see that there are possibly benefits to not checking namespaces, e.g. for efficiency. And also that it may well 'just work' most of the time. It may be wise to at least document the current behaviour, to avoid confusion of others. 3. A another look at the XML namespace spec and I see what you mean about attribute names. I was confused by this sentence in the spec, which I took to mean that an attribute defaulted to the namespace of the element containing it: "Default namespace declarations do not apply directly to attribute names; the interpretation of unprefixed attributes is determined by the element on which they appear." But it is contradicted in the paragraph following it, so it must mean something else, but I can't for the life of me figure out what! 4. Another, more subtle issue is that an XML application is likely to want to deal with one particular namespace regularly throughout its work with an XML document, regardless of whether the XML author chose to make it the default namespace or not. 5. I was also interested in the behaviour described in http://www.onlamp.com/pub/a/php/2004/01/15/simplexml.html?page=2 of a beta version of SimpleXML. It seems to me that this would be quite useful, despite the risks. And if you know the details of the documents you are dealing with, you can evaluate the risks anyway. 6. The upshot of all this is that I think a solution to all these problems could be defining two new methods: setElementNamespaceMode($ns,$is_prefix) setAttributeNamespaceMode($ns,$is_prefix) This would set the namespace for all lookups, iterations, etc. 'from that point onwards'. The behaviour I want could be signalled by passing some constant that evaluates to an internal, illegal namespace name. The current behaviour could be signalled by set...NamespaceMode('',true) to check for an empty prefix (or another constant). Another magic constant could enable an 'ignore namespaces and return everything' behaviour like the beta. And of course a specific namespace could be set by passing it in directly. And you could switch namespaces by calling the methods multiple times. The namespace mode should be stored with the instance the method is called upon and propagated to instances derived from it (I mean returned by it, one way or another, whether by property lookup, array index, iteration, whatever). This means things like this would work: $bunch_of_elems->set...NamespaceMode('a'); foreach ($bunch_of_elems as $elem) { ... do_something_including_changing_namespace_to_b($elem); ... // a is still the namespace mode of $elem, presuming $elem // wasn't passed by reference to the function above, // and also the namespace mode of $bunch_of_elems for the // next iteration of the foreach. } 7. I should also say that in general, I think the SimpleXML extension is wonderful. Definitely has lots of potential. But I think it could be significantly more useful with this addition and have a lot more applications. 8. I would be willing to have a go implementing this, but I would probably benefit from a little guidance, as I have never done anything with Zend or Libxml before. And I haven't done all that much with XML and its namespaces before, either! But pretty much all the stuff I need is already in the SimpleXML source; it just needs a little rearranging and some control flow statements around. It looks like just editing it shouldn't be too steep a learning curve. 9. A bug report probably isn't the best place to have a discussion like this. Should we move it elsewhere? If you are willing to discuss further, that is. I'm quite excited by the prospect of making SimpleXML a bit better, and thus my PHP coding quite a bit...well...simpler, and probably helping others out a bit, too! --
#41976 [Fbk->Opn]: json_encode() ignores CDATA in SimpleXML data
ID: 41976 User updated by: stefan dot priebsch at e-novative dot de -Summary: Please read before you mark bogus Reported By: stefan dot priebsch at e-novative dot de -Status: Feedback +Status: Open Bug Type: JSON related Operating System: WinXP PHP Version: 5.2.3 New Comment: Ok, the problem: I have a SimpleXML object that I want to convert to JSON using json_encode(). According to the manual, json_encode() works on all types. As soon as there is CDATA in the XML, that very node shows up as "" in the JSON encoding. Remove the CDATA section, everything works. Thus I claim that json_encode() does not work properly on CDATA, which I consider a bug. Previous Comments: [2007-07-18 08:52:18] [EMAIL PROTECTED] Don't use such texts for 'Summary'. Please write something that describes the problem.. [2007-07-17 19:09:53] stefan dot priebsch at e-novative dot de Johannes, would you please care to actually *read* and try to *understand* my bug report before marking it as bogus? My point is that json_encode() works properly with nested XML, but does NOT work correctly when the nested XML contains CDATA. [2007-07-17 12:36:14] [EMAIL PROTECTED] $xml and (string)$xml are different things. Using different things as arguments for a function gives different results. [2007-07-17 10:46:38] stefan dot priebsch at e-novative dot de I re-opened the bug due to the discussion of bug #42001. json_encode() does not work on nested XML with a string cast, but it does work without a string cast. (Of course except for the CDATA problem that made me file this bug in the first place.) $xml = new SimpleXMLElement('testvaluesomething'); var_dump(json_encode($xml)); var_dump(json_encode((string) $xml)); $xml = new SimpleXMLElement('valuesomething'); var_dump(json_encode($xml)); var_dump(json_encode((string) $xml)); [2007-07-13 08:08:02] [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 Yes, and it will try to serialize the SimpleXML object, what won't work, that's part of SimpleXML's behaviour 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/41976 -- Edit this bug report at http://bugs.php.net/?id=41976&edit=1
#42026 [Bgs]: Incorrect handling of default namespaces
ID: 42026 User updated by: mail_ben_schmidt at yahoo dot com dot au Reported By: mail_ben_schmidt at yahoo dot com dot au Status: Bogus Bug Type: SimpleXML related Operating System: Mac OS X PHP Version: 5.2.3 New Comment: Hmmm. OK. I've had a little look at the sources and a little think about the problem as well as a related one which I sent a post to the php.xml.dev newsgroup about, asking a question. Here are some thoughts: 1. Although I believe the current behaviour is definitely wrong, it seems like others may not agree, though I would hope the majority would, because IMHO it has pretty serious implications and undermines the whole notion of the semantics of XML documents and their namespaces. 2. I can see that there are possibly benefits to not checking namespaces, e.g. for efficiency. And also that it may well 'just work' most of the time. It may be wise to at least document the current behaviour, to avoid confusion of others. 3. A another look at the XML namespace spec and I see what you mean about attribute names. I was confused by this sentence in the spec, which I took to mean that an attribute defaulted to the namespace of the element containing it: "Default namespace declarations do not apply directly to attribute names; the interpretation of unprefixed attributes is determined by the element on which they appear." But it is contradicted in the paragraph following it, so it must mean something else, but I can't for the life of me figure out what! 4. Another, more subtle issue is that an XML application is likely to want to deal with one particular namespace regularly throughout its work with an XML document, regardless of whether the XML author chose to make it the default namespace or not. 5. I was also interested in the behaviour described in http://www.onlamp.com/pub/a/php/2004/01/15/simplexml.html?page=2 of a beta version of SimpleXML. It seems to me that this would be quite useful, despite the risks. And if you know the details of the documents you are dealing with, you can evaluate the risks anyway. 6. The upshot of all this is that I think a solution to all these problems could be defining two new methods: setElementNamespaceMode($ns,$is_prefix) setAttributeNamespaceMode($ns,$is_prefix) This would set the namespace for all lookups, iterations, etc. 'from that point onwards'. The behaviour I want could be signalled by passing some constant that evaluates to an internal, illegal namespace name. The current behaviour could be signalled by set...NamespaceMode('',true) to check for an empty prefix (or another constant). Another magic constant could enable an 'ignore namespaces and return everything' behaviour like the beta. And of course a specific namespace could be set by passing it in directly. And you could switch namespaces by calling the methods multiple times. The namespace mode should be stored with the instance the method is called upon and propagated to instances derived from it (I mean returned by it, one way or another, whether by property lookup, array index, iteration, whatever). This means things like this would work: $bunch_of_elems->set...NamespaceMode('a'); foreach ($bunch_of_elems as $elem) { ... do_something_including_changing_namespace_to_b($elem); ... // a is still the namespace mode of $elem, presuming $elem // wasn't passed by reference to the function above, // and also the namespace mode of $bunch_of_elems for the // next iteration of the foreach. } 7. I should also say that in general, I think the SimpleXML extension is wonderful. Definitely has lots of potential. But I think it could be significantly more useful with this addition and have a lot more applications. 8. I would be willing to have a go implementing this, but I would probably benefit from a little guidance, as I have never done anything with Zend or Libxml before. And I haven't done all that much with XML and its namespaces before, either! But pretty much all the stuff I need is already in the SimpleXML source; it just needs a little rearranging and some control flow statements around. It looks like just editing it shouldn't be too steep a learning curve. 9. A bug report probably isn't the best place to have a discussion like this. Should we move it elsewhere? If you are willing to discuss further, that is. I'm quite excited by the prospect of making SimpleXML a bit better, and thus my PHP coding quite a bit...well...simpler, and probably helping others out a bit, too! Previous Comments: [2007-07-18 14:34:57] [EMAIL PROTECTED] The behavior is correct and that statement was not exactly correct concerning the behavior. The intended behavior is to operate on non-prefixed elements without checking namespace or operating on elements within a specific namespace when instructed. There is no bug here and those re
#42018 [Opn]: Zero Sized Reply
ID: 42018 User updated by: shabeel at poornam dot com Reported By: shabeel at poornam dot com Status: Open Bug Type: Scripting Engine problem Operating System: Apache/1.3.37 PHP Version: 4.4.7 New Comment: The issue is solved after recomplied php with falsh support module :) Previous Comments: [2007-07-17 13:46:20] shabeel at poornam dot com As I said it works in old server but not in old . So is there any relevance in checking the codes ? [2007-07-17 12:39:26] [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 , 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. [2007-07-17 11:21:59] shabeel at poornam dot com Description: Hi Im getting this apache in logs as Ouch! malloc(5723244) failed in malloc_block() and in front end as Zero Sized Reply Our developer said it worked in previous server , the problem started when our application moved to new server This is the configuration command. './configure' '--prefix=/usr/local' '--with-apxs=/usr/local/apache/bin/apxs' '--enable-zend-multibyte' '--enable-bcmath' '--with-bz2' '--enable-calendar' '--with-curl' '--enable-dbase' '--with-dom' '--enable-exif' '--enable-filepro' '--enable-ftp' '--with-gettext' '--with-gmp' '--with-iconv' '--enable-mbstring' '--with-mcrypt' '--enable-memory-limit' '--with-mhash' '--with-ming' '--with-ncurses' '--with-openssl' '--with-openssl-dir=/usr' '--enable-pcntl' '--with-pgsql' '--with-pspell' '--enable-shmop' '--enable-sockets' '--enable-sysvmsg' '--enable-sysvsem' '--enable-sysvshm' '--enable-wddx' '--with-xmlrpc' '--with-zlib' '--disable-debug' '--enable-dba' '--with-cdb' '--with-db4' '--with-flatfile' '--with-gdbm' '--with-inifile' '--enable-dbx' '--with-freetype-dir=/usr' '--with-t1lib=/usr' '--enable-gd-jis-conv' '--enable-gd-native-ttf' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-gd' '--with-imap=' '--with-imap-ssl' '--with-mysql=/usr' '--with-unixODBC=/usr' '--with-iodbc=/usr' '--with-readline' '--enable-xslt' '--with-xslt-sablot' '--with-dom-xslt=/usr' '--with-dom-exslt=/usr' '--with-mm' '--enable-mbstr-enc-trans' '--enable-mbregex' '--enable-magic-quotes' '--with-mysqli' '--enable-discard-path' '--with-pdflib' '--with-pear' '--enable-safe-mode' '--enable-track-vars' '--with-ttf' '--with-zip' Could you please figure out ? This is the link of the application. http://foreverasoldier.com/MyPet/index.php?option=com_staticxt&staticfile=index.php login : bug/testing Create a card with charachaters + background and publish , here occurs the problem. and here are the phpinfo of new and old server http://foreverasoldier.com/info.php (New Server) http://substormmedia.com/~segull/info.php (Old Server) Regards Shabeel -- Edit this bug report at http://bugs.php.net/?id=42018&edit=1
#42027 [Opn]: is_file()/is_dir() do not match file/dirnames with wildcard char&trailing slash
ID: 42027 Updated by: [EMAIL PROTECTED] Reported By: mahesh dot vemula at in dot ibm dot com Status: Open Bug Type: Scripting Engine problem Operating System: RHEL 4 PHP Version: 5.2.3 New Comment: Obviously Windows side is doing it wrong. I expect wildcards in filenames passed to is_file to return false. Previous Comments: [2007-07-18 11:38:10] mahesh dot vemula at in dot ibm dot com Description: is_file() matches for a file name given with wild-card character/trailing slash on Windows, but not on Linux. When wild-card char/trailing slash is given in the file name as input to the function, the function returns false on Linux. In the same manner, is_dir() matches for a dir name given with wild-card character on Windows, but not on Linux. When wild-card is given in the dir name as input to the function, the function returns false on Linux. A consistent behavior of the function is expected. Environment: Operating System: RHEL 4 PHP Version: PHP 5.2 Configure Setup: ./configure Reproduce code: --- Expected result: bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) Actual result: -- bool(true) bool(false) bool(false) bool(true) bool(true) bool(false) -- Edit this bug report at http://bugs.php.net/?id=42027&edit=1
#42033 [NEW]: configure failed (GD)
From: sh_tanaka at mail dot goo dot ne dot jp Operating system: freebsd 6.2 PHP version: 6CVS-2007-07-18 (snap) PHP Bug Type: Compile Failure Bug description: configure failed (GD) Description: Configure failed when I use not bundled GD '--with-gd=/usr/local' ==> fail. message is configure: error: gdlib-config not found. '--with-gd' ==> succeed. gd package version is gd-2.0.34_1,1 A graphics library for fast creation of images Reproduce code: --- $'./configure' \ '--with-apxs2=/usr/local/apache2/bin/apxs' \ '--with-gd=/usr/local' \ '--with-jpeg-dir=/usr/local' \ '--with-png-dir=/usr/local' \ '--enable-gd-native-ttf' \ '--enable-mbstring' \ '--enable-mbstr-enc-trans' \ '--enable-mbregex' \ '--enable-zend-multibyte' \ '--with-zlib' \ '--with-imap' \ '--with-imap-ssl' \ '--with-freetype-dir=/usr/local' \ '--enable-gd-jis-conv' Actual result: -- . . ommited . checking for FreeType 2... /usr/local checking for T1lib support... no checking whether to enable truetype string function in GD... yes checking whether to enable JIS-mapped Japanese font support in GD... yes configure: error: gdlib-config not found. $ -- Edit bug report at http://bugs.php.net/?id=42033&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42033&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42033&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42033&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=42033&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=42033&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=42033&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=42033&r=needscript Try newer version:http://bugs.php.net/fix.php?id=42033&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=42033&r=support Expected behavior:http://bugs.php.net/fix.php?id=42033&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=42033&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=42033&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=42033&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42033&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=42033&r=dst IIS Stability:http://bugs.php.net/fix.php?id=42033&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=42033&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=42033&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=42033&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=42033&r=mysqlcfg
#42021 [Bgs]: Intance of same class, access directly private vars, dont using __get() method
ID: 42021 User updated by: o_gangrel at hotmail dot com Reported By: o_gangrel at hotmail dot com Status: Bogus Bug Type: Scripting Engine problem Operating System: Linux PHP Version: 5.2.3 New Comment: Sou you mean, when I have an instace of the class itself, the method __get() will not called? It not sounds good to mee! And the variable is a PRIVATE variable, and it can't be accessed only becouse the class is the same and the instace isn't. Previous Comments: [2007-07-17 22:36:12] [EMAIL PROTECTED] Should have been "restricted" instead of "rejected"... [2007-07-17 22:12:43] [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 The visibility modifiers work on a per class basis and is not rejected to the same object. [2007-07-17 21:17:22] o_gangrel at hotmail dot com Description: In a class, if instance this same class inside, the method __get() does not is called. Reproduce code: --- class class_test { private $sub_classes = array(); private $foo = "bar"; // Default value public function __construct($n = 0) { for($i = 0; $i < $n; $i++) { $this->sub_classes[] = new class_test(); // New "sub" instaces } if($n > 0) { $this->foo = $n; // Change the default value on main instace } } public function __get($name) { switch($name) { case 'foo': return '__get("foo") = '.$this->foo; // Getting the variable, changing the value break; case 'subs': $subs = '$this->foo = '.$this->foo."\n"; // Value of var on main instace foreach($this->sub_classes as $key => $sub_class) { $subs.= "\$this->sub_classes[$key]->foo = ".$this->sub_classes[$key]->foo."\n"; // The value of variable on each "sub" instace } return $subs; break; } return false; } } $test = new class_test(2); // Create the main instace, with 2 "sub" instaces echo $test->subs; // Show the variables Expected result: $this->foo = 2 $this->sub_classes[0]->foo = __get("foo") = bar $this->sub_classes[1]->foo = __get("foo") = bar Actual result: -- $this->foo = 2 $this->sub_classes[0]->foo = bar $this->sub_classes[1]->foo = bar -- Edit this bug report at http://bugs.php.net/?id=42021&edit=1
#21197 [Asn]: [PATCH] socket_read() outputs error with PHP_NORMAL_READ
ID: 21197 Updated by: [EMAIL PROTECTED] Reported By: bool at boolsite dot net Status: Assigned Bug Type: Sockets related Operating System: * PHP Version: 5.*, 4.* (2005-11-17) (cvs) Assigned To: jani New Comment: The patch can be found at: http://pecl.php.net/~jani/patches/bug_21197_socket_read.patch Previous Comments: [2007-07-17 20:57:54] [EMAIL PROTECTED] I have a patch prepared for this. Just waiting for dinesh at dinsoft dot net to test it for me. :) [2007-06-23 22:23:06] dinesh at dinsoft dot net Indeed, it works with : //m = fcntl(bsd_socket, F_GETFL); //if (m < 0) { // return m; //} nonblock = 0; So the fcntl() call makes it fail. But this has the side effect of making the socket_read() call blocking even if the socket has been set to non blocking mode. I will try to make a fully working patch with no side effect when I'll have some time, if no one else is wanting to solve this problem. For the lambda users, here is a usuable dll built against PHP 5.2.3 : http://www.dinsoft.net/dev/php/php_sockets.dll Regards, Dinesh Bolkensteyn [2007-06-23 13:33:06] dinesh at dinsoft dot net Hi all, The bug is still there in: PHP 5.2.3 (cli) (built: May 31 2007 09:37:22) (binary zip release) The initial bug report was posted on 26 Dec 2002 9:32am UTC, almost 5 years ago. PHP_NORMAL_READ works well under *NIX, but the same scripts does not work on windows. If the above patch is working, then it should be added in the binary release. Thanks. [2006-11-15 06:33:38] thessoro at gmail dot com I think the existence of this bug should be mentioned in the documentation to prevent developers rely on PHP_NORMAL_READ. Although OS category is set to * i can only reproduce it in windows. I checked my script there too late. So, as a script relying this feature is capable of making the entire socket extension useless on Windows, i think is important enough to mention it en the socket_read section of the manual. Thx, [2005-11-05 22:10:22] [EMAIL PROTECTED] I've made a patch that implements the idea of my last comment. The test case now works properly. I haven't tested bug #35062 but it seems to be a different bug. http://mega.ist.utl.pt/~ncpl/php_sockets_win.txt 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/21197 -- Edit this bug report at http://bugs.php.net/?id=21197&edit=1
#22839 [Opn->Asn]: Error messages go to STDOUT instead of STDERR
ID: 22839 Updated by: [EMAIL PROTECTED] Reported By: gk at proliberty dot com -Status: Open +Status: Assigned Bug Type: Feature/Change Request Operating System: * PHP Version: 5CVS, 4CVS (2007-07-13) -Assigned To: +Assigned To: jani New Comment: I have created a patch to improve this situation a bit: http://pecl.php.net/~jani/patches/errors_to_stderr.patch Might need some tuning but this should work. I overloaded the display_errors php.ini directive, it allows using 'stderr' as parameter which makes all error messages output in CLI/CGI to go to STDERR. Works fine in *nix, I haven't tested in Windows.. Previous Comments: [2007-06-29 20:13:58] gk at proliberty dot com This is not about where errors be LOGGED, but about what output stream to write DISPLAY output to. I am arguing that if display_errors is enabled, then this output should go to /dev/stderr, not to /dev/stdout. [EMAIL PROTECTED] describes a workaround that co-opts use of error_log file from its intended purpose (logging errors to a file, for archival purposes) in order to redirect display output. Most well-behaved programs distinguish between 'normal' display output and 'errors' and use /dev/stdout and /dev/sterr appropriately, in this regard. PHP breaks this convention by displaying errors on /dev/stdout instead of /dev/stderr UNLESS you employ the workaround of setting /dev/stderr as the logfile. If sniper's workaround is employed, however, then this prevents logging errors to a file. The behavior of PHP appears confused. PHP should offer two clearly separated output mechanisms to the programmer: 1. echo() - for sending 'normal' output to /dev/stdout 2. trigger_error() - for sending 'errors' to /dev/stderr In my case, I am running php scripts via cron. I always want to maintain a historical record, via error_log, but I also need cron to email any true errors immediately - I don't want to set error_log = /dev/stderr and lose the historical error_log record in order to accomplish this simple task that would be a no-brainer if my script was written in bash instead of php. [2003-03-24 06:33:07] [EMAIL PROTECTED] Works fine when you have set it correctly in php.ini: # php -d log_errors=1 -d error_log=/dev/stderr -r "f();" 1>/dev/null [2003-03-24 02:14:59] gk at proliberty dot com Error messages should go to /dev/stderr instead of /dev/stdout Example: redirect STDOUT to /dev/null; notice error message does not appear below: [EMAIL PROTECTED] php4-STABLE-200303210630]# sapi/cli/php -r "f();" 1>/dev/null [EMAIL PROTECTED] php4-STABLE-200303210630]# This is what you should see on /dev/stderr: [EMAIL PROTECTED] php4-STABLE-200303210630]# sapi/cli/php -r "f();" Fatal error: Call to undefined function: f() in Command line code on line 1 The problem is due to the default error handler; if you install a custom error handler function with set_error_handler() then you can work around the problem for errors except the following which CANNOT be handled with set_error_handler() function: E_ERROR, E_PARSE, E_CORE_ERROR, E_CORE_WARNING, E_COMPILE_ERROR and E_COMPILE_WARNING. -- Edit this bug report at http://bugs.php.net/?id=22839&edit=1
#35131 [Opn->Asn]: stream_select() in conjuntion with popen() does not appear to work
ID: 35131 Updated by: [EMAIL PROTECTED] Reported By: larryjadams at comcast dot net -Status: Open +Status: Assigned Bug Type: Streams related Operating System: WindowsXP Pro SP2 PHP Version: 5CVS-2007-07-17 -Assigned To: wez +Assigned To: jani New Comment: I didn't try it on Windows myself, I'll test this later on *nix. Previous Comments: [2007-07-18 13:53:18] larryjadams at comcast dot net The set block option now works. However, the stream select still waits for the script to return or for ever, whichever comes first :). Here is the revised code. Simply place test1.php and test2.php in the c:\ directory. test1.php 0) { $output = fgets($fp, 4096); echo "Command Exited with a Result of '" . trim($output) . "'\n"; } pclose($fp); }else{ $output = `$command`; } ?> test2.php TheWitness [2007-07-17 14:30:41] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi [2005-11-06 22:07:19] larryjadams at comcast dot net Description: If I call $my_fd = popen("mycommand", "rb"); to a function that hangs/suspends and then subsquently call: stream_select(...) using $read=array($my_fd) with a timeout, the steam_select returns immediately, event if I have set $my_fd as blocking using stream_set_blocking(); I would like stream_select to wait on output from the pipe prior to firing, or to drive a timeout. Thanks, Larry Adams The Cacti Group Reproduce code: --- if (function_exists("stream_select")) { if ($config["cacti_server_os"] == "unix") { $fp = popen($command, "r"); }else{ $fp = popen($command, "rb"); } /* set script server timeout */ $script_timeout = read_config_option("script_timeout"); /* establish timeout variables */ $to_sec = floor($script_timeout/1000); $to_usec = ($script_timeout%1000)*1000; /* Prepare the read array */ $read = array($fp); stream_set_blocking ($fp, 1); if (false === ($num_changed_streams = stream_select($read, $write = NULL, $except = NULL, $to_sec, $to_usec))) { cacti_log("WARNING: SERVER POPEN Timed out."); $output = "U"; }elseif ($num_changed_streams > 0) { $output = fgets($fp, 4096); } pclose($fp); }else{ $output = `$command`; } $command = a file with the following: The stream_select timeout is 5 seconds. Expected result: popen will be called, stream_select will block until timeout has expired, the number of fd's changed will be 0 and my result will be as expected. Actual result: -- stream_select returns immediately. -- Edit this bug report at http://bugs.php.net/?id=35131&edit=1
#41874 [Opn->Asn]: Separate STDOUT and STDERR in exec functions
ID: 41874 Updated by: [EMAIL PROTECTED] -Summary: php (CLI) exec function passes no stderr output Reported By: ckeefer at us dot nomura dot com -Status: Open +Status: Assigned -Bug Type: CGI related +Bug Type: Feature/Change Request Operating System: Windows XP Pro SP2 PHP Version: 5.2CVS-2007-07-03 -Assigned To: +Assigned To: jani New Comment: Since this is actually improvement from previous behaviour where the output was mixed, I'm changing this to a FR. I'll look into adding an extra parameter to store STDERR in. In the meantime I suggest you use proc_open() or popen() which give you more control over these.. Previous Comments: [2007-07-18 13:01:40] ckeefer at us dot nomura dot com >Oddly, 5.2.2+ versions still work correctly with cygwin/bash 3.1 Using the same Win32 binary, not a Cygwin binary. To [EMAIL PROTECTED]: That is a good suggestion for just getting STDERR output and I use it often on Unix and Linux systems when I need, and don't care if outputs are mixed. I haven't tested if this construct works with W32. Unfortunately, I need STDIN and STDERR separate. I also have a question: Did the version of compiler or libraries used to compile the binary change? MS is notorious for making undocumented changes to their development tools. Thanks, Chip Keefer [2007-07-18 08:45:45] [EMAIL PROTECTED] This works fine with *nix (found from the user comments at http://www.php.net/manual/en/function.exec.php : &1", $out, $err); var_dump($out); ?> I don't know if Windows supports something like this, but iirc, it should. [2007-07-03 12:56:37] ckeefer at us dot nomura dot com Thank you for the quick response. The new version still shows no STDERR output from a cmd.exe window. Thanks C:\php5.2fix>php test_exec.php Two exec statements: --- This exec should result in error for non-existant dir: Array ( ) --- This exec works: Array ( [0] => Volume in drive C is LOCAL DISK [1] => Volume Serial Number is 4054-8345 [2] => [3] => Directory of C:\php5.2fix [4] => [5] => 07/03/2007 08:08 AM32,821 php.exe [6] =>1 File(s) 32,821 bytes [7] =>0 Dir(s) 58,549,849,088 bytes free ) C:\php5.2fix> C:\php5.2fix>type test_exec.php [2007-07-03 06:41:22] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi [2007-07-02 18:39:25] ckeefer at us dot nomura dot com Description: PHP CLI version 5.1.8 thru 5.2.1 Windows Binary - exec() function, when error is generated passes STDERR no problem to CLI window. 5.2.2+ STDERR output has vanished. Nothing in documentation or search suggests what happened. No other changes 5.2.1 just downloaded and tested with generic setup (no php.ini or other modifications) stderr from exec() functions perfectly. 5.2.2+ system() apparently passes stderr properly, but is not useful for most of what we do. STDOUT appears to be fine all versions. Oddly, 5.2.2+ versions still work correctly with cygwin/bash 3.1 Note in 5.2.2 changelog contains this bit: - Fixed commandline handling for CLI and CGI. (Marcus, Johannes) Thanks, Chip Keefer Reproduce code: --- Expected result: NJPC3916:php5.22$ php test_exec.php php test_exec.php The system cannot find the path specified. - Works properly with cygwin Actual result: -- C:\php5.22>php test_exec.php C:\php5.22> No STDERR -- Edit this bug report at http://bugs.php.net/?id=41874&edit=1
#42026 [Opn->Bgs]: Incorrect handling of default namespaces
ID: 42026 Updated by: [EMAIL PROTECTED] Reported By: mail_ben_schmidt at yahoo dot com dot au -Status: Open +Status: Bogus Bug Type: SimpleXML related Operating System: Mac OS X -PHP Version: 5.2CVS-2007-07-18 +PHP Version: 5.2.3 New Comment: The behavior is correct and that statement was not exactly correct concerning the behavior. The intended behavior is to operate on non-prefixed elements without checking namespace or operating on elements within a specific namespace when instructed. There is no bug here and those referenced documents are not exactly the same (an attribute without a prefix does not fall into default namespace like an element does). Previous Comments: [2007-07-18 13:52:49] mail_ben_schmidt at yahoo dot com dot au O, and yes, I did try the CVS version, and it behaves the same way. I didn't do 'make install' but just ran the binary in place, but I presume this wouldn't have an impact. If that isn't a valid test, let me know, and I will reconfigure with some temporary prefix and 'make install'. Forgot to mention in previous post. [2007-07-18 13:48:58] mail_ben_schmidt at yahoo dot com dot au Telling me to check the manual is somewhat useless, as this module is poorly documented, particularly in this area. The best 'documentation' available from what I can gather is at http://devzone.zend.com/node/view/id/688#Heading3 where it states, "If no namespace is passed to the children() function, all the elements in the global namespace are returned." This is clearly not the behaviour exhibited, because in the case in question the 'global namespace' *is* the namespace 'ns' (in the first six s anyway). Regardless of whether an element is in that namespace by virtue of a prefix or by default, it is still in the global namespace. Purely from a logical perspective, though, the behaviour is clearly wrong. To the XML author is equivalent to which is equivalent to and so on, and any author should have the right to expect both those snippets (and other such modifications) to be treated identically by any parser/XML binding system, as they mean exactly the same thing. The difference is merely one of stylistic choice or ease of implementation of some XML generator, and it shouldn't have the side-effect/ability of hiding things from some XML application/script. I would be happy to have a go fixing the bug unless the consensus of the developers truly is that this shouldn't be fixed. Or even perhaps if it is, as it would simply my application. I can think of a couple of workarounds, but they aren't very pleasant. [2007-07-18 11:59:17] [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 Works as it should. Not specifying a namespace returns un-prefixed elements (no or default namespace), as no namespace testing is performed other than checking for no prefix. There is no default namespace for attributes. [2007-07-18 11:12:22] mail_ben_schmidt at yahoo dot com dot au Irrelevant to the bug itself, but one of my numbers that were meant to be helpful in the code example was wrong. Should have read: 1 0 1 [2007-07-18 11:09:01] mail_ben_schmidt at yahoo dot com dot au Description: When getting children/attributes without using methods to specify a namespace explicity, non-prefixed names are returned, but not prefixed ones, even if the prefixed names are in the same namespace. (Note that in fixing this bug there is a subtlety: the default namespace for attributes is inherited from the element in which they appear.) Reproduce code: --- $str=<< http://localhost/a"; xmlns:ns="http://localhost/a"; xmlns:other="http://localhost/b"; > 1 1 0 1 1 0 0 0 1 DONE; $xml = simplexml_load_string($str); foreach ($xml->elem as $elem) { echo count($elem->attributes()); } echo "\n"; foreach ($xml->children('http://localhost/a')->elem as $elem) { echo count($elem->attributes()); } echo "\n"; foreach ($xml->children('http://localhost/b')->elem as $elem) { echo count($elem->attributes()); } echo "\n"; Expected result: 110110 110110 101 Actual result: -- 100 100100 100 -- Edit this bug report at http://bugs.php.net/?id=42026&edit=1
#42028 [Opn->Bgs]: filemtime() returns different timestamp in 5.2.3 compared to 5.2.0
ID: 42028 Updated by: [EMAIL PROTECTED] Reported By: levi_tedder at hotmail dot com -Status: Open +Status: Bogus Bug Type: Date/time related Operating System: Windows 2003 PHP Version: 5.2.3 New Comment: Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely to be the same. Thank you for your interest in PHP. See bug #40568 Previous Comments: [2007-07-18 11:56:49] levi_tedder at hotmail dot com Description: Hi filemtime() results differs from 5.2.0 to 5.2.3 on files modified during winter time. In 5.2.0 it returns for example 2007-03-15 12:49:35 (1173959375) In 5.2.3 the same file returns 2007-03-15 11:49:35 (1173955775) One hour difference. On files modified during summer time, there's no such difference. Actual bug or feature? Levi -- Edit this bug report at http://bugs.php.net/?id=42028&edit=1
#41116 [Opn->Asn]: Bogus "indrect modification ..has no effect" warning
ID: 41116 Updated by: [EMAIL PROTECTED] Reported By: hannes dot magnusson at gmail dot com -Status: Open +Status: Assigned Bug Type: Scripting Engine problem Operating System: FreeBSD PHP Version: 5CVS-2007-04-17 (CVS) -Assigned To: +Assigned To: helly New Comment: See also bug #42030 and bug #41641 Previous Comments: [2007-04-17 12:14:36] hannes dot magnusson at gmail dot com Description: When setting value to an object returned from an overloaded array produces bogus "Indirect modification of overloaded element of foo has no effect" warning Reproduce code: --- array[$key] = $value; } public function offsetGet($key) { return $this->array[$key]; } public function offsetExists($key) {} public function offsetUnset($key) {} } $foo = new foo; $std = new stdclass; $foo["bar"] = array($std); $foo["bar"][0]->std = "foo"; var_dump($foo); Actual result: -- Notice: Indirect modification of overloaded element of foo has no effect in /usr/home/bjori/test/bogus.warning.php on line 17 object(foo)#1 (1) { ["array:private"]=> array(1) { ["bar"]=> array(1) { [0]=> object(stdClass)#2 (1) { ["std"]=> string(3) "foo" } } } } -- Edit this bug report at http://bugs.php.net/?id=41116&edit=1
#42030 [Asn]: Cannot use __set and __get with arrays (Indirect modification of overloaded...)
ID: 42030 Updated by: [EMAIL PROTECTED] Reported By: luke at liveoakinteractive dot com Status: Assigned Bug Type: Class/Object related Operating System: Ubuntu 7.04 / RHEL 4 PHP Version: 5.2.3 Assigned To: helly New Comment: See also bug #41641 Previous Comments: [2007-07-18 14:25:11] [EMAIL PROTECTED] Assigned to Marcus who added this notice. Please explain these people why it is there. :) [2007-07-18 12:46:55] luke at liveoakinteractive dot com Description: Good morning! I've found what I'm reasonably certain is a bug, and I've searched to verify that nobody has reported the same issue. I see some similar issues reported by others, but I don't think any are identical. Hopefully I'm not beating a dead horse. The issue I've run into is that __get and __set cause odd behavior if you're trying to get or set a piece of an array (e.g. $object->arr[1] = true;). It returns back a notice: "Indirect modification of overloaded property ClassName::$my_array has no effect" (and indeed it doesn't; the assignment or retrieval do not work!). You can get around this by assigning the entire array in advance and then assigning the array as a unit to the object, and retrieving similarly (the entire array first, then in pieces). However, it seems to be the case that I should be able to assign pieces of arrays here just like anywhere else. As an additional note, if the array is an actual class property, it works. Thanks so much for your time! Luke Sneeringer Live Oak Interactive Reproduce code: --- fields[$key])) { return $this->fields[$key]; } else { return null; } } public function __set($key, $val) { $this->fields[$key] = $val; } } $c = new ClassName; $c->scalar = 'two'; // works $c->an_array[3] = 'three'; // throws notice $diff_array[3] = 'three'; $c->diff_array = $diff_array; // works $c->class_array[4] = 'four'; // works Expected result: I would have expected an assignment such as $c->an_array[3] = 'three'; to assign as expected. It certainly seems intuitive that one should be able to assign an array in this manner, and I saw nothing in the documentation indicating otherwise. An array as a whole can be stored this way (as the second working example indicates); there just seems to be something about assigning a particular piece that breaks. Incidentally, retrieving suffers from the same issue...I can retrieve the array as a whole, but not a piece of it. Actual result: -- I get an error of level E_NOTICE: Indirect modification of overloaded property ClassName::$an_array has no effect. The assignment or retrieval, as the notice indicates, does not work. -- Edit this bug report at http://bugs.php.net/?id=42030&edit=1
#42030 [Opn->Asn]: Cannot use __set and __get with arrays (Indirect modification of overloaded...)
ID: 42030 Updated by: [EMAIL PROTECTED] Reported By: luke at liveoakinteractive dot com -Status: Open +Status: Assigned Bug Type: Class/Object related Operating System: Ubuntu 7.04 / RHEL 4 PHP Version: 5.2.3 -Assigned To: +Assigned To: helly New Comment: Assigned to Marcus who added this notice. Please explain these people why it is there. :) Previous Comments: [2007-07-18 12:46:55] luke at liveoakinteractive dot com Description: Good morning! I've found what I'm reasonably certain is a bug, and I've searched to verify that nobody has reported the same issue. I see some similar issues reported by others, but I don't think any are identical. Hopefully I'm not beating a dead horse. The issue I've run into is that __get and __set cause odd behavior if you're trying to get or set a piece of an array (e.g. $object->arr[1] = true;). It returns back a notice: "Indirect modification of overloaded property ClassName::$my_array has no effect" (and indeed it doesn't; the assignment or retrieval do not work!). You can get around this by assigning the entire array in advance and then assigning the array as a unit to the object, and retrieving similarly (the entire array first, then in pieces). However, it seems to be the case that I should be able to assign pieces of arrays here just like anywhere else. As an additional note, if the array is an actual class property, it works. Thanks so much for your time! Luke Sneeringer Live Oak Interactive Reproduce code: --- fields[$key])) { return $this->fields[$key]; } else { return null; } } public function __set($key, $val) { $this->fields[$key] = $val; } } $c = new ClassName; $c->scalar = 'two'; // works $c->an_array[3] = 'three'; // throws notice $diff_array[3] = 'three'; $c->diff_array = $diff_array; // works $c->class_array[4] = 'four'; // works Expected result: I would have expected an assignment such as $c->an_array[3] = 'three'; to assign as expected. It certainly seems intuitive that one should be able to assign an array in this manner, and I saw nothing in the documentation indicating otherwise. An array as a whole can be stored this way (as the second working example indicates); there just seems to be something about assigning a particular piece that breaks. Incidentally, retrieving suffers from the same issue...I can retrieve the array as a whole, but not a piece of it. Actual result: -- I get an error of level E_NOTICE: Indirect modification of overloaded property ClassName::$an_array has no effect. The assignment or retrieval, as the notice indicates, does not work. -- Edit this bug report at http://bugs.php.net/?id=42030&edit=1
#35131 [Fbk->Opn]: stream_select() in conjuntion with popen() does not appear to work
ID: 35131 User updated by: larryjadams at comcast dot net Reported By: larryjadams at comcast dot net -Status: Feedback +Status: Open Bug Type: Streams related Operating System: WindowsXP Pro SP2 PHP Version: 5CVS-2005-11-07 (snap) Assigned To: wez New Comment: The set block option now works. However, the stream select still waits for the script to return or for ever, whichever comes first :). Here is the revised code. Simply place test1.php and test2.php in the c:\ directory. test1.php 0) { $output = fgets($fp, 4096); echo "Command Exited with a Result of '" . trim($output) . "'\n"; } pclose($fp); }else{ $output = `$command`; } ?> test2.php TheWitness Previous Comments: [2007-07-17 14:30:41] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi [2005-11-07 15:31:28] [EMAIL PROTECTED] Assigned to the author of this part. [2005-11-07 02:09:19] larryjadams at comcast dot net I have attempted to resolve the issue with the latest CVS. However, it does not solve the issue. The stream_select fires right away even though the popen does not have anything waiting on the pipe. The version I tested was: PHP 5.1.0RC5-dev (cli) (built: Nov 7 2005 00:47:12) Copyright (c) 1997-2005 The PHP Group Zend Engine v2.1.0-dev, Copyright (c) 1998-2005 Zend Technologies I have noted some other issues that I will be opening separate tickets one. [2005-11-06 22:07:19] larryjadams at comcast dot net Description: If I call $my_fd = popen("mycommand", "rb"); to a function that hangs/suspends and then subsquently call: stream_select(...) using $read=array($my_fd) with a timeout, the steam_select returns immediately, event if I have set $my_fd as blocking using stream_set_blocking(); I would like stream_select to wait on output from the pipe prior to firing, or to drive a timeout. Thanks, Larry Adams The Cacti Group Reproduce code: --- if (function_exists("stream_select")) { if ($config["cacti_server_os"] == "unix") { $fp = popen($command, "r"); }else{ $fp = popen($command, "rb"); } /* set script server timeout */ $script_timeout = read_config_option("script_timeout"); /* establish timeout variables */ $to_sec = floor($script_timeout/1000); $to_usec = ($script_timeout%1000)*1000; /* Prepare the read array */ $read = array($fp); stream_set_blocking ($fp, 1); if (false === ($num_changed_streams = stream_select($read, $write = NULL, $except = NULL, $to_sec, $to_usec))) { cacti_log("WARNING: SERVER POPEN Timed out."); $output = "U"; }elseif ($num_changed_streams > 0) { $output = fgets($fp, 4096); } pclose($fp); }else{ $output = `$command`; } $command = a file with the following: The stream_select timeout is 5 seconds. Expected result: popen will be called, stream_select will block until timeout has expired, the number of fd's changed will be 0 and my result will be as expected. Actual result: -- stream_select returns immediately. -- Edit this bug report at http://bugs.php.net/?id=35131&edit=1
#42026 [Opn]: Incorrect handling of default namespaces
ID: 42026 User updated by: mail_ben_schmidt at yahoo dot com dot au Reported By: mail_ben_schmidt at yahoo dot com dot au Status: Open Bug Type: SimpleXML related Operating System: Mac OS X PHP Version: 5.2.3 New Comment: O, and yes, I did try the CVS version, and it behaves the same way. I didn't do 'make install' but just ran the binary in place, but I presume this wouldn't have an impact. If that isn't a valid test, let me know, and I will reconfigure with some temporary prefix and 'make install'. Forgot to mention in previous post. Previous Comments: [2007-07-18 13:48:58] mail_ben_schmidt at yahoo dot com dot au Telling me to check the manual is somewhat useless, as this module is poorly documented, particularly in this area. The best 'documentation' available from what I can gather is at http://devzone.zend.com/node/view/id/688#Heading3 where it states, "If no namespace is passed to the children() function, all the elements in the global namespace are returned." This is clearly not the behaviour exhibited, because in the case in question the 'global namespace' *is* the namespace 'ns' (in the first six s anyway). Regardless of whether an element is in that namespace by virtue of a prefix or by default, it is still in the global namespace. Purely from a logical perspective, though, the behaviour is clearly wrong. To the XML author is equivalent to which is equivalent to and so on, and any author should have the right to expect both those snippets (and other such modifications) to be treated identically by any parser/XML binding system, as they mean exactly the same thing. The difference is merely one of stylistic choice or ease of implementation of some XML generator, and it shouldn't have the side-effect/ability of hiding things from some XML application/script. I would be happy to have a go fixing the bug unless the consensus of the developers truly is that this shouldn't be fixed. Or even perhaps if it is, as it would simply my application. I can think of a couple of workarounds, but they aren't very pleasant. [2007-07-18 11:59:17] [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 Works as it should. Not specifying a namespace returns un-prefixed elements (no or default namespace), as no namespace testing is performed other than checking for no prefix. There is no default namespace for attributes. [2007-07-18 11:12:26] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi Some fixes were already done regarding namespaces. [2007-07-18 11:12:22] mail_ben_schmidt at yahoo dot com dot au Irrelevant to the bug itself, but one of my numbers that were meant to be helpful in the code example was wrong. Should have read: 1 0 1 [2007-07-18 11:09:01] mail_ben_schmidt at yahoo dot com dot au Description: When getting children/attributes without using methods to specify a namespace explicity, non-prefixed names are returned, but not prefixed ones, even if the prefixed names are in the same namespace. (Note that in fixing this bug there is a subtlety: the default namespace for attributes is inherited from the element in which they appear.) Reproduce code: --- $str=<< http://localhost/a"; xmlns:ns="http://localhost/a"; xmlns:other="http://localhost/b"; > 1 1 0 1 1 0 0 0 1 DONE; $xml = simplexml_load_string($str); foreach ($xml->elem as $elem) { echo count($elem->attributes()); } echo "\n"; foreach ($xml->children('http://localhost/a')->elem as $elem) { echo count($elem->attributes()); } echo "\n"; foreach ($xml->children('http://localhost/b')->elem as $elem) { echo count($elem->attributes()); } echo "\n"; Expected result: 110110 110110 101 Actual result: -- 100 100100 100 -- Edit this bug report at http://bugs.php.net/?id=42026&edit=1
#42026 [Bgs->Opn]: Incorrect handling of default namespaces
ID: 42026 User updated by: mail_ben_schmidt at yahoo dot com dot au Reported By: mail_ben_schmidt at yahoo dot com dot au -Status: Bogus +Status: Open Bug Type: SimpleXML related Operating System: Mac OS X PHP Version: 5.2.3 New Comment: Telling me to check the manual is somewhat useless, as this module is poorly documented, particularly in this area. The best 'documentation' available from what I can gather is at http://devzone.zend.com/node/view/id/688#Heading3 where it states, "If no namespace is passed to the children() function, all the elements in the global namespace are returned." This is clearly not the behaviour exhibited, because in the case in question the 'global namespace' *is* the namespace 'ns' (in the first six s anyway). Regardless of whether an element is in that namespace by virtue of a prefix or by default, it is still in the global namespace. Purely from a logical perspective, though, the behaviour is clearly wrong. To the XML author is equivalent to which is equivalent to and so on, and any author should have the right to expect both those snippets (and other such modifications) to be treated identically by any parser/XML binding system, as they mean exactly the same thing. The difference is merely one of stylistic choice or ease of implementation of some XML generator, and it shouldn't have the side-effect/ability of hiding things from some XML application/script. I would be happy to have a go fixing the bug unless the consensus of the developers truly is that this shouldn't be fixed. Or even perhaps if it is, as it would simply my application. I can think of a couple of workarounds, but they aren't very pleasant. Previous Comments: [2007-07-18 11:59:17] [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 Works as it should. Not specifying a namespace returns un-prefixed elements (no or default namespace), as no namespace testing is performed other than checking for no prefix. There is no default namespace for attributes. [2007-07-18 11:12:26] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi Some fixes were already done regarding namespaces. [2007-07-18 11:12:22] mail_ben_schmidt at yahoo dot com dot au Irrelevant to the bug itself, but one of my numbers that were meant to be helpful in the code example was wrong. Should have read: 1 0 1 [2007-07-18 11:09:01] mail_ben_schmidt at yahoo dot com dot au Description: When getting children/attributes without using methods to specify a namespace explicity, non-prefixed names are returned, but not prefixed ones, even if the prefixed names are in the same namespace. (Note that in fixing this bug there is a subtlety: the default namespace for attributes is inherited from the element in which they appear.) Reproduce code: --- $str=<< http://localhost/a"; xmlns:ns="http://localhost/a"; xmlns:other="http://localhost/b"; > 1 1 0 1 1 0 0 0 1 DONE; $xml = simplexml_load_string($str); foreach ($xml->elem as $elem) { echo count($elem->attributes()); } echo "\n"; foreach ($xml->children('http://localhost/a')->elem as $elem) { echo count($elem->attributes()); } echo "\n"; foreach ($xml->children('http://localhost/b')->elem as $elem) { echo count($elem->attributes()); } echo "\n"; Expected result: 110110 110110 101 Actual result: -- 100 100100 100 -- Edit this bug report at http://bugs.php.net/?id=42026&edit=1
#42020 [Opn]: curl_multi_select causes php to fail, silently
ID: 42020 User updated by: adz999 at yahoo dot co dot uk Reported By: adz999 at yahoo dot co dot uk Status: Open Bug Type: cURL related Operating System: Free BSD (i386) PHP Version: 5.2.3 New Comment: ...and so I can't install the latest version anyway (on the webhost). Previous Comments: [2007-07-18 13:02:23] adz999 at yahoo dot co dot uk Apologies for my ignorance, and noob-ness but I downloaded the cvs snapshot and I have no idea what to do with it!! The bug only occurs on my webhost's server (BSD on i386) and not on my own server (OS X) despite having the same php version. [2007-07-17 19:06:59] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi [2007-07-17 18:58:24] adz999 at yahoo dot co dot uk Some of my submission did not post properly: The "Reproduce code" section should have this at the end: print "4"; The "Expected result" section should continue: ...to loop around again, and therefore print out "2" regardless of whether it then went on to execute curl_multi_exec. [2007-07-17 18:47:26] adz999 at yahoo dot co dot uk Description: I am using (a slight variation of) the user-contributed example on this page:http://uk2.php.net/manual/en/function.curl-multi-exec.php. Sometimes it works and sometimes it causes php to fail, without displaying any error notice (error reporting set to E_WARNING). I cannot work out what it is that causes it to fail or not fail, but if I run the same requests on the script multiple times it behaves the same every time. By getting php to print a message between each line of code I have narrowed the problem down to this line: if (curl_multi_select($mh) != -1) This is the php info for the server: http://phpinfo.hostultra.com/ The problem does NOT occur when the script is executed on my local testing server (Mac OS X 10.4.8, PHP 5.2.1). Reproduce code: --- "; while (@ob_end_flush()); while (@flush()); do { $mrc = curl_multi_exec($mh, $active); } while ($mrc == CURLM_CALL_MULTI_PERFORM && $active>0 && microtime(1)<$time); print "1"; while (@ob_end_flush()); while (@flush()); while ($active>0 and $mrc == CURLM_OK && microtime(1)<$time){ print "2"; while (@ob_end_flush()); while (@flush()); //this gets printed out fine // wait for network if (curl_multi_select($mh) != -1){ // pull in any new data, or at least handle timeouts do { print "3"; while (@ob_end_flush()); while (@flush()); //php never gets this far $mrc = curl_multi_exec($mh, $active); } while ($mrc == CURLM_CALL_MULTI_PERFORM && $active>0 && microtime(1)<$time); } }//end while Expected result: If curl_multi_select($mh) was equal to -1 then I would expect the while loop while ($active>0 and $mrc == CURLM_OK && microtime(1)<$time) Actual result: -- PHP outputs: got as far as executing the curl stuff 1 2 ...and then it stops. The connection to the browser is no longer active. That's it, it just stops there and does no more. No error message. Even if I change the line if (curl_multi_select($mh) != -1) to just if (curl_multi_select($mh)) the result is exactly the same -- Edit this bug report at http://bugs.php.net/?id=42020&edit=1
#42020 [Fbk->Opn]: curl_multi_select causes php to fail, silently
ID: 42020 User updated by: adz999 at yahoo dot co dot uk Reported By: adz999 at yahoo dot co dot uk -Status: Feedback +Status: Open Bug Type: cURL related Operating System: Free BSD (i386) PHP Version: 5.2.3 New Comment: Apologies for my ignorance, and noob-ness but I downloaded the cvs snapshot and I have no idea what to do with it!! The bug only occurs on my webhost's server (BSD on i386) and not on my own server (OS X) despite having the same php version. Previous Comments: [2007-07-17 19:06:59] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi [2007-07-17 18:58:24] adz999 at yahoo dot co dot uk Some of my submission did not post properly: The "Reproduce code" section should have this at the end: print "4"; The "Expected result" section should continue: ...to loop around again, and therefore print out "2" regardless of whether it then went on to execute curl_multi_exec. [2007-07-17 18:47:26] adz999 at yahoo dot co dot uk Description: I am using (a slight variation of) the user-contributed example on this page:http://uk2.php.net/manual/en/function.curl-multi-exec.php. Sometimes it works and sometimes it causes php to fail, without displaying any error notice (error reporting set to E_WARNING). I cannot work out what it is that causes it to fail or not fail, but if I run the same requests on the script multiple times it behaves the same every time. By getting php to print a message between each line of code I have narrowed the problem down to this line: if (curl_multi_select($mh) != -1) This is the php info for the server: http://phpinfo.hostultra.com/ The problem does NOT occur when the script is executed on my local testing server (Mac OS X 10.4.8, PHP 5.2.1). Reproduce code: --- "; while (@ob_end_flush()); while (@flush()); do { $mrc = curl_multi_exec($mh, $active); } while ($mrc == CURLM_CALL_MULTI_PERFORM && $active>0 && microtime(1)<$time); print "1"; while (@ob_end_flush()); while (@flush()); while ($active>0 and $mrc == CURLM_OK && microtime(1)<$time){ print "2"; while (@ob_end_flush()); while (@flush()); //this gets printed out fine // wait for network if (curl_multi_select($mh) != -1){ // pull in any new data, or at least handle timeouts do { print "3"; while (@ob_end_flush()); while (@flush()); //php never gets this far $mrc = curl_multi_exec($mh, $active); } while ($mrc == CURLM_CALL_MULTI_PERFORM && $active>0 && microtime(1)<$time); } }//end while Expected result: If curl_multi_select($mh) was equal to -1 then I would expect the while loop while ($active>0 and $mrc == CURLM_OK && microtime(1)<$time) Actual result: -- PHP outputs: got as far as executing the curl stuff 1 2 ...and then it stops. The connection to the browser is no longer active. That's it, it just stops there and does no more. No error message. Even if I change the line if (curl_multi_select($mh) != -1) to just if (curl_multi_select($mh)) the result is exactly the same -- Edit this bug report at http://bugs.php.net/?id=42020&edit=1
#41874 [Fbk->Opn]: php (CLI) exec function passes no stderr output
ID: 41874 User updated by: ckeefer at us dot nomura dot com Reported By: ckeefer at us dot nomura dot com -Status: Feedback +Status: Open Bug Type: CGI related Operating System: Windows XP Pro SP2 PHP Version: 5.2CVS-2007-07-03 New Comment: >Oddly, 5.2.2+ versions still work correctly with cygwin/bash 3.1 Using the same Win32 binary, not a Cygwin binary. To [EMAIL PROTECTED]: That is a good suggestion for just getting STDERR output and I use it often on Unix and Linux systems when I need, and don't care if outputs are mixed. I haven't tested if this construct works with W32. Unfortunately, I need STDIN and STDERR separate. I also have a question: Did the version of compiler or libraries used to compile the binary change? MS is notorious for making undocumented changes to their development tools. Thanks, Chip Keefer Previous Comments: [2007-07-18 08:45:45] [EMAIL PROTECTED] This works fine with *nix (found from the user comments at http://www.php.net/manual/en/function.exec.php : &1", $out, $err); var_dump($out); ?> I don't know if Windows supports something like this, but iirc, it should. [2007-07-03 12:56:37] ckeefer at us dot nomura dot com Thank you for the quick response. The new version still shows no STDERR output from a cmd.exe window. Thanks C:\php5.2fix>php test_exec.php Two exec statements: --- This exec should result in error for non-existant dir: Array ( ) --- This exec works: Array ( [0] => Volume in drive C is LOCAL DISK [1] => Volume Serial Number is 4054-8345 [2] => [3] => Directory of C:\php5.2fix [4] => [5] => 07/03/2007 08:08 AM32,821 php.exe [6] =>1 File(s) 32,821 bytes [7] =>0 Dir(s) 58,549,849,088 bytes free ) C:\php5.2fix> C:\php5.2fix>type test_exec.php [2007-07-03 06:41:22] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi [2007-07-02 18:39:25] ckeefer at us dot nomura dot com Description: PHP CLI version 5.1.8 thru 5.2.1 Windows Binary - exec() function, when error is generated passes STDERR no problem to CLI window. 5.2.2+ STDERR output has vanished. Nothing in documentation or search suggests what happened. No other changes 5.2.1 just downloaded and tested with generic setup (no php.ini or other modifications) stderr from exec() functions perfectly. 5.2.2+ system() apparently passes stderr properly, but is not useful for most of what we do. STDOUT appears to be fine all versions. Oddly, 5.2.2+ versions still work correctly with cygwin/bash 3.1 Note in 5.2.2 changelog contains this bit: - Fixed commandline handling for CLI and CGI. (Marcus, Johannes) Thanks, Chip Keefer Reproduce code: --- Expected result: NJPC3916:php5.22$ php test_exec.php php test_exec.php The system cannot find the path specified. - Works properly with cygwin Actual result: -- C:\php5.22>php test_exec.php C:\php5.22> No STDERR -- Edit this bug report at http://bugs.php.net/?id=41874&edit=1
#42031 [NEW]: php.net website problem
From: christian_hartwig at hotmail dot de Operating system: Windows Vista PHP version: 4.4.7 PHP Bug Type: Unknown/Other Function Bug description: php.net website problem Description: I've tried to add the search-provider of your page to my IE 7 (German) searchlist. That fails with the message "Dieser Suchanbieter konnte nicht installiert werden. Es gab ein Problem mit den Informationen des Suchanbbieters." In english (with my simple knowledge): "This search provider could not be added. There is a problem with the information from the search provider". It works with firefox. -- Edit bug report at http://bugs.php.net/?id=42031&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42031&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42031&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42031&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=42031&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=42031&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=42031&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=42031&r=needscript Try newer version:http://bugs.php.net/fix.php?id=42031&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=42031&r=support Expected behavior:http://bugs.php.net/fix.php?id=42031&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=42031&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=42031&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=42031&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42031&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=42031&r=dst IIS Stability:http://bugs.php.net/fix.php?id=42031&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=42031&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=42031&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=42031&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=42031&r=mysqlcfg
#42030 [NEW]: Cannot use __set and __get with arrays (Indirect modification of overloaded...)
From: luke at liveoakinteractive dot com Operating system: Ubuntu 7.04 / RHEL 4 PHP version: 5.2.3 PHP Bug Type: Class/Object related Bug description: Cannot use __set and __get with arrays (Indirect modification of overloaded...) Description: Good morning! I've found what I'm reasonably certain is a bug, and I've searched to verify that nobody has reported the same issue. I see some similar issues reported by others, but I don't think any are identical. Hopefully I'm not beating a dead horse. The issue I've run into is that __get and __set cause odd behavior if you're trying to get or set a piece of an array (e.g. $object->arr[1] = true;). It returns back a notice: "Indirect modification of overloaded property ClassName::$my_array has no effect" (and indeed it doesn't; the assignment or retrieval do not work!). You can get around this by assigning the entire array in advance and then assigning the array as a unit to the object, and retrieving similarly (the entire array first, then in pieces). However, it seems to be the case that I should be able to assign pieces of arrays here just like anywhere else. As an additional note, if the array is an actual class property, it works. Thanks so much for your time! Luke Sneeringer Live Oak Interactive Reproduce code: --- fields[$key])) { return $this->fields[$key]; } else { return null; } } public function __set($key, $val) { $this->fields[$key] = $val; } } $c = new ClassName; $c->scalar = 'two'; // works $c->an_array[3] = 'three'; // throws notice $diff_array[3] = 'three'; $c->diff_array = $diff_array; // works $c->class_array[4] = 'four'; // works Expected result: I would have expected an assignment such as $c->an_array[3] = 'three'; to assign as expected. It certainly seems intuitive that one should be able to assign an array in this manner, and I saw nothing in the documentation indicating otherwise. An array as a whole can be stored this way (as the second working example indicates); there just seems to be something about assigning a particular piece that breaks. Incidentally, retrieving suffers from the same issue...I can retrieve the array as a whole, but not a piece of it. Actual result: -- I get an error of level E_NOTICE: Indirect modification of overloaded property ClassName::$an_array has no effect. The assignment or retrieval, as the notice indicates, does not work. -- Edit bug report at http://bugs.php.net/?id=42030&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42030&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42030&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42030&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=42030&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=42030&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=42030&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=42030&r=needscript Try newer version:http://bugs.php.net/fix.php?id=42030&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=42030&r=support Expected behavior:http://bugs.php.net/fix.php?id=42030&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=42030&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=42030&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=42030&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42030&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=42030&r=dst IIS Stability:http://bugs.php.net/fix.php?id=42030&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=42030&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=42030&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=42030&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=42030&r=mysqlcfg
#42029 [NEW]: mbstring missing strpad
From: fabrizio dot balliano at crealabs dot it Operating system: all PHP version: 5.2.3 PHP Bug Type: mbstring related Bug description: mbstring missing strpad Description: mbstring module is missing the str_pad function, thus if you pad some text cointaining a 2 byte char, the result string length will be wrong. -- Edit bug report at http://bugs.php.net/?id=42029&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42029&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42029&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42029&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=42029&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=42029&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=42029&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=42029&r=needscript Try newer version:http://bugs.php.net/fix.php?id=42029&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=42029&r=support Expected behavior:http://bugs.php.net/fix.php?id=42029&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=42029&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=42029&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=42029&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42029&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=42029&r=dst IIS Stability:http://bugs.php.net/fix.php?id=42029&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=42029&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=42029&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=42029&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=42029&r=mysqlcfg
#42026 [Fbk->Bgs]: Incorrect handling of default namespaces
ID: 42026 Updated by: [EMAIL PROTECTED] Reported By: mail_ben_schmidt at yahoo dot com dot au -Status: Feedback +Status: Bogus Bug Type: SimpleXML related Operating System: Mac OS X PHP Version: 5.2.3 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 Works as it should. Not specifying a namespace returns un-prefixed elements (no or default namespace), as no namespace testing is performed other than checking for no prefix. There is no default namespace for attributes. Previous Comments: [2007-07-18 11:12:26] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi Some fixes were already done regarding namespaces. [2007-07-18 11:12:22] mail_ben_schmidt at yahoo dot com dot au Irrelevant to the bug itself, but one of my numbers that were meant to be helpful in the code example was wrong. Should have read: 1 0 1 [2007-07-18 11:09:01] mail_ben_schmidt at yahoo dot com dot au Description: When getting children/attributes without using methods to specify a namespace explicity, non-prefixed names are returned, but not prefixed ones, even if the prefixed names are in the same namespace. (Note that in fixing this bug there is a subtlety: the default namespace for attributes is inherited from the element in which they appear.) Reproduce code: --- $str=<< http://localhost/a"; xmlns:ns="http://localhost/a"; xmlns:other="http://localhost/b"; > 1 1 0 1 1 0 0 0 1 DONE; $xml = simplexml_load_string($str); foreach ($xml->elem as $elem) { echo count($elem->attributes()); } echo "\n"; foreach ($xml->children('http://localhost/a')->elem as $elem) { echo count($elem->attributes()); } echo "\n"; foreach ($xml->children('http://localhost/b')->elem as $elem) { echo count($elem->attributes()); } echo "\n"; Expected result: 110110 110110 101 Actual result: -- 100 100100 100 -- Edit this bug report at http://bugs.php.net/?id=42026&edit=1
#42028 [NEW]: filemtime() returns different timestamp in 5.2.3 compared to 5.2.0
From: levi_tedder at hotmail dot com Operating system: Windows 2003 PHP version: 5.2.3 PHP Bug Type: Date/time related Bug description: filemtime() returns different timestamp in 5.2.3 compared to 5.2.0 Description: Hi filemtime() results differs from 5.2.0 to 5.2.3 on files modified during winter time. In 5.2.0 it returns for example 2007-03-15 12:49:35 (1173959375) In 5.2.3 the same file returns 2007-03-15 11:49:35 (1173955775) One hour difference. On files modified during summer time, there's no such difference. Actual bug or feature? Levi -- Edit bug report at http://bugs.php.net/?id=42028&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42028&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42028&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42028&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=42028&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=42028&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=42028&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=42028&r=needscript Try newer version:http://bugs.php.net/fix.php?id=42028&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=42028&r=support Expected behavior:http://bugs.php.net/fix.php?id=42028&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=42028&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=42028&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=42028&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42028&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=42028&r=dst IIS Stability:http://bugs.php.net/fix.php?id=42028&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=42028&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=42028&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=42028&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=42028&r=mysqlcfg
#42027 [NEW]: is_file()/is_dir() do not match file/dirnames with wildcard char&trailing slash
From: mahesh dot vemula at in dot ibm dot com Operating system: RHEL 4 PHP version: 5.2.3 PHP Bug Type: Scripting Engine problem Bug description: is_file()/is_dir() do not match file/dirnames with wildcard char&trailing slash Description: is_file() matches for a file name given with wild-card character/trailing slash on Windows, but not on Linux. When wild-card char/trailing slash is given in the file name as input to the function, the function returns false on Linux. In the same manner, is_dir() matches for a dir name given with wild-card character on Windows, but not on Linux. When wild-card is given in the dir name as input to the function, the function returns false on Linux. A consistent behavior of the function is expected. Environment: Operating System: RHEL 4 PHP Version: PHP 5.2 Configure Setup: ./configure Reproduce code: --- Expected result: bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) Actual result: -- bool(true) bool(false) bool(false) bool(true) bool(true) bool(false) -- Edit bug report at http://bugs.php.net/?id=42027&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42027&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42027&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42027&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=42027&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=42027&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=42027&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=42027&r=needscript Try newer version:http://bugs.php.net/fix.php?id=42027&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=42027&r=support Expected behavior:http://bugs.php.net/fix.php?id=42027&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=42027&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=42027&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=42027&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42027&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=42027&r=dst IIS Stability:http://bugs.php.net/fix.php?id=42027&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=42027&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=42027&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=42027&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=42027&r=mysqlcfg
#42026 [Opn->Fbk]: Incorrect handling of default namespaces
ID: 42026 Updated by: [EMAIL PROTECTED] Reported By: mail_ben_schmidt at yahoo dot com dot au -Status: Open +Status: Feedback Bug Type: SimpleXML related Operating System: Mac OS X PHP Version: 5.2.3 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi Some fixes were already done regarding namespaces. Previous Comments: [2007-07-18 11:12:22] mail_ben_schmidt at yahoo dot com dot au Irrelevant to the bug itself, but one of my numbers that were meant to be helpful in the code example was wrong. Should have read: 1 0 1 [2007-07-18 11:09:01] mail_ben_schmidt at yahoo dot com dot au Description: When getting children/attributes without using methods to specify a namespace explicity, non-prefixed names are returned, but not prefixed ones, even if the prefixed names are in the same namespace. (Note that in fixing this bug there is a subtlety: the default namespace for attributes is inherited from the element in which they appear.) Reproduce code: --- $str=<< http://localhost/a"; xmlns:ns="http://localhost/a"; xmlns:other="http://localhost/b"; > 1 1 0 1 1 0 0 0 1 DONE; $xml = simplexml_load_string($str); foreach ($xml->elem as $elem) { echo count($elem->attributes()); } echo "\n"; foreach ($xml->children('http://localhost/a')->elem as $elem) { echo count($elem->attributes()); } echo "\n"; foreach ($xml->children('http://localhost/b')->elem as $elem) { echo count($elem->attributes()); } echo "\n"; Expected result: 110110 110110 101 Actual result: -- 100 100100 100 -- Edit this bug report at http://bugs.php.net/?id=42026&edit=1
#42026 [Opn]: Incorrect handling of default namespaces
ID: 42026 User updated by: mail_ben_schmidt at yahoo dot com dot au Reported By: mail_ben_schmidt at yahoo dot com dot au Status: Open Bug Type: SimpleXML related Operating System: Mac OS X PHP Version: 5.2.3 New Comment: Irrelevant to the bug itself, but one of my numbers that were meant to be helpful in the code example was wrong. Should have read: 1 0 1 Previous Comments: [2007-07-18 11:09:01] mail_ben_schmidt at yahoo dot com dot au Description: When getting children/attributes without using methods to specify a namespace explicity, non-prefixed names are returned, but not prefixed ones, even if the prefixed names are in the same namespace. (Note that in fixing this bug there is a subtlety: the default namespace for attributes is inherited from the element in which they appear.) Reproduce code: --- $str=<< http://localhost/a"; xmlns:ns="http://localhost/a"; xmlns:other="http://localhost/b"; > 1 1 0 1 1 0 0 0 1 DONE; $xml = simplexml_load_string($str); foreach ($xml->elem as $elem) { echo count($elem->attributes()); } echo "\n"; foreach ($xml->children('http://localhost/a')->elem as $elem) { echo count($elem->attributes()); } echo "\n"; foreach ($xml->children('http://localhost/b')->elem as $elem) { echo count($elem->attributes()); } echo "\n"; Expected result: 110110 110110 101 Actual result: -- 100 100100 100 -- Edit this bug report at http://bugs.php.net/?id=42026&edit=1
#42026 [NEW]: Incorrect handling of default namespaces
From: mail_ben_schmidt at yahoo dot com dot au Operating system: Mac OS X PHP version: 5.2.3 PHP Bug Type: SimpleXML related Bug description: Incorrect handling of default namespaces Description: When getting children/attributes without using methods to specify a namespace explicity, non-prefixed names are returned, but not prefixed ones, even if the prefixed names are in the same namespace. (Note that in fixing this bug there is a subtlety: the default namespace for attributes is inherited from the element in which they appear.) Reproduce code: --- $str=<< http://localhost/a"; xmlns:ns="http://localhost/a"; xmlns:other="http://localhost/b"; > 1 1 0 1 1 0 0 0 1 DONE; $xml = simplexml_load_string($str); foreach ($xml->elem as $elem) { echo count($elem->attributes()); } echo "\n"; foreach ($xml->children('http://localhost/a')->elem as $elem) { echo count($elem->attributes()); } echo "\n"; foreach ($xml->children('http://localhost/b')->elem as $elem) { echo count($elem->attributes()); } echo "\n"; Expected result: 110110 110110 101 Actual result: -- 100 100100 100 -- Edit bug report at http://bugs.php.net/?id=42026&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42026&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42026&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42026&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=42026&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=42026&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=42026&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=42026&r=needscript Try newer version:http://bugs.php.net/fix.php?id=42026&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=42026&r=support Expected behavior:http://bugs.php.net/fix.php?id=42026&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=42026&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=42026&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=42026&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42026&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=42026&r=dst IIS Stability:http://bugs.php.net/fix.php?id=42026&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=42026&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=42026&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=42026&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=42026&r=mysqlcfg
#42023 [Opn]: html_entity_decode skips some chars
ID: 42023 Updated by: [EMAIL PROTECTED] Reported By: anders dot jenbo at pc dot dk Status: Open Bug Type: Strings related Operating System: Linux -PHP Version: 4.3 +PHP Version: 5.2.3, 4.3 New Comment: I verified it with 5.2.3 so it wasn't totally wrong. :) Previous Comments: [2007-07-18 10:02:05] anders dot jenbo at pc dot dk wrong version [2007-07-18 06:27:46] anders dot jenbo at pc dot dk Description: html_entity_decode does not handle ” “ „ ∞ ’ • ™ … – Reproduce code: --- echo(html_entity_decode(' ”“„∞’•™…–')); Expected result: ∞ Actual result: -- ”“„∞’•™…– -- Edit this bug report at http://bugs.php.net/?id=42023&edit=1
#39883 [NoF->Opn]: ftp_get - coredump
ID: 39883 User updated by: youza at post dot cz Reported By: youza at post dot cz -Status: No Feedback +Status: Open Bug Type: FTP related Operating System: Fedora Core 4 PHP Version: 4.4.4 New Comment: This problem relate to system call select() and max size of structure fd_set - relate to __FD_SETSIZE __FD_SETSIZE increase to 65536 in files: /usr/include/bits/typesizes.h /usr/include/linuxthreads/bits/typesizes.h /usr/include/linux/posix_types.h recompile PHP and the core dump there's not again. Previous Comments: [2007-01-19 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". [2007-01-11 09:57:13] [EMAIL PROTECTED] I don't get it either. If there is no way to reproduce it NOT on your server, then I'd suspect that the problem is somewhere else on your server and not in PHP. [2007-01-08 10:26:55] youza at post dot cz No, the PHP CLI command is ok and file is transferred. I use the ftp_nb_get - this function ok (no problem). What's the difference between ftp_get and ftp_nb_get in the source code ? Hmm, our server is very mass hosting system - the number of virtual servers is cca 1800 (not all very active). The config contains : ( example for one virtual) DocumentRoot /path/to/home/ ServerName www.xxx.xx TransferLog /var/log/httpd/XXX/home/access php_admin_value include_path .:/path/to/home/ php_admin_value doc_root /path/to/home/ php_admin_value open_basedir /path/to/home/ i reduce the number of virtulas to 950 and ftp_get work ok ( 20 times test). The next tests is very interesting 1. Virtual hosts 1205 - error ( segmentation fault) 2. Virtual hosts 1204 - different error - www page in the Firefox show error and the same error messages were saved to file name "0" - zero !!! FTP file not transferred. -rw-rw-r-- 1 apache webuser 445 Jan 8 10:06 0 The "0" file contains: [08-Jan-2007 10:00:17] PHP Warning: ftp_login() expects parameter 1 to be resource, boolean given in /path/to/home/test.php on line 37 [08-Jan-2007 10:00:17] PHP Warning: ftp_get() expects parameter 1 to be resource, boolean given in /path/to/home/test.php on line 43 [08-Jan-2007 10:00:17] PHP Warning: ftp_close() expects parameter 1 to be resource, boolean given in /path/to/home/test.php on line 51 3. Virtual hosts 1203 - error Segmentation fault ftp file not transferred buf the directory contains the empty destination file: -rw-rw-r-- 1 apache webuser0 Jan 8 10:16 test_l.dat 4. Virtual hosts 1202 the same like 3. 5. Virtual hosts 1201 the same like 2. but error message in web browser and "0" file is: [08-Jan-2007 10:17:47] PHP Warning: ftp_get(): Opening BINARY mode data connection for welcome.msg (241 bytes). in /path/to/home/test.php on line 43 6. Virtual hosts <= 1200 - work OK, file transferred ( 20 tests) Apache and php not produce any error message with file or system limits problem. The system limits: ulimit -a core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited file size (blocks, -f) unlimited pending signals (-i) 32765 max locked memory (kbytes, -l) 32 max memory size (kbytes, -m) unlimited open files (-n) 4096 pipe size(512 bytes, -p) 8 POSIX message queues (bytes, -q) 819200 stack size (kbytes, -s) 10240 cpu time (seconds, -t) unlimited max user processes (-u) 32765 virtual memory (kbytes, -v) unlimited file locks (-x) unlimited /proc/sys/fs/file-max 206037 /proc/sys/fs/file-nr 4096 0 206037 The system: Linux version 2.6.17-1.2142_FC4smp FC4 glibc-2.3.6, httpd-2.0.54 httpd -l Compiled in modules: core.c prefork.c http_core.c mod_so.c The apache working model: prefork. I don't get it . [2007-01-03 15:30:30] [EMAIL PROTECTED] Are you able to replicate it using PHP CLI? Or is it reproducible only with Apache2? For the record, I don't see any problems with fetching the "welcome.msg" from the server you mentioned using the reproduce code of yours with _both_ Apache2/worker and PHP CLI. [2007-01-03 15:10:16] youza at post dot cz Yes I reproduce it in the public FTP server: URL: ftp://atrey.karlin.mff.cuni.cz/welcome.msg Result: Warning: ftp_get(): Opening BINARY mode data connection for welcome.msg (241 byte
#42023 [Opn]: html_entity_decode skips some chars
ID: 42023 User updated by: anders dot jenbo at pc dot dk Reported By: anders dot jenbo at pc dot dk Status: Open Bug Type: Strings related Operating System: Linux -PHP Version: 5.2.3 +PHP Version: 4.3 New Comment: wrong version Previous Comments: [2007-07-18 06:27:46] anders dot jenbo at pc dot dk Description: html_entity_decode does not handle ” “ „ ∞ ’ • ™ … – Reproduce code: --- echo(html_entity_decode(' ”“„∞’•™…–')); Expected result: ∞ Actual result: -- ”“„∞’•™…– -- Edit this bug report at http://bugs.php.net/?id=42023&edit=1
#42025 [NEW]: strpos(); if $needle = '::', can't find string
From: xatyonline at gmail dot com Operating system: Linux PHP version: 5.2.3 PHP Bug Type: PHP options/info functions Bug description: strpos(); if $needle = '::', can't find string Description: strpos($str, $needles, $offset); if $str haves ':', if $needles have ':', then $offset does not have mean. Reproduce code: --- $str = "::soonsoonsoon::"; for($i=0; $i<3; $i++) { echo(strpos($str, "::soon::", $i).' '); } Expected result: Normal -- 0 8 16 result 0 8 8 -- Edit bug report at http://bugs.php.net/?id=42025&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42025&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42025&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42025&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=42025&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=42025&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=42025&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=42025&r=needscript Try newer version:http://bugs.php.net/fix.php?id=42025&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=42025&r=support Expected behavior:http://bugs.php.net/fix.php?id=42025&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=42025&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=42025&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=42025&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42025&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=42025&r=dst IIS Stability:http://bugs.php.net/fix.php?id=42025&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=42025&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=42025&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=42025&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=42025&r=mysqlcfg
#42025 [Opn->Fbk]: strpos(); if $needle = '::', can't find string
ID: 42025 Updated by: [EMAIL PROTECTED] Reported By: xatyonline at gmail dot com -Status: Open +Status: Feedback Bug Type: Strings related Operating System: Linux PHP Version: 5.2.3 New Comment: The expected result is 0 8 8 for your code, so what is the problem? Previous Comments: [2007-07-18 09:01:27] xatyonline at gmail dot com Description: strpos($str, $needles, $offset); if $str haves ':', if $needles have ':', then $offset does not have mean. Reproduce code: --- $str = "::soonsoonsoon::"; for($i=0; $i<3; $i++) { echo(strpos($str, "::soon::", $i).' '); } Expected result: Normal -- 0 8 16 result 0 8 8 -- Edit this bug report at http://bugs.php.net/?id=42025&edit=1
#41976 [Opn->Fbk]: Please read before you mark bogus
ID: 41976 Updated by: [EMAIL PROTECTED] Reported By: stefan dot priebsch at e-novative dot de -Status: Open +Status: Feedback Bug Type: JSON related Operating System: WinXP PHP Version: 5.2.3 New Comment: Don't use such texts for 'Summary'. Please write something that describes the problem.. Previous Comments: [2007-07-17 19:09:53] stefan dot priebsch at e-novative dot de Johannes, would you please care to actually *read* and try to *understand* my bug report before marking it as bogus? My point is that json_encode() works properly with nested XML, but does NOT work correctly when the nested XML contains CDATA. [2007-07-17 12:36:14] [EMAIL PROTECTED] $xml and (string)$xml are different things. Using different things as arguments for a function gives different results. [2007-07-17 10:46:38] stefan dot priebsch at e-novative dot de I re-opened the bug due to the discussion of bug #42001. json_encode() does not work on nested XML with a string cast, but it does work without a string cast. (Of course except for the CDATA problem that made me file this bug in the first place.) $xml = new SimpleXMLElement('testvaluesomething'); var_dump(json_encode($xml)); var_dump(json_encode((string) $xml)); $xml = new SimpleXMLElement('valuesomething'); var_dump(json_encode($xml)); var_dump(json_encode((string) $xml)); [2007-07-13 08:08:02] [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 Yes, and it will try to serialize the SimpleXML object, what won't work, that's part of SimpleXML's behaviour [2007-07-13 06:33:16] stefan dot priebsch at e-novative dot de Sorry, I disagree. This is a bug, not bogus. The manual says that json_encode works on any type except resources. $xml = new SimpleXMLElement(''); var_dump(is_resource($xml)); outputs false, (which is obvious as SimpleXML is not listed in the list of resource types). Thus SimpleXML is not a resource and must be processed by json_encode() without a string cast. How would I supposed to cast an XML tree to string anyway? Please have a look at bug#38680, where a similar issue was discussed. 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/41976 -- Edit this bug report at http://bugs.php.net/?id=41976&edit=1
#41874 [Opn->Fbk]: php (CLI) exec function passes no stderr output
ID: 41874 Updated by: [EMAIL PROTECTED] Reported By: ckeefer at us dot nomura dot com -Status: Open +Status: Feedback Bug Type: CGI related Operating System: Windows XP Pro SP2 PHP Version: 5.2CVS-2007-07-03 New Comment: This works fine with *nix (found from the user comments at http://www.php.net/manual/en/function.exec.php : &1", $out, $err); var_dump($out); ?> I don't know if Windows supports something like this, but iirc, it should. Previous Comments: [2007-07-03 12:56:37] ckeefer at us dot nomura dot com Thank you for the quick response. The new version still shows no STDERR output from a cmd.exe window. Thanks C:\php5.2fix>php test_exec.php Two exec statements: --- This exec should result in error for non-existant dir: Array ( ) --- This exec works: Array ( [0] => Volume in drive C is LOCAL DISK [1] => Volume Serial Number is 4054-8345 [2] => [3] => Directory of C:\php5.2fix [4] => [5] => 07/03/2007 08:08 AM32,821 php.exe [6] =>1 File(s) 32,821 bytes [7] =>0 Dir(s) 58,549,849,088 bytes free ) C:\php5.2fix> C:\php5.2fix>type test_exec.php [2007-07-03 06:41:22] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi [2007-07-02 18:39:25] ckeefer at us dot nomura dot com Description: PHP CLI version 5.1.8 thru 5.2.1 Windows Binary - exec() function, when error is generated passes STDERR no problem to CLI window. 5.2.2+ STDERR output has vanished. Nothing in documentation or search suggests what happened. No other changes 5.2.1 just downloaded and tested with generic setup (no php.ini or other modifications) stderr from exec() functions perfectly. 5.2.2+ system() apparently passes stderr properly, but is not useful for most of what we do. STDOUT appears to be fine all versions. Oddly, 5.2.2+ versions still work correctly with cygwin/bash 3.1 Note in 5.2.2 changelog contains this bit: - Fixed commandline handling for CLI and CGI. (Marcus, Johannes) Thanks, Chip Keefer Reproduce code: --- Expected result: NJPC3916:php5.22$ php test_exec.php php test_exec.php The system cannot find the path specified. - Works properly with cygwin Actual result: -- C:\php5.22>php test_exec.php C:\php5.22> No STDERR -- Edit this bug report at http://bugs.php.net/?id=41874&edit=1
#41862 [Opn]: Errorhandler doesn't work (PHP4 only)
ID: 41862 User updated by: thomas at thoftware dot de Reported By: thomas at thoftware dot de Status: Open Bug Type: Scripting Engine problem Operating System: Windows XP PHP Version: 4.4.7 New Comment: So someone may change status to "Wont fix"? And maybe add something like "Don't use functions as argument for require() when setting an errorhandler." to the documentation of set_error_handler()? Previous Comments: [2007-07-10 21:55:09] [EMAIL PROTECTED] right, there's a problem with PHP 4 if foo does not exist, but I doubt anybody is going to fix it. Program received signal SIGSEGV, Segmentation fault. php_strip_url_passwd (url=0x0) at /home/johannes/src/php/PHP_4_4/main/fopen_wrappers.c:481 481 while (*p) { (gdb) bt #0 php_strip_url_passwd (url=0x0) at /home/johannes/src/php/PHP_4_4/main/fopen_wrappers.c:481 #1 0x080b46d8 in php_message_handler_for_zend (message=2, data=0x0) at /home/johannes/src/php/PHP_4_4/main/main.c:812 #2 0x080f22e1 in execute (op_array=0x8df088c) at /home/johannes/src/php/PHP_4_4/Zend/zend_execute.c:2240 #3 0x080df3ab in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/johannes/src/php/PHP_4_4/Zend/zend.c:935 #4 0x080b3805 in php_execute_script (primary_file=0xbf88fed0) at /home/johannes/src/php/PHP_4_4/main/main.c:1757 #5 0x080f9d39 in main (argc=1, argv=0xbf88ff94) at /home/johannes/src/php/PHP_4_4/sapi/cli/php_cli.c:838 [2007-07-09 13:45:09] thomas at thoftware dot de At 5 Jul 1:55pm UTC somebody changed the subject and added ' (PHP4 only)' with no additional comment. Since then no further action took place. Can any of you developers out there tell me what this means? [2007-07-03 08:30:22] thomas at thoftware dot de I've checked the documentation another time and did not find anything that explains or even discusses the above behaviour. As I'm not sure if anyone is reading this while the status is "Bogus", I've decided to reopen it. Maybe someone can read my additional submissions - and if you are sure it is bogus, than please give me a little more specific hint, where I can find it in the documentation (as normally done when a submission is answered with the "Thank you for taking the time"-Text). Thank you in advance. [2007-07-02 06:42:34] thomas at thoftware dot de Something I found even earlier is: "The following error types cannot be handled with a user defined function: E_ERROR, E_PARSE, E_CORE_ERROR, E_CORE_WARNING, E_COMPILE_ERROR, E_COMPILE_WARNING, and most of E_STRICT raised in the file where set_error_handler() is called.". Is that what you mean I should have read? Please note, that that isn't the problem. I don't want these error types to be handled. I simply want the whole construct to run and not to crash. The above script works fine in these 2 versions: Reproduce code 2 (works): --- function foo($foo) { return($foo); } error_reporting(E_ALL); require_once(foo('foo')); Reproduce code 3 (works): --- function ehandler($e,$t,$f,$l,$c) { echo $t; } set_error_handler('ehandler'); error_reporting(E_ALL); require_once('foo'); (Where 'fine' means, it shows the error an stops.) Can you pleease explain to me, why the first version crashes without any message? [2007-06-30 21:29:30] thomas at thoftware dot de Description: Setting an Errorhandler with set_error_handler() and then calling require() with a Function as Argument doesn't produce the expected Result. Reproduce code: --- function ehandler($e,$t,$f,$l,$c) { echo $t; } function foo($foo) { return($foo); } set_error_handler('ehandler'); error_reporting(E_ALL); require_once(foo('foo')); Expected result: Some Errormessage like this: main(foo) [function.main]: failed to open stream: No such file or directory Fatal error: main() [function.require]: Failed opening required 'foo' (include_path='.;c:\php4\pear') in foo.php on line x Actual result: -- Nothing (infinite loop?). PHP crashes. Using no Errorhandler or giving 'foo' directly to require_once() works. -- Edit this bug report at http://bugs.php.net/?id=41862&edit=1
#42024 [NEW]: bug in the chm files english for the documentation the function list is truncat
From: daniel dot rajszajt at rvponp dot fgov dot be Operating system: Windows PHP version: 5.2.3 PHP Bug Type: *General Issues Bug description: bug in the chm files english for the documentation the function list is truncat Description: bug in the chm files english for the documentation the function list is truncated Reproduce code: --- bug in the chm files english for the documentation the function list is truncated Expected result: bug in the chm files english for the documentation the function list is truncated Actual result: -- bug in the chm files english for the documentation the function list is truncated -- Edit bug report at http://bugs.php.net/?id=42024&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42024&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42024&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42024&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=42024&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=42024&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=42024&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=42024&r=needscript Try newer version:http://bugs.php.net/fix.php?id=42024&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=42024&r=support Expected behavior:http://bugs.php.net/fix.php?id=42024&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=42024&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=42024&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=42024&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42024&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=42024&r=dst IIS Stability:http://bugs.php.net/fix.php?id=42024&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=42024&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=42024&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=42024&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=42024&r=mysqlcfg
#20215 [Com]: fputs(); (Line Feed / Carriage Return)
ID: 20215 Comment by: mufd2002 at hotmail dot com Reported By: admin at serveurperso dot com Status: No Feedback Bug Type: Filesystem function related Operating System: Windows 2000 PHP Version: 4.3.1-dev New Comment: I can't reproduce the problem using PHP 4.3RC1 or the slightly more up to date PHP 4.3 development branch and the script that you provided, either under win XP with IIS or linux. I'm using php.ini-recommended, so please make sure that you don't have any zany settings turned on in your php.ini or server configuration. Previous Comments: [2003-02-25 02:04:34] [EMAIL PROTECTED] No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you. [2003-02-19 19:39:13] [EMAIL PROTECTED] What if you write the file in 'wb' (binary) mode? Does it make any difference? [2003-02-11 15:57:26] 6th at katiusha dot com dot ru Funnily, the bug occurs when I run php as a module. When I run php using cgi or commandline, no excess 0D symbols appear. [2003-02-11 15:40:50] 6th at katiusha dot com dot ru PHP 4.3.0 (build Dec 27 2002) Apache 1.3.23 Win ME This: $f=fopen("bug","w"); fwrite($f,"test "); // 74 65 73 74 _0D 0A_ fclose($f); creates file: 74 65 73 74 _0D 0D 0A_ I'm using plain files with ms-dos line breaks to store databases, so fwrite is _very_ important for me to work correctly. [2003-02-09 10:53:25] [EMAIL PROTECTED] Similar to bug #21916 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/20215 -- Edit this bug report at http://bugs.php.net/?id=20215&edit=1