#44041 [WFx]: number_format returns garbage for thousands sep and latvian locale
ID: 44041 User updated by: trickie at gmail dot com Reported By: trickie at gmail dot com Status: Wont fix Bug Type: *General Issues Operating System: Gentoo Linux PHP Version: 5.2.5 New Comment: Thanks for the tip. Previous Comments: [2008-02-07 00:42:29] [EMAIL PROTECTED] The "garbage" you get is a non-breaking space in UTF-8. You can always use utf_decode() on it: Since unicode support is coming in PHP6 and will not be addressed before, this is "wont fix" in earlier versions. I suggest you really don't use setlocale() if you want to use UTF-8. At least not for numbers. [2008-02-05 07:31:30] trickie at gmail dot com Output requested: array(18) { ["decimal_point"]=> string(1) "," ["thousands_sep"]=> string(2) "��" ["int_curr_symbol"]=> string(4) "LVL " ["currency_symbol"]=> string(2) "Ls" ["mon_decimal_point"]=> string(1) "," ["mon_thousands_sep"]=> string(2) "��" ["positive_sign"]=> string(0) "" ["negative_sign"]=> string(1) "-" ["int_frac_digits"]=> int(2) ["frac_digits"]=> int(2) ["p_cs_precedes"]=> int(1) ["p_sep_by_space"]=> int(1) ["n_cs_precedes"]=> int(1) ["n_sep_by_space"]=> int(1) ["p_sign_posn"]=> int(3) ["n_sign_posn"]=> int(3) ["grouping"]=> array(2) { [0]=> int(3) [1]=> int(3) } ["mon_grouping"]=> array(2) { [0]=> int(3) [1]=> int(3) } } [2008-02-05 05:09:48] [EMAIL PROTECTED] What does this output: [2008-02-04 15:18:20] trickie at gmail dot com Description: If you set the locale to 'lv_LV.UTF-8' and have the locale generated on your system, then the code below will return garbage as the 'thousands separator'. It displays ok for me when running with CLI SAPI Reproduce code: --- Expected result: 20 000 Actual result: -- 20�000 -- Edit this bug report at http://bugs.php.net/?id=44041&edit=1
#21649 [Com]: This this problem with fopen() function for windows
ID: 21649 Comment by: a_very_romantic at yahoo dot com Reported By: lipinski7722 at rogers dot com Status: No Feedback Bug Type: Filesystem function related Operating System: win2000 server PHP Version: 4.3.0 New Comment: Thanks a lot [url=http://www.roro44.com]دردشة[/url] و [url=http://www.roro44.com]شات[/url] Previous Comments: [2007-10-05 19:32:15] cxv at bmn dot jb http://www.meta-fx.com http://www.forex.co.ir forex ÝÇÑÓ [2007-10-02 17:10:22] fhj at gfd dot jdk http://www.meta-fx.com http://www.forex.co.ir forex ÝÇÑÓ [2007-09-28 20:13:55] fkl at tfu dot jgfi http://www.meta-fx.com forexÝÇÑÓ [2007-06-08 08:00:06] manny dot ovena at dev dot com In order to change the include_path in pear you must reinstall pear after you have made the changes to the php.ini file. Install PHP, change PHP.ini, and then use go-pear.bat. [2003-02-25 02:05:13] [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. 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/21649 -- Edit this bug report at http://bugs.php.net/?id=21649&edit=1
#44067 [NEW]: Implement hasChildren in SimpleXML
From: [EMAIL PROTECTED] Operating system: N/A PHP version: 5.2.5 PHP Bug Type: Feature/Change Request Bug description: Implement hasChildren in SimpleXML Description: SimpleXML provides the useful children() method to return the children of a given element, it returns E_WARNING if no children are present. As such, it would be useful to be able to ensure an element has children before attempting to retreive them. can i has cheezburger? or just bool SimpleXMLElement->hasChidren() -- Edit bug report at http://bugs.php.net/?id=44067&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=44067&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44067&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44067&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44067&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44067&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44067&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44067&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=44067&r=needscript Try newer version:http://bugs.php.net/fix.php?id=44067&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=44067&r=support Expected behavior:http://bugs.php.net/fix.php?id=44067&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=44067&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=44067&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=44067&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=44067&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=44067&r=dst IIS Stability:http://bugs.php.net/fix.php?id=44067&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=44067&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=44067&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=44067&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=44067&r=mysqlcfg
#44065 [Opn]: fsockopen() throws warning and doesn't return error
ID: 44065 Updated by: [EMAIL PROTECTED] Reported By: joe at digg dot com Status: Open Bug Type: Streams related Operating System: Linux devwww25 2.6.12-1-amd64-k8 PHP Version: 5.2.5 New Comment: Hello, Got the same with 5.2.5 and 6 (32 bits machine) [EMAIL PROTECTED] bugs]# /usr/local/php6/bin/php fsockopen.php Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /root/bugs/fsockopen.php on line 6 Warning: fsockopen(): unable to connect to www.asdf98070978.org:80 (Unknown error) in /root/bugs/fsockopen.php on line 6 ERROR: (#4) Previous Comments: [2008-02-07 00:48:42] joe at digg dot com Did you run the reproduce code? I can consistently reproduce no error and warnings being thrown from many machines. What was the output when you ran the code below? Though, depending on the machine, I sometimes get an error code. [2008-02-07 00:44:42] [EMAIL PROTECTED] Hello, I have not been able to reproduce it. Can please give us an extra explanation about it? [2008-02-06 22:37:42] joe at digg dot com Description: When getaddrinfo fails fsockopen() fails to return an error string or error code. Reproduce code: --- Expected result: fsockopen() should return false and set an appropriate error code and error message. Actual result: -- It spits out a warning and doesn't include any sort of error message or string: Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /home/jstump/repository/wildcat/branches/config/foo.php on line 5 Warning: fsockopen(): unable to connect to www.asdf98070978.org:80 (Unknown error) in /home/jstump/repository/wildcat/branches/config/foo.php on line 5 ERROR: (#0) -- Edit this bug report at http://bugs.php.net/?id=44065&edit=1
#44063 [Opn]: RecursiveIteratorIterator needs rewind right after creation
ID: 44063 Updated by: [EMAIL PROTECTED] Reported By: smirnov at h-type dot com Status: Open Bug Type: SPL related Operating System: Windows PHP Version: 5.2.5 New Comment: Marcus, is my impression or is missing a rewind in this constructor? http://felipe.ath.cx/diff/bug44063.diff Previous Comments: [2008-02-06 14:28:08] smirnov at h-type dot com Description: RecursiveIteratorIterator returns one extra result if we don't provide rewind() before while. Reproduce code: --- $array = array( array('name'=>'butch', 'sex'=>'male'), array('name'=>'fido', 'sex'=>'male'), array('name'=>'girly','sex'=>'female') ); $it=new RecursiveIteratorIterator(new RecursiveArrayIterator($array)); //$it->rewind(); //The result will be as expected if uncomment this while($it->valid()){ echo $it->key().' -- '.$it->current()."\n"; $it->next(); } Expected result: name -- butch sex -- male name -- fido sex -- male name -- girly sex -- female Actual result: -- 0 -- Array name -- butch sex -- male name -- fido sex -- male name -- girly sex -- female -- Edit this bug report at http://bugs.php.net/?id=44063&edit=1
#43677 [Com]: Inconsistent behaviour of include_path set with php_value
ID: 43677 Comment by: manuel at mausz dot at Reported By: root at net1 dot cc Status: Feedback Bug Type: Safe Mode/open_basedir Operating System: FreeBSD 6.2 PHP Version: 5.2.5 New Comment: There's no need to test this. I can still see the bug in CVS. Look at zend_ini.c: ini_entry->modifiable gets modified (... = ZEND_INI_SYSTEM) and won't get restored after the request has been processed (zend_restore_ini_entry_cb). Previous Comments: [2008-02-07 00:47:55] [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 Just to be sure this isn't fixed already. There were some changes done but I'm not sure anymore if those actually went into 5.2.5 and I don't have Apache setup around to test right now.. [2008-02-07 00:45:48] [EMAIL PROTECTED] See also bug #43755 [2008-02-05 13:06:41] manuel at mausz dot at Can someone please assign this bug to some dev or commit my first patch for 5.3 and HEAD. This bug is annoying and I don't want to see it in 5.3 again. [2008-01-22 10:32:59] phpbugs at afilas dot nl I have the same problem here with Apache 1.3 and FreeBSD 6.2. I am wondering why there is no response from the PHP dev team on this issue, as this a fairly serious issue IMHO. I chose to downgrade to 5.2.4 for the time being, hoping that this issue is fixed in 5.2.6. [2008-01-21 18:37:21] manuel at mausz dot at As I said before, my patch breaks the ini settings abi resulting in segfaults if "old" extensions are loaded. Due to the fact that one of my customers is using a proprietary extension I have implemented an alternate, dirty but hopefully non-breaking patch. The patch stores the original value 3 bits to the left of the new value. This method won't break any php or pecl extensions (all checked). Only ext/reflection needs to be recompiled. http://manuel.mausz.at/coding/patches/php/5.2.5/php5.2.5-restore-ini-level2.patch 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/43677 -- Edit this bug report at http://bugs.php.net/?id=43677&edit=1
#44065 [Opn]: fsockopen() throws warning and doesn't return error
ID: 44065 User updated by: joe at digg dot com Reported By: joe at digg dot com Status: Open Bug Type: Streams related Operating System: Linux devwww25 2.6.12-1-amd64-k8 PHP Version: 5.2.5 New Comment: Did you run the reproduce code? I can consistently reproduce no error and warnings being thrown from many machines. What was the output when you ran the code below? Though, depending on the machine, I sometimes get an error code. Previous Comments: [2008-02-07 00:44:42] [EMAIL PROTECTED] Hello, I have not been able to reproduce it. Can please give us an extra explanation about it? [2008-02-06 22:37:42] joe at digg dot com Description: When getaddrinfo fails fsockopen() fails to return an error string or error code. Reproduce code: --- Expected result: fsockopen() should return false and set an appropriate error code and error message. Actual result: -- It spits out a warning and doesn't include any sort of error message or string: Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /home/jstump/repository/wildcat/branches/config/foo.php on line 5 Warning: fsockopen(): unable to connect to www.asdf98070978.org:80 (Unknown error) in /home/jstump/repository/wildcat/branches/config/foo.php on line 5 ERROR: (#0) -- Edit this bug report at http://bugs.php.net/?id=44065&edit=1
#43677 [Opn->Fbk]: Inconsistent behaviour of include_path set with php_value
ID: 43677 Updated by: [EMAIL PROTECTED] Reported By: root at net1 dot cc -Status: Open +Status: Feedback Bug Type: Safe Mode/open_basedir Operating System: FreeBSD 6.2 PHP Version: 5.2.5 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 Just to be sure this isn't fixed already. There were some changes done but I'm not sure anymore if those actually went into 5.2.5 and I don't have Apache setup around to test right now.. Previous Comments: [2008-02-07 00:45:48] [EMAIL PROTECTED] See also bug #43755 [2008-02-05 13:06:41] manuel at mausz dot at Can someone please assign this bug to some dev or commit my first patch for 5.3 and HEAD. This bug is annoying and I don't want to see it in 5.3 again. [2008-01-22 10:32:59] phpbugs at afilas dot nl I have the same problem here with Apache 1.3 and FreeBSD 6.2. I am wondering why there is no response from the PHP dev team on this issue, as this a fairly serious issue IMHO. I chose to downgrade to 5.2.4 for the time being, hoping that this issue is fixed in 5.2.6. [2008-01-21 18:37:21] manuel at mausz dot at As I said before, my patch breaks the ini settings abi resulting in segfaults if "old" extensions are loaded. Due to the fact that one of my customers is using a proprietary extension I have implemented an alternate, dirty but hopefully non-breaking patch. The patch stores the original value 3 bits to the left of the new value. This method won't break any php or pecl extensions (all checked). Only ext/reflection needs to be recompiled. http://manuel.mausz.at/coding/patches/php/5.2.5/php5.2.5-restore-ini-level2.patch [2008-01-20 11:22:55] thorvath at fullnet dot hu I have the same problem on FreeBSD 6.1 with php5-5.2.5, tried to patch with the FreeBSD patch above, recompiled all modules, when I load php5_module apache sigfaults with 11 and core dumps, I use the apache22 port. 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/43677 -- Edit this bug report at http://bugs.php.net/?id=43677&edit=1
#43755 [Opn->Bgs]: php_admin_value include_path on one VirtualHost affects all VirtualHosts
ID: 43755 Updated by: [EMAIL PROTECTED] Reported By: andrew-php at thepenry dot net -Status: Open +Status: Bogus Bug Type: Apache2 related Operating System: centos4 PHP Version: 5.2.5 New Comment: Duplicate of bug #43677 Previous Comments: [2008-01-10 05:20:30] andrew-php at thepenry dot net This bug seems to be the same as: http://bugs.php.net/bug.php?id=43677 [2008-01-04 23:10:19] andrew-php at thepenry dot net Description: Using php_admin_value include_path in one VirtualHost prevents using set_include_path() in another VirtualHost. The documentation is unclear about whether this is the correct behavior, but it seems like php_admin_value should only effect the VirtualHost it was declared in, not the entire server. -- Edit this bug report at http://bugs.php.net/?id=43755&edit=1
#43677 [Opn]: Inconsistent behaviour of include_path set with php_value
ID: 43677 Updated by: [EMAIL PROTECTED] Reported By: root at net1 dot cc Status: Open Bug Type: Safe Mode/open_basedir Operating System: FreeBSD 6.2 PHP Version: 5.2.5 New Comment: See also bug #43755 Previous Comments: [2008-02-05 13:06:41] manuel at mausz dot at Can someone please assign this bug to some dev or commit my first patch for 5.3 and HEAD. This bug is annoying and I don't want to see it in 5.3 again. [2008-01-22 10:32:59] phpbugs at afilas dot nl I have the same problem here with Apache 1.3 and FreeBSD 6.2. I am wondering why there is no response from the PHP dev team on this issue, as this a fairly serious issue IMHO. I chose to downgrade to 5.2.4 for the time being, hoping that this issue is fixed in 5.2.6. [2008-01-21 18:37:21] manuel at mausz dot at As I said before, my patch breaks the ini settings abi resulting in segfaults if "old" extensions are loaded. Due to the fact that one of my customers is using a proprietary extension I have implemented an alternate, dirty but hopefully non-breaking patch. The patch stores the original value 3 bits to the left of the new value. This method won't break any php or pecl extensions (all checked). Only ext/reflection needs to be recompiled. http://manuel.mausz.at/coding/patches/php/5.2.5/php5.2.5-restore-ini-level2.patch [2008-01-20 11:22:55] thorvath at fullnet dot hu I have the same problem on FreeBSD 6.1 with php5-5.2.5, tried to patch with the FreeBSD patch above, recompiled all modules, when I load php5_module apache sigfaults with 11 and core dumps, I use the apache22 port. [2008-01-19 15:56:00] scott at atomicrocketturtle dot com Testing this patch against 5.2.5, ioncube-loader and zend-optimizer will cause segmentation faults. Similar result with eaccelerator, which was resolved with a rebuild. 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/43677 -- Edit this bug report at http://bugs.php.net/?id=43677&edit=1
#44065 [Opn]: fsockopen() throws warning and doesn't return error
ID: 44065 Updated by: [EMAIL PROTECTED] Reported By: joe at digg dot com Status: Open Bug Type: Streams related Operating System: Linux devwww25 2.6.12-1-amd64-k8 PHP Version: 5.2.5 New Comment: Hello, I have not been able to reproduce it. Can please give us an extra explanation about it? Previous Comments: [2008-02-06 22:37:42] joe at digg dot com Description: When getaddrinfo fails fsockopen() fails to return an error string or error code. Reproduce code: --- Expected result: fsockopen() should return false and set an appropriate error code and error message. Actual result: -- It spits out a warning and doesn't include any sort of error message or string: Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /home/jstump/repository/wildcat/branches/config/foo.php on line 5 Warning: fsockopen(): unable to connect to www.asdf98070978.org:80 (Unknown error) in /home/jstump/repository/wildcat/branches/config/foo.php on line 5 ERROR: (#0) -- Edit this bug report at http://bugs.php.net/?id=44065&edit=1
#43819 [Opn->Bgs]: -
ID: 43819 Updated by: [EMAIL PROTECTED] Reported By: fxbois at gmail dot com -Status: Open +Status: Bogus Bug Type: Session related Operating System: RHEL3 PHP Version: 5.2.5 New Comment: Duplicate of bug #43677 And this report is missing a proper summary too, I wonder why..? Previous Comments: [2008-02-05 23:54:47] fxbois at gmail dot com It is so strange that such a big security issue is not dealt serioulsy by a core php developer. Manuel thanx for your patch. [2008-02-05 13:17:24] manuel at mausz dot at Same as Bug 43677 :) [2008-02-05 08:44:20] fxbois at gmail dot com I must confess that I changed all my servers because, as I said it was a serious security problem for me, and I had no feedback. The configuration I used to have was : 1/ session.save_path in the php.ini 2/ php_admin_value session.save_path in the virtualhost 3/ use off the function session_save_path() in a script. The script is loaded for every action but set a different path according to the URI. [2008-02-05 00:26:06] [EMAIL PROTECTED] Are you by any chance using php_admin_value / php_value anywhere in your httpd.conf / .htaccess files? And if so, are you using those to set different session.save_path? [2008-01-12 17:49:05] fxbois at gmail dot com I have in my php.ini file the value : session.save_path = "/tmp" When I try to change this value in a php script with session_save_path() the new value is not kept and the session.save_path still contains "/tmp". session_save_path("2;0777;web/tmp"); error_log(session_save_path()); // /tmp appears instead of 2;0777;web/tmp What is strange is that this bad behaviour only appears a few minutes after an apache restart. I tried many night build (5.2.6) with no success. I am sure that this behaviour appeared with 5.2.5. I can try patches if you want. Hope this new comment will help. This bug is very very annoying on a shared server. tia 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/43819 -- Edit this bug report at http://bugs.php.net/?id=43819&edit=1
#44041 [Opn->WFx]: number_format returns garbage for thousands sep and latvian locale
ID: 44041 Updated by: [EMAIL PROTECTED] Reported By: trickie at gmail dot com -Status: Open +Status: Wont fix Bug Type: *General Issues Operating System: Gentoo Linux PHP Version: 5.2.5 New Comment: The "garbage" you get is a non-breaking space in UTF-8. You can always use utf_decode() on it: Since unicode support is coming in PHP6 and will not be addressed before, this is "wont fix" in earlier versions. I suggest you really don't use setlocale() if you want to use UTF-8. At least not for numbers. Previous Comments: [2008-02-05 07:31:30] trickie at gmail dot com Output requested: array(18) { ["decimal_point"]=> string(1) "," ["thousands_sep"]=> string(2) "��" ["int_curr_symbol"]=> string(4) "LVL " ["currency_symbol"]=> string(2) "Ls" ["mon_decimal_point"]=> string(1) "," ["mon_thousands_sep"]=> string(2) "��" ["positive_sign"]=> string(0) "" ["negative_sign"]=> string(1) "-" ["int_frac_digits"]=> int(2) ["frac_digits"]=> int(2) ["p_cs_precedes"]=> int(1) ["p_sep_by_space"]=> int(1) ["n_cs_precedes"]=> int(1) ["n_sep_by_space"]=> int(1) ["p_sign_posn"]=> int(3) ["n_sign_posn"]=> int(3) ["grouping"]=> array(2) { [0]=> int(3) [1]=> int(3) } ["mon_grouping"]=> array(2) { [0]=> int(3) [1]=> int(3) } } [2008-02-05 05:09:48] [EMAIL PROTECTED] What does this output: [2008-02-04 15:18:20] trickie at gmail dot com Description: If you set the locale to 'lv_LV.UTF-8' and have the locale generated on your system, then the code below will return garbage as the 'thousands separator'. It displays ok for me when running with CLI SAPI Reproduce code: --- Expected result: 20 000 Actual result: -- 20�000 -- Edit this bug report at http://bugs.php.net/?id=44041&edit=1
#44066 [Opn->Fbk]: Inconsistent behaviour when using unset on SimpleXMLElements
ID: 44066 Updated by: [EMAIL PROTECTED] Reported By: freddie at witherden dot org -Status: Open +Status: Feedback Bug Type: SimpleXML related Operating System: OS X PHP Version: 5.2.5 New Comment: 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. Previous Comments: [2008-02-06 23:28:11] freddie at witherden dot org Description: Calling unset on a SimpleXMLElement is inconsistent. Assuming $xml is a SimpleXMLElement and test is an 'array'. unset($xml->test); works, yet unset($xml->test[0]); (or any number does not). Elements returned from xpath queries can also not be unset. unset should work on all SimpleXMLElements, irrespective of where in a document they reside/how they were acquired. Failing this behaviour it would seem logical to generate a warning in the instance where one tries to unset an element which can not be unset. -- Edit this bug report at http://bugs.php.net/?id=44066&edit=1
#44066 [NEW]: Inconsistent behaviour when using unset on SimpleXMLElements
From: freddie at witherden dot org Operating system: OS X PHP version: 5.2.5 PHP Bug Type: SimpleXML related Bug description: Inconsistent behaviour when using unset on SimpleXMLElements Description: Calling unset on a SimpleXMLElement is inconsistent. Assuming $xml is a SimpleXMLElement and test is an 'array'. unset($xml->test); works, yet unset($xml->test[0]); (or any number does not). Elements returned from xpath queries can also not be unset. unset should work on all SimpleXMLElements, irrespective of where in a document they reside/how they were acquired. Failing this behaviour it would seem logical to generate a warning in the instance where one tries to unset an element which can not be unset. -- Edit bug report at http://bugs.php.net/?id=44066&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=44066&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44066&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44066&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44066&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44066&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44066&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44066&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=44066&r=needscript Try newer version:http://bugs.php.net/fix.php?id=44066&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=44066&r=support Expected behavior:http://bugs.php.net/fix.php?id=44066&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=44066&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=44066&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=44066&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=44066&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=44066&r=dst IIS Stability:http://bugs.php.net/fix.php?id=44066&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=44066&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=44066&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=44066&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=44066&r=mysqlcfg
#44065 [NEW]: fsockopen() throws warning and doesn't return error
From: joe at digg dot com Operating system: Linux devwww25 2.6.12-1-amd64-k8 PHP version: 5.2.5 PHP Bug Type: Streams related Bug description: fsockopen() throws warning and doesn't return error Description: When getaddrinfo fails fsockopen() fails to return an error string or error code. Reproduce code: --- Expected result: fsockopen() should return false and set an appropriate error code and error message. Actual result: -- It spits out a warning and doesn't include any sort of error message or string: Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /home/jstump/repository/wildcat/branches/config/foo.php on line 5 Warning: fsockopen(): unable to connect to www.asdf98070978.org:80 (Unknown error) in /home/jstump/repository/wildcat/branches/config/foo.php on line 5 ERROR: (#0) -- Edit bug report at http://bugs.php.net/?id=44065&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=44065&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44065&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44065&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44065&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44065&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44065&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44065&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=44065&r=needscript Try newer version:http://bugs.php.net/fix.php?id=44065&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=44065&r=support Expected behavior:http://bugs.php.net/fix.php?id=44065&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=44065&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=44065&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=44065&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=44065&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=44065&r=dst IIS Stability:http://bugs.php.net/fix.php?id=44065&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=44065&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=44065&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=44065&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=44065&r=mysqlcfg
#41712 [Com]: [PATCH] Add CURL Progress Function Callback
ID: 41712 Comment by: renatobraga at gmail dot com Reported By: sdteffen at gmail dot com Status: Assigned Bug Type: Feature/Change Request Operating System: SuSE Linux 10.2 PHP Version: 5CVS-2007-06-16 (CVS) Assigned To: iliaa New Comment: Thanks Steffen, Worked like a charm Previous Comments: [2008-02-06 18:14:12] sdteffen at gmail dot com I've updated the patch to pass the return value from the callback function as Renato suggested: --- php-5.2.5.orig/ext/curl/interface.c 2007-10-13 13:35:35.0 +0200 +++ php-5.2.5.patch/ext/curl/interface.c2008-02-06 18:43:41.0 +0100 @@ -368,6 +368,7 @@ REGISTER_CURL_CONSTANT(CURLOPT_HEADER); REGISTER_CURL_CONSTANT(CURLOPT_HTTPHEADER); REGISTER_CURL_CONSTANT(CURLOPT_NOPROGRESS); + REGISTER_CURL_CONSTANT(CURLOPT_PROGRESSFUNCTION); REGISTER_CURL_CONSTANT(CURLOPT_NOBODY); REGISTER_CURL_CONSTANT(CURLOPT_FAILONERROR); REGISTER_CURL_CONSTANT(CURLOPT_UPLOAD); @@ -780,6 +781,87 @@ } /* }}} */ +/* {{{ curl_progress + */ +static size_t curl_progress(void *clientp, +double dltotal, +double dlnow, +double ultotal, +double ulnow) +{ + php_curl *ch = (php_curl *) clientp; + php_curl_progress *t = ch->handlers->progress; + int length = -1; + size_t rval = 0; + +#if PHP_CURL_DEBUG + fprintf(stderr, "curl_progress() called\n"); + fprintf(stderr, "clientp = %x, dltotal = %f, dlnow = %f, ultotal = %f, ulnow = %f\n", clientp, dltotal, dlnow, ultotal, ulnow); +#endif + + switch (t->method) { + case PHP_CURL_USER: { + zval **argv[4]; + zval *zdltotal = NULL; + zval *zdlnow = NULL; + zval *zultotal = NULL; + zval *zulnow = NULL; + zval *retval_ptr; + int error; + zend_fcall_info fci; + TSRMLS_FETCH_FROM_CTX(ch->thread_ctx); + + MAKE_STD_ZVAL(zdltotal); + MAKE_STD_ZVAL(zdlnow); + MAKE_STD_ZVAL(zultotal); + MAKE_STD_ZVAL(zulnow); + + ZVAL_LONG(zdltotal, dltotal); + ZVAL_LONG(zdlnow, dlnow); + ZVAL_LONG(zultotal, ultotal); + ZVAL_LONG(zulnow, ulnow); + + argv[0] = &zdltotal; + argv[1] = &zdlnow; + argv[2] = &zultotal; + argv[3] = &zulnow; + + fci.size = sizeof(fci); + fci.function_table = EG(function_table); + fci.function_name = t->func_name; + fci.object_pp = NULL; + fci.retval_ptr_ptr = &retval_ptr; + fci.param_count = 4; + fci.params = argv; + fci.no_separation = 0; + fci.symbol_table = NULL; + + ch->in_callback = 1; + error = zend_call_function(&fci, &t->fci_cache TSRMLS_CC); + ch->in_callback = 0; + if (error == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot call the CURLOPT_READFUNCTION"); + length = -1; + } else if (retval_ptr) { + if (Z_TYPE_P(retval_ptr) != IS_LONG) { + convert_to_long_ex(&retval_ptr); + } + if(0 != Z_LVAL_P(retval_ptr)) + rval = 1; + zval_ptr_dtor(&retval_ptr); + } + zval_ptr_dtor(argv[0]); + zval_ptr_dtor(argv[1]); + zval_ptr_dtor(argv[2]); + zval_ptr_dtor(argv[3]); + break; + } + } + return rval; +} +/* }}} */ + + /* {{{ curl_read */ static size_t curl_read(char *data, size_t size, size_t nmemb, void *ctx) @@ -1068,6 +1150,7 @@ (*ch)->handlers->write= ecalloc(1, sizeof(php_curl_write)); (*ch)->handlers->write_header = ecalloc(1, sizeof(php_curl_write)); (*ch)->handlers->read = ecalloc(1, sizeof(php_curl_read)); + (*ch)->handlers->progress = ecalloc(1, sizeof(php_curl_progress)); (*ch)->in_callback = 0; (*ch)->header.str_len = 0; @@ -1422,6 +1505,17 @@ ch->handlers->read->fu
#41135 [Com]: PDO SQLite BLOB field data truncated after 21 bytes
ID: 41135 Comment by: nospam dot list at unclassified dot de Reported By: rich at corephp dot co dot uk Status: Assigned Bug Type: PDO related Operating System: Windows XP SP2 PHP Version: 5.2.1 Assigned To: wez New Comment: So, here we are. I can confirm that PDO SQLite truncates BLOB data at the first \x00 character. It's not binary-safe. I tried to write a JPEG file and it's only 4 bytes long. Looking at the file in a hex viewer, the byte no. 5 is a NUL. PHP version: 5.2.3 (from xampp) on Windows XP Not quite up-to-date, but this bug isn't marked as fixed so the issue is the same. It really does exist, for those in doubt. This is a rather old bug and it's still in discussion. Is there any progress already? Will it be fixed or is it considered "irrelevant"? (I'm asking this because I see so many severe bugs being forgotten in many public bug trackers.) Previous Comments: [2008-02-03 22:40:55] chx1975 at gmail dot com My final note here is that you can avoid a temporary file with the php://memory stream. $stmt->bindParam(':data', $blob, PDO::PARAM_LOB); $stmt->bindParam(':len', $len); $blob = fopen('php://memory', 'a'); $len = fwrite($blob, $binarydata); rewind($blob); [2008-02-03 22:33:33] chx1975 at gmail dot com Based on http://netevil.org/blog/2005/oct/lob-support-added-to-pdo-oci-in-php-5-1-cvs-finally I believe maciej dot pijanka at gmail dot com wants this code: $db = new PDO(...); $binarydata = "abcdefg\x00a\x00\x01\x02"; $db->exec('CREATE TABLE test (data bytea, comment varchar(64), len integer)'); $db->beginTransaction(); $a = tempnam('.', 'pdo'); file_put_contents($a, $binarydata); $stmt = $db->prepare("INSERT INTO test (data, comment, len) VALUES (:data, :comment, :len)"); $stmt->bindParam(':data', $blob, PDO::PARAM_LOB); $comment = 'lob'; $stmt->bindParam(':comment', $comment); $len = filesize($a); $stmt->bindParam(':len', $len); $blob = fopen($a, 'rb'); $stmt->execute(); $db->commit(); unlink($a); print "\nFetching and comparing data\n"; # with fetchall resources don't work too $stmt = $db->prepare("select * from test"); $stmt->execute(); $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES,true); while($row = $stmt->fetch(PDO::FETCH_ASSOC)) { $buffer = ''; var_dump($row); if(is_resource($row['data'])) { $buffer = stream_get_contents($row['data']); } else $buffer = $row['data']; print "Test `".$row['comment']."' StrCmp:"; print "".(strcmp($binarydata,$buffer) == 0 )?"equal":"fail"; print " length stored in db: ". $row['len'] . ", returned data len: ".strlen($buffer)."\n"; echo bin2hex($buffer)."\n"; } $db->exec('DROP TABLE test'); [2008-02-03 20:43:34] chx1975 at gmail dot com I just ran Wez's test code and got 006100 so it seems I am unable to reproduce this bug. PECL Module version => 1.0.1 $Id: pdo_sqlite.c,v 1.10.2.6.2.2 2007/03/23 14:30:00 wez Exp $ SQLite library => 3.4.2 [2008-01-22 17:21:34] maciej dot pijanka at gmail dot com on linux, with php 5.2.5 and postgresql 8.2.5, problem is replicable ie after last example table gets empty '' values not NULLs. I wrote more detailed testcase. -- file.php -- getMessage(); exit; } $binarydata = "abcdefg\x00a\x00\x01\x02"; $db->exec('CREATE TABLE test (data bytea, comment varchar(64), len integer)'); $stmt = $db->prepare("INSERT INTO test VALUES ( :data, :comment, :len )"); # test 1, just binary data, will fail $comment = 'Just pass binary data as bindValue'; $stmt->bindValue('data', $binarydata); $stmt->bindValue('comment', $comment); $stmt->bindValue('len', strlen($binarydata)); var_dump($stmt->execute(), $stmt->rowCount(), $comment); print "--\n"; # pass as bindParam $comment = 'Just pass binary data as bindParam'; $stmt->bindParam('data', &$binarydata); $stmt->bindValue('comment', $comment); $stmt->bindValue('len', strlen($binarydata)); var_dump($stmt->execute(), $stmt->rowCount(), $comment); print "--\n"; # encoded by pg_escape_bytea, wrong too $comment = 'encoded by pg_escape_bytea'; $stmt->bindValue('data', pg_escape_bytea($binarydata)); $stmt->bindValue('comment', $comment); $stmt->bindValue('len', strlen($binarydata)); var_dump($stmt->execute(), $stmt->rowCount(), $comment); print "--\n"; # pass something that give correct result $comment = 'this one produces best result so far'; $stmt->bindValue('data', str_replace("","\\",pg_escape_bytea($binarydata)),PDO::PARAM_STR); $stmt->bindValue('comment', $comment); $stmt->bindValue('len', strlen($binarydata)); var_dump($stmt->execute(), $stmt->rowCount(), $comment); print "--\n"; echo " NOW FETCH \nExecute retu
#44050 [Bgs]: Multiple 'Cookie: ' headers incorrectly parsed
ID: 44050 Updated by: [EMAIL PROTECTED] Reported By: a dot candle at gmail dot com Status: Bogus Bug Type: Unknown/Other Function Operating System: slackware/debian PHP Version: 5.2.5 New Comment: See also Feature request http://bugs.php.net/bug.php?id=32860 Previous Comments: [2008-02-06 18:37:52] [EMAIL PROTECTED] Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. Hello, Please check the following report: http://bugs.php.net/bug.php?id=32827 Thanks [2008-02-05 21:53:47] pfx-bugs dot php dot net at goeswhere dot com This can be reproduced by, for example (with the above test-case as http://localhost/pro.php): [EMAIL PROTECTED]:~% echo -e 'GET /pro.php HTTP/1.1\r\nHost: localhost\r\nCookie: $Version=0; a=\r\nCookie: $Version=0; b=\r\nCookie: $Version=0; c=\r\nConnection: close\r\n' | nc localhost 80 HTTP/1.1 200 OK Date: Tue, 05 Feb 2008 21:51:41 GMT Server: Apache/2.2.3 (Debian) PHP/5.2.0-8+etch10 X-Powered-By: PHP/5.2.0-8+etch10 Set-Cookie: a= Set-Cookie: b= Set-Cookie: c= Content-Length: 160 Connection: close Content-Type: text/html; charset=UTF-8 array(4) { ["$Version"]=> string(1) "0" ["a"]=> string(16) ", $Version=0" ["b"]=> string(16) ", $Version=0" ["c"]=> string(4) "" } [EMAIL PROTECTED]:~% [2008-02-05 20:31:59] [EMAIL PROTECTED] Hello, I have not been able to reproduce your issue. Can you please give us more feedback about that? [2008-02-05 17:37:48] a dot candle at gmail dot com Description: When a client sends multiple 'Cookie' headers they appear to be parsed incorrectly. What I believe is happening is that the value part of the cookie headers (after the ': ') are being concaternated with a comma rather then a semicolon. Then (as per the cookie spec: http://wp.netscape.com/newsref/std/cookie_spec.html) the resulting string is being split on semicolon, resulting in the broken cookie values. Reproduce code: --- php code: headers sent by client: (on the second request) "Cookie: $Version=0; a=\r\n" "Cookie: $Version=0; b=\r\n" "Cookie: $Version=0; c=\r\n" Expected result: array(4) { ["$Version"]=> string(1) "0" ["a"]=> string(4) "" ["b"]=> string(4) "" ["c"]=> string(4) "" } Actual result: -- resulting output: array(4) { ["$Version"]=> string(1) "0" ["a"]=> string(16) ", $Version=0" ["b"]=> string(16) ", $Version=0" ["c"]=> string(4) "" } -- Edit this bug report at http://bugs.php.net/?id=44050&edit=1
#44064 [NEW]: rename_function is undefined
From: paul_nelson57071 at yahoo dot com Operating system: Windows XP PHP version: 5.2.5 PHP Bug Type: *Regular Expressions Bug description: rename_function is undefined Description: I'm trying to use the rename_fuction to make it so I can easly use either MySQL or MSSQL functions. Using the example from your website produces the folling error: RESULT: I know mysql_connect works though so I assume that rename_function is not complied in PHP for some reason... any suggestions on how to fix this or work around the problem in another way Reproduce code: --- Expected result: mysql_connect should now be callable using Universal_SQL_Connect Actual result: -- Fatal error: Call to undefined function rename_function() in S:\webpages\Eaton\T2.php on line 2 -- Edit bug report at http://bugs.php.net/?id=44064&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=44064&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44064&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44064&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44064&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44064&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44064&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44064&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=44064&r=needscript Try newer version:http://bugs.php.net/fix.php?id=44064&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=44064&r=support Expected behavior:http://bugs.php.net/fix.php?id=44064&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=44064&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=44064&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=44064&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=44064&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=44064&r=dst IIS Stability:http://bugs.php.net/fix.php?id=44064&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=44064&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=44064&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=44064&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=44064&r=mysqlcfg
#44064 [Opn->Bgs]: rename_function is undefined
ID: 44064 Updated by: [EMAIL PROTECTED] Reported By: paul_nelson57071 at yahoo dot com -Status: Open +Status: Bogus Bug Type: *Regular Expressions Operating System: Windows XP PHP Version: 5.2.5 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 (PECL apd:0.2-1.0.1) http://docs.php.net/manual/en/apd.setup.php http://docs.php.net/rename-function Previous Comments: [2008-02-06 18:02:57] paul_nelson57071 at yahoo dot com Description: I'm trying to use the rename_fuction to make it so I can easly use either MySQL or MSSQL functions. Using the example from your website produces the folling error: RESULT: I know mysql_connect works though so I assume that rename_function is not complied in PHP for some reason... any suggestions on how to fix this or work around the problem in another way Reproduce code: --- Expected result: mysql_connect should now be callable using Universal_SQL_Connect Actual result: -- Fatal error: Call to undefined function rename_function() in S:\webpages\Eaton\T2.php on line 2 -- Edit this bug report at http://bugs.php.net/?id=44064&edit=1
#44050 [Opn->Bgs]: Multiple 'Cookie: ' headers incorrectly parsed
ID: 44050 Updated by: [EMAIL PROTECTED] Reported By: a dot candle at gmail dot com -Status: Open +Status: Bogus Bug Type: Unknown/Other Function Operating System: slackware/debian PHP Version: 5.2.5 New Comment: Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. Hello, Please check the following report: http://bugs.php.net/bug.php?id=32827 Thanks Previous Comments: [2008-02-05 21:53:47] pfx-bugs dot php dot net at goeswhere dot com This can be reproduced by, for example (with the above test-case as http://localhost/pro.php): [EMAIL PROTECTED]:~% echo -e 'GET /pro.php HTTP/1.1\r\nHost: localhost\r\nCookie: $Version=0; a=\r\nCookie: $Version=0; b=\r\nCookie: $Version=0; c=\r\nConnection: close\r\n' | nc localhost 80 HTTP/1.1 200 OK Date: Tue, 05 Feb 2008 21:51:41 GMT Server: Apache/2.2.3 (Debian) PHP/5.2.0-8+etch10 X-Powered-By: PHP/5.2.0-8+etch10 Set-Cookie: a= Set-Cookie: b= Set-Cookie: c= Content-Length: 160 Connection: close Content-Type: text/html; charset=UTF-8 array(4) { ["$Version"]=> string(1) "0" ["a"]=> string(16) ", $Version=0" ["b"]=> string(16) ", $Version=0" ["c"]=> string(4) "" } [EMAIL PROTECTED]:~% [2008-02-05 20:31:59] [EMAIL PROTECTED] Hello, I have not been able to reproduce your issue. Can you please give us more feedback about that? [2008-02-05 17:37:48] a dot candle at gmail dot com Description: When a client sends multiple 'Cookie' headers they appear to be parsed incorrectly. What I believe is happening is that the value part of the cookie headers (after the ': ') are being concaternated with a comma rather then a semicolon. Then (as per the cookie spec: http://wp.netscape.com/newsref/std/cookie_spec.html) the resulting string is being split on semicolon, resulting in the broken cookie values. Reproduce code: --- php code: headers sent by client: (on the second request) "Cookie: $Version=0; a=\r\n" "Cookie: $Version=0; b=\r\n" "Cookie: $Version=0; c=\r\n" Expected result: array(4) { ["$Version"]=> string(1) "0" ["a"]=> string(4) "" ["b"]=> string(4) "" ["c"]=> string(4) "" } Actual result: -- resulting output: array(4) { ["$Version"]=> string(1) "0" ["a"]=> string(16) ", $Version=0" ["b"]=> string(16) ", $Version=0" ["c"]=> string(4) "" } -- Edit this bug report at http://bugs.php.net/?id=44050&edit=1
#41712 [Asn]: [PATCH] Add CURL Progress Function Callback
ID: 41712 User updated by: sdteffen at gmail dot com Reported By: sdteffen at gmail dot com Status: Assigned Bug Type: Feature/Change Request Operating System: SuSE Linux 10.2 PHP Version: 5CVS-2007-06-16 (CVS) Assigned To: iliaa New Comment: I've updated the patch to pass the return value from the callback function as Renato suggested: --- php-5.2.5.orig/ext/curl/interface.c 2007-10-13 13:35:35.0 +0200 +++ php-5.2.5.patch/ext/curl/interface.c2008-02-06 18:43:41.0 +0100 @@ -368,6 +368,7 @@ REGISTER_CURL_CONSTANT(CURLOPT_HEADER); REGISTER_CURL_CONSTANT(CURLOPT_HTTPHEADER); REGISTER_CURL_CONSTANT(CURLOPT_NOPROGRESS); + REGISTER_CURL_CONSTANT(CURLOPT_PROGRESSFUNCTION); REGISTER_CURL_CONSTANT(CURLOPT_NOBODY); REGISTER_CURL_CONSTANT(CURLOPT_FAILONERROR); REGISTER_CURL_CONSTANT(CURLOPT_UPLOAD); @@ -780,6 +781,87 @@ } /* }}} */ +/* {{{ curl_progress + */ +static size_t curl_progress(void *clientp, +double dltotal, +double dlnow, +double ultotal, +double ulnow) +{ + php_curl *ch = (php_curl *) clientp; + php_curl_progress *t = ch->handlers->progress; + int length = -1; + size_t rval = 0; + +#if PHP_CURL_DEBUG + fprintf(stderr, "curl_progress() called\n"); + fprintf(stderr, "clientp = %x, dltotal = %f, dlnow = %f, ultotal = %f, ulnow = %f\n", clientp, dltotal, dlnow, ultotal, ulnow); +#endif + + switch (t->method) { + case PHP_CURL_USER: { + zval **argv[4]; + zval *zdltotal = NULL; + zval *zdlnow = NULL; + zval *zultotal = NULL; + zval *zulnow = NULL; + zval *retval_ptr; + int error; + zend_fcall_info fci; + TSRMLS_FETCH_FROM_CTX(ch->thread_ctx); + + MAKE_STD_ZVAL(zdltotal); + MAKE_STD_ZVAL(zdlnow); + MAKE_STD_ZVAL(zultotal); + MAKE_STD_ZVAL(zulnow); + + ZVAL_LONG(zdltotal, dltotal); + ZVAL_LONG(zdlnow, dlnow); + ZVAL_LONG(zultotal, ultotal); + ZVAL_LONG(zulnow, ulnow); + + argv[0] = &zdltotal; + argv[1] = &zdlnow; + argv[2] = &zultotal; + argv[3] = &zulnow; + + fci.size = sizeof(fci); + fci.function_table = EG(function_table); + fci.function_name = t->func_name; + fci.object_pp = NULL; + fci.retval_ptr_ptr = &retval_ptr; + fci.param_count = 4; + fci.params = argv; + fci.no_separation = 0; + fci.symbol_table = NULL; + + ch->in_callback = 1; + error = zend_call_function(&fci, &t->fci_cache TSRMLS_CC); + ch->in_callback = 0; + if (error == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot call the CURLOPT_READFUNCTION"); + length = -1; + } else if (retval_ptr) { + if (Z_TYPE_P(retval_ptr) != IS_LONG) { + convert_to_long_ex(&retval_ptr); + } + if(0 != Z_LVAL_P(retval_ptr)) + rval = 1; + zval_ptr_dtor(&retval_ptr); + } + zval_ptr_dtor(argv[0]); + zval_ptr_dtor(argv[1]); + zval_ptr_dtor(argv[2]); + zval_ptr_dtor(argv[3]); + break; + } + } + return rval; +} +/* }}} */ + + /* {{{ curl_read */ static size_t curl_read(char *data, size_t size, size_t nmemb, void *ctx) @@ -1068,6 +1150,7 @@ (*ch)->handlers->write= ecalloc(1, sizeof(php_curl_write)); (*ch)->handlers->write_header = ecalloc(1, sizeof(php_curl_write)); (*ch)->handlers->read = ecalloc(1, sizeof(php_curl_read)); + (*ch)->handlers->progress = ecalloc(1, sizeof(php_curl_progress)); (*ch)->in_callback = 0; (*ch)->header.str_len = 0; @@ -1422,6 +1505,17 @@ ch->handlers->read->func_name = *zvalue; ch->handlers->read->method = PHP_CURL_USER; break; + case CURLOPT_PROGRESSFUNCTION: +
#44056 [Fbk->Opn]: Get file content
ID: 44056 User updated by: raphpell at cario dot fr Reported By: raphpell at cario dot fr -Status: Feedback +Status: Open Bug Type: Performance problem Operating System: Windows Vista PHP Version: 5.2.5 New Comment: $_ENV [ 'nFiles' ] = 0 ; $_ENV [ 'nFolders' ] = 0 ; $sPath = $prefixe . './' ; // define a file system function _getmicrotime ( ) { list ( $usec, $sec ) = explode ( " " , microtime ( )) ; return ( ( (float) $usec + (float) $sec ) * 1000 ) ; }; function doSomething ( $sPath ) { $_ENV [ "nFolders" ]++ ; $a = glob ( $sPath . "*" ) ; if ( $a ) while ( list (, $sFile ) = each ( $a )){ if ( is_dir ( $sFile ) AND ! in_array ( $sFile , Array ( "." , ".." ))) doSomething ( $sFile . "/" ) ; if ( is_file ( $sFile )){ $s = file_get_contents ( $sFile ) ; $_ENV [ "nFiles" ]++ ; } } }; $nStart = _getmicrotime ( ) ; if ( is_dir ( $sPath )) doSomething ( $sPath ) ; else die ( $sPath ) ; echo ' - time: '. (int)( _getmicrotime ( ) - $nStart ) . 'ms ' . ' - Files: '. $_ENV [ "nFiles" ] . ' - Folders: '. $_ENV [ "nFolders" ] ; /* EXECUTION TIME [PHP 4.3.10] 2848.597 ms 2915.554 ms 2798.933 ms [PHP 5.2.5] 11469.610 ms 11199.461 ms 11227.722 ms */ Previous Comments: [2008-02-06 08:13:10] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with , 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. [2008-02-05 22:45:45] raphpell at cario dot fr Description: I handle my filesy stem : - 2000 files - 2000 folders With PHP 4.3.3 my scripts take 5 secondes With PHP 5.2.5 35 secondes... I use fopen, file_get_contents ( ob_start + include ) I zip my site, create my db with my filesystem,... -- Edit this bug report at http://bugs.php.net/?id=44056&edit=1
#44062 [Opn->Bgs]: Low limit in PCRE preg_match ?
ID: 44062 Updated by: [EMAIL PROTECTED] Reported By: janko at ami dot cz -Status: Open +Status: Bogus Bug Type: PCRE related Operating System: Windows XP PHP Version: 5.2.5 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 preg_last_error() shows 2 (= PREG_BACKTRACK_LIMIT_ERROR). http://docs.php.net/manual/en/pcre.constants.php Previous Comments: [2008-02-06 14:41:03] [EMAIL PROTECTED] See bug#42649 [2008-02-06 13:11:49] janko at ami dot cz Description: Im will try match part of HTML page. Concretely table of fixtures. URL is http://www.eurofotbal.cz/ligue-1/2007-2008/vysledky-rozlosovani/?month=02 Here is code $url = "http://www.eurofotbal.cz/ligue-1/2007-2008/vysledky-rozlosovani/?month=02";; $content = file_get_contents($url); preg_match('~(.+)~Usi', $content, $out); //print_r($out); echo ""; echo $out[1]; echo ""; Everything is OK, but when I want match all fixtures, result is empty. URL is http://www.eurofotbal.cz/ligue-1/2007-2008/vysledky-rozlosovani/?month=0 Structure is the same like previous example Can you tell me where is error? RJ -- Edit this bug report at http://bugs.php.net/?id=44062&edit=1
#44058 [Fbk->Csd]: Fresh Install of PHP w/ Extensions Crashes
ID: 44058 User updated by: Paul-PHPBug at Czarnik dot com Reported By: Paul-PHPBug at Czarnik dot com -Status: Feedback +Status: Closed Bug Type: Reproducible crash Operating System: FreeBSD 6.2-PRERELEASE PHP Version: 5.2.5 New Comment: The problem seems to be caused by conflicts between recode & imap and recode & mysql. Loading recode before the other conflict extensions appears to circumvent this problem. This information was found in a Warning note on the GNU Recode Functions page in the Function Reference. Previous Comments: [2008-02-06 08:57:09] [EMAIL PROTECTED] Can you run 'bt full' please. [2008-02-06 07:14:53] Paul-PHPBug at Czarnik dot com Description: fresh install of php5 & php5-extensions. run php -v = seg fault. Built all w/ debug. Ran gdb bt, results are: (gdb) bt #0 0x28b44a16 in hash_lookup (hashtab=0x8435dc0, key=0xbfbfe8d0 "Î]B)Hé¿¿)\033&(") at misc.c:349 #1 0x29362fd7 in find_alias () from /usr/local/lib/librecode.so.3 #2 0x29364ea0 in recode_new_outer () from /usr/local/lib/librecode.so.3 #3 0x29319d76 in zm_startup_recode () from /usr/local/lib/php/20060613-debug/recode.so #4 0x081713ff in zend_startup_module_ex (module=0x8359100) at /z/ports/tmp/usr/ports/lang/php5/work/php-5.2.5/Zend/zend_API.c:1466 #5 0x081779d4 in zend_hash_apply (ht=0x8274d40, apply_func=0x8171298 ) at /z/ports/tmp/usr/ports/lang/php5/work/php-5.2.5/Zend/zend_hash.c:867 #6 0x08171592 in zend_startup_modules () at /z/ports/tmp/usr/ports/lang/php5/work/php-5.2.5/Zend/zend_API.c:1513 #7 0x081240b1 in php_module_startup (sf=0x82705a0, additional_modules=0x0, num_additional_modules=0) at /z/ports/tmp/usr/ports/lang/php5/work/php-5.2.5/main/main.c:1840 #8 0x081d2d5d in php_cli_startup (sapi_module=0x82705a0) at /z/ports/tmp/usr/ports/lang/php5/work/php-5.2.5/sapi/cli/php_cli.c:358 #9 0x081d389a in main (argc=2, argv=0xbfbfec4c) at /z/ports/tmp/usr/ports/lang/php5/work/php-5.2.5/sapi/cli/php_cli.c:717 Reproduce code: --- php -v Expected result: the version info Actual result: -- Segmentation fault (core dumped) -- Edit this bug report at http://bugs.php.net/?id=44058&edit=1
#44062 [Opn]: Low limit in PCRE preg_match ?
ID: 44062 Updated by: [EMAIL PROTECTED] Reported By: janko at ami dot cz Status: Open Bug Type: PCRE related Operating System: Windows XP PHP Version: 5.2.5 New Comment: See bug#42649 Previous Comments: [2008-02-06 13:11:49] janko at ami dot cz Description: Im will try match part of HTML page. Concretely table of fixtures. URL is http://www.eurofotbal.cz/ligue-1/2007-2008/vysledky-rozlosovani/?month=02 Here is code $url = "http://www.eurofotbal.cz/ligue-1/2007-2008/vysledky-rozlosovani/?month=02";; $content = file_get_contents($url); preg_match('~(.+)~Usi', $content, $out); //print_r($out); echo ""; echo $out[1]; echo ""; Everything is OK, but when I want match all fixtures, result is empty. URL is http://www.eurofotbal.cz/ligue-1/2007-2008/vysledky-rozlosovani/?month=0 Structure is the same like previous example Can you tell me where is error? RJ -- Edit this bug report at http://bugs.php.net/?id=44062&edit=1
#44063 [NEW]: RecursiveIteratorIterator needs rewind right after creation
From: smirnov at h-type dot com Operating system: Windows PHP version: 5.2.5 PHP Bug Type: SPL related Bug description: RecursiveIteratorIterator needs rewind right after creation Description: RecursiveIteratorIterator returns one extra result if we don't provide rewind() before while. Reproduce code: --- $array = array( array('name'=>'butch', 'sex'=>'male'), array('name'=>'fido', 'sex'=>'male'), array('name'=>'girly','sex'=>'female') ); $it=new RecursiveIteratorIterator(new RecursiveArrayIterator($array)); //$it->rewind(); //The result will be as expected if uncomment this while($it->valid()){ echo $it->key().' -- '.$it->current()."\n"; $it->next(); } Expected result: name -- butch sex -- male name -- fido sex -- male name -- girly sex -- female Actual result: -- 0 -- Array name -- butch sex -- male name -- fido sex -- male name -- girly sex -- female -- Edit bug report at http://bugs.php.net/?id=44063&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=44063&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44063&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44063&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44063&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44063&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44063&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44063&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=44063&r=needscript Try newer version:http://bugs.php.net/fix.php?id=44063&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=44063&r=support Expected behavior:http://bugs.php.net/fix.php?id=44063&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=44063&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=44063&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=44063&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=44063&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=44063&r=dst IIS Stability:http://bugs.php.net/fix.php?id=44063&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=44063&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=44063&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=44063&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=44063&r=mysqlcfg
#43907 [Fbk->Csd]: mkdir function ignore permission mask.
ID: 43907 User updated by: sergio at gruposinternet dot com dot br Reported By: sergio at gruposinternet dot com dot br -Status: Feedback +Status: Closed Bug Type: Directory function related Operating System: Freebsd 6.2 PHP Version: 5.2.5 New Comment: Closing the bug. Its bogus. Previous Comments: [2008-02-02 20:27:20] [EMAIL PROTECTED] Yes, PHP just wraps around the libc mkdir() function, no news there. And as it works like it's supposed to, where's the bug? [2008-01-26 16:13:12] sergio at gruposinternet dot com dot br Default system umask is set to 0022, setting it to works fine, but if I hard set the permission on (PHP) function mkdir it shouldn't overwrite the system umask? It shouldn't work like call (C) function mkdir(2) followed by a call to (C) function chmod(2) for every directory setting the right permission? It seems that PHP just underlays to (C) function mkdir(2) with permission set as second parameter, so that function is realy restricted to the process umask. Example that works with system umask set to 0022: [2008-01-26 01:22:27] [EMAIL PROTECTED] And you're sure system umask() is not forcing something else here? [2008-01-22 13:37:41] sergio at gruposinternet dot com dot br Description: mkdir function ignore permission mask for "group" and "others" bits. safe_mode off Reproduce code: --- Expected result: $ ls -lh total 4 drwxrwxrwx 2 grupos grupos 512B Jan 22 11:15 bar drwx-- 2 grupos grupos 512B Jan 22 11:21 bar2 drwxrwxrwx 3 grupos grupos 512B Jan 22 11:12 foo drwx-- 3 grupos grupos 512B Jan 22 11:21 foo2 Actual result: -- $ ls -lh total 4 drwxr-xr-x 2 grupos grupos 512B Jan 22 11:15 bar drwx-- 2 grupos grupos 512B Jan 22 11:21 bar2 drwxr-xr-x 3 grupos grupos 512B Jan 22 11:12 foo drwx-- 3 grupos grupos 512B Jan 22 11:21 foo2 -- Edit this bug report at http://bugs.php.net/?id=43907&edit=1
#44061 [Opn->Bgs]: When changing system tzdata, PHP keeps using the old timezone
ID: 44061 Updated by: [EMAIL PROTECTED] Reported By: martin at marquesminen dot com dot ar -Status: Open +Status: Bogus Bug Type: Date/time related Operating System: Linux PHP Version: 5.2.5 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. Please read the note here: http://no.php.net/manual/en/ref.datetime.php Previous Comments: [2008-02-06 13:02:19] martin at marquesminen dot com dot ar Description: I got an update from tzdata on a Debian server due to a daylight saving change here in Argentina (same thing happens on a Fedora 7 server). The problem is that, even when the system sees the correct time, php keeps giving me the *old* hour (CLI and mod_apache). Reproduce code: --- $ date mié feb 6 09:03:57 ARST 2008 $ echo ""|php 08:04 $ date +%z -0200 $ echo ""|php -3 -- Edit this bug report at http://bugs.php.net/?id=44061&edit=1
#44062 [NEW]: Low limit in PCRE preg_match ?
From: janko at ami dot cz Operating system: Windows XP PHP version: 5.2.5 PHP Bug Type: PCRE related Bug description: Low limit in PCRE preg_match ? Description: Im will try match part of HTML page. Concretely table of fixtures. URL is http://www.eurofotbal.cz/ligue-1/2007-2008/vysledky-rozlosovani/?month=02 Here is code $url = "http://www.eurofotbal.cz/ligue-1/2007-2008/vysledky-rozlosovani/?month=02";; $content = file_get_contents($url); preg_match('~(.+)~Usi', $content, $out); //print_r($out); echo ""; echo $out[1]; echo ""; Everything is OK, but when I want match all fixtures, result is empty. URL is http://www.eurofotbal.cz/ligue-1/2007-2008/vysledky-rozlosovani/?month=0 Structure is the same like previous example Can you tell me where is error? RJ -- Edit bug report at http://bugs.php.net/?id=44062&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=44062&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44062&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44062&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44062&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44062&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44062&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44062&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=44062&r=needscript Try newer version:http://bugs.php.net/fix.php?id=44062&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=44062&r=support Expected behavior:http://bugs.php.net/fix.php?id=44062&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=44062&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=44062&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=44062&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=44062&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=44062&r=dst IIS Stability:http://bugs.php.net/fix.php?id=44062&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=44062&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=44062&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=44062&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=44062&r=mysqlcfg
#44061 [NEW]: When changing system tzdata, PHP keeps using the old timezone
From: martin at marquesminen dot com dot ar Operating system: Linux PHP version: 5.2.5 PHP Bug Type: Date/time related Bug description: When changing system tzdata, PHP keeps using the old timezone Description: I got an update from tzdata on a Debian server due to a daylight saving change here in Argentina (same thing happens on a Fedora 7 server). The problem is that, even when the system sees the correct time, php keeps giving me the *old* hour (CLI and mod_apache). Reproduce code: --- $ date mié feb 6 09:03:57 ARST 2008 $ echo ""|php 08:04 $ date +%z -0200 $ echo ""|php -3 -- Edit bug report at http://bugs.php.net/?id=44061&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=44061&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44061&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44061&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44061&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44061&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44061&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44061&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=44061&r=needscript Try newer version:http://bugs.php.net/fix.php?id=44061&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=44061&r=support Expected behavior:http://bugs.php.net/fix.php?id=44061&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=44061&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=44061&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=44061&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=44061&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=44061&r=dst IIS Stability:http://bugs.php.net/fix.php?id=44061&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=44061&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=44061&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=44061&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=44061&r=mysqlcfg
#44042 [Asn->Csd]: Errors returned when trying to generate certain MySQL tests
ID: 44042 Updated by: [EMAIL PROTECTED] Reported By: josmessa at uk dot ibm dot com -Status: Assigned +Status: Closed Bug Type: Scripting Engine problem Operating System: Windows XP PHP Version: 5.2CVS-2008-02-04 (snap) Assigned To: zoe New Comment: Fixed Previous Comments: [2008-02-04 17:56:25] [EMAIL PROTECTED] Hi Josie - I can see what it is. I made an incorrect assumption about how FALIAS is used. I will send you a private copy to check out as I had to change the way the regexs that find teh implementation work. Thanks for finding this. Zoe [2008-02-04 17:01:49] josmessa at uk dot ibm dot com Description: When trying to generate tests for certain MySQL functions (so far I've found this happens with the following: mysql_db_name, mysql_freeresult (have to use deprecated name, another problem!) and mysql_listdbs, but there could be more) using the generate_phpt script on command prompt I get the following error messages: Notice: Undefined index: desc in ...\generate_phpt.php on line 185 Notice: Undefined index: arg_det in ...\generate_phpt.php on line 187. The tests are still created but in the opening comment none of the arguments are in the prototype and the description isn't there at all. The actual test code is also only passing zero arguments as it cannot find any arguments to initiate. -- Edit this bug report at http://bugs.php.net/?id=44042&edit=1
#15999 [Com]: fread() hangs apache when file pointer obtained from a url parameter PHPSESSID
ID: 15999 Comment by: juergen dot link at freenet dot de Reported By: didier dot alain at laposte dot net Status: No Feedback Bug Type: Session related Operating System: Linux PHP Version: 4.1.0, 4.0.6 New Comment: I came across the same issue - the answer is pretty simple. PHP does not support parallel requests with the same session id, i.e. the session ids serves as mutex for the requests. Thus, triggering a http request to a session from within another request to this very session will lead to a timeout for this request. After the first request is finished, the second one will come to a happy end, too. You may observe this in your web server's log. Previous Comments: [2004-05-08 02:12:47] jcgonz at innox dot com dot mx I have exactly the same problem. I try to send PHPSESSID=session_id() and apache hangs up; when I change PHPSESSID from the url string, it works perfectly (Obviously this doesn't work because I need to know in the target script what session are we talking about). Does anyone has a solution for this? Thanks in advance! [2002-08-12 01:00:12] php-bugs at lists dot php dot net No feedback was provided for this bug for over a month, 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". [2002-07-11 00:40:20] [EMAIL PROTECTED] Your scripts will never work since the session data will be available AFTER the script is run. What are you trying to achieve? Can't you just use include() as the files are on same machine??? [2002-06-01 11:56:54] didier dot alain at laposte dot net $doc="http://myserver/docs/mydoc.html?PHPSESSID=".session_id(); It was a type mismatch, of course, sorry. [2002-06-01 11:51:18] didier dot alain at laposte dot net Sorry for the long time... Here's a complete but simple example : - In httpd.conf - php_value auto_prepend_file "block.php" (block.php is in my php.ini include_path, and /var/www is my Apache DocumentRoot) open_doc.php (<--I call this one with my browser) http://http://myserver/docs/mydoc.html?PHPSESSID=".session_id(); readfile($doc); //same with $fp=fopen($doc, "r"); ?> - block.php - I can't see any infinite loop here, but I may be wrong... Whenever you don't pass the session param in the url anymore, there's "no problem" anymore, except you can't retrieve session values ! 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/15999 -- Edit this bug report at http://bugs.php.net/?id=15999&edit=1
#44058 [Opn->Fbk]: Fresh Install of PHP w/ Extensions Crashes
ID: 44058 Updated by: [EMAIL PROTECTED] Reported By: Paul-PHPBug at Czarnik dot com -Status: Open +Status: Feedback Bug Type: Reproducible crash Operating System: FreeBSD 6.2-PRERELEASE PHP Version: 5.2.5 New Comment: Can you run 'bt full' please. Previous Comments: [2008-02-06 07:14:53] Paul-PHPBug at Czarnik dot com Description: fresh install of php5 & php5-extensions. run php -v = seg fault. Built all w/ debug. Ran gdb bt, results are: (gdb) bt #0 0x28b44a16 in hash_lookup (hashtab=0x8435dc0, key=0xbfbfe8d0 "Î]B)Hé¿¿)\033&(") at misc.c:349 #1 0x29362fd7 in find_alias () from /usr/local/lib/librecode.so.3 #2 0x29364ea0 in recode_new_outer () from /usr/local/lib/librecode.so.3 #3 0x29319d76 in zm_startup_recode () from /usr/local/lib/php/20060613-debug/recode.so #4 0x081713ff in zend_startup_module_ex (module=0x8359100) at /z/ports/tmp/usr/ports/lang/php5/work/php-5.2.5/Zend/zend_API.c:1466 #5 0x081779d4 in zend_hash_apply (ht=0x8274d40, apply_func=0x8171298 ) at /z/ports/tmp/usr/ports/lang/php5/work/php-5.2.5/Zend/zend_hash.c:867 #6 0x08171592 in zend_startup_modules () at /z/ports/tmp/usr/ports/lang/php5/work/php-5.2.5/Zend/zend_API.c:1513 #7 0x081240b1 in php_module_startup (sf=0x82705a0, additional_modules=0x0, num_additional_modules=0) at /z/ports/tmp/usr/ports/lang/php5/work/php-5.2.5/main/main.c:1840 #8 0x081d2d5d in php_cli_startup (sapi_module=0x82705a0) at /z/ports/tmp/usr/ports/lang/php5/work/php-5.2.5/sapi/cli/php_cli.c:358 #9 0x081d389a in main (argc=2, argv=0xbfbfec4c) at /z/ports/tmp/usr/ports/lang/php5/work/php-5.2.5/sapi/cli/php_cli.c:717 Reproduce code: --- php -v Expected result: the version info Actual result: -- Segmentation fault (core dumped) -- Edit this bug report at http://bugs.php.net/?id=44058&edit=1
#44059 [Opn]: Able to get more infos about FTP
ID: 44059 User updated by: daniel dot chobe at nextiraone dot de Reported By: daniel dot chobe at nextiraone dot de Status: Open Bug Type: Feature/Change Request Operating System: Linux PHP Version: 5.2.5 New Comment: --- ftp_save/php_ftp.c 2006-10-23 09:23:23.0 +0200 +++ ftp/php_ftp.c 2006-10-23 10:58:54.0 +0200 @@ -120,6 +120,10 @@ REGISTER_LONG_CONSTANT("FTP_FAILED", PHP_FTP_FAILED, CONST_PERSISTENT | CONST_CS); REGISTER_LONG_CONSTANT("FTP_FINISHED", PHP_FTP_FINISHED, CONST_PERSISTENT | CONST_CS); REGISTER_LONG_CONSTANT("FTP_MOREDATA", PHP_FTP_MOREDATA, CONST_PERSISTENT | CONST_CS); + + REGISTER_LONG_CONSTANT("FTP_PASSIVPORT", PHP_FTP_PASSIVPORT, CONST_PERSISTENT | CONST_CS); + REGISTER_LONG_CONSTANT("FTP_LASTRESPONSE", PHP_FTP_LASTRESPONSE, CONST_PERSISTENT | CONST_CS); + return SUCCESS; } @@ -1195,6 +1199,10 @@ case PHP_FTP_OPT_AUTOSEEK: RETURN_BOOL(ftp->autoseek); break; + case PHP_FTP_LASTRESPONSE: + RETURN_STRING(ftp->inbuf, 1); + break; + case PHP_FTP_PASSIVPORT: + RETURN_LONG(((struct sockaddr_in *)& ftp->pasvaddr)->sin_port); + break; default: php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown option '%ld'", option); RETURN_FALSE; diff --new-file -u -r ftp_save/php_ftp.h ftp/php_ftp.h --- ftp_save/php_ftp.h 2006-10-23 09:23:23.0 +0200 +++ ftp/php_ftp.h 2006-10-23 09:24:12.0 +0200 @@ -29,6 +29,8 @@ #define PHP_FTP_OPT_TIMEOUT_SEC0 #define PHP_FTP_OPT_AUTOSEEK 1 +#define PHP_FTP_LASTRESPONSE 2 +#define PHP_FTP_PASSIVPORT 3 #define PHP_FTP_AUTORESUME -1 PHP_MINIT_FUNCTION(ftp); Previous Comments: [2008-02-06 08:17:46] daniel dot chobe at nextiraone dot de Description: The FTP Extension dont show the choosen passiv port. But sometime it helps if your have problem with your connection. The other thing your can get is the last ftp responseline. It also helps in case of problems with FTP Connections. Reproduce code: --- Expected result: 226 Transfer complete 43020 -- Edit this bug report at http://bugs.php.net/?id=44059&edit=1
#44059 [NEW]: Able to get more infos about FTP
From: daniel dot chobe at nextiraone dot de Operating system: Linux PHP version: 5.2.5 PHP Bug Type: Feature/Change Request Bug description: Able to get more infos about FTP Description: The FTP Extension dont show the choosen passiv port. But sometime it helps if your have problem with your connection. The other thing your can get is the last ftp responseline. It also helps in case of problems with FTP Connections. Reproduce code: --- Expected result: 226 Transfer complete 43020 -- Edit bug report at http://bugs.php.net/?id=44059&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=44059&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44059&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44059&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44059&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44059&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44059&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44059&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=44059&r=needscript Try newer version:http://bugs.php.net/fix.php?id=44059&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=44059&r=support Expected behavior:http://bugs.php.net/fix.php?id=44059&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=44059&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=44059&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=44059&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=44059&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=44059&r=dst IIS Stability:http://bugs.php.net/fix.php?id=44059&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=44059&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=44059&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=44059&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=44059&r=mysqlcfg
#43922 [Opn->Bgs]: CURL HEAD command problem
ID: 43922 Updated by: [EMAIL PROTECTED] Reported By: dragos dot matachescu at dna dot ro -Status: Open +Status: Bogus Bug Type: cURL related Operating System: Windows XP SP2 PHP Version: 5.2.5 New Comment: Thanks Daniel Previous Comments: [2008-02-05 22:47:25] daniel at haxx dot se Correct, this is the expected and designed behaviour as you're doing a GET request but changes the method keyword to "HEAD" which doesn't make libcurl act differently. It will still act like it does a GET. You get what you ask for. The NOBODY option is for changing a GET to HEAD and make libcurl treat it as such. So: thisisnotabug [2008-01-23 17:59:44] dragos dot matachescu at dna dot ro Description: This bug is not solved: Bug #27341 CURLOPT_CUSTOMREQUEST 'HEAD' misbehaves? I checked with latest CVS version I dont know what you have solved, but the real issus is this: when calling using CURL IIS servers, those servers will return (correctly) in the HEAD method reply the Content-Length field. This is OK because the HTTP protocol says HEAD should be identical with GET, only the body of the response should not be sent in case of HEAD. Apache in case of a HEAD command will NOT return Content-Length in response, so dont test against Apache and say it works. So, if Content-Length is present in a HEAD response, CURL will block waiting to receive o response body of the given length, and this will never come. See below script to reproduce the problem (is the script you proposed at Bug #27341 resolution, only URL is modified to call an IIS server) Reproduce code: --- http://www.robertoswinds.com/store/p.asp?c=126'); //MAKE SURE URL HERE IS FROM A IIS SERVER. THIS IS, I KNOW IT BECAUSE IS MY SERVER. curl_setopt($ch, CURLOPT_HEADER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'HEAD'); var_dump(curl_exec($ch)); ?> Expected result: return the page content Actual result: -- HTTP/1.1 200 OK Date: Wed, 23 Jan 2008 17:49:20 GMT Server: Microsoft-IIS/6.0 Content-Length: 16914 Content-Type: text/html Set-Cookie: ASPSESSIONIDSSCDDQSS=NFLPAACDIBKLHIGINKELONCJ; path=/ Cache-control: private Fatal error: Maximum execution time of 30 seconds exceeded in C:\wamp\www\hub\p.php on line 5 -- Edit this bug report at http://bugs.php.net/?id=43922&edit=1
#44056 [Opn->Fbk]: Get file content
ID: 44056 Updated by: [EMAIL PROTECTED] Reported By: raphpell at cario dot fr -Status: Open +Status: Feedback Bug Type: Performance problem Operating System: Windows Vista PHP Version: 5.2.5 New Comment: 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. Previous Comments: [2008-02-05 22:45:45] raphpell at cario dot fr Description: I handle my filesy stem : - 2000 files - 2000 folders With PHP 4.3.3 my scripts take 5 secondes With PHP 5.2.5 35 secondes... I use fopen, file_get_contents ( ob_start + include ) I zip my site, create my db with my filesystem,... -- Edit this bug report at http://bugs.php.net/?id=44056&edit=1