#44326 [Opn]: wrong assert output-phpt:php-5.2.5/ext/standard/tests/assert/assert_error1.phpt
ID: 44326 Updated by: [EMAIL PROTECTED] Reported By: eyal at zend dot com Status: Open Bug Type: Unknown/Other Function Operating System: Linux any PHP Version: 5.2.5 New Comment: Works fine here... Warnings are showed. Previous Comments: [2008-03-04 16:54:03] eyal at zend dot com Description: The following was found when I used the code of a phpt via apache-module php. Requesting the script below returns the requested output as specified in the phpt. However, second and third requests will result a different output with no error messages. As specified in the phpt --INI-- section, I added the following directives to my php.ini: assert.active = 1 assert.warning = 1 assert.callback = f1 assert.quiet_eval = 1 assert.bail = 0 Reproduce code: --- http://bugs.php.net/?id=44326&edit=1
#44324 [Opn->Bgs]: $_SESSION[0] is not stored
ID: 44324 Updated by: [EMAIL PROTECTED] Reported By: Pasuk2003 at mail dot ru -Status: Open +Status: Bogus Bug Type: Session related Operating System: WIndows XP SP2 PHP Version: 5.2.5 New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php Says the documentation: "The keys in the $_SESSION associative array are subject to the same limitations as regular variable names in PHP, i.e. they cannot start with a number and must start with a letter or underscore. For more details see the section on variables in this manual." http://docs.php.net/manual/en/session.examples.php Previous Comments: [2008-03-04 15:57:47] Pasuk2003 at mail dot ru Description: When using $_SESSION and trying to store there something in key=0, the whole session data is not 'magically' :) present in the next page load Reproduce code: --- Expected result: -- first load: array() -- second load array( 0 => array( ... ) ) Actual result: -- -- first load: array() -- second load array() -- Edit this bug report at http://bugs.php.net/?id=44324&edit=1
#6118 [Com]: Can not supress runtime warnings on foreach
ID: 6118 Comment by: slight_ at hotmail dot com Reported By: ronen at greyzone dot com Status: Open Bug Type: Feature/Change Request Operating System: Redhat Linux 6.2 PHP Version: 4.0.1pl2 New Comment: I'd just like to add a vote for this as a new feature. I have countless foreach blocks wrapped in if( is_array( $x ) ){} where the only reason to check is to avoid raising a warning. Previous Comments: [2000-08-12 03:12:31] [EMAIL PROTECTED] Well, it's still a valid feature request. Why to be overzealous to close it, maybe somewhere in PHP 6.5 we decide to implement it? :) [2000-08-12 03:01:58] [EMAIL PROTECTED] Actually its not that... foreach is a statement, you can't suppress warnings for statements. [2000-08-12 02:40:05] [EMAIL PROTECTED] At the moment it seems that parse errors can not be suppressed, but I think it is not possible to do it, and it is absolutely not useful. >From the manual: "All PHP expressions can also be called with the "@" prefix, which turns off error reporting for that particular expression" But if PHP can see there is an expression (because of an parse error), there is no way to disable warnings from that statement. [2000-08-12 02:29:39] ronen at greyzone dot com @foreach($items as $key => $val) {} does not work: $value) { echo "TEST[$key]=$value"; } /* THE OUTPUT IS Parse error: parse error in /home/httpd/brocadedocs/ronen/secure/testtest.html on line 10 / ?> -- Edit this bug report at http://bugs.php.net/?id=6118&edit=1
#43053 [Com]: Scientific notation
ID: 43053 Comment by: tech at dragonara dot net Reported By: owner at dragon-hearts dot net Status: Verified Bug Type: Scripting Engine problem Operating System: Centos4 PHP Version: 5CVS-2007-10-25 New Comment: We have the same bug, and really - cPanel does not support 5.1 anymore, so we are really in stupid situation. Previous Comments: [2008-02-09 13:20:23] lhfagundes at gmail dot com This gets bad if the float is casted to string (which happens if it goes through requests): $x = 12.00; echo $x . "\n"; echo (int)$x . "\n"; $x = "$x"; echo (int) $x . "\n"; In PHP 4.4.2 (I guess in earlier php5 too) 12 12 12 now: 1.2E+9 12 1 [2008-01-28 13:39:47] gcleaves at yahoo dot com dot au Same problem: PHP Version 5.2.4 Windows NT HGCT-SQL 5.2 build 3790 Apache 2.0 Handler [2008-01-26 02:18:38] [EMAIL PROTECTED] This issue is still present in PHP 5.2.5 (FreeBSD). It only happens on some floats. If there is a reason for using E-notation in this case - which could be argued, although I feel changing past behavior is not necessary, especially as MySQL has trouble handling these values in common scenarios - it should be made consistent so people can depend on it and prevent problems by testing. devwh:~> php floats.php 5.2.1 270 280 290 test:~> php floats.php 5.2.4 270 2.8E+6 290 toms1:~> php floats.php 5.2.5 270 2.8E+6 290 [2008-01-18 21:42:38] nate at recoverydatabase dot net We just got bit by this on one of our servers running Fedora 7 and PHP 5.2.4 installed via yum. The others not causing any headaches are running Fedora 6 and PHP 5.1.6. It's not just a display problem - we have a mysql database with very large values in the primary keys, and when this server tries to insert data, or display, or lookup information based on those values it fails miserably. A php.ini option to disable the notation behavior would be nice. As for right now I must get back to downgrading. :( [2007-12-29 01:50:56] daniel at fanetworks dot net I also noticed results coming as scientific notation for larger numbers in 5.1.6. Honestly, it should always come out in interger format with an option to return as notation. Having data not return in a reliable format is a serious issue. Its like $array = array(1=>2, 3=>4); sometimes returning with a serialized version of the array as a string instead of an actual array. Its hard to code when data is returning in an uncontrolled format :( 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/43053 -- Edit this bug report at http://bugs.php.net/?id=43053&edit=1
#44333 [Opn->Csd]: SEGFAULT when using mysql_pconnect() with client_flags
ID: 44333 Updated by: [EMAIL PROTECTED] Reported By: drake at oomkill dot net -Status: Open +Status: Closed Bug Type: Reproducible crash Operating System: Hardened Gentoo Linux (amd64) PHP Version: 5.2.6RC1 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: [2008-03-04 21:03:51] drake at oomkill dot net Description: Segfaults appear when using: mysql_pconnect('localhost', 'foo', 'bar', 0); but runs fine when using: mysql_pconnect('localhost', 'foo', 'bar'); The bug is most likely caused by trying to store a 'long' value in an 'int' on the stack. At the beginning of php_mysql_do_connect() in ext/mysql/php_mysql.c there is the following declaration: int client_flags = 0; Later in that function zend_parse_parameters() stores a long at &client_flags, which can also overwrite another variable on the stack. Changing the client_flags to unsigned long (like it is defined in mysql's headers) solved my segfault problem. Reproduce code: --- // the user/pass don't have to be valid. mysql_pconnect('localhost', 'foo', 'bar', 0); Expected result: No segfault. Actual result: -- Segfault. No php/zend error message in logs. -- Edit this bug report at http://bugs.php.net/?id=44333&edit=1
#41069 [Bgs->Csd]: segfault when running a large query over dblink
ID: 41069 Updated by: [EMAIL PROTECTED] Reported By: brian dot kao at gateway dot com -Status: Bogus +Status: Closed Bug Type: OCI8 related Operating System: linux PHP Version: 5.2.1 New Comment: +--- | PHP 5.3 and PHP 6 now use oci8.default_prefetch and | oci_set_prefetch() to limit only the number of rows. This is as | documented. Previously the row limit was used in conjunction with | a memory size limit heuristic. The memory limit caused a crash in | Oracle for some fetched data sizes. (Oracle bug 6039623) +--- Previous Comments: [2007-05-15 18:02:54] [EMAIL PROTECTED] One potential workaround is to modify php_oci_statement_set_prefetch() in oci8_statement.c and comment out either the lines that set the prefetch memory limit, or comment out the lines that set the prefetch row limit. In my testing the crash only occurred when both memory and row limits were set (and you use a DB link and you have the right data to trigger the crash). Confirmation or contradiction welcome. [2007-05-10 02:27:16] brian dot kao at gateway dot com Thanks to the help from Chirstopher Jones, an Oracle/PHP consultant, Oracle is logging a bug for this issue. For anyone having the same issue, the bug id is 6039623. Hopefully, Oracle will have a fix soon. [2007-04-20 07:13:23] [EMAIL PROTECTED] >Oracle has closed the SR stating that since the database link works >with sqlplus that the issue is with PHP which Oracle does not support. Are you sure SQLPlus uses the same client library? >The database does not need a patch since there is no issue with the >database link on the Oracle database side I'm aware of similar issues, see the last comment here: http://bugs.php.net/bug.php?id=36607 [2007-04-19 21:48:13] brian dot kao at gateway dot com Tony, Our Oracle DBA tried reporting this issue to Oracle Support, but they came back to us and say this is not an Oracle issue. Here's the message I've received from our Oracle DBA: "Oracle has closed the SR stating that since the database link works with sqlplus that the issue is with PHP which Oracle does not support. The database does not need a patch since there is no issue with the database link on the Oracle database side." Are you aware of any workaround for this issue? [2007-04-13 08:07:19] [EMAIL PROTECTED] >could this be a PHP OCI8 driver issue? I'm saying it knows nothing of dblink. >What is your recommendation for this issue, going to Oracle support? Yes. 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/41069 -- Edit this bug report at http://bugs.php.net/?id=41069&edit=1
#44333 [NEW]: SEGFAULT when using mysql_pconnect() with client_flags
From: drake at oomkill dot net Operating system: Hardened Gentoo Linux (amd64) PHP version: 5.2.6RC1 PHP Bug Type: Reproducible crash Bug description: SEGFAULT when using mysql_pconnect() with client_flags Description: Segfaults appear when using: mysql_pconnect('localhost', 'foo', 'bar', 0); but runs fine when using: mysql_pconnect('localhost', 'foo', 'bar'); The bug is most likely caused by trying to store a 'long' value in an 'int' on the stack. At the beginning of php_mysql_do_connect() in ext/mysql/php_mysql.c there is the following declaration: int client_flags = 0; Later in that function zend_parse_parameters() stores a long at &client_flags, which can also overwrite another variable on the stack. Changing the client_flags to unsigned long (like it is defined in mysql's headers) solved my segfault problem. Reproduce code: --- // the user/pass don't have to be valid. mysql_pconnect('localhost', 'foo', 'bar', 0); Expected result: No segfault. Actual result: -- Segfault. No php/zend error message in logs. -- Edit bug report at http://bugs.php.net/?id=44333&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44333&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44333&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44333&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44333&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44333&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44333&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=44333&r=needscript Try newer version:http://bugs.php.net/fix.php?id=44333&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=44333&r=support Expected behavior:http://bugs.php.net/fix.php?id=44333&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=44333&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=44333&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=44333&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44333&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=44333&r=dst IIS Stability:http://bugs.php.net/fix.php?id=44333&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=44333&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=44333&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=44333&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=44333&r=mysqlcfg
#13421 [Com]: Problematic MIME-Type "application/x-httpd-php"
ID: 13421 Comment by: WILMERMEJIAS1 at HOTMAIL dot COM Reported By: php at matthias-wimmer dot de Status: No Feedback Bug Type: Apache related Operating System: Linux PHP Version: 4.0.6 New Comment: ID NEVER EXPERIENCE THIS PROBLEM Previous Comments: [2008-03-04 20:55:00] wilmermejias1 at hotmail dot com i open this page before and now it dont works [2007-12-09 21:02:09] ekin_yesiltepe at hotmail dot com selam ekin nasýlsýn [2007-12-07 22:50:19] eunikabodzianowska at poczta dot onet dot pl UBPG [2003-03-14 06:15:37] bartek at luka dot dagma dot pl It seems like the same problem occurs in 4.3.1 version of PHP running on Apache 1.3.x. [2002-12-23 16:03:27] j dot westendorp at chello dot nl I have the same problem: I can't view my "Multiviewed" pages (e.g. http://domain.com/news/38 instead of http://domain.com/news.php?ID=38 ) with a user agent that does not send the "Accept: */*" request header (like AvantGo 3.2 does) because Apache throws a "406 No Acceptable Variant" error. I'm running PHP 4.2.2 on Apache 1.3.19 (Red-Hat/Linux) 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/13421 -- Edit this bug report at http://bugs.php.net/?id=13421&edit=1
#13421 [Com]: Problematic MIME-Type "application/x-httpd-php"
ID: 13421 Comment by: wilmermejias1 at hotmail dot com Reported By: php at matthias-wimmer dot de Status: No Feedback Bug Type: Apache related Operating System: Linux PHP Version: 4.0.6 New Comment: i open this page before and now it dont works Previous Comments: [2007-12-09 21:02:09] ekin_yesiltepe at hotmail dot com selam ekin nasýlsýn [2007-12-07 22:50:19] eunikabodzianowska at poczta dot onet dot pl UBPG [2003-03-14 06:15:37] bartek at luka dot dagma dot pl It seems like the same problem occurs in 4.3.1 version of PHP running on Apache 1.3.x. [2002-12-23 16:03:27] j dot westendorp at chello dot nl I have the same problem: I can't view my "Multiviewed" pages (e.g. http://domain.com/news/38 instead of http://domain.com/news.php?ID=38 ) with a user agent that does not send the "Accept: */*" request header (like AvantGo 3.2 does) because Apache throws a "406 No Acceptable Variant" error. I'm running PHP 4.2.2 on Apache 1.3.19 (Red-Hat/Linux) [2002-10-16 01:00:06] php-bugs at lists dot php dot net No feedback was provided for this bug for over 2 weeks, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". 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/13421 -- Edit this bug report at http://bugs.php.net/?id=13421&edit=1
#44330 [Opn]: Apache with PHP 5+6
ID: 44330 User updated by: lunter at interia dot pl Reported By: lunter at interia dot pl Status: Open Bug Type: Feature/Change Request Operating System: only Win PHP Version: 6CVS-2008-03-04 (CVS) New Comment: To switch beetwen PHP5 and PHP6 you must use .htaccess file: 1) AddType application/x-httpd-php .php # for PHP5 (if not defined in httpd.conf) 2) AddType application/x-httpd-php6 .php # for PHP6 Previous Comments: [2008-03-04 20:21:32] lunter at interia dot pl Better idea - compile two dll's in future PHP6: 1) php6apache2_2.dll - current without changes; 2) php6apache2_2c.dll - corrected for admins who want to running Apache2.x with PHP5 & PHP6 as module at the same time. [2008-03-04 20:08:44] lunter at interia dot pl sorry - replace: 'application/x-httpd-php' => 'application/x-httpd-php6' Testes with modified php6apache2_2.dll. Works very good. [2008-03-04 19:49:22] lunter at interia dot pl Description: Only Windows php6apache2_2.dll replace: 'PHPINIDir' => 'PHPINIDir6' & add second type: 'application/x-httpd-php6' to able load both as Apache module: 1) php5apache2_2.dll 2) php6apache2_2.dll with different Configuration File (php.ini) Path. Expected result: running Apache2.x with PHP5 & PHP6 as module at the same time Actual result: -- It is not able to load Apache2.x with PHP5 & PHP6 as module. -- Edit this bug report at http://bugs.php.net/?id=44330&edit=1
#44330 [Opn]: Apache with PHP 5+6
ID: 44330 User updated by: lunter at interia dot pl Reported By: lunter at interia dot pl Status: Open Bug Type: Feature/Change Request Operating System: only Win PHP Version: 6CVS-2008-03-04 (CVS) New Comment: Better idea - compile two dll's in future PHP6: 1) php6apache2_2.dll - current without changes; 2) php6apache2_2c.dll - corrected for admins who want to running Apache2.x with PHP5 & PHP6 as module at the same time. Previous Comments: [2008-03-04 20:08:44] lunter at interia dot pl sorry - replace: 'application/x-httpd-php' => 'application/x-httpd-php6' Testes with modified php6apache2_2.dll. Works very good. [2008-03-04 19:49:22] lunter at interia dot pl Description: Only Windows php6apache2_2.dll replace: 'PHPINIDir' => 'PHPINIDir6' & add second type: 'application/x-httpd-php6' to able load both as Apache module: 1) php5apache2_2.dll 2) php6apache2_2.dll with different Configuration File (php.ini) Path. Expected result: running Apache2.x with PHP5 & PHP6 as module at the same time Actual result: -- It is not able to load Apache2.x with PHP5 & PHP6 as module. -- Edit this bug report at http://bugs.php.net/?id=44330&edit=1
#44330 [Opn]: Apache with PHP 5+6
ID: 44330 User updated by: lunter at interia dot pl Reported By: lunter at interia dot pl Status: Open Bug Type: Feature/Change Request Operating System: only Win PHP Version: 6CVS-2008-03-04 (CVS) New Comment: sorry - replace: 'application/x-httpd-php' => 'application/x-httpd-php6' Testes with modified php6apache2_2.dll. Works very good. Previous Comments: [2008-03-04 19:49:22] lunter at interia dot pl Description: Only Windows php6apache2_2.dll replace: 'PHPINIDir' => 'PHPINIDir6' & add second type: 'application/x-httpd-php6' to able load both as Apache module: 1) php5apache2_2.dll 2) php6apache2_2.dll with different Configuration File (php.ini) Path. Expected result: running Apache2.x with PHP5 & PHP6 as module at the same time Actual result: -- It is not able to load Apache2.x with PHP5 & PHP6 as module. -- Edit this bug report at http://bugs.php.net/?id=44330&edit=1
#44332 [NEW]: Construct SoapClient against Java6 running Axis2 causes page to download
From: nick at stinemates dot org Operating system: Linux - Gentoo PHP version: 5.2.5 PHP Bug Type: SOAP related Bug description: Construct SoapClient against Java6 running Axis2 causes page to download Description: The summary basically states the issue. I wrote a simple client which connects to a Java1.6.03 Axis2 implementation of SOAP and, whenever: $client = new SoapClient($url_to_wsdl); is called, instead of displaying ANY text on the page, the browser thinks it should download the resulting php file. I have tested it with the following browser: Mozilla, Links, Lynx, W3M, Python urllib.urlopen. If I point the WSDL url to something which is running the same software, Java 1.5.09->1.5.14, the request completes as expected. Reproduce code: --- $client = new SoapClient($url_to_wsdl); Expected result: It is executed appropriately Actual result: -- Page attempts to download -- Edit bug report at http://bugs.php.net/?id=44332&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44332&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44332&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44332&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44332&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44332&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44332&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=44332&r=needscript Try newer version:http://bugs.php.net/fix.php?id=44332&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=44332&r=support Expected behavior:http://bugs.php.net/fix.php?id=44332&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=44332&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=44332&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=44332&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44332&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=44332&r=dst IIS Stability:http://bugs.php.net/fix.php?id=44332&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=44332&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=44332&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=44332&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=44332&r=mysqlcfg
#44331 [NEW]: Formatting option for json_encode
From: jeremy at duckwizard dot com Operating system: Debian Stable PHP version: 5.2.5 PHP Bug Type: Feature/Change Request Bug description: Formatting option for json_encode Description: One of the appeals of JSON is that it is human readable. However, json_encode produces output that is not particularly manageable by a human - little more so than PHP's own serialization. DOM, for example, has a formatOutput option that nicely indents the resulting XML. A similar option for json_encode would be extremely helpful. Reproduce code: --- $obj = new stdClass; $obj->field1 = "hello"; $obj->field2 = "world"; $obj->field3 = array("key" => "value", "level2" => array(1,2,3)); echo json_encode($obj, JSON::FORMAT_OUTPUT); //flags are an implementation example Expected result: { "field1":"hello", "field2":"world", "field3": { "key":"value", "level2": [1,2,3] } } Actual result: -- {"field1":"hello","field2":"world","field3":{"key":"value","level2":[1,2,3]}} -- Edit bug report at http://bugs.php.net/?id=44331&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44331&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44331&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44331&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44331&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44331&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44331&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=44331&r=needscript Try newer version:http://bugs.php.net/fix.php?id=44331&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=44331&r=support Expected behavior:http://bugs.php.net/fix.php?id=44331&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=44331&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=44331&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=44331&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44331&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=44331&r=dst IIS Stability:http://bugs.php.net/fix.php?id=44331&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=44331&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=44331&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=44331&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=44331&r=mysqlcfg
#44330 [NEW]: Apache with PHP 5+6
From: lunter at interia dot pl Operating system: only Win PHP version: 6CVS-2008-03-04 (CVS) PHP Bug Type: Feature/Change Request Bug description: Apache with PHP 5+6 Description: Only Windows php6apache2_2.dll replace: 'PHPINIDir' => 'PHPINIDir6' & add second type: 'application/x-httpd-php6' to able load both as Apache module: 1) php5apache2_2.dll 2) php6apache2_2.dll with different Configuration File (php.ini) Path. Expected result: running Apache2.x with PHP5 & PHP6 as module at the same time Actual result: -- It is not able to load Apache2.x with PHP5 & PHP6 as module. -- Edit bug report at http://bugs.php.net/?id=44330&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44330&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44330&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44330&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44330&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44330&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44330&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=44330&r=needscript Try newer version:http://bugs.php.net/fix.php?id=44330&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=44330&r=support Expected behavior:http://bugs.php.net/fix.php?id=44330&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=44330&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=44330&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=44330&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44330&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=44330&r=dst IIS Stability:http://bugs.php.net/fix.php?id=44330&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=44330&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=44330&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=44330&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=44330&r=mysqlcfg
#44325 [Opn->Csd]: MSSQL empty string as NULL
ID: 44325 Updated by: [EMAIL PROTECTED] Reported By: alexr at oplot dot com -Status: Open +Status: Closed Bug Type: MSSQL related Operating System: All PHP Version: 5.2.5 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: [2008-03-04 17:14:11] alexr at oplot dot com I'm update code :) replace if ( (type==SQLVARCHAR) || (type==SQLCHAR) || (type==SQLTEXT) ) { /* variable-length type */ if (is_null) { maxlen=0; datalen=0; } else { convert_to_string_ex(var); datalen=Z_STRLEN_PP(var); value=(LPBYTE)Z_STRVAL_PP(var); } } To if ( (type==SQLVARCHAR) || (type==SQLCHAR) || (type==SQLTEXT) ) { /* variable-length type */ if (is_null) { maxlen=0; datalen=0; } else { if( Z_TYPE_PP(var) == IS_NULL ) { maxlen=0; datalen=0; } else { convert_to_string_ex(var); datalen=Z_STRLEN_PP(var); value=(LPBYTE)Z_STRVAL_PP(var); if(!datalen) { datalen=1; if( maxlen == -1 ) maxlen=1; } } } } [2008-03-04 16:20:00] alexr at oplot dot com Sorry. This is duplicate of http://bugs.php.net/bug.php?id=40394 bug with fix :) Could you please correct my code or approve it? [2008-03-04 16:09:27] alexr at oplot dot com Description: mssql_bind not correctly bind empty strings as parameter value. I add in php_mssql.c if(!datalen) { datalen = 1; maxlen = 1; } After the value=(LPBYTE)Z_STRVAL_PP(var); To fix this problem. Please add this code to the next PHP realize. Reproduce code: --- Code 1: Code 2: SQL Code CREATE PROCEDURE sp_test @ID varchar(255) null AS begin if @ID is NULL return 2 else return 3 END Expected result: 1) "3" 2) "2" Actual result: -- 1) "2" 2) "2" -- Edit this bug report at http://bugs.php.net/?id=44325&edit=1
#43639 [Com]: php-5.2.5-win32-installer.msi stops before it is finished.
ID: 43639 Comment by: markinoxford555 at yahoo dot co dot uk Reported By: erik dot kullberg at telia dot com Status: No Feedback Bug Type: *General Issues Operating System: Windows Vista PHP Version: 5.2.5 New Comment: Polite request... Is there any chance the batch file workaround could be added to the documentation? It is not obvious - it's no good just being logged on as administrator - you really do have to use the batch file, right click, and run as administrator. You can say it's not a bug all you like, but the fact is that Windows Vista users simply can't install PHP without literally hours of frustration and searching here for solutions. Either decide that PHP isn't available under Windows Vista :-( or add this trick to the documentation or, even better, change the installer so that it works without any trickery. Please don't just say it's not a bug - as far as the user is concerned, it simply doesn't work, not give any indication of why it doesn't work, and that, in my mind, is a bug. Sorry! Previous Comments: [2008-02-22 04:06:10] jhwanginet at hotmail dot com The MSIEXEC/I batch file solved the "unable to run script" error for me. But if you rerun the batch file to add/remove some extensions, then you get that error again. Even after installation now without error, including certain extensions still crash PHP, for example, maybe, pspell Oracle 8 svnclient threads [2008-02-16 17:57:26] davkalman at gmail dot com This is not really a bug, just that the installer needs to be run as administrator. When Right-clicking, Vista does not propose "Run as administrator" for MSI files. To correct this, modify the registry as follow: http://juice.altiris.com/download/1382/msi-run-as-administrator-context-menu-for-vista [2008-01-06 13:56:39] sean dot mccleary at gmail dot com Found a work-around. Create a batch file to run the installer, and run the batch file as administrator. Batch file should contain the single line: msiexec /i C:\php-5.2.5-win32-installer.msi Save it, right-click on it, run as administrator. [2008-01-06 12:53:48] sean dot mccleary at gmail dot com Same problem with 5.2.6-dev, by the way. [2008-01-06 12:49:30] sean dot mccleary at gmail dot com Same problem here. More info from the Windows event viewer: Product: PHP 5.2.5 -- Error 1720. There is a problem with this Windows Installer package. A script required for this install to complete could not be run. Contact your support personnel or package vendor. Custom action unconfigApache script error -2146828218, Microsoft VBScript runtime error: Permission denied Line 142, Column 5, 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/43639 -- Edit this bug report at http://bugs.php.net/?id=43639&edit=1
#44299 [Asn]: PCRE security issue
ID: 44299 User updated by: test_junk at hotmail dot it Reported By: test_junk at hotmail dot it Status: Assigned Bug Type: PCRE related Operating System: All PHP Version: 4.4.8 Assigned To: derick New Comment: There are several script using eval() statement in an unsafe manner (i.e. http://www.securityfocus.com/bid/14086), this makes the vulnerability remotely exploitable and potentially dangerous. Previous Comments: [2008-03-03 10:50:03] [EMAIL PROTECTED] Yes, that's true. This is only a problem if the program uses user-supplied regexes. I think that the most problematic thing was the pcre 7.0 BC break, that was later fixed in 7.2 (we still bundle 7.0). Anyway, Derick please reassign the bug report to me again if you want me to upgrade pcre or close it otherwise. I can always upgrade PCRE later if you decide to make a new release for some other reason. [2008-03-03 08:17:02] [EMAIL PROTECTED] >From what I can see from their ChangeLog: 1. A character class containing a very large number of characters with codepoints greater than 255 (in UTF-8 mode, of course) caused a buffer overflow. Which is only an issue for the expression, and not "input" - so this should only be an issue if you use user-supplied input. Otherwise it's just a local-developer issue only. Which IMO doesn't warrant a new release. [2008-03-01 22:52:54] [EMAIL PROTECTED] I can upgrade it in CVS, but I'm not sure there will be any further PHP 4 release. Derick can you comment on this? [2008-02-29 23:58:05] test_junk at hotmail dot it Description: Hello, PCRE versions prior to 7.6 are affected by a vulnerability: http://www.securityfocus.com/bid/27786 Unfortunately php 4.4.8 compiled against version 7.6 is unstable, are you going to fix this issue? Thanks -- Edit this bug report at http://bugs.php.net/?id=44299&edit=1
#44323 [Opn->Bgs]: efree() issue (reported by suhosin)
ID: 44323 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Bogus Bug Type: Reproducible crash Operating System: FreeBSD PHP Version: 5.2.5 New Comment: Works fine in CVS with no valgrind errors. More over the valgrind error about php_realpath() seems strange since no files are being opened and it implies the normal script execution process is flawed, which is not the case. Previous Comments: [2008-03-04 14:12:41] [EMAIL PROTECTED] Description: The issue happens at a cast of an array, to an object. Reproduce code: --- 'category', 'object_type' => 'post', 'hierarchical' => true, 'update_count_callback' => '_update_post_term_count'); $wp_taxonomies['post_tag'] = (object) array('name' => 'post_tag', 'object_type' => 'post', 'hierarchical' => false, 'update_count_callback' => '_update_post_term_count'); $wp_taxonomies['link_category'] = (object) array('name' => 'link_category', 'object_type' => 'link', 'hierarchical' => false); var_dump($wp_taxonomies); ?> Expected result: A var_dump() of the objects, which are stacked in an array ($wp_taxonomies). When I replace the above code with: $wp_taxonomies['post_tag'] = new stdClass; $wp_taxonomies['post_tag']->name = 'post_tag'; ... It works. Actual result: -- 1. ==11388== Memcheck, a memory error detector for x86-linux. 2. ==11388== Copyright (C) 2002-2004, and GNU GPL'd, by Julian Seward. 3. ==11388== Using valgrind-2.1.0, a program supervision framework for x86-linux. 4. ==11388== Copyright (C) 2000-2004, and GNU GPL'd, by Julian Seward. 5. ==11388== Estimated CPU clock rate is 2426 MHz 6. ==11388== For more details, rerun with: -v 7. ==11388== 8. ==11388== Conditional jump or move depends on uninitialised value(s) 9. ==11388==at 0x80F2016: php_realpath (in /usr/local/bin/php) 10. ==11388==by 0x80F2549: virtual_file_ex (in /usr/local/bin/php) 11. ==11388==by 0x80F8F5E: expand_filepath (in /usr/local/bin/php) 12. ==11388==by 0x80F5ECC: php_execute_script (in /usr/local/bin/php) 13. ==11388== 14. ==11388== Conditional jump or move depends on uninitialised value(s) 15. ==11388==at 0x8121CC8: _zval_ptr_dtor (in /usr/local/bin/php) 16. ==11388==by 0x8149002: zend_assign_to_variable (in /usr/local/bin/php) 17. ==11388==by 0x8193CE3: ZEND_ASSIGN_DIM_SPEC_CV_CONST_HANDLER (in /usr/local/bin/php) 18. ==11388==by 0x8149E88: execute (in /usr/local/bin/php) 19. ==11388== 20. ==11388== Conditional jump or move depends on uninitialised value(s) 21. ==11388==at 0x8121CE5: _zval_ptr_dtor (in /usr/local/bin/php) 22. ==11388==by 0x8149002: zend_assign_to_variable (in /usr/local/bin/php) 23. ==11388==by 0x8193CE3: ZEND_ASSIGN_DIM_SPEC_CV_CONST_HANDLER (in /usr/local/bin/php) 24. ==11388==by 0x8149E88: execute (in /usr/local/bin/php) 25. array(3) { 26. ["category"]=> 27. object(stdClass)#2 (4) { 28. ["name"]=> 29. string(8) "category" 30. ["object_type"]=> 31. string(4) "post" 32. ["hierarchical"]=> 33. bool(true) 34. ["update_count_callback"]=> 35. string(23) "_update_post_term_count" 36. } 37. ["post_tag"]=> 38. object(stdClass)#4 (4) { 39. ["name"]=> 40. string(8) "post_tag" 41. ["object_type"]=> 42. string(4) "post" 43. ["hierarchical"]=> 44. bool(false) 45. ["update_count_callback"]=> 46. string(23) "_update_post_term_count" 47. } 48. ["link_category"]=> 49. object(stdClass)#6 (3) { 50. ["name"]=> 51. string(13) "link_category" 52. ["object_type"]=> 53. string(4) "link" 54. ["hierarchical"]=> 55. bool(false) 56. } 57. } 58. ==11388== 59. ==11388== ERROR SUMMARY: 7 errors from 3 contexts (suppressed: 0 from 0) 60. ==11388== malloc/free: in use at exit: 7873 bytes in 60 blocks. 61. ==11388== malloc/free: 20131 allocs, 20071 frees, 2022373 bytes allocated. 62. ==11388== For a detailed leak analysis, rerun with: --leak-check=yes 63. ==11388== For counts of detected errors, rerun with: -v -- Edit this bug report at http://bugs.php.net/?id=44323&edit=1
#44329 [Opn]: pg_query_params null does not pass correctly
ID: 44329 User updated by: tyler at sleekcode dot net Reported By: tyler at sleekcode dot net Status: Open Bug Type: PostgreSQL related Operating System: Multiple PHP Version: 5.2.5 New Comment: the query above is wrong, it should be: pg_query_params("SELECT name FROM test WHERE extra IS $1",array(null)); Previous Comments: [2008-03-04 19:19:38] tyler at sleekcode dot net Description: Passing NULL via pg_query_params does not work resulting in situations where a possible NULL value must have a secondary branch of code to adjust the query accordingly. Reproduce code: --- Reproduce code: --- using postgres 8x create this test table: CREATE TABLE test ( id serial PRIMARY KEY, name text, extra text, ); INSERT INTO test (name,extra) VALUES ('Testing 123,'Testing'); INSERT INTO test (name) VALUES ('My extra is null'); Expected result: pg_fetch_results should return the first result that matches the query and the code should print it. Actual result: -- The query does not run. -- Edit this bug report at http://bugs.php.net/?id=44329&edit=1
#44329 [NEW]: pg_query_params null does not pass correctly
From: tyler at sleekcode dot net Operating system: Multiple PHP version: 5.2.5 PHP Bug Type: PostgreSQL related Bug description: pg_query_params null does not pass correctly Description: Passing NULL via pg_query_params does not work resulting in situations where a possible NULL value must have a secondary branch of code to adjust the query accordingly. Reproduce code: --- Reproduce code: --- using postgres 8x create this test table: CREATE TABLE test ( id serial PRIMARY KEY, name text, extra text, ); INSERT INTO test (name,extra) VALUES ('Testing 123,'Testing'); INSERT INTO test (name) VALUES ('My extra is null'); Expected result: pg_fetch_results should return the first result that matches the query and the code should print it. Actual result: -- The query does not run. -- Edit bug report at http://bugs.php.net/?id=44329&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44329&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44329&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44329&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44329&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44329&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44329&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=44329&r=needscript Try newer version:http://bugs.php.net/fix.php?id=44329&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=44329&r=support Expected behavior:http://bugs.php.net/fix.php?id=44329&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=44329&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=44329&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=44329&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44329&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=44329&r=dst IIS Stability:http://bugs.php.net/fix.php?id=44329&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=44329&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=44329&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=44329&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=44329&r=mysqlcfg
#43861 [NoF->Opn]: suhosin patch detects heap overflow on mssql_free_result()
ID: 43861 User updated by: skennedy at vcn dot com Reported By: skennedy at vcn dot com -Status: No Feedback +Status: Open Bug Type: MSSQL related Operating System: FreeBSD 6.2 PHP Version: 5.2.5 New Comment: Sorry for not getting this done sooner. I got a PHP 5.3 snapshot and compiled/installed it and ran it through valgrind with the USE_ZEND_ALLOC env var set to 0 and here is the output: http://www.bandwidthbuilders.com/valgrind-output-nozendalloc-php5.3.txt Previous Comments: [2008-02-25 17:23:36] [EMAIL PROTECTED] Andy, this bug is specific to MSSQL and you indicated you are using MySQL, so I don't see how your issue is the similar. [2008-02-25 09:58:25] andy at diginights dot com Same issue here, we get white pages browsing our site. Also we get "ALERT - canary mismatch on efree() - heap overflow detected" in apache error log. Using apache 2.2.8-1 php 5.2.5-2 mysql 5.0.51-3 Software ist Burning Board (http://woltlab.de/) [2008-02-18 01:00:01] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". [2008-02-10 14:50:28] [EMAIL PROTECTED] Can you please try a CVS snapshot on PHP 5.3.0 in about 4-5 hours. I've just applied a patch to the code that may fix your problem. Alternatively you can try the patch yourself from this URL; http://cvs.php.net/viewvc.cgi/php-src/ext/mssql/php_mssql.c? r1=1.152.2.13.2.4.2.3&r2=1.152.2.13.2.4.2.4&diff_format=u [2008-02-10 07:57:04] cxcxcxcx at gmail dot com I have encountered a similar problem. When "select" contains 'smalldatetime' or 'datetime' columns. I am using Debian Sid and php5 php5-sybase. 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/43861 -- Edit this bug report at http://bugs.php.net/?id=43861&edit=1
#44057 [Opn]: Session vars weird behavior
ID: 44057 User updated by: galaxy dot mipt at gmail dot com Reported By: galaxy dot mipt at gmail dot com Status: Open -Bug Type: Documentation problem +Bug Type: Session related Operating System: Linux 2.6.9 PHP Version: 5.2.5 New Comment: My apologize for that I am changing the category but there is still a bit of a problem with session store if one actually tries to put invalid stuff to $_SESSION, as I described. Also, is it possible to emerge a warning at some stage if an invalid key is put to $_SESSION - guess it is something worth to be done along with the notes in docs. Previous Comments: [2008-02-13 18:27:20] [EMAIL PROTECTED] This needs to be told in the manual. Even as $_SESSION and $HTTP_SESSION_VARS look different they're essentially same thing. (dunno how to say this better..just don't do it! :) [2008-02-05 23:02:13] galaxy dot mipt at gmail dot com Description: Looks like session data gets corrupted at serialization step if one attempts to store certain variables in session, namely HTTP_SESSION_VARS. As far as I understand it is a desired behavior that var with that name doesn't get saved in session (still it is *really* worth mentioning that in documentation on sessions), but it seems to have some side effects on successive variables passed to the session. Reproduce code: --- session_start(); print ''; print_r($_SESSION); print ''; $_SESSION['qwerty'] = 1; $_SESSION['HTTP_SESSION_VARS'] = 2; $_SESSION['ABC'] = 'qqq'; Expected result: First call: Array ( ) Later calls: Array ( [qwerty] => 1 [ABC] => qqq ) Actual result: -- First call: Array ( ) Later calls: Array ( [qwerty] => 1 [i:2;ABC] => qqq ) -- Edit this bug report at http://bugs.php.net/?id=44057&edit=1
#44327 [NEW]: PDORow::queryString property & numeric offsets
From: uwendel at mysql dot com Operating system: Linux PHP version: 5.3CVS-2008-03-04 (snap) PHP Bug Type: PDO related Bug description: PDORow::queryString property & numeric offsets Description: What kind of thing is the PDORow::queryString property? PDORow objects are generated and returned by PDOStatement::fetch(PDO::FETCH_LAZY). PDORow objects seem a bit special in some ways. 1) "PDO::FETCH_LAZY = PDO::FETCH_OBJ + PDO::FETCH_BOTH" PDO::FETCH_BOTH means that the returned data is both indexed by the column name and a column offset number. For example, a query like SELECT id FROM test should return an object (resp. array) with the properties {0} and id. You can access both properties and you get what you want. But var_dump() will report only the column name based property and not the property based on the numeric column offset. I have no idea if this is a var_dump() or a PDO flaw. 2) The magic queryString property var_dump() reports a queryString property for PDORow objects returned by PDOStatement::fetch(). In all my testing I found the queryString propery value to be the query string which has constructed the corresponding PDOStatement object. However, I cannot access this property. I see it, but I have no access. That makes it a bit "magic". Also, note how var_dump(), var_export() and debug_zval_dump report different things. Johannes already explained to me that the functions might do different things, but anyway it looks confusing to me. Reproduce code: --- 1, FETCH_LAZY and numeric offset -- sapi/cli/php -r '$db = new PDO("mysql:dbname=phptest;unix_socket=/tmp/mysql.sock", "root", "root"); $stmt = $db->prepare("SELECT 1 AS \"one\""); $stmt->execute(); $row = $stmt->fetch(PDO::FETCH_LAZY); var_dump($row); var_dump($row->{0}); var_dump($row->one); ' object(PDORow)#3 (2) { ["queryString"]=> string(17) "SELECT 1 AS "one"" ["one"]=> string(1) "1" } --> string(1) "1" string(1) "1" 2, magic PDORow::queryString() - sapi/cli/php -r '$db = new PDO("mysql:dbname=phptest;unix_socket=/tmp/mysql.sock", "root", "root"); $stmt = $db->prepare("SELECT 1 AS \"one\""); $stmt->execute(); $row = $stmt->fetch(PDO::FETCH_LAZY); var_dump($row); var_dump($row->queryString); ' object(PDORow)#3 (2) { ["queryString"]=> string(17) "SELECT 1 AS "one"" ["one"]=> string(1) "1" } --> UNKNOWN:0 sapi/cli/php -r '$db = new PDO("mysql:dbname=phptest;unix_socket=/tmp/mysql.sock", "root", "root"); $db->exec("DROP TABLE test"); $db->exec("CREATE TABLE test (id INT)"); $db->exec("INSERT INTO test(id) VALUES (1)"); $stmt = $db->prepare("SELECT id FROM test"); $stmt->execute(); $row = $stmt->fetch(PDO::FETCH_LAZY); var_dump($row); var_dump($row->queryString); var_export($row->queryString); print "\n"; debug_zval_dump($row->queryString);' --> UNKNOWN:0 NULL UNKNOWN:0 -- Edit bug report at http://bugs.php.net/?id=44327&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44327&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44327&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44327&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44327&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44327&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44327&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=44327&r=needscript Try newer version:http://bugs.php.net/fix.php?id=44327&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=44327&r=support Expected behavior:http://bugs.php.net/fix.php?id=44327&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=44327&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=44327&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=44327&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44327&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=44327&r=dst IIS Stability:http://bugs.php.net/fix.php?id=44327&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=44327&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=44327&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=44327&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=44327&r=mysqlcfg
#44325 [Opn]: MSSQL empty string as NULL
ID: 44325 User updated by: alexr at oplot dot com Reported By: alexr at oplot dot com Status: Open Bug Type: MSSQL related Operating System: All PHP Version: 5.2.5 New Comment: I'm update code :) replace if ( (type==SQLVARCHAR) || (type==SQLCHAR) || (type==SQLTEXT) ) { /* variable-length type */ if (is_null) { maxlen=0; datalen=0; } else { convert_to_string_ex(var); datalen=Z_STRLEN_PP(var); value=(LPBYTE)Z_STRVAL_PP(var); } } To if ( (type==SQLVARCHAR) || (type==SQLCHAR) || (type==SQLTEXT) ) { /* variable-length type */ if (is_null) { maxlen=0; datalen=0; } else { if( Z_TYPE_PP(var) == IS_NULL ) { maxlen=0; datalen=0; } else { convert_to_string_ex(var); datalen=Z_STRLEN_PP(var); value=(LPBYTE)Z_STRVAL_PP(var); if(!datalen) { datalen=1; if( maxlen == -1 ) maxlen=1; } } } } Previous Comments: [2008-03-04 16:20:00] alexr at oplot dot com Sorry. This is duplicate of http://bugs.php.net/bug.php?id=40394 bug with fix :) Could you please correct my code or approve it? [2008-03-04 16:09:27] alexr at oplot dot com Description: mssql_bind not correctly bind empty strings as parameter value. I add in php_mssql.c if(!datalen) { datalen = 1; maxlen = 1; } After the value=(LPBYTE)Z_STRVAL_PP(var); To fix this problem. Please add this code to the next PHP realize. Reproduce code: --- Code 1: Code 2: SQL Code CREATE PROCEDURE sp_test @ID varchar(255) null AS begin if @ID is NULL return 2 else return 3 END Expected result: 1) "3" 2) "2" Actual result: -- 1) "2" 2) "2" -- Edit this bug report at http://bugs.php.net/?id=44325&edit=1
#42862 [Com]: IMAP toolkit crash: rfc822.c legacy routine buffer, overflow
ID: 42862 Comment by: sborrill at precedence dot co dot uk Reported By: Maylein at ub dot uni-heidelberg dot de Status: Assigned Bug Type: IMAP related Operating System: Linux 2.6.22 PHP Version: 5.2.4 Assigned To: iliaa New Comment: php_imap.c uses rfc822_write_address() which, with imap-uw sources since 2005, limits the complete returned address list to 16383 bytes in length irrespective of the size of the buffer you pass into it (you don't pass the length, so it can't know the actual size). This means that if you have a large address lists in your To: or Cc: headers, that would expand to more than 16383 characters, PHP will core-dump with SIGABRT. This affects PHP HEAD too. rfc822_write_address is deprecated: * WARNING: These routines are for compatibility with old software only. * * Their use in new software is to be avoided. * * These interfaces do not provide satisfactory buffer checking. In * versions of c-client prior to imap-2005, they did not provide any * buffer checking at all. The fix is to use rfc822_output_address_list(). Patch below (against 5.2.5): --- php_imap.c.orig 2007-07-31 01:31:10.0 +0100 +++ php_imap.c 2008-03-04 17:48:30.0 + @@ -70,6 +70,7 @@ static void _php_imap_add_body(zval *arg, BODY *body TSRMLS_DC); static void _php_imap_parse_address(ADDRESS *addresslist, char **fulladdress, zval *paddress TSRMLS_DC); static int _php_imap_address_size(ADDRESS *addresslist); +static void _php_rfc822_write_address_len (char *dest, ADDRESS *adr, int len); /* the gets we use */ static char *php_mail_gets(readfn_t f, void *stream, unsigned long size, GETS_DATA *md); @@ -2137,7 +2138,7 @@ } string[0]='\0'; - rfc822_write_address(string, addr); + _php_rfc822_write_address_len(string, addr, sizeof(string)); RETVAL_STRING(string, 1); } /* }}} */ @@ -2906,13 +2907,13 @@ if (env->from && _php_imap_address_size(env->from) < MAILTMPLEN) { env->from->next=NULL; address[0] = '\0'; - rfc822_write_address(address, env->from); + _php_rfc822_write_address_len(address, env->from, sizeof(address)); add_property_string(myoverview, "from", address, 1); } if (env->to && _php_imap_address_size(env->to) < MAILTMPLEN) { env->to->next = NULL; address[0] = '\0'; - rfc822_write_address(address, env->to); + _php_rfc822_write_address_len(address, env->to, sizeof(address)); add_property_string(myoverview, "to", address, 1); } if (env->date) { @@ -3883,6 +3884,34 @@ /* }}} */ +/* {{{ _php_rfc822_soutr + */ +static long _php_rfc822_soutr (void *stream,char *string) +{ + return NIL; +} + +/* }}} */ + + +/* {{{ _php_rfc822_write_address_len + */ +static void _php_rfc822_write_address_len ( char *dest, ADDRESS *adr, int len) +{ + RFC822BUFFER buf; + + buf.beg = dest; + buf.cur = buf.beg; + buf.end = buf.beg + len - 1; + buf.s = NIL; + buf.f = _php_rfc822_soutr; + rfc822_output_address_list (&buf, adr, 0, NIL); + *buf.cur = '\0'; +} + +/* }}} */ + + /* {{{ _php_imap_parse_address */ static void _php_imap_parse_address (ADDRESS *addresslist, char **fulladdress, zval *paddress TSRMLS_DC) @@ -3897,7 +3926,7 @@ if ((len = _php_imap_address_size(addresstmp))) { tmpstr = (char *) pemalloc(len + 1, 1); tmpstr[0] = '\0'; - rfc822_write_address(tmpstr, addresstmp); + _php_rfc822_write_address_len(tmpstr, addresstmp, len); *fulladdress = tmpstr; } else { *fulladdress = NULL; Previous Comments: [2007-10-30 17:15:29] [EMAIL PROTECTED] Reclassified. (This is the correct place for this, it's imap related) [2007-10-22 11:44:14] Maylein at ub dot uni-heidelberg dot de No one seems to care about a bug report in the category 'imap related', so I put it now in the category 'reproducible crash'. [2007-10-11 08:49:53] Maylein at ub dot uni-heidelberg dot de Please tell me, if there will be a patch for the imap-extension. It's an security issue, isn't it? If you don't plan to patch the imap extension (as I understand from the answer on Bug #40925) then yo
#44326 [NEW]: wrong assert output-phpt:php-5.2.5/ext/standard/tests/assert/assert_error1.phpt
From: eyal at zend dot com Operating system: Linux any PHP version: 5.2.5 PHP Bug Type: Unknown/Other Function Bug description: wrong assert output-phpt:php-5.2.5/ext/standard/tests/assert/assert_error1.phpt Description: The following was found when I used the code of a phpt via apache-module php. Requesting the script below returns the requested output as specified in the phpt. However, second and third requests will result a different output with no error messages. As specified in the phpt --INI-- section, I added the following directives to my php.ini: assert.active = 1 assert.warning = 1 assert.callback = f1 assert.quiet_eval = 1 assert.bail = 0 Reproduce code: --- http://bugs.php.net/?id=44326&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44326&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44326&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44326&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44326&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44326&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44326&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=44326&r=needscript Try newer version:http://bugs.php.net/fix.php?id=44326&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=44326&r=support Expected behavior:http://bugs.php.net/fix.php?id=44326&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=44326&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=44326&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=44326&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44326&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=44326&r=dst IIS Stability:http://bugs.php.net/fix.php?id=44326&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=44326&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=44326&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=44326&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=44326&r=mysqlcfg
#40394 [Com]: mssql_bind() converts empty strings to null
ID: 40394 Comment by: alexr at oplot dot com Reported By: rnerovich at gmail dot com Status: Assigned Bug Type: MSSQL related Operating System: XP/2003 server PHP Version: 5.2.0 Assigned To: fmk New Comment: Guys, I was fix (temporarily) this bug, please see the http://bugs.php.net/bug.php?id=44325 Previous Comments: [2007-06-21 10:12:22] smargroth at hotmail dot com I have the same problem and it makes me a headache all the time. This bug is very annoying, as empty string is normal and valid value, and is different from NULL value. I have non-NULL-able columns, and I cannot insert empty strings because of this stupid bug. The only workaround is to make NULL-able columns, but then I could not distinguish between omitted (NULL) or valid empty string. [2007-02-07 23:27:04] [EMAIL PROTECTED] Assigned to the maintainer. [2007-02-07 23:19:24] rnerovich at gmail dot com Just tried the new snapshot with the same result. 885: [02/07] [17:17:30] *** array ( 0 => 'ükÁ#ðÌæMTèÇS±í°', 'ucode' => 'ükÁ#ðÌæMTèÇS±í°', 1 => NULL, 'phone' => NULL, 2 => NULL, 'account' => NULL, 3 => '423998059-130628001', 'ealoc' => '423998059-130628001', 4 => '2007-02-07 17:17:21', 'time' => '2007-02-07 17:17:21', 5 => 'g÷r}Q\'[EMAIL PROTECTED]', 'recid' => 'g÷r}Q\'[EMAIL PROTECTED]', 6 => NULL, 'prbstr' => NULL, ) [2007-02-07 22:48:56] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.2-win32-latest.zip [2007-02-07 22:36:18] rnerovich at gmail dot com Description: When using mssql_bind() to pass an empty string to a stored procedure, the empty string is converted to NULL. This problem has been reported by others, but either closed or marked as BOGUS, which is not the case, as I've reproduced this on both development and deployed systems. Reproduce code: --- CREATE PROCEDURE REC_PROC_INSERT_MS_INTF @UCODE UNIQUEIDENTIFIER, @PHONE VARCHAR(10), @ACCOUNT VARCHAR(25), @EALOC VARCHAR(38), @TIME DATETIME, @RECID UNIQUEIDENTIFIER, @PRBSTR VARCHAR(30) AS SELECT @UCODE as ucode, @PHONE as phone, @ACCOUNT as account, @EALOC as ealoc, @TIME as time, @RECID as recid, @PRBSTR as prbstr RETURN 1 GO $sp = mssql_init('REC_PROC_INSERT_MS_INTF',$dblink->dbresource); mssql_bind($sp,"RETVAL",&$rc,SQLINT4,TRUE,TRUE,4); mssql_bind($sp,"@UCODE",$ucode,SQLVARCHAR,FALSE,FALSE,strlen($ucode)); mssql_bind($sp,"@PHONE",$phone,SQLVARCHAR,FALSE,FALSE,10); mssql_bind($sp,"@ACCOUNT",$account,SQLVARCHAR,FALSE,FALSE,25); mssql_bind($sp,"@EALOC",$ealoc,SQLVARCHAR,FALSE,FALSE,38); mssql_bind($sp,"@TIME",$currtime,SQLVARCHAR,FALSE,FALSE,strlen($currtime)); mssql_bind($sp,"@RECID",$recId,SQLVARCHAR,FALSE,FALSE,strlen($recId)); mssql_bind($sp,"@PRBSTR",$problem,SQLVARCHAR,FALSE,FALSE,30); $result = mssql_execute($sp); if($result){ $row = mssql_fetch_array($result); global $log; $log->Writelog(var_export($row,true)); } Expected result: I would expect the empty strings to stay empty. This causes major problems with NON-NULLABLE SQL fields!!! array ( 0 => 'ükÁ#ðÌæMTèÇS±í°', 'ucode' => 'ükÁ#ðÌæMTèÇS±í°', 1 => '', 'phone' => '', 2 => '', 'account' => '', 3 => '423998059-130628001', 'ealoc' => '423998059-130628001', 4 => '2007-02-07 16:20:54', 'time' => '2007-02-07 16:20:54', 5 => 'g÷r}Q\'[EMAIL PROTECTED]', 'recid' => 'g÷r}Q\'[EMAIL PROTECTED]', 6 => '', 'prbstr' => '', ) Actual result: -- when any of the strings (not uniqueidentifiers) are set to an empty string ($phone = '') the following is received from the var_export() array ( 0 => 'ükÁ#ðÌæMTèÇS±í°', 'ucode' => 'ükÁ#ðÌæMTèÇS±í°', 1 => NULL, 'phone' => NULL, 2 => NULL, 'account' => NULL, 3 => '423998059-130628001', 'ealoc' => '423998059-130628001', 4 => '2007-02-07 16:20:04', 'time' => '2007-02-07 16:20:04', 5 => 'g÷r}Q\'[EMAIL PROTECTED]', 'recid' => 'g÷r}Q\'[EMAIL PROTECTED]', 6 => NULL, 'prbstr' => NULL, ) the GUIDS look like garbage, but are correct. The strings however are all NULL if they were sent in as '' This is what var_export() reports if all strings are set to ' ' (one space) array ( 0 => 'ükÁ#ðÌæMTèÇS±í°', 'ucode' => 'ükÁ#ðÌæMTèÇS±í°', 1 => ' ', 'phone' => ' ', 2 => ' ', 'account' => ' ', 3 => '423998059-130628001', 'ealoc' => '423998059-
#44325 [Opn]: MSSQL empty string as NULL
ID: 44325 User updated by: alexr at oplot dot com Reported By: alexr at oplot dot com Status: Open Bug Type: MSSQL related Operating System: All PHP Version: 5.2.5 New Comment: Sorry. This is duplicate of http://bugs.php.net/bug.php?id=40394 bug with fix :) Could you please correct my code or approve it? Previous Comments: [2008-03-04 16:09:27] alexr at oplot dot com Description: mssql_bind not correctly bind empty strings as parameter value. I add in php_mssql.c if(!datalen) { datalen = 1; maxlen = 1; } After the value=(LPBYTE)Z_STRVAL_PP(var); To fix this problem. Please add this code to the next PHP realize. Reproduce code: --- Code 1: Code 2: SQL Code CREATE PROCEDURE sp_test @ID varchar(255) null AS begin if @ID is NULL return 2 else return 3 END Expected result: 1) "3" 2) "2" Actual result: -- 1) "2" 2) "2" -- Edit this bug report at http://bugs.php.net/?id=44325&edit=1
#44325 [NEW]: MSSQL empty string as NULL
From: alexr at oplot dot com Operating system: All PHP version: 5.2.5 PHP Bug Type: MSSQL related Bug description: MSSQL empty string as NULL Description: mssql_bind not correctly bind empty strings as parameter value. I add in php_mssql.c if(!datalen) { datalen = 1; maxlen = 1; } After the value=(LPBYTE)Z_STRVAL_PP(var); To fix this problem. Please add this code to the next PHP realize. Reproduce code: --- Code 1: Code 2: SQL Code CREATE PROCEDURE sp_test @ID varchar(255) null AS begin if @ID is NULL return 2 else return 3 END Expected result: 1) "3" 2) "2" Actual result: -- 1) "2" 2) "2" -- Edit bug report at http://bugs.php.net/?id=44325&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44325&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44325&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44325&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44325&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44325&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44325&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=44325&r=needscript Try newer version:http://bugs.php.net/fix.php?id=44325&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=44325&r=support Expected behavior:http://bugs.php.net/fix.php?id=44325&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=44325&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=44325&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=44325&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44325&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=44325&r=dst IIS Stability:http://bugs.php.net/fix.php?id=44325&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=44325&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=44325&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=44325&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=44325&r=mysqlcfg
#44324 [NEW]: $_SESSION[0] is not stored
From: Pasuk2003 at mail dot ru Operating system: WIndows XP SP2 PHP version: 5.2.5 PHP Bug Type: Session related Bug description: $_SESSION[0] is not stored Description: When using $_SESSION and trying to store there something in key=0, the whole session data is not 'magically' :) present in the next page load Reproduce code: --- Expected result: -- first load: array() -- second load array( 0 => array( ... ) ) Actual result: -- -- first load: array() -- second load array() -- Edit bug report at http://bugs.php.net/?id=44324&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44324&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44324&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44324&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44324&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44324&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44324&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=44324&r=needscript Try newer version:http://bugs.php.net/fix.php?id=44324&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=44324&r=support Expected behavior:http://bugs.php.net/fix.php?id=44324&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=44324&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=44324&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=44324&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44324&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=44324&r=dst IIS Stability:http://bugs.php.net/fix.php?id=44324&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=44324&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=44324&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=44324&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=44324&r=mysqlcfg
#44047 [Com]: IIS Worker Process stopped working
ID: 44047 Comment by: nick at databasedevelopments dot com Reported By: matthew dot horner at redprairie dot com Status: Open Bug Type: IIS related Operating System: Windows Vista PHP Version: 5.2.5 New Comment: Same issue here on Vista Ultimate and PHP5.2.5 with IIS7 Previous Comments: [2008-03-04 00:57:46] nonya at spam dot this Yea, that is a horrible idea. You are literally telling IIS to never clean it's caches or do garbage collection on the AppPools. I am sure that there are more critical consequences on high-volume web servers if you decide to do this. PHP just fix it [2008-03-03 13:52:11] matthew dot horner at redprairie dot com Setting the recycle time to 0 would not be considered a solution, but rather a workaround. The solution to the problem would require a code change. That change would resolve the issue, so that the workaround would not have to be applied. This change to standard code would also avoid changing standard configuration of the IIS server for _every_ instance that has a PHP 5 installation. [2008-03-02 12:27:34] satan at dclxvi dot nl lol, your test is the solution... where you set it idle time out to 1 to test it earlier, just set it to '0'. it will error out once more and the next time it starts it will stay on.. there is no problem with leaving it on.. [2008-02-29 04:37:22] nonya at spam dot this To elaborate on Matthew, (Every PHP5\Vista\IIS7 machine I have every worked on does this; 20+ machines) The same error can be achieved back-to-back simply by running any PHP, which in turn will add 1 active application to the DefaultAppPool. This is visible in the IIS7 Manager. You can select the DefaultAppPool and click "Recycle...", wait 3-5 secs (because WerFault.exe kicks in, Windows Error Reporting Service) and you have a "IIS Worker Process has failed" message with the event in the windows event log the way Matt described which says the fault came from c:\windows\system32\ntdll.dll If the PHP dev guys are trying to recreate this issue, you need to be using Latest PHP5/IIS7/ISAPI-Configuration/Vista This has been going on since Vista RC1. Everyone who is not getting this error may not be complaining because the error doesn't seem to do major damage. The closest thing to a resolution I have seen since the release of Vista is to just adjust the timing of the automated recycle cycle. Since the error is only occurring during recycling, they have been scheduling 1 recycle per day, hence 1 crash per day. There are many, many, many, MANY forums and support threads with people having the same problem, they just aren't posting here. Here are a few: forums.techarena.in/showthread.php?t=686723 www.developersdex.com/asp/message.asp?p=592&r=6057007 www.issociate.de/board/post/468636/IIS_+_PHP_--_Worker_Process_alert_&_w3wp.exe_crash?.html forums.techarena.in/showthread.php?t=821723 groups.google.com/group/comp.lang.php/browse_thread/thread/93aef1ff2f0ba3b0 www.thescripts.com/forum/thread742344.html [2008-02-05 16:17:54] matthew dot horner at redprairie dot com I removed all extensions and re-tested with the same results. 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/44047 -- Edit this bug report at http://bugs.php.net/?id=44047&edit=1
#44270 [Com]: $mysqli->info is NULL, not an empty string, for "not supported situations"
ID: 44270 Comment by: uwendel at mysql dot com Reported By: stein at visibone dot com Status: Open Bug Type: MySQLi related Operating System: Win2K PHP Version: 5.2.5 New Comment: Interesting question and good point. In real life only few people might notice the difference and cast the return value to string, but good question... Please don't commit the change. I wonder if there are more such tiny differences. For example, I wonder if my mysqli_info.phpt test is correct. Let me check in more detail first before we change anything. Ulf Previous Comments: [2008-03-04 13:45:07] [EMAIL PROTECTED] Hi Johannes/Ulf Whereas the documentation says "empty string" for each string property, i guess that could be modified the macro responsible for that. http://felipe.ath.cx/diff/bug44270.diff What do you think? :) [2008-02-27 17:55:22] stein at visibone dot com Description: $mysqli->info is NULL instead of empty string for "not supported situations" (i.e. queries other than multi-row INSERT, LOAD, ALTER, UPDATE) The procedural mysqli_info() does return the empty string, as documented. Reproduce code: --- Query: 'INSERT INTO t (id) VALUES (1),(2),(3)' mysqli_info(): 'Records: 3 Duplicates: 0 Warnings: 0' $mysqli->info: 'Records: 3 Duplicates: 0 Warnings: 0' Query: 'INSERT INTO t (id) VALUES (9)' mysqli_info(): '' $mysqli->info: NULL Expected result: (see above) Actual result: -- the object oriented property $mysqli->info should be the empty string after "not supported situations", e.g. a single-row insert. -- Edit this bug report at http://bugs.php.net/?id=44270&edit=1
#44323 [NEW]: efree() issue (reported by suhosin)
From: [EMAIL PROTECTED] Operating system: FreeBSD PHP version: 5.2.5 PHP Bug Type: Reproducible crash Bug description: efree() issue (reported by suhosin) Description: The issue happens at a cast of an array, to an object. Reproduce code: --- 'category', 'object_type' => 'post', 'hierarchical' => true, 'update_count_callback' => '_update_post_term_count'); $wp_taxonomies['post_tag'] = (object) array('name' => 'post_tag', 'object_type' => 'post', 'hierarchical' => false, 'update_count_callback' => '_update_post_term_count'); $wp_taxonomies['link_category'] = (object) array('name' => 'link_category', 'object_type' => 'link', 'hierarchical' => false); var_dump($wp_taxonomies); ?> Expected result: A var_dump() of the objects, which are stacked in an array ($wp_taxonomies). When I replace the above code with: $wp_taxonomies['post_tag'] = new stdClass; $wp_taxonomies['post_tag']->name = 'post_tag'; ... It works. Actual result: -- 1. ==11388== Memcheck, a memory error detector for x86-linux. 2. ==11388== Copyright (C) 2002-2004, and GNU GPL'd, by Julian Seward. 3. ==11388== Using valgrind-2.1.0, a program supervision framework for x86-linux. 4. ==11388== Copyright (C) 2000-2004, and GNU GPL'd, by Julian Seward. 5. ==11388== Estimated CPU clock rate is 2426 MHz 6. ==11388== For more details, rerun with: -v 7. ==11388== 8. ==11388== Conditional jump or move depends on uninitialised value(s) 9. ==11388==at 0x80F2016: php_realpath (in /usr/local/bin/php) 10. ==11388==by 0x80F2549: virtual_file_ex (in /usr/local/bin/php) 11. ==11388==by 0x80F8F5E: expand_filepath (in /usr/local/bin/php) 12. ==11388==by 0x80F5ECC: php_execute_script (in /usr/local/bin/php) 13. ==11388== 14. ==11388== Conditional jump or move depends on uninitialised value(s) 15. ==11388==at 0x8121CC8: _zval_ptr_dtor (in /usr/local/bin/php) 16. ==11388==by 0x8149002: zend_assign_to_variable (in /usr/local/bin/php) 17. ==11388==by 0x8193CE3: ZEND_ASSIGN_DIM_SPEC_CV_CONST_HANDLER (in /usr/local/bin/php) 18. ==11388==by 0x8149E88: execute (in /usr/local/bin/php) 19. ==11388== 20. ==11388== Conditional jump or move depends on uninitialised value(s) 21. ==11388==at 0x8121CE5: _zval_ptr_dtor (in /usr/local/bin/php) 22. ==11388==by 0x8149002: zend_assign_to_variable (in /usr/local/bin/php) 23. ==11388==by 0x8193CE3: ZEND_ASSIGN_DIM_SPEC_CV_CONST_HANDLER (in /usr/local/bin/php) 24. ==11388==by 0x8149E88: execute (in /usr/local/bin/php) 25. array(3) { 26. ["category"]=> 27. object(stdClass)#2 (4) { 28. ["name"]=> 29. string(8) "category" 30. ["object_type"]=> 31. string(4) "post" 32. ["hierarchical"]=> 33. bool(true) 34. ["update_count_callback"]=> 35. string(23) "_update_post_term_count" 36. } 37. ["post_tag"]=> 38. object(stdClass)#4 (4) { 39. ["name"]=> 40. string(8) "post_tag" 41. ["object_type"]=> 42. string(4) "post" 43. ["hierarchical"]=> 44. bool(false) 45. ["update_count_callback"]=> 46. string(23) "_update_post_term_count" 47. } 48. ["link_category"]=> 49. object(stdClass)#6 (3) { 50. ["name"]=> 51. string(13) "link_category" 52. ["object_type"]=> 53. string(4) "link" 54. ["hierarchical"]=> 55. bool(false) 56. } 57. } 58. ==11388== 59. ==11388== ERROR SUMMARY: 7 errors from 3 contexts (suppressed: 0 from 0) 60. ==11388== malloc/free: in use at exit: 7873 bytes in 60 blocks. 61. ==11388== malloc/free: 20131 allocs, 20071 frees, 2022373 bytes allocated. 62. ==11388== For a detailed leak analysis, rerun with: --leak-check=yes 63. ==11388== For counts of detected errors, rerun with: -v -- Edit bug report at http://bugs.php.net/?id=44323&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44323&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44323&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44323&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44323&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44323&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44323&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=44323&r=needscript Try newer version:http://bugs.php.net/fix.php?id=44323&r=oldversion Not de
#44270 [Opn]: $mysqli->info is NULL, not an empty string, for "not supported situations"
ID: 44270 Updated by: [EMAIL PROTECTED] Reported By: stein at visibone dot com Status: Open Bug Type: MySQLi related Operating System: Win2K PHP Version: 5.2.5 New Comment: Hi Johannes/Ulf Whereas the documentation says "empty string" for each string property, i guess that could be modified the macro responsible for that. http://felipe.ath.cx/diff/bug44270.diff What do you think? :) Previous Comments: [2008-02-27 17:55:22] stein at visibone dot com Description: $mysqli->info is NULL instead of empty string for "not supported situations" (i.e. queries other than multi-row INSERT, LOAD, ALTER, UPDATE) The procedural mysqli_info() does return the empty string, as documented. Reproduce code: --- Query: 'INSERT INTO t (id) VALUES (1),(2),(3)' mysqli_info(): 'Records: 3 Duplicates: 0 Warnings: 0' $mysqli->info: 'Records: 3 Duplicates: 0 Warnings: 0' Query: 'INSERT INTO t (id) VALUES (9)' mysqli_info(): '' $mysqli->info: NULL Expected result: (see above) Actual result: -- the object oriented property $mysqli->info should be the empty string after "not supported situations", e.g. a single-row insert. -- Edit this bug report at http://bugs.php.net/?id=44270&edit=1
#44273 [Fbk->Opn]: access to private and protected class variables allowed when casting to array
ID: 44273 User updated by: paulscheltema at gmail dot com Reported By: paulscheltema at gmail dot com -Status: Feedback +Status: Open Bug Type: Scripting Engine problem Operating System: Windows XP / Linux Debian PHP Version: 5.2.5 New Comment: I think the bug is that I CAN access private / protected class data at runtime which neglects the whole point of private or protected data inside classes. It is to be protected! Why else use private data if you can access it anyway? its useless then. its just obstruction instead of security. (security in terms of data integrity) On the positive side at least i can not change the data. And to refer to your reaction precisely, lets have two classes A and B A is instanciated and has a private property x which is set, class B casts class A to an array and gains access to class A's private property x. This is not directly about visibility but it allows class B to "view" class A's private property x. Previous Comments: [2008-03-03 13:41:02] [EMAIL PROTECTED] Private/protected is about visibility between _classes_ not with a class cast to an array. So what's the "bug" here? [2008-02-27 20:49:25] paulscheltema at gmail dot com Description: Hello dear developer(s), When i setup a simple class with a protected/private var, instanciate the class, and cast the instance to an array i can access the protected/private var. Reproduce code: --- class test { public $public = 'public'; private $private = 'private'; protected $protected = 'protected'; } $t = new test; $a = (array)$t; print 'public: '.$a['public']; print 'private: '.$a["\0test\0private"]; print 'protected: '.$a["\0*\0protected"]; Expected result: Expected: public: public Or at most an Error like: Cannot access private property test::$private as the value of the private property Actual result: -- Result: public: public private: private protected: protected -- Edit this bug report at http://bugs.php.net/?id=44273&edit=1
#44321 [NEW]: json_decode will not decode json string with chars like
From: vzeman at gmail dot com Operating system: Windows/Linux PHP version: 5.2.5 PHP Bug Type: JSON related Bug description: json_decode will not decode json string with chars like Description: json_decode will not decode string if in value is string like "" Reproduce code: --- try to decode string like this: {"params":[{"body":"Hello,Regards,"}]} Expected result: params object should contain entry body with text: Hello,Regards, Actual result: -- encoding will stop on character R -- Edit bug report at http://bugs.php.net/?id=44321&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44321&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44321&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44321&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44321&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44321&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44321&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=44321&r=needscript Try newer version:http://bugs.php.net/fix.php?id=44321&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=44321&r=support Expected behavior:http://bugs.php.net/fix.php?id=44321&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=44321&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=44321&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=44321&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44321&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=44321&r=dst IIS Stability:http://bugs.php.net/fix.php?id=44321&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=44321&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=44321&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=44321&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=44321&r=mysqlcfg
#44277 [Bgs]: when round() rounds a number -1
ID: 44277 User updated by: felix dot ospald at gmx dot de Reported By: felix dot ospald at gmx dot de Status: Bogus Bug Type: Math related Operating System: Windows XP PHP Version: 5.2.5 New Comment: Yes I was aware of the limited precision. But I'm still wondering if it is a good idea to have a positive and a negative zero as output of rounding operations that both should be mathematically the same zero which has noting to do with a limited float precision. Rounding is not like taking a left or right limit to the next integer. It also inherits problems in some cases e.g.: echo (((round(0.1).'EUR') == (round(-0.1).'EUR')) ? 'EQUAL' : 'NOT EQUAL'); gives: "NOT EQUAL" MATLAB for example also doesn't have a negative zero here. >> digits(32) >> sym(-0.1,'d') ans = -.1555111512312578 >> sym(round(-0.1),'d') ans = 0 >> Previous Comments: [2008-03-03 13:16:22] [EMAIL PROTECTED] # php -n -dprecision=32 -r '$a=-0.1; var_dump($a);var_dump(round($a));' float(-0.1555111512312578) float(-0) [2008-03-03 13:15:39] [EMAIL PROTECTED] Floating point values have a limited precision. Hence a value might not have the same string representation after any processing. That also includes writing a floating point value in your script and directly printing it without any mathematical operations. If you would like to know more about "floats" and what IEEE 754 is, read this: http://docs.sun.com/source/806-3568/ncg_goldberg.html Thank you for your interest in PHP. [2008-02-28 00:28:34] felix dot ospald at gmx dot de Description: This bug was already reported for Linux 3405 in 2000. Is this a bug or feature? Reproduce code: --- echo round(-0.1); Expected result: "0" Actual result: -- "-0" -- Edit this bug report at http://bugs.php.net/?id=44277&edit=1
#44319 [Opn]: Add access to actual query sent to DB
ID: 44319 Updated by: [EMAIL PROTECTED] Reported By: joe at digg dot com Status: Open -Bug Type: PDO related +Bug Type: Feature/Change Request Operating System: All PHP Version: 5.2.5 New Comment: Reclassified. Previous Comments: [2008-03-03 22:10:34] joe at digg dot com I just looked through the code. Looks like what I'm asking for is access to stmt->active_query_string which is in PDOStatement::execute()'s code. I'll poke around a bit more. I'd like access to it whether the statement executes successfully or not so it makes sense to expose it via a member variable. I can probably come up with a patch, but would want to do it in a way that'd actually get accepted. Thoughts? [2008-03-03 21:46:26] joe at digg dot com Description: PEAR's DB (and others?) has a property called DB::$last_query that gives access to the *actual* query sent to the database. For the life of me I can't find this functionality in PDO and it's insanely useful for logging, debugging, etc. I doubt it'd be a big deal to add. -- Edit this bug report at http://bugs.php.net/?id=44319&edit=1
#42625 [Com]: When mysql and mysqli enabled both together, php CLI hangs when ZTS is enabled
ID: 42625 Comment by: kalle at addikti dot net Reported By: jama at mk dot cvut dot cz Status: Assigned Bug Type: MySQL related Operating System: Gentoo/Linux PHP Version: 5.2.4 Assigned To: andrey New Comment: Hello, Sorry for spam. I should read this thread couple of times more. Problem will solve itself when you rename /lib/tls to /lib/tls.go.fuck.yourself Previous Comments: [2008-03-04 09:11:46] kalle at addikti dot net Hello, And one more thing. If I compile PHP without path to apxs the CLI will work. example: ./sapi/cli/php -v [2008-03-04 09:06:54] kalle at addikti dot net Hello, Has someone solve this problem? I just run to it, but I got little different opinion what is causing this. Or im 100% sure that problem is not mysql AND mysqli compiled same time. I have two identical server's OS: Debian Etch MySQL_config: 5.0.32 PHP 5.2.5 Bought server's PHP has compiled with same options.. './configure' \ '--includedir=/usr/include' \ '--prefix=/home/pete/wwwroot/php' \ '--with-apxs2=/home/pete/wwwroot/bin/apxs' \ '--with-config-file-path=/home/pete/wwwroot/php' \ '--with-mysql=/usr' \ '--with-pgsql' \ '--with-openssl' \ '--with-imap' \ '--with-imap-ssl' \ '--with-xpm-dir' \ '--with-mysqli=/usr/bin/mysql_config' \ '--enable-exif' \ '--enable-ftp' \ '--with-kerberos' \ '--with-mcrypt' \ '--with-gd' \ '--with-jpeg-dir=/usr/lib' \ '--with-png-dir=/usr/lib' \ '--with-mime-magic' \ '--with-zlib-dir=/usr/lib' \ '--with-pdo-mysql=/usr/bin/mysql_config' \ '--with-pdo-sqlite' \ '--with-xmlrpc' \ '--with-ttf' \ '--with-curl' \ '--with-mhash' \ '--enable-soap' \ '--enable-mbstring' \ '--enable-calendar' \ '--enable-gd-native-ttf' \ '--with-freetype-dir=/usr/src/freetype234' \ '--with-gettext' \ '--with-xsl' \ "$@" Funny think is that this work on other server and not on other. strace give me same error. I have also tried this with 5.2.6-RC1. It works on other and not on other. So my opinion is that this is not directly PHP problem but it has something to with some library?? Any help will be much pricieted. [2008-01-07 05:59:12] s dot s at terra dot com dot br It seems a pthread version bug. Checking with gdb the result is: Starting program: /usr/bin/php [Thread debugging using libthread_db enabled] [New Thread -1218722112 (LWP 24212)] [New Thread -1219249232 (LWP 24215)] [Thread -1219249232 (zombie) exited] Program received signal SIGINT, Interrupt. [Switching to Thread -1218722112 (LWP 24212)] 0xb7708fd9 in __lll_mutex_lock_wait () from /lib/tls/libpthread.so.0 And a backtrace: (gdb) bt #0 0xb7708fd9 in __lll_mutex_lock_wait () from /lib/tls/libpthread.so.0 #1 0xb7706a64 in _L_mutex_lock_22 () from /lib/tls/libpthread.so.0 #2 0xb7fadaa0 in _dl_runtime_resolve () from /lib/ld-linux.so.2 #3 0xb7da51a1 in my_thread_global_end () from /usr/local/mysql/lib/libmysqlclient_r.so.15 #4 0xb7da51a1 in my_thread_global_end () from /usr/local/mysql/lib/libmysqlclient_r.so.15 #5 0xb7da10b5 in my_end () from /usr/local/mysql/lib/libmysqlclient_r.so.15 #6 0xb7d9a27e in mysql_server_end () from /usr/local/mysql/lib/libmysqlclient_r.so.15 #7 0x081817eb in zm_shutdown_mysqli (type=1, module_number=23, tsrm_ls=0x8600050) at /usr/src/network/web/php-5.2.5/ext/mysqli/mysqli.c:676 #8 0x083236fe in module_destructor (module=0x863e220) at /usr/src/network/web/php-5.2.5/Zend/zend_API.c:1916 #9 0x08329519 in zend_hash_apply_deleter (ht=0x85ffb80, p=0x863e1f0) at /usr/src/network/web/php-5.2.5/Zend/zend_hash.c:611 #10 0x083295d7 in zend_hash_graceful_reverse_destroy (ht=0x85ffb80) at /usr/src/network/web/php-5.2.5/Zend/zend_hash.c:646 #11 0x0831e4dd in zend_shutdown (tsrm_ls=0x8600050) at /usr/src/network/web/php-5.2.5/Zend/zend.c:733 #12 0x082db92e in php_module_shutdown (tsrm_ls=0x8600050) at /usr/src/network/web/php-5.2.5/main/main.c:1887 ---Type to continue, or q to quit--- #13 0x083986b9 in main (argc=1, argv=0xbfc5d364) at /usr/src/network/web/php-5.2.5/sapi/cli/php_cli.c:1335 [2008-01-07 05:43:48] s dot s at terra dot com dot br Same problem since PHP 5.2.3. My site configuration: Distro: Slackware Linux 11.0 (will upgrade to 12.0 soon) # httpd -v Server version: Apache/2.2.6 (Unix) Server built: Dec 9 2007 18:54:29 # php -v PHP 5.2.5 (cli) (built: Dec 9 2007 21:25:26) Copyright (c) 1997-2007 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies # /usr/local/mysql/bin/mysql_config --version 5.0.41 --- PHP and Apache was compiled by me. MySQL is the default pre-compiled distribution from MySQL.com web site. Strace output on cli mode: lstat64("/r
#42625 [Com]: When mysql and mysqli enabled both together, php CLI hangs when ZTS is enabled
ID: 42625 Comment by: kalle at addikti dot net Reported By: jama at mk dot cvut dot cz Status: Assigned Bug Type: MySQL related Operating System: Gentoo/Linux PHP Version: 5.2.4 Assigned To: andrey New Comment: Hello, And one more thing. If I compile PHP without path to apxs the CLI will work. example: ./sapi/cli/php -v Previous Comments: [2008-03-04 09:06:54] kalle at addikti dot net Hello, Has someone solve this problem? I just run to it, but I got little different opinion what is causing this. Or im 100% sure that problem is not mysql AND mysqli compiled same time. I have two identical server's OS: Debian Etch MySQL_config: 5.0.32 PHP 5.2.5 Bought server's PHP has compiled with same options.. './configure' \ '--includedir=/usr/include' \ '--prefix=/home/pete/wwwroot/php' \ '--with-apxs2=/home/pete/wwwroot/bin/apxs' \ '--with-config-file-path=/home/pete/wwwroot/php' \ '--with-mysql=/usr' \ '--with-pgsql' \ '--with-openssl' \ '--with-imap' \ '--with-imap-ssl' \ '--with-xpm-dir' \ '--with-mysqli=/usr/bin/mysql_config' \ '--enable-exif' \ '--enable-ftp' \ '--with-kerberos' \ '--with-mcrypt' \ '--with-gd' \ '--with-jpeg-dir=/usr/lib' \ '--with-png-dir=/usr/lib' \ '--with-mime-magic' \ '--with-zlib-dir=/usr/lib' \ '--with-pdo-mysql=/usr/bin/mysql_config' \ '--with-pdo-sqlite' \ '--with-xmlrpc' \ '--with-ttf' \ '--with-curl' \ '--with-mhash' \ '--enable-soap' \ '--enable-mbstring' \ '--enable-calendar' \ '--enable-gd-native-ttf' \ '--with-freetype-dir=/usr/src/freetype234' \ '--with-gettext' \ '--with-xsl' \ "$@" Funny think is that this work on other server and not on other. strace give me same error. I have also tried this with 5.2.6-RC1. It works on other and not on other. So my opinion is that this is not directly PHP problem but it has something to with some library?? Any help will be much pricieted. [2008-01-07 05:59:12] s dot s at terra dot com dot br It seems a pthread version bug. Checking with gdb the result is: Starting program: /usr/bin/php [Thread debugging using libthread_db enabled] [New Thread -1218722112 (LWP 24212)] [New Thread -1219249232 (LWP 24215)] [Thread -1219249232 (zombie) exited] Program received signal SIGINT, Interrupt. [Switching to Thread -1218722112 (LWP 24212)] 0xb7708fd9 in __lll_mutex_lock_wait () from /lib/tls/libpthread.so.0 And a backtrace: (gdb) bt #0 0xb7708fd9 in __lll_mutex_lock_wait () from /lib/tls/libpthread.so.0 #1 0xb7706a64 in _L_mutex_lock_22 () from /lib/tls/libpthread.so.0 #2 0xb7fadaa0 in _dl_runtime_resolve () from /lib/ld-linux.so.2 #3 0xb7da51a1 in my_thread_global_end () from /usr/local/mysql/lib/libmysqlclient_r.so.15 #4 0xb7da51a1 in my_thread_global_end () from /usr/local/mysql/lib/libmysqlclient_r.so.15 #5 0xb7da10b5 in my_end () from /usr/local/mysql/lib/libmysqlclient_r.so.15 #6 0xb7d9a27e in mysql_server_end () from /usr/local/mysql/lib/libmysqlclient_r.so.15 #7 0x081817eb in zm_shutdown_mysqli (type=1, module_number=23, tsrm_ls=0x8600050) at /usr/src/network/web/php-5.2.5/ext/mysqli/mysqli.c:676 #8 0x083236fe in module_destructor (module=0x863e220) at /usr/src/network/web/php-5.2.5/Zend/zend_API.c:1916 #9 0x08329519 in zend_hash_apply_deleter (ht=0x85ffb80, p=0x863e1f0) at /usr/src/network/web/php-5.2.5/Zend/zend_hash.c:611 #10 0x083295d7 in zend_hash_graceful_reverse_destroy (ht=0x85ffb80) at /usr/src/network/web/php-5.2.5/Zend/zend_hash.c:646 #11 0x0831e4dd in zend_shutdown (tsrm_ls=0x8600050) at /usr/src/network/web/php-5.2.5/Zend/zend.c:733 #12 0x082db92e in php_module_shutdown (tsrm_ls=0x8600050) at /usr/src/network/web/php-5.2.5/main/main.c:1887 ---Type to continue, or q to quit--- #13 0x083986b9 in main (argc=1, argv=0xbfc5d364) at /usr/src/network/web/php-5.2.5/sapi/cli/php_cli.c:1335 [2008-01-07 05:43:48] s dot s at terra dot com dot br Same problem since PHP 5.2.3. My site configuration: Distro: Slackware Linux 11.0 (will upgrade to 12.0 soon) # httpd -v Server version: Apache/2.2.6 (Unix) Server built: Dec 9 2007 18:54:29 # php -v PHP 5.2.5 (cli) (built: Dec 9 2007 21:25:26) Copyright (c) 1997-2007 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies # /usr/local/mysql/bin/mysql_config --version 5.0.41 --- PHP and Apache was compiled by me. MySQL is the default pre-compiled distribution from MySQL.com web site. Strace output on cli mode: lstat64("/root", {st_mode=S_IFDIR|0710, st_size=1176, ...}) = 0 lstat64("/root/-", 0xbfcb65fc) = -1 ENOENT (No such file or directory) ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0 fstat64(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...
#42625 [Com]: When mysql and mysqli enabled both together, php CLI hangs when ZTS is enabled
ID: 42625 Comment by: kalle at addikti dot net Reported By: jama at mk dot cvut dot cz Status: Assigned Bug Type: MySQL related Operating System: Gentoo/Linux PHP Version: 5.2.4 Assigned To: andrey New Comment: Hello, Has someone solve this problem? I just run to it, but I got little different opinion what is causing this. Or im 100% sure that problem is not mysql AND mysqli compiled same time. I have two identical server's OS: Debian Etch MySQL_config: 5.0.32 PHP 5.2.5 Bought server's PHP has compiled with same options.. './configure' \ '--includedir=/usr/include' \ '--prefix=/home/pete/wwwroot/php' \ '--with-apxs2=/home/pete/wwwroot/bin/apxs' \ '--with-config-file-path=/home/pete/wwwroot/php' \ '--with-mysql=/usr' \ '--with-pgsql' \ '--with-openssl' \ '--with-imap' \ '--with-imap-ssl' \ '--with-xpm-dir' \ '--with-mysqli=/usr/bin/mysql_config' \ '--enable-exif' \ '--enable-ftp' \ '--with-kerberos' \ '--with-mcrypt' \ '--with-gd' \ '--with-jpeg-dir=/usr/lib' \ '--with-png-dir=/usr/lib' \ '--with-mime-magic' \ '--with-zlib-dir=/usr/lib' \ '--with-pdo-mysql=/usr/bin/mysql_config' \ '--with-pdo-sqlite' \ '--with-xmlrpc' \ '--with-ttf' \ '--with-curl' \ '--with-mhash' \ '--enable-soap' \ '--enable-mbstring' \ '--enable-calendar' \ '--enable-gd-native-ttf' \ '--with-freetype-dir=/usr/src/freetype234' \ '--with-gettext' \ '--with-xsl' \ "$@" Funny think is that this work on other server and not on other. strace give me same error. I have also tried this with 5.2.6-RC1. It works on other and not on other. So my opinion is that this is not directly PHP problem but it has something to with some library?? Any help will be much pricieted. Previous Comments: [2008-01-07 05:59:12] s dot s at terra dot com dot br It seems a pthread version bug. Checking with gdb the result is: Starting program: /usr/bin/php [Thread debugging using libthread_db enabled] [New Thread -1218722112 (LWP 24212)] [New Thread -1219249232 (LWP 24215)] [Thread -1219249232 (zombie) exited] Program received signal SIGINT, Interrupt. [Switching to Thread -1218722112 (LWP 24212)] 0xb7708fd9 in __lll_mutex_lock_wait () from /lib/tls/libpthread.so.0 And a backtrace: (gdb) bt #0 0xb7708fd9 in __lll_mutex_lock_wait () from /lib/tls/libpthread.so.0 #1 0xb7706a64 in _L_mutex_lock_22 () from /lib/tls/libpthread.so.0 #2 0xb7fadaa0 in _dl_runtime_resolve () from /lib/ld-linux.so.2 #3 0xb7da51a1 in my_thread_global_end () from /usr/local/mysql/lib/libmysqlclient_r.so.15 #4 0xb7da51a1 in my_thread_global_end () from /usr/local/mysql/lib/libmysqlclient_r.so.15 #5 0xb7da10b5 in my_end () from /usr/local/mysql/lib/libmysqlclient_r.so.15 #6 0xb7d9a27e in mysql_server_end () from /usr/local/mysql/lib/libmysqlclient_r.so.15 #7 0x081817eb in zm_shutdown_mysqli (type=1, module_number=23, tsrm_ls=0x8600050) at /usr/src/network/web/php-5.2.5/ext/mysqli/mysqli.c:676 #8 0x083236fe in module_destructor (module=0x863e220) at /usr/src/network/web/php-5.2.5/Zend/zend_API.c:1916 #9 0x08329519 in zend_hash_apply_deleter (ht=0x85ffb80, p=0x863e1f0) at /usr/src/network/web/php-5.2.5/Zend/zend_hash.c:611 #10 0x083295d7 in zend_hash_graceful_reverse_destroy (ht=0x85ffb80) at /usr/src/network/web/php-5.2.5/Zend/zend_hash.c:646 #11 0x0831e4dd in zend_shutdown (tsrm_ls=0x8600050) at /usr/src/network/web/php-5.2.5/Zend/zend.c:733 #12 0x082db92e in php_module_shutdown (tsrm_ls=0x8600050) at /usr/src/network/web/php-5.2.5/main/main.c:1887 ---Type to continue, or q to quit--- #13 0x083986b9 in main (argc=1, argv=0xbfc5d364) at /usr/src/network/web/php-5.2.5/sapi/cli/php_cli.c:1335 [2008-01-07 05:43:48] s dot s at terra dot com dot br Same problem since PHP 5.2.3. My site configuration: Distro: Slackware Linux 11.0 (will upgrade to 12.0 soon) # httpd -v Server version: Apache/2.2.6 (Unix) Server built: Dec 9 2007 18:54:29 # php -v PHP 5.2.5 (cli) (built: Dec 9 2007 21:25:26) Copyright (c) 1997-2007 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies # /usr/local/mysql/bin/mysql_config --version 5.0.41 --- PHP and Apache was compiled by me. MySQL is the default pre-compiled distribution from MySQL.com web site. Strace output on cli mode: lstat64("/root", {st_mode=S_IFDIR|0710, st_size=1176, ...}) = 0 lstat64("/root/-", 0xbfcb65fc) = -1 ENOENT (No such file or directory) ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0 fstat64(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fbe000 read(0, "", 1024) = 0 close(0)= 0 munmap(0xb7fbe000, 4096)= 0 munmap(0x