#27446 [Com]: system.multiCall does not work
ID: 27446 Comment by: kawai at apache dot org Reported By: tomy at envox dot hr Status: Verified Bug Type: XMLRPC-EPI related Operating System: * PHP Version: 5CVS, 4CVS (2004-03-01) New Comment: Now, you can download patched version of xmlrpc extension from: http://mp.i-revo.jp/user.php/kcvcrlkq/entry/309.html I hope this patch to be applied in the next PHP release. Previous Comments: [2008-05-02 13:52:41] kawai at apache dot org I also hit this bug in my own server. I analyzed the bug, and created a patch for this: --- php-5.2.6/ext/xmlrpc/xmlrpc-epi-php.c Mon Dec 31 16:20:14 2007 +++ xmlrpc-epi-php.cFri May 2 22:41:30 2008 @@ -859,6 +859,20 @@ zval* callback_params[3]; TSRMLS_FETCH(); + const char* methodname = XMLRPC_RequestGetMethodName(xRequest); + zval **php_function; + if (!methodname) { methodname = ""; } + Z_STRVAL_P(pData->xmlrpc_method) = estrdup(methodname); + Z_STRLEN_P(pData->xmlrpc_method) = strlen(methodname); + Z_TYPE_P(pData->xmlrpc_method) = IS_STRING; + pData->php_executed = 0; + if(zend_hash_find(Z_ARRVAL_P(pData->server->method_map), + Z_STRVAL_P(pData->xmlrpc_method), + Z_STRLEN_P(pData->xmlrpc_method) + 1, + (void**)&php_function) == SUCCESS) { + pData->php_function = *php_function; + } + /* convert xmlrpc to native php types */ xmlrpc_params = XMLRPC_to_PHP(XMLRPC_RequestGetData(xRequest)); @@ -876,7 +890,7 @@ zval_ptr_dtor(&xmlrpc_params); - return NULL; + return PHP_to_XMLRPC(pData->return_data TSRMLS_CC); } /* called by the C server when it first receives an introspection request. We pass this on to @@ -1017,7 +1031,6 @@ Parses XML requests and call methods */ PHP_FUNCTION(xmlrpc_server_call_method) { - xmlrpc_callback_data data = {0}; XMLRPC_REQUEST xRequest; STRUCT_XMLRPC_REQUEST_INPUT_OPTIONS input_opts; xmlrpc_server_data* server; @@ -1048,8 +1061,8 @@ if(xRequest) { const char* methodname = XMLRPC_RequestGetMethodName(xRequest); - zval **php_function; - XMLRPC_VALUE xAnswer = NULL; + + xmlrpc_callback_data data = {0}; MAKE_STD_ZVAL(data.xmlrpc_method); /* init. very important. spent a frustrating day finding this out. */ MAKE_STD_ZVAL(data.return_data); Z_TYPE_P(data.return_data) = IS_NULL; /* in case value is never init'd, we don't dtor to think it is a string or something */ @@ -1060,26 +1073,15 @@ } /* setup some data to pass to the callback function */ - Z_STRVAL_P(data.xmlrpc_method) = estrdup(methodname); - Z_STRLEN_P(data.xmlrpc_method) = strlen(methodname); - Z_TYPE_P(data.xmlrpc_method) = IS_STRING; data.caller_params = *caller_params; data.php_executed = 0; data.server = server; - /* check if the called method has been previous registered */ - if(zend_hash_find(Z_ARRVAL_P(server->method_map), - Z_STRVAL_P(data.xmlrpc_method), - Z_STRLEN_P(data.xmlrpc_method) + 1, - (void**)&php_function) == SUCCESS) { - - data.php_function = *php_function; - } - /* We could just call the php method directly ourselves at this point, but we do this * with a C callback in case the xmlrpc library ever implements some cool usage stats, * or somesuch. */ + XMLRPC_VALUE xAnswer = NULL; xAnswer = XMLRPC_ServerCallMethod(server->server_ptr, xRequest, &data); if(xAnswer && out.b_php_out) { zval_dtor(data.return_data); @@ -1086,7 +1088,9 @@ FREE_ZVAL(data.return_data); data.return_data = XMLRPC_to_PHP(xAnswer); } else if(data.php_executed && !out.b_php_out) { - xAnswer = PHP_to_XMLRPC(data.return_data TSRMLS_CC); + if(!xAnswer){ + xAnswer = PHP_to_XMLRPC(data.return_data TSRMLS_CC); + } } /* should we return data as xml? */ -
#45112 [NEW]: Not able to configure Php with MySQL.
From: priyadharshini dot rajesh at ge dot com Operating system: Soaris 10 PHP version: 5.2.6 PHP Bug Type: MySQL related Bug description: Not able to configure Php with MySQL. Description: I want to install Php 5.2.5 on Solaris 10 with the support of MySQL. Once the php is ready I will be conencting it to the MySQL server present remotely. MySQL server is not installed locally. But I have the MySQL header files and the libmysqlclient files in a folder.(Not sure how it came). Now when I try the following Php configure command getting the following error: checking for MySQL support... yes checking for specified location of the MySQL UNIX socket... no checking for MySQL UNIX socket location... no configure: error: Cannot find libmysqlclient_r under /usr/local. Note that the MySQL client library is not bundled anymore! My Configure cmd is: ./configure --prefix=/apps/php/current --with-apxs2=/apps/apache/current/bin/apxs --with-config-file-path=/apps/php/current/ --with-mysql=/usr/local/include/mysql/ I searched for this bug but not able to get any concrete solution. So raised a bug report. If u have a relevant bug for this please let me know the number and I can check it. Expected result: I expect to see the Php being configured with the MySQL support. I have never seen that ebfore so will not be able to provide you the actual configure lines I expect -- Edit bug report at http://bugs.php.net/?id=45112&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45112&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45112&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45112&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45112&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45112&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45112&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=45112&r=needscript Try newer version:http://bugs.php.net/fix.php?id=45112&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45112&r=support Expected behavior:http://bugs.php.net/fix.php?id=45112&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45112&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45112&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45112&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45112&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45112&r=dst IIS Stability:http://bugs.php.net/fix.php?id=45112&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45112&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45112&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45112&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=45112&r=mysqlcfg
#45111 [NEW]: Support of #line instruction for parser context substitutuon
From: php at koterov dot ru Operating system: all PHP version: 5.2.6 PHP Bug Type: Feature/Change Request Bug description: Support of #line instruction for parser context substitutuon Description: In Perl, we could write the following program test.pl (lines are enumerated for better look): 01 #!/usr/bin/perl -w 02 print "hello!\n"; 03 print "something!\n"; 04 05 #line 100 "aaa.pl" 06 print $undefined_var; This code generates a warning message "Using of undefined variable", but (attention!) - the context of this error is NOT "test.pl line 5", but - "aaa.pl line 100". So, the "pseudo-comment" operator #line xxx "yyy" in Perl substitutes the current parsing context to a specified line number and filename. (You may ommit filename, then - only the line number will be substituted). And, if a warning or a fatal error occurs, the line number and filename in the error message will be changed. There is the same feature in C language: it is used by C preprocessor to execute #include directives an keep line numbers clear to understand. This feature is VERY VERY useful when we write some code translator (e.g. from a templating language to pure PHP). This kind of translation is done e.g. in Smarty: it translates Smarty templates into pure PHP code, but line numbers are mixed up in translated files, so we cannot revert back and detect which line of the template had produced an error. Please say, do you plan to add this feature to a new PHP versions? I'd like to ask you very much about it... -- Edit bug report at http://bugs.php.net/?id=45111&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45111&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45111&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45111&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45111&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45111&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45111&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=45111&r=needscript Try newer version:http://bugs.php.net/fix.php?id=45111&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45111&r=support Expected behavior:http://bugs.php.net/fix.php?id=45111&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45111&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45111&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45111&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45111&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45111&r=dst IIS Stability:http://bugs.php.net/fix.php?id=45111&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45111&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45111&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45111&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=45111&r=mysqlcfg
#45109 [Csd->Bgs]: Inconsistent array loop
ID: 45109 Updated by: [EMAIL PROTECTED] Reported By: php-bug at undoso dot info -Status: Closed +Status: Bogus Bug Type: Arrays related Operating System: All PHP Version: 5.2.6 Previous Comments: [2008-05-27 19:35:26] php-bug at undoso dot info Forgot to close the bug ! [2008-05-27 19:34:54] php-bug at undoso dot info Yes, I was on 5.2.3. Looks like it is not doing that any more. Thanks a lot and sorry for the useless bug ^^ [2008-05-27 19:25:56] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi Can't reproduce [2008-05-27 18:54:10] php-bug at undoso dot info Sorry, reproduce code is : Reproduce code: --- $arr = array(); $arr["loop"] = $arr; print_r($arr); and not the original one. I don't know how I did that change since I just copied the code from my test file... [2008-05-27 18:47:15] php-bug at undoso dot info Description: When assigning into a cell of an array the array itself, the result is incoherent. Since the assignation does not use reference, the array should be copied and not create a magical structure that looks like an infinite loop. The worst is that the array seems impossible to browse using PHP since there is no way to find that we are on a portion that we already visited, or not at my knowing. Reproduce code: --- $arr = array(); $arr["loop"] $ arr; print_r($arr); Expected result: Array ( [loop] => Array ( ) ) Here is what the resulting print_r should looks like. Since no reference is used, the array should be copied and only after that the loop cell created. Actual result: -- The constructed array looks like that: Array ( [loop] => Array *RECURSION* ) wich is inconsistent. By the way, f you find a way to browse this array in PHP and detect that a recursion does exists, I want it because I just can't. -- Edit this bug report at http://bugs.php.net/?id=45109&edit=1
#45109 [Opn->Csd]: Inconsistent array loop
ID: 45109 User updated by: php-bug at undoso dot info Reported By: php-bug at undoso dot info -Status: Open +Status: Closed Bug Type: Arrays related Operating System: All PHP Version: 5.2.6 New Comment: Forgot to close the bug ! Previous Comments: [2008-05-27 19:34:54] php-bug at undoso dot info Yes, I was on 5.2.3. Looks like it is not doing that any more. Thanks a lot and sorry for the useless bug ^^ [2008-05-27 19:25:56] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi Can't reproduce [2008-05-27 18:54:10] php-bug at undoso dot info Sorry, reproduce code is : Reproduce code: --- $arr = array(); $arr["loop"] = $arr; print_r($arr); and not the original one. I don't know how I did that change since I just copied the code from my test file... [2008-05-27 18:47:15] php-bug at undoso dot info Description: When assigning into a cell of an array the array itself, the result is incoherent. Since the assignation does not use reference, the array should be copied and not create a magical structure that looks like an infinite loop. The worst is that the array seems impossible to browse using PHP since there is no way to find that we are on a portion that we already visited, or not at my knowing. Reproduce code: --- $arr = array(); $arr["loop"] $ arr; print_r($arr); Expected result: Array ( [loop] => Array ( ) ) Here is what the resulting print_r should looks like. Since no reference is used, the array should be copied and only after that the loop cell created. Actual result: -- The constructed array looks like that: Array ( [loop] => Array *RECURSION* ) wich is inconsistent. By the way, f you find a way to browse this array in PHP and detect that a recursion does exists, I want it because I just can't. -- Edit this bug report at http://bugs.php.net/?id=45109&edit=1
#45109 [Fbk->Opn]: Inconsistent array loop
ID: 45109 User updated by: php-bug at undoso dot info Reported By: php-bug at undoso dot info -Status: Feedback +Status: Open Bug Type: Arrays related Operating System: All PHP Version: 5.2.6 New Comment: Yes, I was on 5.2.3. Looks like it is not doing that any more. Thanks a lot and sorry for the useless bug ^^ Previous Comments: [2008-05-27 19:25:56] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi Can't reproduce [2008-05-27 18:54:10] php-bug at undoso dot info Sorry, reproduce code is : Reproduce code: --- $arr = array(); $arr["loop"] = $arr; print_r($arr); and not the original one. I don't know how I did that change since I just copied the code from my test file... [2008-05-27 18:47:15] php-bug at undoso dot info Description: When assigning into a cell of an array the array itself, the result is incoherent. Since the assignation does not use reference, the array should be copied and not create a magical structure that looks like an infinite loop. The worst is that the array seems impossible to browse using PHP since there is no way to find that we are on a portion that we already visited, or not at my knowing. Reproduce code: --- $arr = array(); $arr["loop"] $ arr; print_r($arr); Expected result: Array ( [loop] => Array ( ) ) Here is what the resulting print_r should looks like. Since no reference is used, the array should be copied and only after that the loop cell created. Actual result: -- The constructed array looks like that: Array ( [loop] => Array *RECURSION* ) wich is inconsistent. By the way, f you find a way to browse this array in PHP and detect that a recursion does exists, I want it because I just can't. -- Edit this bug report at http://bugs.php.net/?id=45109&edit=1
#45109 [Opn->Fbk]: Inconsistent array loop
ID: 45109 Updated by: [EMAIL PROTECTED] Reported By: php-bug at undoso dot info -Status: Open +Status: Feedback Bug Type: Arrays related Operating System: All PHP Version: 5.2.6 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi Can't reproduce Previous Comments: [2008-05-27 18:54:10] php-bug at undoso dot info Sorry, reproduce code is : Reproduce code: --- $arr = array(); $arr["loop"] = $arr; print_r($arr); and not the original one. I don't know how I did that change since I just copied the code from my test file... [2008-05-27 18:47:15] php-bug at undoso dot info Description: When assigning into a cell of an array the array itself, the result is incoherent. Since the assignation does not use reference, the array should be copied and not create a magical structure that looks like an infinite loop. The worst is that the array seems impossible to browse using PHP since there is no way to find that we are on a portion that we already visited, or not at my knowing. Reproduce code: --- $arr = array(); $arr["loop"] $ arr; print_r($arr); Expected result: Array ( [loop] => Array ( ) ) Here is what the resulting print_r should looks like. Since no reference is used, the array should be copied and only after that the loop cell created. Actual result: -- The constructed array looks like that: Array ( [loop] => Array *RECURSION* ) wich is inconsistent. By the way, f you find a way to browse this array in PHP and detect that a recursion does exists, I want it because I just can't. -- Edit this bug report at http://bugs.php.net/?id=45109&edit=1
#45110 [NEW]: Object destruction after the end off the script
From: php-bug at undoso dot info Operating system: * PHP version: 5.2.6 PHP Bug Type: Class/Object related Bug description: Object destruction after the end off the script Description: I'm opening a bug about old bug 36831. In fact I think that this bug has been closed a bit quickly. I really think that destructors should be called before any parts of the execution context is destroyed. Moreover, it is a pain to understand why PHP is saying that an exception has not been catched in unkown at line 0. It would be a lot more consistent to have destructors executed in a correct context since they are part of the script and may not be something like an extra. -- Edit bug report at http://bugs.php.net/?id=45110&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45110&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45110&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45110&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45110&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45110&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45110&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=45110&r=needscript Try newer version:http://bugs.php.net/fix.php?id=45110&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45110&r=support Expected behavior:http://bugs.php.net/fix.php?id=45110&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45110&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45110&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45110&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45110&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45110&r=dst IIS Stability:http://bugs.php.net/fix.php?id=45110&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45110&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45110&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45110&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=45110&r=mysqlcfg
#45109 [Opn]: Inconsistent array loop
ID: 45109 User updated by: php-bug at undoso dot info Reported By: php-bug at undoso dot info Status: Open Bug Type: Arrays related Operating System: All PHP Version: 5.2.6 New Comment: Sorry, reproduce code is : Reproduce code: --- $arr = array(); $arr["loop"] = $arr; print_r($arr); and not the original one. I don't know how I did that change since I just copied the code from my test file... Previous Comments: [2008-05-27 18:47:15] php-bug at undoso dot info Description: When assigning into a cell of an array the array itself, the result is incoherent. Since the assignation does not use reference, the array should be copied and not create a magical structure that looks like an infinite loop. The worst is that the array seems impossible to browse using PHP since there is no way to find that we are on a portion that we already visited, or not at my knowing. Reproduce code: --- $arr = array(); $arr["loop"] $ arr; print_r($arr); Expected result: Array ( [loop] => Array ( ) ) Here is what the resulting print_r should looks like. Since no reference is used, the array should be copied and only after that the loop cell created. Actual result: -- The constructed array looks like that: Array ( [loop] => Array *RECURSION* ) wich is inconsistent. By the way, f you find a way to browse this array in PHP and detect that a recursion does exists, I want it because I just can't. -- Edit this bug report at http://bugs.php.net/?id=45109&edit=1
#45109 [NEW]: Inconsistent array loop
From: php-bug at undoso dot info Operating system: All PHP version: 5.2.6 PHP Bug Type: Arrays related Bug description: Inconsistent array loop Description: When assigning into a cell of an array the array itself, the result is incoherent. Since the assignation does not use reference, the array should be copied and not create a magical structure that looks like an infinite loop. The worst is that the array seems impossible to browse using PHP since there is no way to find that we are on a portion that we already visited, or not at my knowing. Reproduce code: --- $arr = array(); $arr["loop"] $ arr; print_r($arr); Expected result: Array ( [loop] => Array ( ) ) Here is what the resulting print_r should looks like. Since no reference is used, the array should be copied and only after that the loop cell created. Actual result: -- The constructed array looks like that: Array ( [loop] => Array *RECURSION* ) wich is inconsistent. By the way, f you find a way to browse this array in PHP and detect that a recursion does exists, I want it because I just can't. -- Edit bug report at http://bugs.php.net/?id=45109&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45109&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45109&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45109&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45109&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45109&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45109&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=45109&r=needscript Try newer version:http://bugs.php.net/fix.php?id=45109&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45109&r=support Expected behavior:http://bugs.php.net/fix.php?id=45109&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45109&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45109&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45109&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45109&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45109&r=dst IIS Stability:http://bugs.php.net/fix.php?id=45109&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45109&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45109&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45109&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=45109&r=mysqlcfg
#45082 [Fbk->Opn]: ReflectionClass make apache restart
ID: 45082 User updated by: pierrick at webstart dot fr Reported By: pierrick at webstart dot fr -Status: Feedback +Status: Open Bug Type: Reflection related Operating System: Windows XP,2003 PHP Version: 5.2.6 New Comment: I just try with the CVS snapshot and there's the same problem. Previous Comments: [2008-05-25 18:32:49] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi [2008-05-23 21:50:41] pierrick at webstart dot fr Description: When i make an Apache Bench with more than 1 concurrency access on this peace of code it make my apache crash but just on physical windows machine (Work on Linux and Windows Virtual Machines) Here is the apache bench : ab.exe -n100 -c2 http://localhost/bug.php Reproduce code: --- getProperties(); ++$cpt; } Expected result: No apache Crash Actual result: -- zend_mm_heap corrupted zend_mm_heap coError in my_thread_global_end(): 66 threads didn't exit [Fri May 23 17:22:49 2008] [notice] Parent: child process exited with status 1 -- Restarting. [Fri May 23 17:22:49 2008] [notice] Apache/2.2.8 (Win32) PHP/5.2.5 configured -- resuming normal operations [Fri May 23 17:22:49 2008] [notice] Server built: Jan 18 2008 00:37:19 [Fri May 23 17:22:49 2008] [notice] Parent: Created child process 3052 [Fri May 23 17:22:49 2008] [notice] Child 3052: Child process is running [Fri May 23 17:22:49 2008] [notice] Child 3052: Acquired the start mutex. [Fri May 23 17:22:49 2008] [notice] Child 3052: Starting 64 worker threads. [Fri May 23 17:22:49 2008] [notice] Child 3052: Starting thread to listen on port 80. -- Edit this bug report at http://bugs.php.net/?id=45082&edit=1
#43009 [Com]: headers_sent() is PHP responsibility not Apache! do your job please
ID: 43009 Comment by: hamdisahloul at hotmail dot com Reported By: hamdi at rawasy dot com Status: Open Bug Type: Feature/Change Request Operating System: Irrelevant PHP Version: 4.4.7 New Comment: If you think this is a bugus issue, then at least the output should be something like this: bool(true) string(0) "/path/to/empty.php" int(0) or bool(false) string(0) "" int(0) but not the actual result: bool(true) string(0) "" int(0) how could headers_sent() acts stupid so it says the headers already sent, but don't indicate the file & line??? Previous Comments: [2008-01-24 21:03:02] codeslinger at compsalot dot com I just now got around to reading the docs on "virtual" which your example program is using. This bug is totally bogus. The docs make it very clear what the behavior of "virtual" is. This behavior is by design. My previous comments about probable causes of "headers already sent" are valid, they just don't apply to your program example. [2007-12-19 21:18:07] codeslinger at compsalot dot com apologies for the poor grammar, I should have proof-read more carefully before hitting submit. [2007-12-19 21:08:31] codeslinger at compsalot dot com I suspect your problem is not a bug at all, but is the result of not deciphering an error message that is somewhat mis-leading. What the error message says is "headers have already been sent". What you appears to be complaining about is that you have not in fact sent any headers. What you probably don't realize is that any text at all which is seen to be part of the web page, is considered to create a situation of "headers already sent". The issue is not actually that the headers have been sent, the issue is that the headers MUST proceed any and all text. The usual cause of this situation is when the php tag is not the actual start of the document. if there is even a single space character in front of the tag it will cause this problem. Also any blank lines after the end of the closing php tag can cause this problem. And be sure to check all of your include files. Blank lines at the end of include files drive me totally nuts until I figured out what was going on. Any character at all, including blank lines, which is outside of the php code brackets is considered to be part of the web page itself. In order to use php to send headers, you CAN'T send any other character at all to the web page. The work-around, for sloppy editing/coding is to turn on output buffering, see the manual. With output buffering enabled, php holds anything being sent, and it is able to insert headers in front of already sent text. But this is really the wrong solution, the right solution is to fix your code. The requirement that headers MUST be sent first is defined by the HTTP protocol itself and can not be changed. [2007-10-17 17:41:35] hamdi at rawasy dot com Description: Referring to my previous report that holds ID 42992 http://bugs.php.net/bug.php?id=42992 Yes, PHP is not responsible about virtual() behavior. But I think that it's holding the full responsibility against headers_sent() behavior and I'm asking to fix headers_sent() not virtual(), as it says that headers was already sent while it wasn't, you could send any headers after that and no problems happens (there is no buffer controllers). So, is it still apache problem? Also the filename & line number returned by headers_sent() indicates that headers wasn't sent! and that is stupid behavior Summary You should return true from headers_sent() only when filename & line number are set, otherwise return false. I repeat, this bug is PHP problem located at headers_sent() function! Not anything else. I think that your job here is to fix those bugs not throwing blame at others. So, do your job please! Reproduce code: --- Expected result: bool(false) string(0) "" int(0) Actual result: -- bool(true) string(0) "" int(0) -- Edit this bug report at http://bugs.php.net/?id=43009&edit=1