#29797 [Com]: mkdir function doesn't work correctly when path contains forward slashes
ID: 29797 Comment by: php at nowhere dot net Reported By: arnoud at procurios dot nl Status: Open Bug Type: Directory function related Operating System: Windows XP PHP Version: 5.0.0 New Comment: The proper work around is to use the php defined constant PHP_DIR_SEPARATOR which is set according to the platform. Previous Comments: [2004-09-01 16:56:11] alex dot pagnoni at solarix dot it Actual workaround is to check for underlying os (look inside $_ENV['OS']) and, if it is Windows, convert all forward slashes using str_replace(). [2004-08-23 14:41:27] arnoud at procurios dot nl Description: The 'mkdir' function doesn't function correctly on Windows when the path contains forward slashes. The part of the path with the forward slashes doesn't get created. Reproduce code: --- Expected result: Two directories should have been created: c:\a\b\c\d, and c:\e\f\g\h Actual result: -- Actual directories being created: c:\a\b\c\d, and C:\e\f -- Edit this bug report at http://bugs.php.net/?id=29797&edit=1
#24570 [Com]: Passing objects as default function parameters
ID: 24570 Comment by: php at nowhere dot net Reported By: da_bomb at hisplace dot net Status: Open Bug Type: Feature/Change Request Operating System: WinXP Pro PHP Version: 5CVS-2003-07-09 (dev) New Comment: This probably shouldnt be supported in the engine. I'm not aware of any languages where this is supported. If you want a default value, then use the existing capability to set it withing the scope of the function. Previous Comments: [2003-07-09 18:05:44] da_bomb at hisplace dot net Description: Hey, I've shown a function I'm trying to write that is giving me an error because I can set an object as a default function parameter. I don't know if this is a bug, or it wasn't intended to be possible but I reckon it would be a good addition. I can't see a specific reason not to have this functionality unless it runs into some issues such as namespaces did. Thanks :) Reproduce code: --- public function PadLeft ( Int32 $var1, Char $var2 = new Char ( ' ' ) ) { // line 315 try { $this->Value = str_pad($this->Value, $var1->Value, $var2->ToString(), STR_PAD_LEFT); return( true ); } catch ( xException $ex ) { return( $ex->False ); } } Expected result: I wasn't expecting to see the error anyway :p I'd like to have the result I'm looking for returned if possible. Actual result: -- Parse error: parse error, unexpected T_NEW in D:\www\root\objects\TMP2ct7ths5f1.php on line 315 -- Edit this bug report at http://bugs.php.net/?id=24570&edit=1
#30270 [Opn]: Remote Hostname Not Found on Win98
ID: 30270 User updated by: trustpunk at hotmail dot com Reported By: trustpunk at hotmail dot com Status: Open Bug Type: *General Issues Operating System: Windows 98 PHP Version: 4.3.9 New Comment: I want someone to test both codes on a Windows 98 and tell me if this processes correctly like it did on my Windows XP. Previous Comments: [2004-09-29 08:50:30] trustpunk at hotmail dot com Description: I have been testing this script thAT I recently developed to search for an ISP/Hostname on my windows XP but when I tested it on my actual server which is a Win98 , it didn't want to read any hostnames from a domain or IP Address. Im just wondering , is this not compatible with Windows 98 because I don't understand why it works on WinXP with the same exact PHP version which is 4.3.9. I did do a search. Reproduce code: --- 01. IP Address: Example 02. Domain Address: Example Expected result: The first example should turn a IP Address into a hostname. Now I understand that not all IP's have hostnames but this IP Address does. When I view this on my WinXP it shows just perfectly but if im viewing this on my Win98 , it shows my local hostname only. Same goes for the second example. Note: This is a remote IP Address so their is no reason for it to show my local hostname , this is driving me mad. :( -- Edit this bug report at http://bugs.php.net/?id=30270&edit=1
#26554 [Com]: __get($variable) do not work.
ID: 26554 Comment by: php at nowhere dot net Reported By: jonas at gauffin dot org Status: Open Bug Type: Feature/Change Request Operating System: winxp PHP Version: 5.0.0b2 (beta2) New Comment: This test code appears to work now. Should this be closed? Previous Comments: [2003-12-08 13:22:22] [EMAIL PROTECTED] This is not really a bug, making it a feature request. [2003-12-08 13:20:14] jonas at gauffin dot org Description: __get do not work as I expected. I think that it should override member variables (and return them). Reproduce code: --- class testClass { private $myTest; function __get($memberVariable) { if ($memberVariable == 'myTest') return $this->myTest; } } $test = new testClass; echo $test->myTest; Expected result: imho that's valid code. I do not want to change the variables to public since they are readonly. One way to do it would be to add a prefix to the member variables, but since $this have to be used to access the variables that would produce ugly code. Actual result: -- PHP Fatal error: Cannot access private property testclass::$myTest in E:\projects\inetpub\progga.se\test.php on line 46 -- Edit this bug report at http://bugs.php.net/?id=26554&edit=1
#26554 [Opn->Csd]: __get($variable) do not work.
ID: 26554 Updated by: [EMAIL PROTECTED] Reported By: jonas at gauffin dot org -Status: Open +Status: Closed Bug Type: Feature/Change Request Operating System: winxp PHP Version: 5.0.0b2 (beta2) New Comment: Sample code work ok now -> closed. Previous Comments: [2004-09-29 09:32:41] php at nowhere dot net This test code appears to work now. Should this be closed? [2003-12-08 13:22:22] [EMAIL PROTECTED] This is not really a bug, making it a feature request. [2003-12-08 13:20:14] jonas at gauffin dot org Description: __get do not work as I expected. I think that it should override member variables (and return them). Reproduce code: --- class testClass { private $myTest; function __get($memberVariable) { if ($memberVariable == 'myTest') return $this->myTest; } } $test = new testClass; echo $test->myTest; Expected result: imho that's valid code. I do not want to change the variables to public since they are readonly. One way to do it would be to add a prefix to the member variables, but since $this have to be used to access the variables that would produce ugly code. Actual result: -- PHP Fatal error: Cannot access private property testclass::$myTest in E:\projects\inetpub\progga.se\test.php on line 46 -- Edit this bug report at http://bugs.php.net/?id=26554&edit=1
#30271 [NEW]: Bitwise operator returns unwanted values
From: mccohy at kyberdigi dot cz Operating system: Linux PHP version: 5.0.2 PHP Bug Type: Math related Bug description: Bitwise operator returns unwanted values Description: The bitwise operator "and" returns an unwanted value. Here is a simple example: Let's store value 924303769 in variable $a and value -2147483649 in variable $ax. Now, let's count the 'bitwise and' of these two variables ($a & $ax). PHP 5.0.2 returns zero. PHP 4.3.9 returns 924303769. I am not sure what happens in 5.0.0 or 5.0.1, sorry. Reproduce code: --- $a=924303769; $ax=-2147483649; echo ($a & $ax)."\n"; Expected result: 924303769 Actual result: -- 0 -- Edit bug report at http://bugs.php.net/?id=30271&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30271&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30271&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30271&r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=30271&r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=30271&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30271&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30271&r=needscript Try newer version: http://bugs.php.net/fix.php?id=30271&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30271&r=support Expected behavior: http://bugs.php.net/fix.php?id=30271&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30271&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30271&r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=30271&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30271&r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=30271&r=dst IIS Stability: http://bugs.php.net/fix.php?id=30271&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30271&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30271&r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30271&r=mysqlcfg
#30263 [Com]: bitwise operators return different lengths
ID: 30263 Comment by: php at botimer dot net Reported By: tomas_matousek at hotmail dot com Status: Open Bug Type: Variables related Operating System: WinXP PHP Version: 5.0.2 New Comment: Tomas, I'm not ready to say that the XOR operator is bugged. I will say that the AND and XOR definitely behave differently than OR. All three of these operators pad the shorter string ``on the right'', making the bits more significant. The difference between your expected and actual is due to taking only the overlap and shifting it right by the number of pad bits (bytes/characters, dealing with strings). I've broken your examples down into full binary form, separated the nibbles, and blocked the words. In the AND and XOR, the high word is taken as the result, while the padded section is discarded. I've also included a little c program and its results to give the breakdown. The a variable is padded left, b is padded right. You can see that the results PHP is giving you are the shifted values listed last. As for reasoning for the shift, while the OR is allowed to ``make bits'', I would say that it is for masking purposes, but I can't say exactly what. I'm sure some guru would be more than happy to chime in. I know this is probably a more mathematical treatment than necessary. Simply put, the strings are truncated right of the overlap for AND and XOR, but not for OR. I don't consider it a bug, but can't give the deliberate intention. 00 00 01 02 -> 0001 0010 = 258 01 02 00 00 -> 0001 0010 = 16908288 01 00 01 02 -> 0011 0001 0001 = 16777474 10 20 10 00 -> 0001 0010 0001 = 270536704 00 00 00 01 -> 0001 = 1 -- 01 02 00 00 -> [ 0001 0010] [ ] 01 00 01 02 -> [ 0001 ] [ 0001 0010] & [ 0001 ] [ ] = 256 = 0100 01 02 00 00 -> [ 0001 0010] [ ] 10 20 10 00 -> [0001 0010 ] [0001 ] | [0001 0001 0010 0010] [0001 ] = 287444992 = 11221000 01 02 00 00 -> [ 0001 0010] [ ] 00 00 00 01 -> [ ] [ 0001] ^ [ 0001 0010] [ 0001] = 258 = 0102 =<%==<%= #include int main() { unsigned long a = 258; unsigned long b = 16908288; unsigned long c = 16777474; unsigned long d = 270536704; unsigned long e = 1; printf("a & c: %d\n", a & c); printf("a | d: %d\n", a | d); printf("a ^ e: %d\n", a ^ e); printf("\n"); printf("b & c: %d\n", b & c); printf("b | d: %d\n", b | d); printf("b ^ e: %d\n", b ^ e); printf("(b & c) >> 16: %d\n", (b & c) >> 16); printf("(b ^ e) >> 16: %d\n", (b ^ e) >> 16); return 0; } =<%==<%= a & c: 258 a | d: 270536962 a ^ e: 259 b & c: 16777216 b | d: 287444992 b ^ e: 16908289 (b & c) >> 16: 256 (b ^ e) >> 16: 258 Thanks, -Noah Previous Comments: [2004-09-28 16:13:52] tomas_matousek at hotmail dot com Description: If a biwise operator is applied on strings with different lengths one would expect that all such operators would return a string which length is a maximum of the lengths of the operands. Or at least that OR and XOR would do that. But neither is true since OR returns string having the maximum of both lengths and AND, XOR the minimum. That's why I think there is a bug in ^ operator. & operator may behave in both ways, although I would prefer the same behavior as in the case of | and ^. Reproduce code: --- echo bin2hex("\x01\x02" & "\x01\x00\x01\x02"),"\n"; echo bin2hex("\x01\x02" | "\x10\x20\x10\x00"),"\n"; echo bin2hex("\x01\x02" ^ "\x00\x00\x00\x01"),"\n"; Expected result: 0100 11221000 01020001 -- or -- 0100 11221000 01020001 Actual result: -- 0100 11221000 0102 -- Edit this bug report at http://bugs.php.net/?id=30263&edit=1
#30194 [Opn->Bgs]: Mysqli Prepared Statements work very slow when CLOB\BLOB is in result set
ID: 30194 Updated by: [EMAIL PROTECTED] Reported By: phoeniks2k at mail dot ru -Status: Open +Status: Bogus -Bug Type: Performance problem +Bug Type: MySQLi related Operating System: All PHP Version: 5.0.1 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 Retrieving only a single recordset with a prepared statement is of course slower. Why do you use mysqli_stmt_store_result? The first recordset is already sent to client after mysqli_stmt_execute. Also there is no reproducible testcase in your bug report. Previous Comments: [2004-09-22 14:38:07] phoeniks2k at mail dot ru Sorry, some additional info: Mysql 4.1.4 Gamma and clobs are not empty [2004-09-22 14:27:20] phoeniks2k at mail dot ru Description: If result set has clob\blob fields, retrieving data is VERY slow. Query "SELECT SQL_NO_CACHE id, xml_clob FROM some_table WHERE id = 1" executes 1000 times for about 0.4 seconds on my server; But this query rewriten with statement execs 20 time for 6(!) seconds!!! Every time i call: exec, store result, fetch, free_result P.S. SQL_NO_CACHE is used for clean noncached result times Expected result: STMT performance higher then normal query performance -- Edit this bug report at http://bugs.php.net/?id=30194&edit=1
#30194 [Bgs->Opn]: Mysqli Prepared Statements work very slow when CLOB\BLOB is in result set
ID: 30194 User updated by: phoeniks2k at mail dot ru Reported By: phoeniks2k at mail dot ru -Status: Bogus +Status: Open Bug Type: MySQLi related Operating System: All PHP Version: 5.0.1 New Comment: No, i ment another thing. Every query\stmt is executed multiple times (stmts are prepared only once) This statement SELECT id, title, proto, lnk4, mdf FROM objects_hier oh WHERE owner = ? works FASTER then query SELECT id, title, proto, lnk4, mdf FROM objects_hier WHERE owner = $owner_id But this statement (i marked clob field) SELECT id, title, proto, lnk4, mdf, xml_data <<<(clob) FROM objects_hier oh WHERE owner = ? works MUCH SLOWER then query SELECT id, title, proto, lnk4, mdf, xml_data <<<(clob) FROM objects_hier WHERE owner = $owner_id Every time ALL DATA is fetched from recordsets to script variables, everything is made as it was described in DOC and is identical by result except exec time Previous Comments: [2004-09-29 11:16:07] [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 Retrieving only a single recordset with a prepared statement is of course slower. Why do you use mysqli_stmt_store_result? The first recordset is already sent to client after mysqli_stmt_execute. Also there is no reproducible testcase in your bug report. [2004-09-22 14:38:07] phoeniks2k at mail dot ru Sorry, some additional info: Mysql 4.1.4 Gamma and clobs are not empty [2004-09-22 14:27:20] phoeniks2k at mail dot ru Description: If result set has clob\blob fields, retrieving data is VERY slow. Query "SELECT SQL_NO_CACHE id, xml_clob FROM some_table WHERE id = 1" executes 1000 times for about 0.4 seconds on my server; But this query rewriten with statement execs 20 time for 6(!) seconds!!! Every time i call: exec, store result, fetch, free_result P.S. SQL_NO_CACHE is used for clean noncached result times Expected result: STMT performance higher then normal query performance -- Edit this bug report at http://bugs.php.net/?id=30194&edit=1
#30194 [Opn]: Mysqli Prepared Statements work very slow when CLOB\BLOB is in result set
ID: 30194 User updated by: phoeniks2k at mail dot ru Reported By: phoeniks2k at mail dot ru Status: Open Bug Type: MySQLi related Operating System: All PHP Version: 5.0.1 New Comment: In another words reading clobs from statement results looks much slower then reading those from simple select results Previous Comments: [2004-09-29 11:44:16] phoeniks2k at mail dot ru No, i ment another thing. Every query\stmt is executed multiple times (stmts are prepared only once) This statement SELECT id, title, proto, lnk4, mdf FROM objects_hier oh WHERE owner = ? works FASTER then query SELECT id, title, proto, lnk4, mdf FROM objects_hier WHERE owner = $owner_id But this statement (i marked clob field) SELECT id, title, proto, lnk4, mdf, xml_data <<<(clob) FROM objects_hier oh WHERE owner = ? works MUCH SLOWER then query SELECT id, title, proto, lnk4, mdf, xml_data <<<(clob) FROM objects_hier WHERE owner = $owner_id Every time ALL DATA is fetched from recordsets to script variables, everything is made as it was described in DOC and is identical by result except exec time [2004-09-29 11:16:07] [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 Retrieving only a single recordset with a prepared statement is of course slower. Why do you use mysqli_stmt_store_result? The first recordset is already sent to client after mysqli_stmt_execute. Also there is no reproducible testcase in your bug report. [2004-09-22 14:38:07] phoeniks2k at mail dot ru Sorry, some additional info: Mysql 4.1.4 Gamma and clobs are not empty [2004-09-22 14:27:20] phoeniks2k at mail dot ru Description: If result set has clob\blob fields, retrieving data is VERY slow. Query "SELECT SQL_NO_CACHE id, xml_clob FROM some_table WHERE id = 1" executes 1000 times for about 0.4 seconds on my server; But this query rewriten with statement execs 20 time for 6(!) seconds!!! Every time i call: exec, store result, fetch, free_result P.S. SQL_NO_CACHE is used for clean noncached result times Expected result: STMT performance higher then normal query performance -- Edit this bug report at http://bugs.php.net/?id=30194&edit=1
#29957 [Opn->Fbk]: MYSQLI_TYPE_* lost
ID: 29957 Updated by: [EMAIL PROTECTED] Reported By: maillist at pnpitalia dot it -Status: Open +Status: Feedback Bug Type: MySQLi related Operating System: all PHP Version: 5CVS-2004-09-02 (dev) New Comment: Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PHP. Previous Comments: [2004-09-02 20:53:01] maillist at pnpitalia dot it Description: magically all MYSQLI_TYPE_* became MYSQL_TYPE_*, this appens in the last days in cvs version of php. Is this the wanted behaviour ? -- Edit this bug report at http://bugs.php.net/?id=29957&edit=1
#30081 [Opn->Bgs]: mulit_query's error
ID: 30081 Updated by: [EMAIL PROTECTED] Reported By: nxcoder at gmail dot com -Status: Open +Status: Bogus Bug Type: MySQLi related Operating System: win2000 PHP Version: 5.0.1 New Comment: tested against latest cvs and 5.0.2. Output: Array ( [0] => 1 [@@autocommit] => 1 ) Array ( [0] => [EMAIL PROTECTED] [current_user()] => [EMAIL PROTECTED] ) Also your actual result is wrong/incomplete: please specify the complete error message next time. Previous Comments: [2004-09-14 10:19:11] nxcoder at gmail dot com Description: use $str ="select @@autocommit;"; $str .= "select current_user();"; reportting errors! - use $str ="select @@autocommit;"; or $str = "select current_user();"; result is right; Reproduce code: --- "; $mysqli = new mysqli("localhost", "root", "", "EPS"); if(mysqli_connect_errno()) die(mysqli_connect_error()); $str ="select @@autocommit;"; $str .= "select current_user();"; $mysqli->multi_query($str) or die($mysqli->error); do{ if($result=$mysqli->store_result()) while($row = $result->fetch_array()) print_r($row); } while($mysqli->next_result()); ?> Expected result: print out two array Actual result: -- Unknown command -- Edit this bug report at http://bugs.php.net/?id=30081&edit=1
#30194 [Opn->Fbk]: Mysqli Prepared Statements work very slow when CLOB\BLOB is in result set
ID: 30194 Updated by: [EMAIL PROTECTED] Reported By: phoeniks2k at mail dot ru -Status: Open +Status: Feedback Bug Type: MySQLi related Operating System: All PHP Version: 5.0.1 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 possible, make the script source available online and provide an URL to it here. Try avoid embedding huge scripts into the report. Please read the comments more carefully. As I mentioned before, add a short reproducible testcase. Previous Comments: [2004-09-29 11:50:23] phoeniks2k at mail dot ru In another words reading clobs from statement results looks much slower then reading those from simple select results [2004-09-29 11:44:16] phoeniks2k at mail dot ru No, i ment another thing. Every query\stmt is executed multiple times (stmts are prepared only once) This statement SELECT id, title, proto, lnk4, mdf FROM objects_hier oh WHERE owner = ? works FASTER then query SELECT id, title, proto, lnk4, mdf FROM objects_hier WHERE owner = $owner_id But this statement (i marked clob field) SELECT id, title, proto, lnk4, mdf, xml_data <<<(clob) FROM objects_hier oh WHERE owner = ? works MUCH SLOWER then query SELECT id, title, proto, lnk4, mdf, xml_data <<<(clob) FROM objects_hier WHERE owner = $owner_id Every time ALL DATA is fetched from recordsets to script variables, everything is made as it was described in DOC and is identical by result except exec time [2004-09-29 11:16:07] [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 Retrieving only a single recordset with a prepared statement is of course slower. Why do you use mysqli_stmt_store_result? The first recordset is already sent to client after mysqli_stmt_execute. Also there is no reproducible testcase in your bug report. [2004-09-22 14:38:07] phoeniks2k at mail dot ru Sorry, some additional info: Mysql 4.1.4 Gamma and clobs are not empty [2004-09-22 14:27:20] phoeniks2k at mail dot ru Description: If result set has clob\blob fields, retrieving data is VERY slow. Query "SELECT SQL_NO_CACHE id, xml_clob FROM some_table WHERE id = 1" executes 1000 times for about 0.4 seconds on my server; But this query rewriten with statement execs 20 time for 6(!) seconds!!! Every time i call: exec, store result, fetch, free_result P.S. SQL_NO_CACHE is used for clean noncached result times Expected result: STMT performance higher then normal query performance -- Edit this bug report at http://bugs.php.net/?id=30194&edit=1
#30093 [Fbk->Opn]: Error with file upload
ID: 30093 User updated by: marcus dot stolzenberg at kgrz-kassel dot de Reported By: marcus dot stolzenberg at kgrz-kassel dot de -Status: Feedback +Status: Open Bug Type: HTTP related Operating System: SLES 8.0 zSeries s390 IBM PHP Version: 4.3.9RC3 New Comment: Hi, I' m really sorry... but I was wrong! I did some test the last days with different php versions (4.3.6 - 4.3.9). I found out that the problem is not the php release. The problem is using Apache 2.0.50 together with any (4.3.6 - 4.3.9) PHP release. Using Apache/2.0.46 every version of PHP works fine... Outout with 4.3.9: Array ( [file] => Array ( [name] => Test.exe [type] => application/octet-stream [tmp_name] => /uploadkds/phpAZU372 [error] => 0 [size] => 1999592 ) ) Array ( ) 1999592 = original file size :)) But now I did not know is the problem "in" apache or in php running together with apache 2.0.50... Is there a possibility to find this out so that I have to post the "bug" to apache group? Thanks, Marcus Previous Comments: [2004-09-28 23:05:10] [EMAIL PROTECTED] Have you tried PHP 4.3.8 ? Or 4.3.7 ? (would help us to know when this bug appeared first time) [2004-09-17 12:27:41] marcus dot stolzenberg at kgrz-kassel dot de Hi, I did the test with the: PHP Version 4.3.9RC4-dev / STABLE-200409161030 Same problem: Array ( [file] => Array ( [name] => daemon347.exe [type] => application/octet-stream [tmp_name] => /uploadkds/phpg9gWFe [error] => 0 [size] => 1004032 ) ) Array ( ) 1004032 Marcus [2004-09-16 09:41:26] marcus dot stolzenberg at kgrz-kassel dot de Hi, Yes I have some linux partitions on our IBM mainframe with php... We are running Suse Linux Enterprice Server 8.0 on 31 bit zSeries s390 / zOS I send a make test with 4.3.9rc3 yesterday to: [EMAIL PROTECTED] maybee it helps. I think I will try the HEAD version this evening and than I will report... Marcus [2004-09-16 05:36:31] [EMAIL PROTECTED] I just updated one of my servers to PHP_4_3 HEAD and large image file uploads are working fine both single and multiple at a time. Are we really talking about an S390 here? [2004-09-15 15:58:17] marcus dot stolzenberg at kgrz-kassel dot de Description: Hello, First the 'error' is also in 4.3.9rc1 with 4.3.6 everything is fine. If I am going to upload a file using php which is not txt encoded the file size of the transfered file is more then doubble and the file stored on the server is corrupted. Reproduce code: --- 1. HTML Part: 2. PHP Part: $tempname = $_FILES['file']['tmp_name']; $name = $_FILES['file']['name']; $type = $_FILES['file']['type']; $size = $_FILES['file']['size']; ... print_r($_FILES); echo $size; copy("$tempname", "/upload/$name"); ... Expected result: Output useing 4.3.6 Array ( [file] => Array ( [name] => daemon347.exe [type] => application/octet-stream [tmp_name] => /uploadkds/phpJGle3P [error] => 0 [size] => 504320 ) ) Array ( ) 504320 504320 = filesize of desination file on the server = original file size Actual result: -- Output 4.3.9rc1 and 4.3.9rc3 Array ( [file] => Array ( [name] => daemon347.exe [type] => application/octet-stream [tmp_name] => /uploadkds/phplvCHls [error] => 0 [size] => 1004032 ) ) Array ( ) 1004032 1004032 = filesize of desination file on the server =! original size -- Edit this bug report at http://bugs.php.net/?id=30093&edit=1
#30272 [NEW]: Problem running MySQL support under PHP5:"Unable to load dynamic library...
From: frix at abv dot bg Operating system: Windows 2003 Server Enterprice PHP version: 5.0.2 PHP Bug Type: MySQL related Bug description: Problem running MySQL support under PHP5:"Unable to load dynamic library... Description: I'm using IIS 6.0 web server and I'm trying to enable MySQL support on my php-5.0.2. But I recieve an error: Unable to load dynamic library 'C:\Program Files\php-5.0.2-Win32\ext\php_mysql.dll' - The specified module could not be found. (Note that the path is correct and there IS php_mysql.dll) I read the information. On the web server i've allowed any type of scripts and executables to run. In the path variable I've inserted the path to the php folder ('C:\Program Files\php-5.0.2-Win32'), the path to the extention folder ('C:\Program Files\php-5.0.2-Win32\ext'). There is a copy of libmySQL.dll in '%Systemroot%'. Changes in php.ini (base is the php.ini-dist): ... extension_dir = "C:\Program Files\php-5.0.2-Win32\ext" ... extension=php_mysql.dll ... I'm using the compiled binaries from php.net. I've tryed everything but nothing help. Please supply more informataion about this problem. I'm not the only one, who has it (the problem). With php 4.x.x everythings fine... -- Edit bug report at http://bugs.php.net/?id=30272&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30272&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30272&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30272&r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=30272&r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=30272&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30272&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30272&r=needscript Try newer version: http://bugs.php.net/fix.php?id=30272&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30272&r=support Expected behavior: http://bugs.php.net/fix.php?id=30272&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30272&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30272&r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=30272&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30272&r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=30272&r=dst IIS Stability: http://bugs.php.net/fix.php?id=30272&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30272&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30272&r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30272&r=mysqlcfg
#30194 [Fbk->Opn]: Mysqli Prepared Statements work very slow when CLOB\BLOB is in result set
ID: 30194 User updated by: phoeniks2k at mail dot ru Reported By: phoeniks2k at mail dot ru -Status: Feedback +Status: Open Bug Type: MySQLi related Operating System: All PHP Version: 5.0.1 New Comment: '; /**/ $t = getmicrotime(); for ($owner = 0; $owner < 20; $owner++) { $recordset = mysqli_query($link, "SELECT id, title, proto, lnk4, mdf, xml FROM objects_hier oh WHERE owner = $owner"); while ($row = mysqli_fetch_assoc($recordset)) { // some data manipulations that are equiv. those in stmt } mysqli_free_result($recordset); } echo (getmicrotime() - $t).''; ?> Previous Comments: [2004-09-29 12:10:42] [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 possible, make the script source available online and provide an URL to it here. Try avoid embedding huge scripts into the report. Please read the comments more carefully. As I mentioned before, add a short reproducible testcase. [2004-09-29 11:50:23] phoeniks2k at mail dot ru In another words reading clobs from statement results looks much slower then reading those from simple select results [2004-09-29 11:44:16] phoeniks2k at mail dot ru No, i ment another thing. Every query\stmt is executed multiple times (stmts are prepared only once) This statement SELECT id, title, proto, lnk4, mdf FROM objects_hier oh WHERE owner = ? works FASTER then query SELECT id, title, proto, lnk4, mdf FROM objects_hier WHERE owner = $owner_id But this statement (i marked clob field) SELECT id, title, proto, lnk4, mdf, xml_data <<<(clob) FROM objects_hier oh WHERE owner = ? works MUCH SLOWER then query SELECT id, title, proto, lnk4, mdf, xml_data <<<(clob) FROM objects_hier WHERE owner = $owner_id Every time ALL DATA is fetched from recordsets to script variables, everything is made as it was described in DOC and is identical by result except exec time [2004-09-29 11:16:07] [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 Retrieving only a single recordset with a prepared statement is of course slower. Why do you use mysqli_stmt_store_result? The first recordset is already sent to client after mysqli_stmt_execute. Also there is no reproducible testcase in your bug report. [2004-09-22 14:38:07] phoeniks2k at mail dot ru Sorry, some additional info: Mysql 4.1.4 Gamma and clobs are not empty 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/30194 -- Edit this bug report at http://bugs.php.net/?id=30194&edit=1
#30273 [NEW]: Apache crach when preforming openssl operations.
From: oskar at lanstorm dot org Operating system: Linux 2.4.26-grsec PHP version: 5.0.2 PHP Bug Type: Apache related Bug description: Apache crach when preforming openssl operations. Description: Hey. I`ve tried to send encrypted and signed e-mail via php using the openssl_pkcs7* functions and they crash my apache. Code looks like this... 'Oskar <[EMAIL PROTECTED]>', 'From' => 'oskar <[EMAIL PROTECTED]>'))) { //szyfruj if (openssl_pkcs7_encrypt('signed.txt', 'enc.txt', $key, array('To' => 'Oskar <[EMAIL PROTECTED]>', 'From' => 'oskar <[EMAIL PROTECTED]>', 'Subject' => 'Zaszyfrowana i podpisana elektronicznie wiadomosc ze strony www.'))) { // slij exec(ini_get('sendmail_path') . ' < enc.txt'); } } else { echo(openssl_error_string()); } ?> When i`m lunching the script apache child process segfault:|. [Wed Sep 29 13:20:35 2004] [notice] child pid 2586 exit signal Segmentation fault (11) Everything else is ok.PHP works fine on "normal" (not using openssl functions) scripts.But on this one it crash.Code is good because somethimes it works and don`t crash. Regards. -- Edit bug report at http://bugs.php.net/?id=30273&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30273&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30273&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30273&r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=30273&r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=30273&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30273&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30273&r=needscript Try newer version: http://bugs.php.net/fix.php?id=30273&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30273&r=support Expected behavior: http://bugs.php.net/fix.php?id=30273&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30273&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30273&r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=30273&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30273&r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=30273&r=dst IIS Stability: http://bugs.php.net/fix.php?id=30273&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30273&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30273&r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30273&r=mysqlcfg
#22070 [Com]: trans_id: Hidden fields placed incorrectly
ID: 22070 Comment by: zhou140 at yahoo dot com dot cn Reported By: jonas at understroem dot dk Status: Closed Bug Type: Session related Operating System: Linux PHP Version: 4.3.0 New Comment: fix this bug please it is still there at 4.3.8 this cause html 4.01 strict to fail. Previous Comments: [2003-02-10 12:25:00] node at nodefall dot de 1. i won't use ... i use instead 2. If i use fieldset (4.3.0) this is the result very funny [2003-02-09 16:00:40] [EMAIL PROTECTED] For xhtml, you use , so that the rewriter will include the hidden input field after the fieldset. [2003-02-09 15:36:56] node at nodefall dot de lol is this the way how php is fixing bugs? [2003-02-05 16:01:38] [EMAIL PROTECTED] You can disable the adding of the hidden field by removing 'form=' from url_rewriter.tags [2003-02-05 09:16:05] [EMAIL PROTECTED] Output from http://validator.w3.org: Line 7, column 115: document type does not allow element "input" here; missing one of "ins", "del", "h1", "h2", "h3", "h4", "h5", "h6", "p", "div", "address", "fieldset" start-tag ...="f78cfab3aa4745920992c99cabedc75f" /> ^ 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/22070 -- Edit this bug report at http://bugs.php.net/?id=22070&edit=1
#30273 [Opn->Fbk]: Apache crach when preforming openssl operations.
ID: 30273 Updated by: [EMAIL PROTECTED] Reported By: oskar at lanstorm dot org -Status: Open +Status: Feedback Bug Type: Apache related Operating System: Linux 2.4.26-grsec PHP Version: 5.0.2 New Comment: Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php Once you have generated a backtrace, please submit it to this bug report and change the status back to "Open". Thank you for helping us make PHP better. Previous Comments: [2004-09-29 13:34:45] oskar at lanstorm dot org Description: Hey. I`ve tried to send encrypted and signed e-mail via php using the openssl_pkcs7* functions and they crash my apache. Code looks like this... 'Oskar <[EMAIL PROTECTED]>', 'From' => 'oskar <[EMAIL PROTECTED]>'))) { //szyfruj if (openssl_pkcs7_encrypt('signed.txt', 'enc.txt', $key, array('To' => 'Oskar <[EMAIL PROTECTED]>', 'From' => 'oskar <[EMAIL PROTECTED]>', 'Subject' => 'Zaszyfrowana i podpisana elektronicznie wiadomosc ze strony www.'))) { // slij exec(ini_get('sendmail_path') . ' < enc.txt'); } } else { echo(openssl_error_string()); } ?> When i`m lunching the script apache child process segfault:|. [Wed Sep 29 13:20:35 2004] [notice] child pid 2586 exit signal Segmentation fault (11) Everything else is ok.PHP works fine on "normal" (not using openssl functions) scripts.But on this one it crash.Code is good because somethimes it works and don`t crash. Regards. -- Edit this bug report at http://bugs.php.net/?id=30273&edit=1
#30275 [NEW]: Erroneous 'Undeclared entity' error
From: michiel at trendserver dot nl Operating system: Debian PHP version: 5.0.2 PHP Bug Type: XML related Bug description: Erroneous 'Undeclared entity' error Description: The XML extension in PHP5(.02) seems to fail on the use entities that are declared in the same XML file. Reproduce code: --- ]> ü HERE; $parser = xml_parser_create(); if (!xml_parse($parser, $xml)) { echo xml_error_string(xml_get_error_code($parser)) . "\n"; } xml_parser_free($parser); ?> Expected result: No errors. Actual result: -- Undeclared entity error. -- Edit bug report at http://bugs.php.net/?id=30275&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30275&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30275&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30275&r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=30275&r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=30275&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30275&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30275&r=needscript Try newer version: http://bugs.php.net/fix.php?id=30275&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30275&r=support Expected behavior: http://bugs.php.net/fix.php?id=30275&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30275&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30275&r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=30275&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30275&r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=30275&r=dst IIS Stability: http://bugs.php.net/fix.php?id=30275&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30275&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30275&r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30275&r=mysqlcfg
#30269 [Csd->Bgs]: encoding (special chars)
ID: 30269 Updated by: [EMAIL PROTECTED] Reported By: biroy at hotmail dot com -Status: Closed +Status: Bogus Bug Type: SimpleXML related Operating System: Windows XP PHP Version: 5.0.1 New Comment: bogus... Previous Comments: [2004-09-29 02:30:44] biroy at hotmail dot com I used utf8_decode() and it works now good. Sorry. [2004-09-29 01:17:03] biroy at hotmail dot com Description: (when you read a field with specials chars like spanish or catalan 'á' it returns 'á') I saw similar bugs reported and others say tey are bogus... I think it's a problem anyway and I hope it will be repaired. Reproduce code: --- http://www.codigoescrito.com/index.rdf";; $xml = simplexml_load_file($fitxer); foreach ($xml->item as $item) { echo $item->title, ''; } ?> Expected result: Mozilla Firefox RC 1.0 Primer día en ESIDE Nueva máquina y lío con Don Pc (1/2) Inseguridad en redes WI-FI Promoción de ADSL boca a boca Colores armónicos en sitios web Nuevo navegador Maxthon Un paso más a la inseguridad La preproducción del software TypingMaster Pro Apple Mini IPod de 4GB El error descubierto La Cueva de los Clásicos Bordes redondeados y punto para Mozilla Linux en la Fórmula 1 Actual result: -- Mozilla Firefox RC 1.0 Primer dÃa en ESIDE Nueva máquina y lÃo con Don Pc (1/2) Inseguridad en redes WI-FI Promoción de ADSL boca a boca Colores armónicos en sitios web Nuevo navegador Maxthon Un paso más a la inseguridad La preproducción del software TypingMaster Pro Apple Mini IPod de 4GB El error descubierto La Cueva de los Clásicos Bordes redondeados y punto para Mozilla Linux en la Fórmula 1 -- Edit this bug report at http://bugs.php.net/?id=30269&edit=1
#30275 [Opn]: Erroneous 'Undeclared entity' error
ID: 30275 User updated by: michiel at trendserver dot nl Reported By: michiel at trendserver dot nl Status: Open Bug Type: XML related Operating System: Debian PHP Version: 5.0.2 New Comment: Also occurs using http://snaps.php.net/win32/php5-win32-200409291030.zip Previous Comments: [2004-09-29 14:41:17] michiel at trendserver dot nl Description: The XML extension in PHP5(.02) seems to fail on the use entities that are declared in the same XML file. Reproduce code: --- ]> ü HERE; $parser = xml_parser_create(); if (!xml_parse($parser, $xml)) { echo xml_error_string(xml_get_error_code($parser)) . "\n"; } xml_parser_free($parser); ?> Expected result: No errors. Actual result: -- Undeclared entity error. -- Edit this bug report at http://bugs.php.net/?id=30275&edit=1
#30093 [Opn->Asn]: Error with file upload
ID: 30093 Updated by: [EMAIL PROTECTED] Reported By: marcus dot stolzenberg at kgrz-kassel dot de -Status: Open +Status: Assigned Bug Type: HTTP related Operating System: SLES 8.0 zSeries s390 IBM PHP Version: 4.3.9RC3 -Assigned To: +Assigned To: jorton New Comment: Joe, do you have any idea about this? I'd say it's just an Apache problem... Previous Comments: [2004-09-29 12:13:21] marcus dot stolzenberg at kgrz-kassel dot de Hi, I' m really sorry... but I was wrong! I did some test the last days with different php versions (4.3.6 - 4.3.9). I found out that the problem is not the php release. The problem is using Apache 2.0.50 together with any (4.3.6 - 4.3.9) PHP release. Using Apache/2.0.46 every version of PHP works fine... Outout with 4.3.9: Array ( [file] => Array ( [name] => Test.exe [type] => application/octet-stream [tmp_name] => /uploadkds/phpAZU372 [error] => 0 [size] => 1999592 ) ) Array ( ) 1999592 = original file size :)) But now I did not know is the problem "in" apache or in php running together with apache 2.0.50... Is there a possibility to find this out so that I have to post the "bug" to apache group? Thanks, Marcus [2004-09-28 23:05:10] [EMAIL PROTECTED] Have you tried PHP 4.3.8 ? Or 4.3.7 ? (would help us to know when this bug appeared first time) [2004-09-17 12:27:41] marcus dot stolzenberg at kgrz-kassel dot de Hi, I did the test with the: PHP Version 4.3.9RC4-dev / STABLE-200409161030 Same problem: Array ( [file] => Array ( [name] => daemon347.exe [type] => application/octet-stream [tmp_name] => /uploadkds/phpg9gWFe [error] => 0 [size] => 1004032 ) ) Array ( ) 1004032 Marcus [2004-09-16 09:41:26] marcus dot stolzenberg at kgrz-kassel dot de Hi, Yes I have some linux partitions on our IBM mainframe with php... We are running Suse Linux Enterprice Server 8.0 on 31 bit zSeries s390 / zOS I send a make test with 4.3.9rc3 yesterday to: [EMAIL PROTECTED] maybee it helps. I think I will try the HEAD version this evening and than I will report... Marcus [2004-09-16 05:36:31] [EMAIL PROTECTED] I just updated one of my servers to PHP_4_3 HEAD and large image file uploads are working fine both single and multiple at a time. Are we really talking about an S390 here? 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/30093 -- Edit this bug report at http://bugs.php.net/?id=30093&edit=1
#30272 [Opn->Bgs]: Problem running MySQL support under PHP5:"Unable to load dynamic library...
ID: 30272 Updated by: [EMAIL PROTECTED] Reported By: frix at abv dot bg -Status: Open +Status: Bogus Bug Type: MySQL related Operating System: Windows 2003 Server Enterprice PHP Version: 5.0.2 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. Thank you for your interest in PHP. . Previous Comments: [2004-09-29 12:25:01] frix at abv dot bg Description: I'm using IIS 6.0 web server and I'm trying to enable MySQL support on my php-5.0.2. But I recieve an error: Unable to load dynamic library 'C:\Program Files\php-5.0.2-Win32\ext\php_mysql.dll' - The specified module could not be found. (Note that the path is correct and there IS php_mysql.dll) I read the information. On the web server i've allowed any type of scripts and executables to run. In the path variable I've inserted the path to the php folder ('C:\Program Files\php-5.0.2-Win32'), the path to the extention folder ('C:\Program Files\php-5.0.2-Win32\ext'). There is a copy of libmySQL.dll in '%Systemroot%'. Changes in php.ini (base is the php.ini-dist): ... extension_dir = "C:\Program Files\php-5.0.2-Win32\ext" ... extension=php_mysql.dll ... I'm using the compiled binaries from php.net. I've tryed everything but nothing help. Please supply more informataion about this problem. I'm not the only one, who has it (the problem). With php 4.x.x everythings fine... -- Edit this bug report at http://bugs.php.net/?id=30272&edit=1
#30093 [Asn->Fbk]: Error with file upload
ID: 30093 Updated by: [EMAIL PROTECTED] Reported By: marcus dot stolzenberg at kgrz-kassel dot de -Status: Assigned +Status: Feedback Bug Type: HTTP related Operating System: SLES 8.0 zSeries s390 IBM PHP Version: 4.3.9RC3 Assigned To: jorton New Comment: Screwups in POST body handling can happen if you use the apache2filter SAPI and you have it configured badly. Things to try: 1) switch to apache2handler 2) remove any "SetInputFilter PHP" statements from your apache configuration, if you also have "AddType application/x-httpd-php .php". The AddType is sufficient for the apache2filter to work correctly. If you have both, it screws up. 2.0.51 + 4.3.9 (apache2handler) work fine on an s390x box here. (running RHEL not SLES) Previous Comments: [2004-09-29 14:55:19] [EMAIL PROTECTED] Joe, do you have any idea about this? I'd say it's just an Apache problem... [2004-09-29 12:13:21] marcus dot stolzenberg at kgrz-kassel dot de Hi, I' m really sorry... but I was wrong! I did some test the last days with different php versions (4.3.6 - 4.3.9). I found out that the problem is not the php release. The problem is using Apache 2.0.50 together with any (4.3.6 - 4.3.9) PHP release. Using Apache/2.0.46 every version of PHP works fine... Outout with 4.3.9: Array ( [file] => Array ( [name] => Test.exe [type] => application/octet-stream [tmp_name] => /uploadkds/phpAZU372 [error] => 0 [size] => 1999592 ) ) Array ( ) 1999592 = original file size :)) But now I did not know is the problem "in" apache or in php running together with apache 2.0.50... Is there a possibility to find this out so that I have to post the "bug" to apache group? Thanks, Marcus [2004-09-28 23:05:10] [EMAIL PROTECTED] Have you tried PHP 4.3.8 ? Or 4.3.7 ? (would help us to know when this bug appeared first time) [2004-09-17 12:27:41] marcus dot stolzenberg at kgrz-kassel dot de Hi, I did the test with the: PHP Version 4.3.9RC4-dev / STABLE-200409161030 Same problem: Array ( [file] => Array ( [name] => daemon347.exe [type] => application/octet-stream [tmp_name] => /uploadkds/phpg9gWFe [error] => 0 [size] => 1004032 ) ) Array ( ) 1004032 Marcus [2004-09-16 09:41:26] marcus dot stolzenberg at kgrz-kassel dot de Hi, Yes I have some linux partitions on our IBM mainframe with php... We are running Suse Linux Enterprice Server 8.0 on 31 bit zSeries s390 / zOS I send a make test with 4.3.9rc3 yesterday to: [EMAIL PROTECTED] maybee it helps. I think I will try the HEAD version this evening and than I will report... Marcus 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/30093 -- Edit this bug report at http://bugs.php.net/?id=30093&edit=1
#30266 [Opn->Asn]: Invalid opcode 137/1/8
ID: 30266 Updated by: [EMAIL PROTECTED] Reported By: sorin at intersol dot ro -Status: Open +Status: Assigned Bug Type: Reproducible crash Operating System: WinXP PHP Version: 5.0.2 -Assigned To: +Assigned To: andi Previous Comments: [2004-09-28 20:46:14] sorin at intersol dot ro Description: Very basic use test of adodb generate a complete crash on 5.0.2 and last build PHP 5.1.0-dev (cli) (built: Sep 28 2004 16:26:27) gives this: Invalid opcode 137/1/8 in adodb-xmlschema.inc.php. Runing php with -e parameters makes no difference. Reproduce code: --- function _tag_close( &$parser, $tag ) { >> $this->currentElement = ''; switch( strtoupper( $tag ) ) { case 'TABLE': $this->parent->addSQL( Expected result: Anything but not a crash?! -- Edit this bug report at http://bugs.php.net/?id=30266&edit=1
#30264 [Opn->Bgs]: headers_sent() reporting incorrect value
ID: 30264 Updated by: [EMAIL PROTECTED] Reported By: mpn at illearth dot net -Status: Open +Status: Bogus Bug Type: Output Control Operating System: Win NT(2K) PHP Version: 4.3.9 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 What makes you think headers should have been sent at the point where you call headers_sent()? I would not expect this to happen until the ob_end_flush() call. Previous Comments: [2004-09-28 18:33:41] mpn at illearth dot net Description: When checking the value of headers_sent(), function is returning FALSE even though headers have clearly been sent. Returned result does not change when output buffering is commented out or where output buffering is started (i.e before sending headers or after ). I crammed the test code into 19 lines, so please excuse the formatting. ["SERVER_SOFTWARE"]=> string(31) "Apache/2.0.49 (Win32) PHP/4.3.9" using sapi Reproduce code: --- http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>' . "\n\n"; echo '' . "\n";echo '' . "\n";echo '' . "\n"; echo 'headers_sent() Returned Value Is: ' . "\n"; var_dump( headers_sent() ); echo '' . "\n"; ob_end_flush(); function compressOutput( $str ) { $_output = gzencode( $str ); if ( (bool)FALSE === $_output ) { return $str; } header( 'Content-Encoding: gzip' ); return $_output; } // End Function compressOutput ?> Expected result: var_dump( headers_sent() ); = (bool)true Actual result: -- var_dump( headers_sent() ); = (bool)false -- Edit this bug report at http://bugs.php.net/?id=30264&edit=1
#30276 [NEW]: Ctype_digit causes apache to crash
From: stephen_edmonds at btinternet dot com Operating system: Windows XP (SP2) PHP version: 4.3.9 PHP Bug Type: Reproducible crash Bug description: Ctype_digit causes apache to crash Description: When ctype_digit is passed a large number, it causes the apache child thread to terminate with the code "3221225477". When apache tries to restart the child thread, it crashes with the same code about 20 seconds later. The only way to stop this crash cycle is to shutdown/restart the apache server. This bug was supposedly fixed in bug #29226 - but php 4.3.9 still seems to be effected. Reproduce code: --- Expected result: true Actual result: -- The apache child thread will crash. When the child is re-started by apache, it will crash 20 seconds later. This will continue to happen until the apache server is shutdown or restarted. -- Edit bug report at http://bugs.php.net/?id=30276&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30276&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30276&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30276&r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=30276&r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=30276&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30276&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30276&r=needscript Try newer version: http://bugs.php.net/fix.php?id=30276&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30276&r=support Expected behavior: http://bugs.php.net/fix.php?id=30276&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30276&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30276&r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=30276&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30276&r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=30276&r=dst IIS Stability: http://bugs.php.net/fix.php?id=30276&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30276&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30276&r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30276&r=mysqlcfg
#30093 [Fbk->Csd]: Error with file upload
ID: 30093 User updated by: marcus dot stolzenberg at kgrz-kassel dot de Reported By: marcus dot stolzenberg at kgrz-kassel dot de -Status: Feedback +Status: Closed Bug Type: HTTP related Operating System: SLES 8.0 zSeries s390 IBM PHP Version: 4.3.9RC3 Assigned To: jorton New Comment: Hello, Thank U for your answer now everything is fine Sorry so long! Marcus Previous Comments: [2004-09-29 15:11:14] [EMAIL PROTECTED] Screwups in POST body handling can happen if you use the apache2filter SAPI and you have it configured badly. Things to try: 1) switch to apache2handler 2) remove any "SetInputFilter PHP" statements from your apache configuration, if you also have "AddType application/x-httpd-php .php". The AddType is sufficient for the apache2filter to work correctly. If you have both, it screws up. 2.0.51 + 4.3.9 (apache2handler) work fine on an s390x box here. (running RHEL not SLES) [2004-09-29 14:55:19] [EMAIL PROTECTED] Joe, do you have any idea about this? I'd say it's just an Apache problem... [2004-09-29 12:13:21] marcus dot stolzenberg at kgrz-kassel dot de Hi, I' m really sorry... but I was wrong! I did some test the last days with different php versions (4.3.6 - 4.3.9). I found out that the problem is not the php release. The problem is using Apache 2.0.50 together with any (4.3.6 - 4.3.9) PHP release. Using Apache/2.0.46 every version of PHP works fine... Outout with 4.3.9: Array ( [file] => Array ( [name] => Test.exe [type] => application/octet-stream [tmp_name] => /uploadkds/phpAZU372 [error] => 0 [size] => 1999592 ) ) Array ( ) 1999592 = original file size :)) But now I did not know is the problem "in" apache or in php running together with apache 2.0.50... Is there a possibility to find this out so that I have to post the "bug" to apache group? Thanks, Marcus [2004-09-28 23:05:10] [EMAIL PROTECTED] Have you tried PHP 4.3.8 ? Or 4.3.7 ? (would help us to know when this bug appeared first time) [2004-09-17 12:27:41] marcus dot stolzenberg at kgrz-kassel dot de Hi, I did the test with the: PHP Version 4.3.9RC4-dev / STABLE-200409161030 Same problem: Array ( [file] => Array ( [name] => daemon347.exe [type] => application/octet-stream [tmp_name] => /uploadkds/phpg9gWFe [error] => 0 [size] => 1004032 ) ) Array ( ) 1004032 Marcus 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/30093 -- Edit this bug report at http://bugs.php.net/?id=30093&edit=1
#30273 [Fbk->Opn]: Apache crach when preforming openssl operations.
ID: 30273 User updated by: oskar at lanstorm dot org Reported By: oskar at lanstorm dot org -Status: Feedback +Status: Open Bug Type: Apache related Operating System: Linux 2.4.26-grsec PHP Version: 5.0.2 New Comment: Backtrace: (gdb) run -X Starting program: /usr/local/apache/bin/httpd -X Program received signal SIGSEGV, Segmentation fault. 0x44041a3c in OBJ_obj2nid () from /usr/lib/libcrypto.so.0 (gdb) bt #0 0x44041a3c in OBJ_obj2nid () from /usr/lib/libcrypto.so.0 That seems to be openssl bug.Maybe i shuld send it to they buglist?Dunno:| Previous Comments: [2004-09-29 14:36:31] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php Once you have generated a backtrace, please submit it to this bug report and change the status back to "Open". Thank you for helping us make PHP better. [2004-09-29 13:34:45] oskar at lanstorm dot org Description: Hey. I`ve tried to send encrypted and signed e-mail via php using the openssl_pkcs7* functions and they crash my apache. Code looks like this... 'Oskar <[EMAIL PROTECTED]>', 'From' => 'oskar <[EMAIL PROTECTED]>'))) { //szyfruj if (openssl_pkcs7_encrypt('signed.txt', 'enc.txt', $key, array('To' => 'Oskar <[EMAIL PROTECTED]>', 'From' => 'oskar <[EMAIL PROTECTED]>', 'Subject' => 'Zaszyfrowana i podpisana elektronicznie wiadomosc ze strony www.'))) { // slij exec(ini_get('sendmail_path') . ' < enc.txt'); } } else { echo(openssl_error_string()); } ?> When i`m lunching the script apache child process segfault:|. [Wed Sep 29 13:20:35 2004] [notice] child pid 2586 exit signal Segmentation fault (11) Everything else is ok.PHP works fine on "normal" (not using openssl functions) scripts.But on this one it crash.Code is good because somethimes it works and don`t crash. Regards. -- Edit this bug report at http://bugs.php.net/?id=30273&edit=1
#30273 [Opn->Fbk]: Apache crach when preforming openssl operations.
ID: 30273 Updated by: [EMAIL PROTECTED] Reported By: oskar at lanstorm dot org -Status: Open +Status: Feedback Bug Type: Apache related Operating System: Linux 2.4.26-grsec PHP Version: 5.0.2 New Comment: Read the bt instructions again; the trace you've provided is not terribly helpful. Make sure you build a debug build of PHP and paste the full trace. Previous Comments: [2004-09-29 15:55:12] oskar at lanstorm dot org Backtrace: (gdb) run -X Starting program: /usr/local/apache/bin/httpd -X Program received signal SIGSEGV, Segmentation fault. 0x44041a3c in OBJ_obj2nid () from /usr/lib/libcrypto.so.0 (gdb) bt #0 0x44041a3c in OBJ_obj2nid () from /usr/lib/libcrypto.so.0 That seems to be openssl bug.Maybe i shuld send it to they buglist?Dunno:| [2004-09-29 14:36:31] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php Once you have generated a backtrace, please submit it to this bug report and change the status back to "Open". Thank you for helping us make PHP better. [2004-09-29 13:34:45] oskar at lanstorm dot org Description: Hey. I`ve tried to send encrypted and signed e-mail via php using the openssl_pkcs7* functions and they crash my apache. Code looks like this... 'Oskar <[EMAIL PROTECTED]>', 'From' => 'oskar <[EMAIL PROTECTED]>'))) { //szyfruj if (openssl_pkcs7_encrypt('signed.txt', 'enc.txt', $key, array('To' => 'Oskar <[EMAIL PROTECTED]>', 'From' => 'oskar <[EMAIL PROTECTED]>', 'Subject' => 'Zaszyfrowana i podpisana elektronicznie wiadomosc ze strony www.'))) { // slij exec(ini_get('sendmail_path') . ' < enc.txt'); } } else { echo(openssl_error_string()); } ?> When i`m lunching the script apache child process segfault:|. [Wed Sep 29 13:20:35 2004] [notice] child pid 2586 exit signal Segmentation fault (11) Everything else is ok.PHP works fine on "normal" (not using openssl functions) scripts.But on this one it crash.Code is good because somethimes it works and don`t crash. Regards. -- Edit this bug report at http://bugs.php.net/?id=30273&edit=1
#30277 [NEW]: Half of the downloads on the download page are not working.
From: yankeegal01 at yahoo dot com Operating system: PHP version: Irrelevant PHP Bug Type: Unknown/Other Function Bug description: Half of the downloads on the download page are not working. Description: Half the downloads on the download page are not working. And error message is given stating "the mirror server is not set up properly to download this file". Specifically the installer files on ver 4 and 5. -- Edit bug report at http://bugs.php.net/?id=30277&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30277&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30277&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30277&r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=30277&r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=30277&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30277&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30277&r=needscript Try newer version: http://bugs.php.net/fix.php?id=30277&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30277&r=support Expected behavior: http://bugs.php.net/fix.php?id=30277&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30277&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30277&r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=30277&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30277&r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=30277&r=dst IIS Stability: http://bugs.php.net/fix.php?id=30277&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30277&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30277&r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30277&r=mysqlcfg
#30218 [Opn->Fbk]: xsltApplyOneTeplate warning c'se
ID: 30218 Updated by: [EMAIL PROTECTED] Reported By: robert dot dahlin at jerntorget dot se -Status: Open +Status: Feedback Bug Type: XSLT related Operating System: Linux Slackware 2.6 PHP Version: 5.0.1 New Comment: Currently can't reproduce that, can you please upgrade to a recent libxml2/libxslt version and see if the problem persists? Previous Comments: [2004-09-28 11:06:47] robert dot dahlin at jerntorget dot se XML and XSL example. The same thing happens when i use for example » but if » it does not appear either. If i wan't it to be visible i have to use "»" instead, but that's not OK. Here is an example that does not work for me, I just get the following warnings. Warning: xsltApplyOneTemplate: apply-templates was not compiled in xsltest.php on line 20 Warning: xsltApplyOneTemplate: apply-templates was not compiled in xsltest.php on line 20 //Robert Dahlin --- XML: - http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";[ ]> - XSL: - ]> http://www.w3.org/1999/XSL/Transform";> » - [2004-09-24 14:24:36] [EMAIL PROTECTED] Can you please provide a full XSLT and XML example and did you declare the entity? [2004-09-24 13:13:45] robert dot dahlin at jerntorget dot se Version info from phpifo() just in case. Zend Engine v2.0.1 Zend Extension Manager v1.0.2 --- xml XML Support active XML Namespace Support active libxml2 Version 2.5.11 --- xsl XSL enabled libxslt Version 1.0.33 libxslt compiled against libxml Version 2.5.11 EXSLT enabled libexslt Version 1.0.33 --- [2004-09-24 13:10:08] robert dot dahlin at jerntorget dot se Description: xsltApplyOneTemplate is always shown if i have an followed by for example in an xsl file. xsltApplyOneTemplate: if was not compiled in (if can for example be apply-template or some other method), i've found that the problem seems to be an directly before the or what ever "method" is causing the problem. One way to get thru the problem is to use span tags around like : but I don't think that it should be nessesary to do that. Reproduce code: --- Expected result: (the value of object in xml) Actual result: -- Warning: xsltApplyOneTemplate: if was not compiled in /www/include/xslttest.php on line 19 (the value of object in xml) -- Edit this bug report at http://bugs.php.net/?id=30218&edit=1
#30266 [Asn]: Invalid opcode 137/1/8
ID: 30266 Updated by: [EMAIL PROTECTED] Reported By: sorin at intersol dot ro Status: Assigned Bug Type: Reproducible crash Operating System: WinXP PHP Version: 5.0.2 Assigned To: andi New Comment: Can you please post a working piece of reproducing code? Preferably no more than 20 lines. Thanks. Previous Comments: [2004-09-28 20:46:14] sorin at intersol dot ro Description: Very basic use test of adodb generate a complete crash on 5.0.2 and last build PHP 5.1.0-dev (cli) (built: Sep 28 2004 16:26:27) gives this: Invalid opcode 137/1/8 in adodb-xmlschema.inc.php. Runing php with -e parameters makes no difference. Reproduce code: --- function _tag_close( &$parser, $tag ) { >> $this->currentElement = ''; switch( strtoupper( $tag ) ) { case 'TABLE': $this->parent->addSQL( Expected result: Anything but not a crash?! -- Edit this bug report at http://bugs.php.net/?id=30266&edit=1
#30278 [NEW]: SPL: ArrayIterator: seek($postion) does not work
From: d dot peters at gmail dot com Operating system: Linux PHP version: 5.0.1 PHP Bug Type: Zend Engine 2 problem Bug description: SPL: ArrayIterator: seek($postion) does not work Description: http://www.php.net/~helly/php/ext/spl/classArrayIterator.html#a8 ArrayIterator::seek($position) always jumps to the 2nd element, no matter which value $position had... I saw this in changelog: Fixed bug #27042 (SPL: SeekableIterator seek() broken). (Marcus) But it was fixed in 5.0.0 Beta4 and I use 5.0.1... Reproduce code: --- $a = array(0,1,2,3,4,5,6,7,8,9); $it = new ArrayIterator($a); $it->rewind(); for ($i=0; $i < $it->count(); $i++) { $it->seek($i); echo $it->current(); } // output: 01 // -> seek always jumps to the 1st position... Expected result: output: 0123456789 In my opinion it only makes sense to "seek" to the specified position... but correct my if i'm wrong ;-) Actual result: -- output: 01 -- Edit bug report at http://bugs.php.net/?id=30278&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30278&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30278&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30278&r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=30278&r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=30278&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30278&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30278&r=needscript Try newer version: http://bugs.php.net/fix.php?id=30278&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30278&r=support Expected behavior: http://bugs.php.net/fix.php?id=30278&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30278&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30278&r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=30278&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30278&r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=30278&r=dst IIS Stability: http://bugs.php.net/fix.php?id=30278&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30278&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30278&r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30278&r=mysqlcfg
#30279 [NEW]: 404 instead of 403 when permission denied
From: pviet at azuria dot com Operating system: Linux PHP version: 4.3.9 PHP Bug Type: CGI related Bug description: 404 instead of 403 when permission denied Description: Status 404 instead of 403 when file passed via environment is not accessible. This leads to error on debugging and took me about 7hrs to find what was really happening (wrong rights) Reproduce code: --- Abstract : - A PHP file is called x.php, located in /data/www/x.php - My user is called someunixuser - This someunixuser can't read the file because lacking unix permissions (not owner, 0700 or so on) mybox:~$ cat /data/www/x.php cat: /data/www/x.php: Permission denied mybox:~$ env SCRIPT_FILENAME=/data/www/x.php /usr/bin/php Status: 404 Content-type: text/html X-Powered-By: PHP/4.3.9 No input file specified. mybox:~$ Expected result: Return a 403 and "Permission denied on /data/web/x.php" Actual result: -- Return a 404 and "No input files" -- Edit bug report at http://bugs.php.net/?id=30279&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30279&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30279&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30279&r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=30279&r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=30279&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30279&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30279&r=needscript Try newer version: http://bugs.php.net/fix.php?id=30279&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30279&r=support Expected behavior: http://bugs.php.net/fix.php?id=30279&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30279&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30279&r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=30279&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30279&r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=30279&r=dst IIS Stability: http://bugs.php.net/fix.php?id=30279&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30279&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30279&r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30279&r=mysqlcfg
#29074 [Opn]: mssql_connect fails under heavy load
ID: 29074 User updated by: david dot blair at nsi1 dot com Reported By: david dot blair at nsi1 dot com Status: Open Bug Type: MSSQL related Operating System: MS 2003 PHP Version: 4.3.7 New Comment: (In response to two posts ago) Charles, I tried your fix by setting the winsocklistenbacklog to 16. Didn't work. Had three more incidents today where the first connection was refused but on an instant reconnect it worked. Previous Comments: [2004-09-22 07:37:08] pretenda at pretenda dot com I am also having the same problem. I have been searching high and low for an answer, but have found none. I ended up creating a loop in my PHP connect code too, and it has attempted to connect more than once, 27 times on my development server in the past week. I am running the following: Windows 2003 Server IIS6 PHP 5.01 SQL Server 2000 SP3 A also previously had the issue on 4.3.8, which didn't fail as often. Unfortunately I need some of the features of PHP5 on my new website. Cheers, Matt [2004-09-21 23:57:14] david dot blair at nsi1 dot com Charles, this doesn't explain why newer versions of PHP cause the error more frequently than older versions, when everything else about our systems remains the same. This also doesn't explain why PHP is the only thing having issues that contacts my SQL server. I'll try your work-around tomorrow and monitor the server for a few weeks to see what happens. It's a step in the right direction to finding a solution if it does help, but I still see it as a work-around, not a solution. [2004-09-21 23:36:13] phpbugreport at workboy dot com This bug should probably be closed. The problem is on the MSSQL end and ban be resolved by changing the value of the winsocklistenbacklog registry entry. For those who are experiencing this problem, please see http://support.microsoft.com/default.aspx?kbid=328476 I don't know why this also affects mssql_select_db, but they do appear to go together. [2004-09-13 00:42:39] phpbugreport at workboy dot com Upgrading seems to make things worse. I upgraded to freetds-0.62.4, php-4.3.9RC2 (4.3.8 has a compile issue with freetds-0.62.4 according to bug reports), and apache 1.3.31. Now in addition to mssql_connect failures I also get mssql_select_db failures for one of our busier databases. Could it be that php/freetds is getting too fast and giving up before a response is received from SQL 2000? Charles Bennigton Oddcast, Inc. [2004-09-11 22:13:08] phpbugreport at workboy dot com We are currently running apache_1.3.28, freetds-0.61.2 and php-4.3.3 on linux 2.4.x kernels and experiencing the same problem connecting to a SQL 2000E SP3 database. Modifying our PHP db connection classes to immediately try mssql_connect again when it fails produces the desired results most of the time. However not always. I will be upgrading to the latest and greatest in the current major version for all of the components on the Linux side and testing more. I will post a follow up then. Charles Bennington Oddcast, Inc. 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/29074 -- Edit this bug report at http://bugs.php.net/?id=29074&edit=1
#30280 [NEW]: Small patch
From: freddyz77 at tin dot it Operating system: Any PHP version: 4.3.9 PHP Bug Type: MSSQL related Bug description: Small patch Description: Well, I wrote this patch just looking at the code, I hope someone find some useful info. Mainly it contains some memory leak fix connecting and some others minor issues and notes. --- php_mssql.c.orig2004-09-29 19:52:42.0 +0200 +++ php_mssql.c 2004-09-29 20:29:10.0 +0200 @@ -197,20 +197,23 @@ result->data = NULL; result->blocks_initialized = 0; } if (free_fields && result->fields) { for (i=0; inum_fields; i++) { STR_FREE(result->fields[i].name); STR_FREE(result->fields[i].column_source); } efree(result->fields); + result->fields = NULL; + result->num_fields = 0; + result->cur_field = 0; } } static void _free_mssql_statement(mssql_statement *statement) { if (statement->binds) { zend_hash_destroy(statement->binds); efree(statement->binds); } @@ -263,28 +266,25 @@ mssql_bind *bind= (mssql_bind *) data; zval_ptr_dtor(&(bind->zval)); } static void php_mssql_init_globals(zend_mssql_globals *mssql_globals) { long compatability_mode; mssql_globals->num_persistent = 0; + mssql_globals->get_column_content = php_mssql_get_column_content_with_type; if (cfg_get_long("mssql.compatability_mode", &compatability_mode) == SUCCESS) { if (compatability_mode) { mssql_globals->get_column_content = php_mssql_get_column_content_without_type; - } else { - mssql_globals->get_column_content = php_mssql_get_column_content_with_type; } - } else { - mssql_globals->get_column_content = php_mssql_get_column_content_with_type; } } PHP_MINIT_FUNCTION(mssql) { ZEND_INIT_MODULE_GLOBALS(mssql, php_mssql_init_globals, NULL); REGISTER_INI_ENTRIES(); le_statement = register_list_destructors(_free_mssql_statement, NULL); @@ -508,61 +508,68 @@ if (DBSETOPT(mssql.link, DBBUFFER, "2")==FAIL) { efree(hashed_details); dbfreelogin(mssql.login); dbclose(mssql.link); RETURN_FALSE; } if (MS_SQL_G(textlimit) != -1) { sprintf(buffer, "%li", MS_SQL_G(textlimit)); if (DBSETOPT(mssql.link, DBTEXTLIMIT, buffer)==FAIL) { + dbclose(mssql.link); efree(hashed_details); dbfreelogin(mssql.login); RETURN_FALSE; } } if (MS_SQL_G(textsize) != -1) { sprintf(buffer, "SET TEXTSIZE %li", MS_SQL_G(textsize)); dbcmd(mssql.link, buffer); dbsqlexec(mssql.link); dbresults(mssql.link); } /* hash it up */ mssql_ptr = (mssql_link *) malloc(sizeof(mssql_link)); memcpy(mssql_ptr, &mssql, sizeof(mssql_link)); Z_TYPE(new_le) = le_plink; new_le.ptr = mssql_ptr; if (zend_hash_update(&EG(persistent_list), hashed_details, hashed_details_length + 1, &new_le, sizeof(list_entry), NULL)==FAILURE) { free(mssql_ptr); + dbclose(mssql.link); efree(hashed_details); dbfreelogin(mssql.login); RETURN_FALSE; } MS_SQL_G(num_persistent)++; MS_SQL_G(num_links)++; } else { /* we do */ + dbfreelogin(mssql.login); + if (Z_TYPE_P(le) != le_plink) { + efree(hashed_details); #if BROKEN_MSSQL_PCONNECTS log_error("PHP/MS SQL: Hashed persistent link is not a MS SQL link!",php_rqst->server); #endif php_error_docref(NULL TSRMLS_CC, E_WARNING, "Hashed persistent link is not a MS SQL link!"); RETURN_FALSE; } mssql_ptr = (mssql_link *) le->ptr; /* test that
#28081 [Com]: mssql_connect segfaults with wrong parameters
ID: 28081 Comment by: freddyz77 at tin dot it Reported By: [EMAIL PROTECTED] Status: Assigned Bug Type: MSSQL related Operating System: Linux PHP Version: 4CVS-2004-04-20 (stable) Assigned To: fmk New Comment: I'm a FreeTDS developer. 0.53 it's quite old, we released 0.60, 0.61, and 0.62 in the meantime (and we are releasing 0.63). Previous Comments: [2004-04-20 23:34:37] [EMAIL PROTECTED] This sounds like a problem with FreeTDS, but I'll take a closer look at the code. [2004-04-20 19:41:17] [EMAIL PROTECTED] Description: Similar to bug #11490. mssql_connect (and mssql_pconnect) segfault when called witout the user/password parameters. Using PHP CVS Snap from today, FreeTDS v 0.53-7 (Debian Unstable). Reproduce code: --- echo "Connected: ". ( mssql_pconnect("some_instance") ? 'yes' : 'no' ) ."\n"; Expected result: No Segfault, uses the interfaces/freetds.conf file for user/pass info. Actual result: -- Warning: mssql_pconnect(): Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. (severity 14) in mssql_test2.php on line 3 Segmentation fault (gdb) bt #0 0x402785f3 in tds_reset_msg_info () from /usr/lib/libsybdb.so.1 #1 0x4027470d in dblib_handle_err_message () from /usr/lib/libsybdb.so.1 #2 0x4027852e in tds_process_column_row () from /usr/lib/libsybdb.so.1 #3 0x4027697f in tds_process_default_tokens () from /usr/lib/libsybdb.so.1 #4 0x40276b5d in tds_process_login_tokens () from /usr/lib/libsybdb.so.1 #5 0x40279c6c in tds_connect () from /usr/lib/libsybdb.so.1 #6 0x40271e33 in tdsdbopen () from /usr/lib/libsybdb.so.1 #7 0x40264e9f in php_mssql_do_connect (ht=1, return_value=0x8196db4, this_ptr=0x0, return_value_used=1, persistent=1) at /home/sean/php4-STABLE-200404122030/ext/mssql/php_mssql.c:501 #8 0x40265491 in zif_mssql_pconnect (ht=1, return_value=0x8196db4, this_ptr=0x0, return_value_used=1) at /home/sean/php4-STABLE-200404122030/ext/mssql/php_mssql.c:684 #9 0x0811f1fa in execute (op_array=0x8199c44) at /home/sean/php/stable/Zend/zend_execute.c:1637 #10 0x0810fc28 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/sean/php/stable/Zend/zend.c:886 #11 0x080ed383 in php_execute_script (primary_file=0xbca8) at /home/sean/php/stable/main/main.c:1731 #12 0x08125cac in main (argc=4, argv=0xbd24) at /home/sean/php/stable/sapi/cli/php_cli.c:822 -- Edit this bug report at http://bugs.php.net/?id=28081&edit=1
#30281 [NEW]: returned size for WBMP is always 1x0
From: spam at batz dot org Operating system: Windows XP PHP version: 5.0.1 PHP Bug Type: GetImageSize related Bug description: returned size for WBMP is always 1x0 Description: getimagesize returns always 1 as width and 0 as height for WBMP pictures. problem occurs on 4.3.8 and 4.3.9 as well. WBMP/ICO can hold multiple frames with different sizes. Reproduce code: --- $imageinfo = getimagesize('favicon.ico'); echo "width:{$imageinfo[0]}"; echo "height:{$imageinfo[1]}"; echo "imagetype:{$imageinfo[2]}"; echo "to show that the size is wrong:"; echo ""; Expected result: width:16 height:16 imagetype:15 to show that the size is wrong: IMAGE Actual result: -- width:1 height:0 imagetype:15 to show that the size is wrong: IMAGE -- Edit bug report at http://bugs.php.net/?id=30281&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30281&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30281&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30281&r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=30281&r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=30281&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30281&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30281&r=needscript Try newer version: http://bugs.php.net/fix.php?id=30281&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30281&r=support Expected behavior: http://bugs.php.net/fix.php?id=30281&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30281&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30281&r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=30281&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30281&r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=30281&r=dst IIS Stability: http://bugs.php.net/fix.php?id=30281&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30281&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30281&r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30281&r=mysqlcfg
#30264 [Bgs->Opn]: headers_sent() reporting incorrect value
ID: 30264 User updated by: mpn at illearth dot net Reported By: mpn at illearth dot net -Status: Bogus +Status: Open Bug Type: Output Control Operating System: Win NT(2K) PHP Version: 4.3.9 New Comment: I quote from the manual: http://us4.php.net/manual/en/function.ob-start.php "While output buffering is active no output is sent from the script (other than headers), instead the output is stored in an internal buffer." In particular "(other than headers)". So according to the documentation, headers are sent prior to buffer flushing, which is also consistent with the documentation for headers: http://us4.php.net/manual/en/function.header.php "Remember that header() must be called before any actual output is sent, either by normal HTML tags, blank lines in a file, or from PHP." Please explain what use this function has when you can't use it until all the content has been sent to the browser, at which point (barring a shutdown function) the script normally exits? Please try this test code: CUT blankhttp://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>' . "\n\n"; echo '' . "\n";echo '' . "\n";echo '' . "\n"; echo 'headers_sent() Returned Value Is: ' . "\n"; var_dump( headers_sent() ); echo '' . "\n"; flush(); header( 'Cache-Control: no-store, no-cache, must-revalidate' ); var_dump( headers_sent() ); ?> END CUT The behavior of this code is consitent with what you have stated, headers aren't sent prior to the flush, however when trying to send headers after flushing, you trigger a warning: Warning: Cannot modify header information - headers already sent in W:\MPN\CVS\rc2-2\mpn188\html\_test_headers.php on line 12 So I fail to see where this function can be used?? The only good reason I can see for testing if headers have been sent is to determine if you can successfully send more headers. As the above code shows, you cannot send anymore headers once flushing, which is the only location in the script that you get a TRUE return from headers_sent(). At the very least this qualifies as documentation problems or possibly add to the list of soon to be deprecated functions. Previous Comments: [2004-09-29 15:35:37] [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 What makes you think headers should have been sent at the point where you call headers_sent()? I would not expect this to happen until the ob_end_flush() call. [2004-09-28 18:33:41] mpn at illearth dot net Description: When checking the value of headers_sent(), function is returning FALSE even though headers have clearly been sent. Returned result does not change when output buffering is commented out or where output buffering is started (i.e before sending headers or after ). I crammed the test code into 19 lines, so please excuse the formatting. ["SERVER_SOFTWARE"]=> string(31) "Apache/2.0.49 (Win32) PHP/4.3.9" using sapi Reproduce code: --- http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>' . "\n\n"; echo '' . "\n";echo '' . "\n";echo '' . "\n"; echo 'headers_sent() Returned Value Is: ' . "\n"; var_dump( headers_sent() ); echo '' . "\n"; ob_end_flush(); function compressOutput( $str ) { $_output = gzencode( $str ); if ( (bool)FALSE === $_output ) { return $str; } header( 'Content-Encoding: gzip' ); return $_output; } // End Function compressOutput ?> Expected result: var_dump( headers_sent() ); = (bool)true Actual result: -- var_dump( headers_sent() ); = (bool)false -- Edit this bug report at http://bugs.php.net/?id=30264&edit=1
#30273 [Fbk->Opn]: Apache crach when preforming openssl operations.
ID: 30273 User updated by: oskar at lanstorm dot org Reported By: oskar at lanstorm dot org -Status: Feedback +Status: Open Bug Type: Apache related Operating System: Linux 2.4.26-grsec PHP Version: 5.0.2 New Comment: Re. I cannot provide more info cuz that all the output from gdb.PHP is compiled with --enable-debug option.And in gdb i see only this one frame. Previous Comments: [2004-09-29 16:49:13] [EMAIL PROTECTED] Read the bt instructions again; the trace you've provided is not terribly helpful. Make sure you build a debug build of PHP and paste the full trace. [2004-09-29 15:55:12] oskar at lanstorm dot org Backtrace: (gdb) run -X Starting program: /usr/local/apache/bin/httpd -X Program received signal SIGSEGV, Segmentation fault. 0x44041a3c in OBJ_obj2nid () from /usr/lib/libcrypto.so.0 (gdb) bt #0 0x44041a3c in OBJ_obj2nid () from /usr/lib/libcrypto.so.0 That seems to be openssl bug.Maybe i shuld send it to they buglist?Dunno:| [2004-09-29 14:36:31] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php Once you have generated a backtrace, please submit it to this bug report and change the status back to "Open". Thank you for helping us make PHP better. [2004-09-29 13:34:45] oskar at lanstorm dot org Description: Hey. I`ve tried to send encrypted and signed e-mail via php using the openssl_pkcs7* functions and they crash my apache. Code looks like this... 'Oskar <[EMAIL PROTECTED]>', 'From' => 'oskar <[EMAIL PROTECTED]>'))) { //szyfruj if (openssl_pkcs7_encrypt('signed.txt', 'enc.txt', $key, array('To' => 'Oskar <[EMAIL PROTECTED]>', 'From' => 'oskar <[EMAIL PROTECTED]>', 'Subject' => 'Zaszyfrowana i podpisana elektronicznie wiadomosc ze strony www.'))) { // slij exec(ini_get('sendmail_path') . ' < enc.txt'); } } else { echo(openssl_error_string()); } ?> When i`m lunching the script apache child process segfault:|. [Wed Sep 29 13:20:35 2004] [notice] child pid 2586 exit signal Segmentation fault (11) Everything else is ok.PHP works fine on "normal" (not using openssl functions) scripts.But on this one it crash.Code is good because somethimes it works and don`t crash. Regards. -- Edit this bug report at http://bugs.php.net/?id=30273&edit=1
#30280 [Opn->Asn]: Small patch
ID: 30280 Updated by: [EMAIL PROTECTED] Reported By: freddyz77 at tin dot it -Status: Open +Status: Assigned Bug Type: MSSQL related Operating System: Any PHP Version: 4.3.9 -Assigned To: +Assigned To: fmk Previous Comments: [2004-09-29 20:39:37] freddyz77 at tin dot it Description: Well, I wrote this patch just looking at the code, I hope someone find some useful info. Mainly it contains some memory leak fix connecting and some others minor issues and notes. --- php_mssql.c.orig2004-09-29 19:52:42.0 +0200 +++ php_mssql.c 2004-09-29 20:29:10.0 +0200 @@ -197,20 +197,23 @@ result->data = NULL; result->blocks_initialized = 0; } if (free_fields && result->fields) { for (i=0; inum_fields; i++) { STR_FREE(result->fields[i].name); STR_FREE(result->fields[i].column_source); } efree(result->fields); + result->fields = NULL; + result->num_fields = 0; + result->cur_field = 0; } } static void _free_mssql_statement(mssql_statement *statement) { if (statement->binds) { zend_hash_destroy(statement->binds); efree(statement->binds); } @@ -263,28 +266,25 @@ mssql_bind *bind= (mssql_bind *) data; zval_ptr_dtor(&(bind->zval)); } static void php_mssql_init_globals(zend_mssql_globals *mssql_globals) { long compatability_mode; mssql_globals->num_persistent = 0; + mssql_globals->get_column_content = php_mssql_get_column_content_with_type; if (cfg_get_long("mssql.compatability_mode", &compatability_mode) == SUCCESS) { if (compatability_mode) { mssql_globals->get_column_content = php_mssql_get_column_content_without_type; - } else { - mssql_globals->get_column_content = php_mssql_get_column_content_with_type; } - } else { - mssql_globals->get_column_content = php_mssql_get_column_content_with_type; } } PHP_MINIT_FUNCTION(mssql) { ZEND_INIT_MODULE_GLOBALS(mssql, php_mssql_init_globals, NULL); REGISTER_INI_ENTRIES(); le_statement = register_list_destructors(_free_mssql_statement, NULL); @@ -508,61 +508,68 @@ if (DBSETOPT(mssql.link, DBBUFFER, "2")==FAIL) { efree(hashed_details); dbfreelogin(mssql.login); dbclose(mssql.link); RETURN_FALSE; } if (MS_SQL_G(textlimit) != -1) { sprintf(buffer, "%li", MS_SQL_G(textlimit)); if (DBSETOPT(mssql.link, DBTEXTLIMIT, buffer)==FAIL) { + dbclose(mssql.link); efree(hashed_details); dbfreelogin(mssql.login); RETURN_FALSE; } } if (MS_SQL_G(textsize) != -1) { sprintf(buffer, "SET TEXTSIZE %li", MS_SQL_G(textsize)); dbcmd(mssql.link, buffer); dbsqlexec(mssql.link); dbresults(mssql.link); } /* hash it up */ mssql_ptr = (mssql_link *) malloc(sizeof(mssql_link)); memcpy(mssql_ptr, &mssql, sizeof(mssql_link)); Z_TYPE(new_le) = le_plink; new_le.ptr = mssql_ptr; if (zend_hash_update(&EG(persistent_list), hashed_details, hashed_details_length + 1, &new_le, sizeof(list_entry), NULL)==FAILURE) { free(mssql_ptr); + dbclose(mssql.link); efree(hashed_details); dbfreelogin(mssql.login); RETURN_FALSE; } MS_SQL_G(num_persistent)++; MS_SQL_G(num_links)++; } else { /* we do */ + dbfreelogin(mssql.login); + if (Z_TYPE_P(le) != le_plink) { + efree(hashed_details); #if BROKEN_MSSQL_PCONNECTS log_error("PHP/MS SQL: Hashed persistent link is not a MS SQL link!",php_rqst->server); #endif php_error_docre
#30278 [Opn->Csd]: SPL: ArrayIterator: seek($postion) does not work
ID: 30278 Updated by: [EMAIL PROTECTED] Reported By: d dot peters at gmail dot com -Status: Open +Status: Closed Bug Type: Zend Engine 2 problem Operating System: * PHP Version: 5.0.1 Assigned To: helly New Comment: Thank you for your bug report. This issue has already been fixed in the latest released version of PHP, which you can download at http://www.php.net/downloads.php Previous Comments: [2004-09-29 19:08:24] d dot peters at gmail dot com Description: http://www.php.net/~helly/php/ext/spl/classArrayIterator.html#a8 ArrayIterator::seek($position) always jumps to the 2nd element, no matter which value $position had... I saw this in changelog: Fixed bug #27042 (SPL: SeekableIterator seek() broken). (Marcus) But it was fixed in 5.0.0 Beta4 and I use 5.0.1... Reproduce code: --- $a = array(0,1,2,3,4,5,6,7,8,9); $it = new ArrayIterator($a); $it->rewind(); for ($i=0; $i < $it->count(); $i++) { $it->seek($i); echo $it->current(); } // output: 01 // -> seek always jumps to the 1st position... Expected result: output: 0123456789 In my opinion it only makes sense to "seek" to the specified position... but correct my if i'm wrong ;-) Actual result: -- output: 01 -- Edit this bug report at http://bugs.php.net/?id=30278&edit=1
#30264 [Opn]: headers_sent() reporting incorrect value
ID: 30264 User updated by: mpn at illearth dot net Reported By: mpn at illearth dot net Status: Open Bug Type: Output Control Operating System: Win NT(2K) PHP Version: 4.3.9 New Comment: I might also note that the second test code results are also inconsistent with the manual with regard to headers(). According to the manual, the string "blank" before opening PHP should have triggered a warning and prevented headers from being sent. Previous Comments: [2004-09-29 21:30:11] mpn at illearth dot net I quote from the manual: http://us4.php.net/manual/en/function.ob-start.php "While output buffering is active no output is sent from the script (other than headers), instead the output is stored in an internal buffer." In particular "(other than headers)". So according to the documentation, headers are sent prior to buffer flushing, which is also consistent with the documentation for headers: http://us4.php.net/manual/en/function.header.php "Remember that header() must be called before any actual output is sent, either by normal HTML tags, blank lines in a file, or from PHP." Please explain what use this function has when you can't use it until all the content has been sent to the browser, at which point (barring a shutdown function) the script normally exits? Please try this test code: CUT blankhttp://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>' . "\n\n"; echo '' . "\n";echo '' . "\n";echo '' . "\n"; echo 'headers_sent() Returned Value Is: ' . "\n"; var_dump( headers_sent() ); echo '' . "\n"; flush(); header( 'Cache-Control: no-store, no-cache, must-revalidate' ); var_dump( headers_sent() ); ?> END CUT The behavior of this code is consitent with what you have stated, headers aren't sent prior to the flush, however when trying to send headers after flushing, you trigger a warning: Warning: Cannot modify header information - headers already sent in W:\MPN\CVS\rc2-2\mpn188\html\_test_headers.php on line 12 So I fail to see where this function can be used?? The only good reason I can see for testing if headers have been sent is to determine if you can successfully send more headers. As the above code shows, you cannot send anymore headers once flushing, which is the only location in the script that you get a TRUE return from headers_sent(). At the very least this qualifies as documentation problems or possibly add to the list of soon to be deprecated functions. [2004-09-29 15:35:37] [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 What makes you think headers should have been sent at the point where you call headers_sent()? I would not expect this to happen until the ob_end_flush() call. [2004-09-28 18:33:41] mpn at illearth dot net Description: When checking the value of headers_sent(), function is returning FALSE even though headers have clearly been sent. Returned result does not change when output buffering is commented out or where output buffering is started (i.e before sending headers or after ). I crammed the test code into 19 lines, so please excuse the formatting. ["SERVER_SOFTWARE"]=> string(31) "Apache/2.0.49 (Win32) PHP/4.3.9" using sapi Reproduce code: --- http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>' . "\n\n"; echo '' . "\n";echo '' . "\n";echo '' . "\n"; echo 'headers_sent() Returned Value Is: ' . "\n"; var_dump( headers_sent() ); echo '' . "\n"; ob_end_flush(); function compressOutput( $str ) { $_output = gzencode( $str ); if ( (bool)FALSE === $_output ) { return $str; } header( 'Content-Encoding: gzip' ); return $_output; } // End Function compressOutput ?> Expected result: var_dump( headers_sent() ); = (bool)true Actual result: -- var_dump( headers_sent() ); = (bool)false -- Edit this bug report at http://bugs.php.net/?id=30264&edit=1
#24570 [Opn]: Passing objects as default function parameters
ID: 24570 Updated by: [EMAIL PROTECTED] Reported By: da_bomb at hisplace dot net Status: Open Bug Type: Feature/Change Request -Operating System: WinXP Pro +Operating System: * -PHP Version: 5CVS-2003-07-09 (dev) +PHP Version: 5.* New Comment: At the moment the parser/compiler/executor trio doesn't allow this at all. Before we can suppport this we'd need major changes all over the engine becuase the current situation is that we allways have two opcodes for every parameter. Allowing other things as default parameters would break this rule Previous Comments: [2004-09-29 09:11:16] php at nowhere dot net This probably shouldnt be supported in the engine. I'm not aware of any languages where this is supported. If you want a default value, then use the existing capability to set it withing the scope of the function. [2003-07-09 18:05:44] da_bomb at hisplace dot net Description: Hey, I've shown a function I'm trying to write that is giving me an error because I can set an object as a default function parameter. I don't know if this is a bug, or it wasn't intended to be possible but I reckon it would be a good addition. I can't see a specific reason not to have this functionality unless it runs into some issues such as namespaces did. Thanks :) Reproduce code: --- public function PadLeft ( Int32 $var1, Char $var2 = new Char ( ' ' ) ) { // line 315 try { $this->Value = str_pad($this->Value, $var1->Value, $var2->ToString(), STR_PAD_LEFT); return( true ); } catch ( xException $ex ) { return( $ex->False ); } } Expected result: I wasn't expecting to see the error anyway :p I'd like to have the result I'm looking for returned if possible. Actual result: -- Parse error: parse error, unexpected T_NEW in D:\www\root\objects\TMP2ct7ths5f1.php on line 315 -- Edit this bug report at http://bugs.php.net/?id=24570&edit=1
#24570 [Opn->WFx]: Passing objects as default function parameters
ID: 24570 Updated by: [EMAIL PROTECTED] Reported By: da_bomb at hisplace dot net -Status: Open +Status: Wont fix Bug Type: Feature/Change Request Operating System: * PHP Version: 5.* Previous Comments: [2004-09-29 22:01:03] [EMAIL PROTECTED] At the moment the parser/compiler/executor trio doesn't allow this at all. Before we can suppport this we'd need major changes all over the engine becuase the current situation is that we allways have two opcodes for every parameter. Allowing other things as default parameters would break this rule [2004-09-29 09:11:16] php at nowhere dot net This probably shouldnt be supported in the engine. I'm not aware of any languages where this is supported. If you want a default value, then use the existing capability to set it withing the scope of the function. [2003-07-09 18:05:44] da_bomb at hisplace dot net Description: Hey, I've shown a function I'm trying to write that is giving me an error because I can set an object as a default function parameter. I don't know if this is a bug, or it wasn't intended to be possible but I reckon it would be a good addition. I can't see a specific reason not to have this functionality unless it runs into some issues such as namespaces did. Thanks :) Reproduce code: --- public function PadLeft ( Int32 $var1, Char $var2 = new Char ( ' ' ) ) { // line 315 try { $this->Value = str_pad($this->Value, $var1->Value, $var2->ToString(), STR_PAD_LEFT); return( true ); } catch ( xException $ex ) { return( $ex->False ); } } Expected result: I wasn't expecting to see the error anyway :p I'd like to have the result I'm looking for returned if possible. Actual result: -- Parse error: parse error, unexpected T_NEW in D:\www\root\objects\TMP2ct7ths5f1.php on line 315 -- Edit this bug report at http://bugs.php.net/?id=24570&edit=1
#30122 [Fbk->Opn]: ORA-02396 error even though there is a call to ocilogoff
ID: 30122 User updated by: atebbe at utk dot edu Reported By: atebbe at utk dot edu -Status: Feedback +Status: Open Bug Type: OCI8 related Operating System: Suse Professional 9.1 PHP Version: 5.0.1 New Comment: Our timeout is set to 30 for the Oracle database. I still don't understand though why the connection is not being closed by PHP at the end of the page. It is as though a persistent connection is opened, even though I am not using that function within PHP. Is there any way to force PHP to terminate this connection, so that when a page is reloaded or a new page is viewed, it will open a new connection to Oracle? Previous Comments: [2004-09-29 08:29:39] [EMAIL PROTECTED] Could you plz tell me what's the value of the IDLE_TIME variable? You should be able to get it with "select * from dba_profiles". [2004-09-29 02:23:00] atebbe at utk dot edu This issue still has not been resolved and should remain categorized as Open. It is my understanding that ocilogoff does not even need to be called, and PHP should disconnect from Oracle at the end of the page, but it does not seem to do so [2004-09-28 23:18:33] [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. [2004-09-17 06:42:27] [EMAIL PROTECTED] Try to set appropriate idle timeout first. It looks like a problem of your (mis)configuration. [2004-09-16 20:03:48] atebbe at utk dot edu Description: Using Apache 2 to connect to a remote Oracle 9 database. PHP was built on an AMD64 machine with both OCI8 and ORA functions using the Oracle 9 libraries. When a PHP page is loaded , it calls ocilogon at the top, generates the page, then calls ocilogoff at the bottom. When the page sites for a while, then is refreshed, the following message is produced: Warning: ociexecute() [function.ociexecute]: OCIStmtExecute: ORA-02396: exceeded maximum idle time, please connect again in /srv/www/htdocs/ccbioinfo/bioteams/htdocs/oracle.inc.php on line 38 Warning: ociexecute() [function.ociexecute]: OCIStmtExecute: ORA-01012: not logged on in /srv/www/htdocs/ccbioinfo/bioteams/htdocs/oracle.inc.php on line 55 Errors: ORA-02396: exceeded maximum idle time, please connect again Resource id #9 This occurs consistently when letting the page site for a while before reloading it. -- Edit this bug report at http://bugs.php.net/?id=30122&edit=1
#30232 [Fbk->Opn]: Set-Cookie HTTP-Header is missing using session_start()
ID: 30232 User updated by: matthias dot heller at gmx dot net Reported By: matthias dot heller at gmx dot net -Status: Feedback +Status: Open Bug Type: Session related Operating System: Debian Linux 3.1 PHP Version: 4.3.9 New Comment: it happens with all browsers Previous Comments: [2004-09-28 23:00:49] [EMAIL PROTECTED] What browser is it? Does it happen with any other browser as well? [2004-09-25 22:38:52] matthias dot heller at gmx dot net Sorry the other change to php.ini compared to php.ini-dist is session.cookie_lifetime = 0 changed to session.cookie_lifetime = 1800 [2004-09-25 22:36:08] matthias dot heller at gmx dot net Description: This bug occures in php-4.3.9 final release my configure command: './configure' '--with-mysql' '--with-apxs2=/usr/bin/apxs2' '--enable-bcmath' '--enable-calendar' '--with-zlib' '--enable-sockets' The only change in php.ini: session.cookie_name = PHPSESSID changed to session.cookie_name = GWARS_COOKIE The HTTP-Header Set-Cookie is only send when no session-cookie was send in the HTTP_REQUEST to the server (Apache 2.0.51). So when I delete my cookies and I call the script for the first time I got in my HTTP headers the following line: Set-Cookie: GWARS_COOKIE=; expires=; path=/ when I call the same page again the Set-Cookie line in the HTTP headers is missing. The Set-Cookie line in the HTTP headers will occure after I delete my cookies. So the problem is, that my session will be invalid after 30 minutes even if session_start is called again, as I don't get a new Set-Cookie line with the new expiry-date My browser accept cookies and the script worked fine with php version 4.3.8 same configure command and same php settings. Hopefully you understand my problem. If not please contact me. Reproduce code: --- My work around is Expected result: The code should return an empty page. That works quite fine. But the HTTP Headers are only correct the first time I call the script. When I call the script more often and my session-cookie is valid the response HTTP headers are incorrect (Set-Cookie ... is missing) Actual result: -- First time call of script: HTTP-Return HTTP/1.1 200 OK\r\n Date: Sat, 25 Sep 2004 20:16:19 GMT\r\n Server: Apache/2.0.51 (Debian GNU/Linux) mod_perl/1.99_12 Perl/v5.8.3 PHP/4.3.9\r\n X-Powered-By: PHP/4.3.9\r\n Set-Cookie: GWARS_COOKIE=f94b066ef5acdeefb4bcce83292c661b; expires=Sat, 25-Sep-2004 20:46:19 GMT; path=/\r\n Expires: Thu, 19 Nov 1981 08:52:00 GMT\r\n Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0\r\n Pragma: no-cache\r\n Content-Length: 4\r\n Keep-Alive: timeout=2, max=100\r\n Connection: Keep-Alive\r\n Content-Type: text/html; charset=ISO-8859-1\r\n \r\n second call of script (cache emptied) HTTP/1.1 200 OK\r\n Date: Sat, 25 Sep 2004 20:16:19 GMT\r\n Server: Apache/2.0.51 (Debian GNU/Linux) mod_perl/1.99_12 Perl/v5.8.3 PHP/4.3.9\r\n X-Powered-By: PHP/4.3.9\r\n Expires: Thu, 19 Nov 1981 08:52:00 GMT\r\n Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0\r\n Pragma: no-cache\r\n Content-Length: 4\r\n Keep-Alive: timeout=2, max=100\r\n Connection: Keep-Alive\r\n Content-Type: text/html; charset=ISO-8859-1\r\n \r\n -- Edit this bug report at http://bugs.php.net/?id=30232&edit=1
#30282 [NEW]: Setting session.serialize_handler to none in apache config segfaults PHP
From: daniele at orlandi dot com Operating system: SuSE Linux 9.1 PHP version: 4.3.9 PHP Bug Type: Apache2 related Bug description: Setting session.serialize_handler to none in apache config segfaults PHP Description: This is an almost cosmetic issue. I incorrectly put "none" in apache's configuration file for session.serialize_handler. Starting the session, PHP segfaults; it may be a missing NULL check. php_value session.serialize_handler none [pid 31996] open("/tmp/sess_de475dfe390c0d01f35536633634db4a", O_RDWR|O_CREAT, 0600) = 28 [pid 31996] flock(28, LOCK_EX) = 0 [pid 31996] fcntl64(28, F_SETFD, FD_CLOEXEC) = 0 [pid 31996] fstat64(28, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0 [pid 31996] pread(28, "", 0, 0) [pid 31996] --- SIGSEGV (Segmentation fault) @ 0 (0) --- -- Edit bug report at http://bugs.php.net/?id=30282&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30282&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30282&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30282&r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=30282&r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=30282&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30282&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30282&r=needscript Try newer version: http://bugs.php.net/fix.php?id=30282&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30282&r=support Expected behavior: http://bugs.php.net/fix.php?id=30282&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30282&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30282&r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=30282&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30282&r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=30282&r=dst IIS Stability: http://bugs.php.net/fix.php?id=30282&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30282&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30282&r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30282&r=mysqlcfg
#29350 [Com]: output_compression not working with zlib as loadable module
ID: 29350 Comment by: reuf_m at hotmail dot com Reported By: marcel at virtua dot ch Status: Open Bug Type: Output Control Operating System: FreeBSD 4.8p24 PHP Version: 4.3.8 New Comment: System -- FreeBSD 5.3 BETA 6 AMD64(tried on 5.2.1 also); Apache/2.0.50 (FreeBSD) PHP/5.0.1 "zlib" is loaded as module. Result (here phpinfo(); with zlib compression ON) -- ‹ -- Previous Comments: [2004-07-29 00:32:50] frank at atteveld dot demon dot nl I have the same problem. Zlib won't work when it's compilled as a module. Therefor I have to add it to the Makefile myself. I'm running a FreeBSD I386 5.2-release with php 4.3.8 [2004-07-23 14:13:00] marcel at virtua dot ch Description: After installing lang/php4-4.3.8_1 + php4-zlib and setting "zlib.output_compression = On" in php.ini, all I get is garbage (looking like compressed data). Tried different browsers. I had to compile php with --with-zlib, and not with zlib as a loadable module to get it working correctly. Reproduce code: --- any .php file Expected result: normal html code Actual result: -- unreadable binary data. -- Edit this bug report at http://bugs.php.net/?id=29350&edit=1
#30267 [Com]: fwrite() won't work properly in destructor
ID: 30267 Comment by: htmldoug at msn dot com Reported By: eiriksletteberg at hotmail dot com Status: Open Bug Type: Zend Engine 2 problem Operating System: Windows 98SE PHP Version: 5.0.1 New Comment: Reproduction code run using PHP 5.0.2 under WinXP executes exactly as expected. Previous Comments: [2004-09-28 21:31:16] eiriksletteberg at hotmail dot com Description: When this code is executed, one would expect data.txt to contain "Hello World!". And, as file_get_contents() says, it is. But when the script is completely executed, data.txt does not contain "Hello World!" as it should. The error does not occur if the destructor is called before the script ends, eg. by unset()'ing $foo. Seems like the destructor cannot write to files when called at the end of scripts?!? Reproduce code: --- Expected result: data.txt should contain "Hello World!" Actual result: -- data.txt is empty or contains the previous value -- Edit this bug report at http://bugs.php.net/?id=30267&edit=1
#30257 [Com]: Unexpected result of xml_get_current_byte_index and xml_get_current_column_numb
ID: 30257 Comment by: olivier at samalyse dot com Reported By: christoffer at natlikan dot se Status: Open Bug Type: XML related Operating System: Windows XP PHP Version: 5CVS-2004-09-27 (dev) New Comment: I'm experiencing similar troubles with xml_get_current_byte_index(). But I don't agree with the expected result christoffer proposes. Actually, in php4 xml_get_current_byte_index() behaves perfectly to me. Using the test code below with php version 4.3.4 produces : ElementOpen - Row: 2 Col: 0 BIndex: 44 ElementOpen - Row: 4 Col: 1 BIndex: 61 ElementOpen - Row: 5 Col: 2 BIndex: 67 ElementClose - Row: 5 Col: 8 BIndex: 73 ElementClose - Row: 6 Col: 1 BIndex: 79 ElementClose - Row: 7 Col: 0 BIndex: 84 Byte Index 44 points at the beginning of the tag : ^ That is fine. Now, if you omit the xml declaration '', using php5, you will obtain : ElementOpen - Row: 1 Col: 5 BIndex: 8 ElementOpen - Row: 3 Col: 8 BIndex: 19 ElementOpen - Row: 4 Col: 11 BIndex: 25 ElementClose - Row: 4 Col: 15 BIndex: 33 ElementClose - Row: 5 Col: 18 BIndex: 39 ElementClose - Row: 6 Col: 21 BIndex: 44 Byte index 8 does not point at the beginning of the tag anymore, but at its end : ^ In my particular case (XML indexing/marshalling) that's far less usable. Some may consider that's no bug, but it breaks backward compatibility with php4. Now, if you let the xml declaration in place, this function does not produce anything relevant anymore. As Christoffer reports, parsing this xml document when it includes '' will produce : ElementOpen - Row: 2 Col: 5 BIndex: 11 ElementOpen - Row: 4 Col: 8 BIndex: 22 ElementOpen - Row: 5 Col: 11 BIndex: 28 ElementClose - Row: 5 Col: 15 BIndex: 36 ElementClose - Row: 6 Col: 18 BIndex: 42 ElementClose - Row: 7 Col: 21 BIndex: 47 In this later case, what seems to happen is that the xml declaration byte length is badly evaluated. If you add to this the fact that the returned byte index points at the end of the tag (php5) instead of the beginning of the tag (php4), it really starts to look like random output... Previous Comments: [2004-09-27 20:36:13] christoffer at natlikan dot se Description: xml_get_current_byte_index and xml_get_current_column_number returns unexpected values when the XML contains a XML declaration. Using php5.0-win32-200409270830 and Apache/1.3.31. Reproduce code: --- "); } function elementClose($parser, $elementName) { echo("ElementClose - Row: " . xml_get_current_line_number($parser) . " Col: " . xml_get_current_column_number($parser) . " BIndex: " . xml_get_current_byte_index($parser) . ""); } $parser = xml_parser_create(); xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, false); xml_set_element_handler($parser, "elementOpen", "elementClose"); $xml = "\n" . "\n" . "\ttest\n" . "\t\n" . "\t\tfoo\n" . "\t\n" . ""; xml_parse($parser, $xml); xml_parser_free($parser); ?> Expected result: ElementOpen - Row: 2 Col: 10 BIndex: 52 ElementOpen - Row: 4 Col: 8 BIndex: 63 ElementOpen - Row: 5 Col: 11 BIndex: 69 ElementClose - Row: 5 Col: 9 BIndex: 73 ElementClose - Row: 6 Col: 2 BIndex: 79 ElementClose - Row: 7 Col: 1 BIndex: 85 Actual result: -- ElementOpen - Row: 2 Col: 5 BIndex: 11 ElementOpen - Row: 4 Col: 8 BIndex: 22 ElementOpen - Row: 5 Col: 11 BIndex: 28 ElementClose - Row: 5 Col: 15 BIndex: 36 ElementClose - Row: 6 Col: 18 BIndex: 42 ElementClose - Row: 7 Col: 21 BIndex: 47 -- Edit this bug report at http://bugs.php.net/?id=30257&edit=1
#30281 [Opn->Fbk]: returned size for WBMP is always 1x0
ID: 30281 Updated by: [EMAIL PROTECTED] Reported By: spam at batz dot org -Status: Open +Status: Feedback Bug Type: GetImageSize related Operating System: Windows XP PHP Version: 5.0.1 New Comment: Please supply the image used. Previous Comments: [2004-09-29 21:25:49] spam at batz dot org Description: getimagesize returns always 1 as width and 0 as height for WBMP pictures. problem occurs on 4.3.8 and 4.3.9 as well. WBMP/ICO can hold multiple frames with different sizes. Reproduce code: --- $imageinfo = getimagesize('favicon.ico'); echo "width:{$imageinfo[0]}"; echo "height:{$imageinfo[1]}"; echo "imagetype:{$imageinfo[2]}"; echo "to show that the size is wrong:"; echo ""; Expected result: width:16 height:16 imagetype:15 to show that the size is wrong: IMAGE Actual result: -- width:1 height:0 imagetype:15 to show that the size is wrong: IMAGE -- Edit this bug report at http://bugs.php.net/?id=30281&edit=1
#30014 [Com]: pathinfo() doesn't handle multibyte path
ID: 30014 Comment by: ppmm at wuxinan dot net Reported By: cvictor at pchome dot com dot tw Status: Open Bug Type: Directory function related Operating System: Windows XP Pro PHP Version: 5.0.1 New Comment: related to bug# 30105 http://bugs.php.net/bug.php?id=30105 Previous Comments: [2004-09-07 20:26:26] cvictor at pchome dot com dot tw Description: pathinfo() doesn't handle pathname in multibyte well. This error can be reporduced under big5 and utf-8 charset, no matter converting the whole source php file or using mb_convert_encoding() inline. This error only occurs when the first character of basename is a Chinese character. I didn't recompile PHP bin, and modules used seem not relevent. My php.ini is adapted from php.ini-recommended. The OS is a Traditional Chinese version. Reproduce code: --- Expected result: array(3) { ["dirname"]=> string(4) "/var" ["basename"]=> string(8) "©ú²Ó.txt" ["extension"]=> string(3) "txt" } array(3) { ["dirname"]=> string(4) "/var" ["basename"]=> string(8) "a©ú²Ó.txt" ["extension"]=> string(3) "txt" } Actual result: -- array(3) { ["dirname"]=> string(4) "/var" ["basename"]=> string(4) ".txt" ["extension"]=> string(3) "txt" } array(3) { ["dirname"]=> string(4) "/var" ["basename"]=> string(8) "a©ú²Ó.txt" ["extension"]=> string(3) "txt" } -- Edit this bug report at http://bugs.php.net/?id=30014&edit=1
#30276 [Opn->Csd]: Ctype_digit causes apache to crash
ID: 30276 Updated by: [EMAIL PROTECTED] Reported By: stephen_edmonds at btinternet dot com -Status: Open +Status: Closed Bug Type: Reproducible crash Operating System: Windows XP (SP2) PHP Version: 4.3.9 New Comment: This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: [2004-09-29 15:41:16] stephen_edmonds at btinternet dot com Description: When ctype_digit is passed a large number, it causes the apache child thread to terminate with the code "3221225477". When apache tries to restart the child thread, it crashes with the same code about 20 seconds later. The only way to stop this crash cycle is to shutdown/restart the apache server. This bug was supposedly fixed in bug #29226 - but php 4.3.9 still seems to be effected. Reproduce code: --- Expected result: true Actual result: -- The apache child thread will crash. When the child is re-started by apache, it will crash 20 seconds later. This will continue to happen until the apache server is shutdown or restarted. -- Edit this bug report at http://bugs.php.net/?id=30276&edit=1
#30014 [Com]: pathinfo() doesn't handle multibyte path
ID: 30014 Comment by: ppmm at wuxinan dot net Reported By: cvictor at pchome dot com dot tw Status: Open Bug Type: Directory function related Operating System: Windows XP Pro PHP Version: 5.0.1 New Comment: partial summary of bug # 29542 30014 30105: this bug confirmed to exist on: simplified chinese windows 2000 traditional chinese windows xp pro redhat 9 (default rpm's) this bug confirmed not to exist on: fedora core 3 test 1 (default rpm's) english windows xp pro Previous Comments: [2004-09-30 03:22:30] ppmm at wuxinan dot net related to bug# 30105 http://bugs.php.net/bug.php?id=30105 [2004-09-07 20:26:26] cvictor at pchome dot com dot tw Description: pathinfo() doesn't handle pathname in multibyte well. This error can be reporduced under big5 and utf-8 charset, no matter converting the whole source php file or using mb_convert_encoding() inline. This error only occurs when the first character of basename is a Chinese character. I didn't recompile PHP bin, and modules used seem not relevent. My php.ini is adapted from php.ini-recommended. The OS is a Traditional Chinese version. Reproduce code: --- Expected result: array(3) { ["dirname"]=> string(4) "/var" ["basename"]=> string(8) "©ú²Ó.txt" ["extension"]=> string(3) "txt" } array(3) { ["dirname"]=> string(4) "/var" ["basename"]=> string(8) "a©ú²Ó.txt" ["extension"]=> string(3) "txt" } Actual result: -- array(3) { ["dirname"]=> string(4) "/var" ["basename"]=> string(4) ".txt" ["extension"]=> string(3) "txt" } array(3) { ["dirname"]=> string(4) "/var" ["basename"]=> string(8) "a©ú²Ó.txt" ["extension"]=> string(3) "txt" } -- Edit this bug report at http://bugs.php.net/?id=30014&edit=1
#30279 [Opn->Bgs]: 404 instead of 403 when permission denied
ID: 30279 Updated by: [EMAIL PROTECTED] Reported By: pviet at azuria dot com -Status: Open +Status: Bogus Bug Type: CGI related Operating System: Linux PHP Version: 4.3.9 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 PHP has no way of knowing if a file existings when it does not have permission to access. Hence the 404 error message. Previous Comments: [2004-09-29 19:27:02] pviet at azuria dot com Description: Status 404 instead of 403 when file passed via environment is not accessible. This leads to error on debugging and took me about 7hrs to find what was really happening (wrong rights) Reproduce code: --- Abstract : - A PHP file is called x.php, located in /data/www/x.php - My user is called someunixuser - This someunixuser can't read the file because lacking unix permissions (not owner, 0700 or so on) mybox:~$ cat /data/www/x.php cat: /data/www/x.php: Permission denied mybox:~$ env SCRIPT_FILENAME=/data/www/x.php /usr/bin/php Status: 404 Content-type: text/html X-Powered-By: PHP/4.3.9 No input file specified. mybox:~$ Expected result: Return a 403 and "Permission denied on /data/web/x.php" Actual result: -- Return a 404 and "No input files" -- Edit this bug report at http://bugs.php.net/?id=30279&edit=1
#30264 [Opn->Bgs]: headers_sent() reporting incorrect value
ID: 30264 Updated by: [EMAIL PROTECTED] Reported By: mpn at illearth dot net -Status: Open +Status: Bogus Bug Type: Output Control Operating System: Win NT(2K) PHP Version: 4.3.9 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 There is no bug here, at best perhaps a slightly unclear documentation. When you use compression the entire page is buffered in memory, until end of the request. Consequently you can send headers at any time because no data is being actually sent to user when you print it. Until PHP actually decides to send any page output to the user you can still send additional headers which is why the headers_sent() function is returning false. It will return true, indicating that headers have been sent only at a time when output began going to the user and you no longer can send any additional headers. Previous Comments: [2004-09-29 21:57:54] mpn at illearth dot net I might also note that the second test code results are also inconsistent with the manual with regard to headers(). According to the manual, the string "blank" before opening PHP should have triggered a warning and prevented headers from being sent. [2004-09-29 21:30:11] mpn at illearth dot net I quote from the manual: http://us4.php.net/manual/en/function.ob-start.php "While output buffering is active no output is sent from the script (other than headers), instead the output is stored in an internal buffer." In particular "(other than headers)". So according to the documentation, headers are sent prior to buffer flushing, which is also consistent with the documentation for headers: http://us4.php.net/manual/en/function.header.php "Remember that header() must be called before any actual output is sent, either by normal HTML tags, blank lines in a file, or from PHP." Please explain what use this function has when you can't use it until all the content has been sent to the browser, at which point (barring a shutdown function) the script normally exits? Please try this test code: CUT blankhttp://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>' . "\n\n"; echo '' . "\n";echo '' . "\n";echo '' . "\n"; echo 'headers_sent() Returned Value Is: ' . "\n"; var_dump( headers_sent() ); echo '' . "\n"; flush(); header( 'Cache-Control: no-store, no-cache, must-revalidate' ); var_dump( headers_sent() ); ?> END CUT The behavior of this code is consitent with what you have stated, headers aren't sent prior to the flush, however when trying to send headers after flushing, you trigger a warning: Warning: Cannot modify header information - headers already sent in W:\MPN\CVS\rc2-2\mpn188\html\_test_headers.php on line 12 So I fail to see where this function can be used?? The only good reason I can see for testing if headers have been sent is to determine if you can successfully send more headers. As the above code shows, you cannot send anymore headers once flushing, which is the only location in the script that you get a TRUE return from headers_sent(). At the very least this qualifies as documentation problems or possibly add to the list of soon to be deprecated functions. [2004-09-29 15:35:37] [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 What makes you think headers should have been sent at the point where you call headers_sent()? I would not expect this to happen until the ob_end_flush() call. [2004-09-28 18:33:41] mpn at illearth dot net Description: When checking the value of headers_sent(), function is returning FALSE even though headers have clearly been sent. Returned result does not change when output buffering is commented out or where output buffering is started (i.e before sending headers or after ). I crammed the test code into 19 lines, so please excuse the formatting. ["SERVER_SOFTWARE"]=> string(31) "Apache/2.0.49 (Win32) PHP/4.3.9" using sapi Reproduce code: --- http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>' . "\n\n"; echo '' . "\n";echo '' . "\n";echo '' . "\n"; echo 'headers_sent() Returned Value Is: ' . "\n"; var_dump( headers_sent() ); echo '' . "\n"; ob_end_flush(); function compressOutput( $str ) { $_output = gzencode( $str ); if ( (bool)FALSE === $_output ) { return $str; } header(
#30267 [Opn->Fbk]: fwrite() won't work properly in destructor
ID: 30267 Updated by: [EMAIL PROTECTED] Reported By: eiriksletteberg at hotmail dot com -Status: Open +Status: Feedback Bug Type: Zend Engine 2 problem Operating System: Windows 98SE PHP Version: 5.0.1 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.0-win32-latest.zip Cannot replicate on either windows or linux. Previous Comments: [2004-09-30 00:48:41] htmldoug at msn dot com Reproduction code run using PHP 5.0.2 under WinXP executes exactly as expected. [2004-09-28 21:31:16] eiriksletteberg at hotmail dot com Description: When this code is executed, one would expect data.txt to contain "Hello World!". And, as file_get_contents() says, it is. But when the script is completely executed, data.txt does not contain "Hello World!" as it should. The error does not occur if the destructor is called before the script ends, eg. by unset()'ing $foo. Seems like the destructor cannot write to files when called at the end of scripts?!? Reproduce code: --- Expected result: data.txt should contain "Hello World!" Actual result: -- data.txt is empty or contains the previous value -- Edit this bug report at http://bugs.php.net/?id=30267&edit=1
#30263 [Opn->Bgs]: bitwise operators return different lengths
ID: 30263 Updated by: [EMAIL PROTECTED] Reported By: tomas_matousek at hotmail dot com -Status: Open +Status: Bogus Bug Type: Variables related Operating System: WinXP PHP Version: 5.0.2 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 Not a bug. Previous Comments: [2004-09-29 10:24:17] php at botimer dot net Tomas, I'm not ready to say that the XOR operator is bugged. I will say that the AND and XOR definitely behave differently than OR. All three of these operators pad the shorter string ``on the right'', making the bits more significant. The difference between your expected and actual is due to taking only the overlap and shifting it right by the number of pad bits (bytes/characters, dealing with strings). I've broken your examples down into full binary form, separated the nibbles, and blocked the words. In the AND and XOR, the high word is taken as the result, while the padded section is discarded. I've also included a little c program and its results to give the breakdown. The a variable is padded left, b is padded right. You can see that the results PHP is giving you are the shifted values listed last. As for reasoning for the shift, while the OR is allowed to ``make bits'', I would say that it is for masking purposes, but I can't say exactly what. I'm sure some guru would be more than happy to chime in. I know this is probably a more mathematical treatment than necessary. Simply put, the strings are truncated right of the overlap for AND and XOR, but not for OR. I don't consider it a bug, but can't give the deliberate intention. 00 00 01 02 -> 0001 0010 = 258 01 02 00 00 -> 0001 0010 = 16908288 01 00 01 02 -> 0011 0001 0001 = 16777474 10 20 10 00 -> 0001 0010 0001 = 270536704 00 00 00 01 -> 0001 = 1 -- 01 02 00 00 -> [ 0001 0010] [ ] 01 00 01 02 -> [ 0001 ] [ 0001 0010] & [ 0001 ] [ ] = 256 = 0100 01 02 00 00 -> [ 0001 0010] [ ] 10 20 10 00 -> [0001 0010 ] [0001 ] | [0001 0001 0010 0010] [0001 ] = 287444992 = 11221000 01 02 00 00 -> [ 0001 0010] [ ] 00 00 00 01 -> [ ] [ 0001] ^ [ 0001 0010] [ 0001] = 258 = 0102 =<%==<%= #include int main() { unsigned long a = 258; unsigned long b = 16908288; unsigned long c = 16777474; unsigned long d = 270536704; unsigned long e = 1; printf("a & c: %d\n", a & c); printf("a | d: %d\n", a | d); printf("a ^ e: %d\n", a ^ e); printf("\n"); printf("b & c: %d\n", b & c); printf("b | d: %d\n", b | d); printf("b ^ e: %d\n", b ^ e); printf("(b & c) >> 16: %d\n", (b & c) >> 16); printf("(b ^ e) >> 16: %d\n", (b ^ e) >> 16); return 0; } =<%==<%= a & c: 258 a | d: 270536962 a ^ e: 259 b & c: 16777216 b | d: 287444992 b ^ e: 16908289 (b & c) >> 16: 256 (b ^ e) >> 16: 258 Thanks, -Noah [2004-09-28 16:13:52] tomas_matousek at hotmail dot com Description: If a biwise operator is applied on strings with different lengths one would expect that all such operators would return a string which length is a maximum of the lengths of the operands. Or at least that OR and XOR would do that. But neither is true since OR returns string having the maximum of both lengths and AND, XOR the minimum. That's why I think there is a bug in ^ operator. & operator may behave in both ways, although I would prefer the same behavior as in the case of | and ^. Reproduce code: --- echo bin2hex("\x01\x02" & "\x01\x00\x01\x02"),"\n"; echo bin2hex("\x01\x02" | "\x10\x20\x10\x00"),"\n"; echo bin2hex("\x01\x02" ^ "\x00\x00\x00\x01"),"\n"; Expected result: 0100 11221000 01020001 -- or -- 0100 11221000 01020001 Actual result: -- 0100 11221000 0102 -- Edit this bug report at http://bugs.php.net/?id=30263&edit=1
#30279 [Bgs]: 404 instead of 403 when permission denied
ID: 30279 User updated by: pviet at azuria dot com Reported By: pviet at azuria dot com Status: Bogus Bug Type: CGI related Operating System: Linux PHP Version: 4.3.9 New Comment: Isn't it more logical that denied should return 403.. ? (and keep 404 for when php KNOWS the file doesn't exist, eg. has access to the directory) Previous Comments: [2004-09-30 03:28:41] [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 PHP has no way of knowing if a file existings when it does not have permission to access. Hence the 404 error message. [2004-09-29 19:27:02] pviet at azuria dot com Description: Status 404 instead of 403 when file passed via environment is not accessible. This leads to error on debugging and took me about 7hrs to find what was really happening (wrong rights) Reproduce code: --- Abstract : - A PHP file is called x.php, located in /data/www/x.php - My user is called someunixuser - This someunixuser can't read the file because lacking unix permissions (not owner, 0700 or so on) mybox:~$ cat /data/www/x.php cat: /data/www/x.php: Permission denied mybox:~$ env SCRIPT_FILENAME=/data/www/x.php /usr/bin/php Status: 404 Content-type: text/html X-Powered-By: PHP/4.3.9 No input file specified. mybox:~$ Expected result: Return a 403 and "Permission denied on /data/web/x.php" Actual result: -- Return a 404 and "No input files" -- Edit this bug report at http://bugs.php.net/?id=30279&edit=1
#30279 [Bgs]: 404 instead of 403 when permission denied
ID: 30279 Updated by: [EMAIL PROTECTED] Reported By: pviet at azuria dot com Status: Bogus Bug Type: CGI related Operating System: Linux PHP Version: 4.3.9 New Comment: In some cases it may have access to the directory and in other cases it may not. So rather then return 2 different error codes for the same error PHP tries to be consistent. Previous Comments: [2004-09-30 03:54:59] pviet at azuria dot com Isn't it more logical that denied should return 403.. ? (and keep 404 for when php KNOWS the file doesn't exist, eg. has access to the directory) [2004-09-30 03:28:41] [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 PHP has no way of knowing if a file existings when it does not have permission to access. Hence the 404 error message. [2004-09-29 19:27:02] pviet at azuria dot com Description: Status 404 instead of 403 when file passed via environment is not accessible. This leads to error on debugging and took me about 7hrs to find what was really happening (wrong rights) Reproduce code: --- Abstract : - A PHP file is called x.php, located in /data/www/x.php - My user is called someunixuser - This someunixuser can't read the file because lacking unix permissions (not owner, 0700 or so on) mybox:~$ cat /data/www/x.php cat: /data/www/x.php: Permission denied mybox:~$ env SCRIPT_FILENAME=/data/www/x.php /usr/bin/php Status: 404 Content-type: text/html X-Powered-By: PHP/4.3.9 No input file specified. mybox:~$ Expected result: Return a 403 and "Permission denied on /data/web/x.php" Actual result: -- Return a 404 and "No input files" -- Edit this bug report at http://bugs.php.net/?id=30279&edit=1
#30284 [NEW]: chmod function NOT work
From: ipiranha at gmail dot com Operating system: FreeBSD 5.2.1-RELEASE PHP version: 4.3.9 PHP Bug Type: Filesystem function related Bug description: chmod function NOT work Description: my freebsd box php chmod function not work. chmod ("$upload_file_name", "0777"); NOT work. # ls -al -rw-r--r-- 1 nobody nobody 159744 Sep 30 11:42 test1.txt So I was modify my source code ex) exec("chmod 0777 $upload_file_name"); # ls -al -rwxrwxrwx 1 nobody nobody 159744 Sep 30 11:44 test2.txt GOOD work. So Oops. chmod ("$upload_file_name", 0777); -> not work. chmod ($upload_file_name, 0777); -> GOOD work. why ? check this. ^^/ -- Edit bug report at http://bugs.php.net/?id=30284&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30284&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30284&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30284&r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=30284&r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=30284&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30284&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30284&r=needscript Try newer version: http://bugs.php.net/fix.php?id=30284&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30284&r=support Expected behavior: http://bugs.php.net/fix.php?id=30284&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30284&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30284&r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=30284&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30284&r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=30284&r=dst IIS Stability: http://bugs.php.net/fix.php?id=30284&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30284&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30284&r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30284&r=mysqlcfg
#30285 [NEW]: switch statement: default executed when case matches
From: benjcarson at digitaljunkies dot ca Operating system: Debian Linux PHP version: 5CVS-2004-09-30 (dev) PHP Bug Type: Zend Engine 2 problem Bug description: switch statement: default executed when case matches Description: It seems that the default: block of a switch statement now short-circuits the remaining case: tests. If the default: block is put before a matching case: block, it will _always_ be executed. While the docs (http://www.php.net/manual/en/control-structures.switch.php) do recommend making default: last, this is a BC break (tested with 5.0.0 and 4.3.2). This bug is also present at least as early as the 5.1.x-dev 2004-09-25 snap (sorry, the next earliest one I have is 5.0.0). The reproduce code below works if the default: block is put after the case "a": block. Reproduce code: --- Expected result: case: a Actual result: -- default -- Edit bug report at http://bugs.php.net/?id=30285&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30285&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30285&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30285&r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=30285&r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=30285&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30285&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30285&r=needscript Try newer version: http://bugs.php.net/fix.php?id=30285&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30285&r=support Expected behavior: http://bugs.php.net/fix.php?id=30285&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30285&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30285&r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=30285&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30285&r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=30285&r=dst IIS Stability: http://bugs.php.net/fix.php?id=30285&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30285&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30285&r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30285&r=mysqlcfg
#30286 [NEW]: sybase
From: zhang at gdmc dot edu dot cn Operating system: red-hat 7.3 PHP version: 5.0.2 PHP Bug Type: Sybase (dblib) related Bug description: sybase Description: /php-5.0.2/ext/sybase/php_sybase_db.c: In function `zif_sybase_fetch_object': /php-5.0.2/ext/sybase/php_sybase_db.c:1112: invalid lvalue in assignment /php-5.0.2/ext/sybase/php_sybase_db.c:1113: invalid lvalue in assignment make: *** [ext/sybase/php_sybase_db.lo] Error 1 Expected result: I want to solve this problem for use my sybase database. -- Edit bug report at http://bugs.php.net/?id=30286&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30286&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30286&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30286&r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=30286&r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=30286&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30286&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30286&r=needscript Try newer version: http://bugs.php.net/fix.php?id=30286&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30286&r=support Expected behavior: http://bugs.php.net/fix.php?id=30286&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30286&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30286&r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=30286&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30286&r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=30286&r=dst IIS Stability: http://bugs.php.net/fix.php?id=30286&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30286&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30286&r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30286&r=mysqlcfg
#30264 [Bgs->Opn]: headers_sent() reporting incorrect value
ID: 30264 User updated by: mpn at illearth dot net Reported By: mpn at illearth dot net -Status: Bogus +Status: Open -Bug Type: Output Control +Bug Type: Unknown/Other Function Operating System: Win NT(2K) PHP Version: 4.3.9 New Comment: "When you use compression the entire page is buffered in memory, until end of the request." The second test example does not use any compression and I stated in the first example that the returned result was the same regards of where output buffering was started, or for that matter even used. I agree it is not a "bug" in that it's returning what it should based on the behavior of the test code. However in the second test example, no buffering of output is taking place and yet the function is still returning false. Remove the buffering from test code example 1 and you get the same result. This is NOT the behavior I would expect according to documentation. In previous versions of PHP the second test example (and the first for that matter) would generate a warning, in at least vs. 4.3.9 it is not. I understand the reasons for not sending headers until the script is complete (buffering or not), but I don't understand the need for a function that will always return false until a time when it is too late to send anymore headers, and why the documentation is clearly stating the opposite is true. So why even bother testing if headers have been sent? Previous Comments: [2004-09-30 03:32:57] [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 There is no bug here, at best perhaps a slightly unclear documentation. When you use compression the entire page is buffered in memory, until end of the request. Consequently you can send headers at any time because no data is being actually sent to user when you print it. Until PHP actually decides to send any page output to the user you can still send additional headers which is why the headers_sent() function is returning false. It will return true, indicating that headers have been sent only at a time when output began going to the user and you no longer can send any additional headers. [2004-09-29 21:57:54] mpn at illearth dot net I might also note that the second test code results are also inconsistent with the manual with regard to headers(). According to the manual, the string "blank" before opening PHP should have triggered a warning and prevented headers from being sent. [2004-09-29 21:30:11] mpn at illearth dot net I quote from the manual: http://us4.php.net/manual/en/function.ob-start.php "While output buffering is active no output is sent from the script (other than headers), instead the output is stored in an internal buffer." In particular "(other than headers)". So according to the documentation, headers are sent prior to buffer flushing, which is also consistent with the documentation for headers: http://us4.php.net/manual/en/function.header.php "Remember that header() must be called before any actual output is sent, either by normal HTML tags, blank lines in a file, or from PHP." Please explain what use this function has when you can't use it until all the content has been sent to the browser, at which point (barring a shutdown function) the script normally exits? Please try this test code: CUT blankhttp://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>' . "\n\n"; echo '' . "\n";echo '' . "\n";echo '' . "\n"; echo 'headers_sent() Returned Value Is: ' . "\n"; var_dump( headers_sent() ); echo '' . "\n"; flush(); header( 'Cache-Control: no-store, no-cache, must-revalidate' ); var_dump( headers_sent() ); ?> END CUT The behavior of this code is consitent with what you have stated, headers aren't sent prior to the flush, however when trying to send headers after flushing, you trigger a warning: Warning: Cannot modify header information - headers already sent in W:\MPN\CVS\rc2-2\mpn188\html\_test_headers.php on line 12 So I fail to see where this function can be used?? The only good reason I can see for testing if headers have been sent is to determine if you can successfully send more headers. As the above code shows, you cannot send anymore headers once flushing, which is the only location in the script that you get a TRUE return from headers_sent(). At the very least this qualifies as documentation problems or possibly add to the list of soon to be deprecated functions. [2004-09-29 15:35:37] [EMAIL PROTECTED] Thank you for takin