#40304 [NEW]: Round() function strange issue
From: tjouanne at hotmail dot com Operating system: Linux and windows PHP version: 4.4.4 PHP Bug Type: *General Issues Bug description: Round() function strange issue Description: round number with round() function give strange result: 9.815,609.815,4690.815,14609.815,6.735,56.735,1056.735,11056.735 produce 9.82 609.82 4609.81 14609.82 6.74 56.74 1056.73 11056.74 Why it's become 81 or 73 instead of 82 or 74 Reproduce code: --- ? echo (round(9.815, 2).BR); echo (round(609.815, 2).BR); echo (round(4609.815, 2).BR); echo (round(14609.815, 2).BR); echo (round(6.735, 2).BR); echo (round(56.735, 2).BR); echo (round(1056.735, 2).BR); echo (round(11056.735, 2).BR); ? Expected result: 9.82 609.82 4609.82 14609.82 6.74 56.74 1056.74 11056.74 Actual result: -- 9.82 609.82 4609.81 14609.82 6.74 56.74 1056.73 11056.74 -- Edit bug report at http://bugs.php.net/?id=40304edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40304r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40304r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40304r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40304r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40304r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40304r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=40304r=needscript Try newer version:http://bugs.php.net/fix.php?id=40304r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40304r=support Expected behavior:http://bugs.php.net/fix.php?id=40304r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40304r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40304r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40304r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40304r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40304r=dst IIS Stability:http://bugs.php.net/fix.php?id=40304r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40304r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40304r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40304r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=40304r=mysqlcfg
#40291 [Csd-Bgs]: glibc detected - double free or corruption - on fclose for socket
ID: 40291 Updated by: [EMAIL PROTECTED] Reported By: razzul69 at yahoo dot com -Status: Closed +Status: Bogus Bug Type: OpenSSL related Operating System: Fedora Core 6 PHP Version: 5.2.0 Previous Comments: [2007-01-31 23:38:42] razzul69 at yahoo dot com closing [2007-01-30 22:05:28] razzul69 at yahoo dot com That seemed to fix it. I will try it with the new mysql build. My apologies for not finding this my self. [2007-01-30 21:45:22] [EMAIL PROTECTED] Please try building PHP without MySQL and see if that helps. If it does, than you're facing a problem described here: http://bugs.mysql.com/bug.php?id=19817 [2007-01-30 21:44:53] razzul69 at yahoo dot com #0 0x00c83402 in ?? () #1 0x0016dd40 in raise () from /lib/libc.so.6 #2 0x0016f591 in abort () from /lib/libc.so.6 #3 0x001a333b in __libc_message () from /lib/libc.so.6 #4 0x001ab09d in _int_free () from /lib/libc.so.6 #5 0x001ae6f0 in free () from /lib/libc.so.6 #6 0x006a452a in CRYPTO_free () from /lib/libcrypto.so.6 #7 0x0071bd8d in ASN1_STRING_free () from /lib/libcrypto.so.6 #8 0x00712a75 in ASN1_primitive_free () from /lib/libcrypto.so.6 #9 0x00712ad2 in ASN1_primitive_free () from /lib/libcrypto.so.6 #10 0x00712d51 in ASN1_primitive_free () from /lib/libcrypto.so.6 #11 0x00712e2b in ASN1_template_free () from /lib/libcrypto.so.6 #12 0x00712d31 in ASN1_primitive_free () from /lib/libcrypto.so.6 #13 0x00712e2b in ASN1_template_free () from /lib/libcrypto.so.6 #14 0x00712d31 in ASN1_primitive_free () from /lib/libcrypto.so.6 #15 0x00712e73 in ASN1_item_free () from /lib/libcrypto.so.6 #16 0x0070d887 in X509_free () from /lib/libcrypto.so.6 #17 0x006f5e83 in sk_pop_free () from /lib/libcrypto.so.6 #18 0x00b08218 in ssl_sess_cert_free () from /lib/libssl.so.6 #19 0x00b08e85 in SSL_SESSION_free () from /lib/libssl.so.6 #20 0x00b0688d in SSL_free () from /lib/libssl.so.6 #21 0x080b760d in php_openssl_sockop_close (stream=0x960fff8, close_handle=1) at /usr/src/php-5.2.0/ext/openssl/xp_ssl.c:259 #22 0x08283604 in _php_stream_free (stream=0x960fff8, close_options=11) at /usr/src/php-5.2.0/main/streams/streams.c:342 #23 0x08283867 in stream_resource_regular_dtor (rsrc=0x96100a8) at /usr/src/php-5.2.0/main/streams/streams.c:1365 #24 0x082bf503 in list_entry_destructor (ptr=0x96100a8) at /usr/src/php-5.2.0/Zend/zend_list.c:184 #25 0x082be991 in zend_hash_del_key_or_index (ht=0x8580e20, arKey=value optimized out, nKeyLength=0, h=4, flag=1) at /usr/src/php-5.2.0/Zend/zend_hash.c:492 #26 0x082bf79a in _zend_list_delete (id=4) at /usr/src/php-5.2.0/Zend/zend_list.c:58 #27 0x0820c654 in zif_fclose (ht=1, return_value=0x9610a1c, return_value_ptr=0x0, this_ptr=0x0, return_value_used=0) at /usr/src/php-5.2.0/ext/standard/file.c:872 #28 0x082e10b0 in zend_do_fcall_common_helper_SPEC (execute_data=0xbff84c7c) at /usr/src/php-5.2.0/Zend/zend_vm_execute.h:200 #29 0x082d106d in execute (op_array=0x960fa1c) at /usr/src/php-5.2.0/Zend/zend_vm_execute.h:92 #30 0x082b2424 in zend_execute_scripts (type=8, retval=value optimized out, file_count=3) at /usr/src/php-5.2.0/Zend/zend.c:1097 #31 0x0826df53 in php_execute_script (primary_file=0xbff870e0) at /usr/src/php-5.2.0/main/main.c:1758 #32 0x08335bec in main (argc=2, argv=0xbff871f4) at /usr/src/php-5.2.0/sapi/cli/php_cli.c:1108 [2007-01-30 21:41:36] razzul69 at yahoo dot com Description: glibc detected - double free or corruption - on fclose for socket code will work fine through the web interface, however, will not work from the command line will get double free or corruption when issuing fclose or when php does the automatic fclose at the end. It will only be an issue for very few blades, however, when it is an issue, it is reproducible 100% of the time. When it does not work, one thought is it might be when the blade on the other end closes the connection ahead of time. ./configure --prefix=/usr/local/php --with-config-file-path=/etc/php.d --with-zlib --with-apxs2=/etc/httpd/bin/apxs --enable-magic-quotes --enable-sockets --with-openssl --enable-magic-quotes --with-mysql=/usr/local/mysql --enable-debug Reproduce code: --- #!/usr/src/php-5.2.0/sapi/cli/php ?php $ip = ''; $username = ''; $password = ''; $ilo_xml ='RIBCL VERSION=2.0 LOGIN USER_LOGIN=' . $username . ' PASSWORD=' . $password . ' RIB_INFO MODE=read GET_FW_VERSION/ /RIB_INFO /LOGIN /RIBCL'; $ssl_handle = @fsockopen ('ssl://' . $ip, 443, $error_number, $error_text, 10); $split_ilo_xml = split (\n, $ilo_xml); stream_set_timeout ($ssl_handle, 10); fwrite ($ssl_handle, '?xml
#38238 [NoF]: PHP with PEAR running on IIS
ID: 38238 Updated by: [EMAIL PROTECTED] Reported By: rmarescu at gmail dot com Status: No Feedback Bug Type: IIS related Operating System: MS Windows Server 2003 PHP Version: 5.1.4 New Comment: Upgrade to the latest stable version. Previous Comments: [2007-02-01 07:02:25] shinijin at mail dot ru PHP has encountered an Access Violation at 7C8224B PHP 5.1.4 Win IIS MySQL Curent bug apears during the HTML pages generation from php. Is there any progress on this issue? [2006-10-10 20:43:49] chavousc at gmail dot com I, too, am receiving access violation 7C8224B2 on IIS using the ISAPI module. It only starts to occur after the site has been running for a few hours to a few days... I'm running PHP version 5.1.6 mysql 5.0.24-community-nt Win2k3/IIS/ISAPI module I will happily assist however I can. I'm not sure if I'll be able to get the backtrace on my production machine, but if you think it will help, I will try! [2006-09-25 19:45:53] webmaster at impactbs dot com Just as a follow up, switching to CGI has stabilized the site but it's running more slowly. [2006-09-23 06:27:03] webmaster at impactbs dot com IIS 6 Win2003 SP1 standard PHP 5.1.6 ISAPI The site is running Invision Power Board 2.7 in it's own application pool using the MSSQL driver. I'm getting the same error: PHP has encountered an Access Violation at 7C8224B2 Intermittently on a forum that's actively serving 30-80 at a given time but this error also happened before the DNS was even pointed to the site (basically it started just after I installed PHP 5 on the server that didn't have PHP on it before the site was hosted on it). I think you're already aware of the problem but if I can provide anymore information let me know. I'm going to move to the CGI version which apparently is more stable under IIS. [2006-08-05 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. 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/38238 -- Edit this bug report at http://bugs.php.net/?id=38238edit=1
#40304 [Opn-Bgs]: Round() function strange issue
ID: 40304 Updated by: [EMAIL PROTECTED] Reported By: tjouanne at hotmail dot com -Status: Open +Status: Bogus Bug Type: *General Issues Operating System: Linux and windows PHP Version: 4.4.4 New Comment: 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. . Previous Comments: [2007-02-01 10:02:13] tjouanne at hotmail dot com Description: round number with round() function give strange result: 9.815,609.815,4690.815,14609.815,6.735,56.735,1056.735,11056.735 produce 9.82 609.82 4609.81 14609.82 6.74 56.74 1056.73 11056.74 Why it's become 81 or 73 instead of 82 or 74 Reproduce code: --- ? echo (round(9.815, 2).BR); echo (round(609.815, 2).BR); echo (round(4609.815, 2).BR); echo (round(14609.815, 2).BR); echo (round(6.735, 2).BR); echo (round(56.735, 2).BR); echo (round(1056.735, 2).BR); echo (round(11056.735, 2).BR); ? Expected result: 9.82 609.82 4609.82 14609.82 6.74 56.74 1056.74 11056.74 Actual result: -- 9.82 609.82 4609.81 14609.82 6.74 56.74 1056.73 11056.74 -- Edit this bug report at http://bugs.php.net/?id=40304edit=1
#35848 [Com]: Failing when including --with-mysql
ID: 35848 Comment by: milnivlek at gmail dot com Reported By: shawn dot richards at ink dot ltd dot uk Status: No Feedback Bug Type: MySQL related Operating System: Mac OS X Tiger. PHP Version: 5CVS-2005-12-30 (snap) Assigned To: andrey New Comment: I think I've figured out the definitive solution for this problem (at least for most people): If you're building PHP for an x86 server, this problem apparently always occur when you use the 'Linux (x86, glibc-2.2, standard is static)' binary distribution from the MySQL download page. Simply use the 'Linux (x86)' distribution instead, and the problem should go away. (The 'Intel C/C++ compiled' version doesn't seem to work either, so stick with the regular one.) Hope this helps. Previous Comments: [2007-01-29 18:00:55] colin dot anderson at red-man dot com You're getting this problem because the MySQL binaries do not come with certain libraries that are created when you build from source on INTEL systems. To resolve this problem, you need to download the appropriate libraries. Visit http://dev.mysql.com/downloads/os-linux.html And grab the appropriate library for your server. All of the latest MySQL releases are compiled with the ICC9 libraries; so grab those for your appropriate architecture. This should solve your problems; as stated repeatedly above, --WITH-MYSQL-DIR[=DIR] WILL NOT WORK. :P [2007-01-09 20:14:56] dweller at devonweller dot com I experienced this same problem on Mac OS X 10.4 with the 64 bit package of MySQL 5.0.27. I installed the 32-bit version of MySQL 5.0.27. After that, the php compilation worked successfully. [2006-11-21 16:43:33] nicolasboulet at maisonlaprise dot com Thanks alot! The with-mysql-dir= command also fixed my problem on Suse Linux 10.1. Many thanks! Nicolas [2006-11-17 14:25:21] furyx001 at umn dot edu Has there been any update on the status of this? I was able to reproduce this as well on OS 10.4.8 Server using the 64 bit edition of MySQL (which I installed from a package). [2006-10-29 23:30:25] davxoc at hotmail dot com Hi everybody!!!, I had the same problem, but looking for and answer I found two things that can help me to solve it... The first one is located on http://lists.mysql.com/internals/34023 On this link explain which is the problem of integration of mysql, and give an answer ... http://dev.mysql.com/downloads/os-linux.html I had to download the libraries, after tried a lot, and reading the man's help from php config file (configure --help), found the solution. Finally those are the lines to compile my LAMP AND LAPP framework's ./configure --prefix=/usr/local/php5 --with-apxs2=/usr/local/web/bin/apxs --enable-sockets --with-config-file-path=/usr/local/php5 --with-mysql-dir=/usr/local/mysql --with-pgsql=/usr/local/pgsql --with-zlib-dir=/usr/local/zlib-1.2.3 --with-libdir=/usr/local/intel-icc8-libs-8.1-i386 and tha's all!!! I hope that can help!!... 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/35848 -- Edit this bug report at http://bugs.php.net/?id=35848edit=1
#40304 [Bgs]: Round() function strange issue
ID: 40304 User updated by: tjouanne at hotmail dot com Reported By: tjouanne at hotmail dot com Status: Bogus Bug Type: *General Issues Operating System: Linux and windows PHP Version: 4.4.4 New Comment: Do you know if there is a function in php who works correctly for this need? Previous Comments: [2007-02-01 10:13: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. . [2007-02-01 10:02:13] tjouanne at hotmail dot com Description: round number with round() function give strange result: 9.815,609.815,4690.815,14609.815,6.735,56.735,1056.735,11056.735 produce 9.82 609.82 4609.81 14609.82 6.74 56.74 1056.73 11056.74 Why it's become 81 or 73 instead of 82 or 74 Reproduce code: --- ? echo (round(9.815, 2).BR); echo (round(609.815, 2).BR); echo (round(4609.815, 2).BR); echo (round(14609.815, 2).BR); echo (round(6.735, 2).BR); echo (round(56.735, 2).BR); echo (round(1056.735, 2).BR); echo (round(11056.735, 2).BR); ? Expected result: 9.82 609.82 4609.82 14609.82 6.74 56.74 1056.74 11056.74 Actual result: -- 9.82 609.82 4609.81 14609.82 6.74 56.74 1056.73 11056.74 -- Edit this bug report at http://bugs.php.net/?id=40304edit=1
#40300 [Opn-Bgs]: Calling a function on a newly created object doesn't work
ID: 40300 Updated by: [EMAIL PROTECTED] Reported By: finalvoid at gmail dot com -Status: Open +Status: Bogus Bug Type: Class/Object related Operating System: Windows XP PHP Version: 5.2.0 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 This syntax is simply not supported. Previous Comments: [2007-02-01 00:28:12] finalvoid at gmail dot com Description: Calling a function on a newly created object requires saving the object to a variable. Script that clarifies what I'm trying to say: class C { public function __construct() {} public function f() { return 1234; } }; $y = (new C())-f(); print($y); The above doesn't work. However, it does work if you replace the penultimate line with $x = new C(); $y = $x-f(); If we add parentheses around the $x, i.e. $y = ($x)-f(); then it still doesn't work. This and bug report #9587 indicate that the actual underlying cause is that object-valued variables are implemented, but object-valued expressions are not. Although the this is not a bug comment on the above-cited bug report #9587 did not include a rationale, it's difficult for me to decide whether it applies here as well; maybe this bug report should actually be a feature request? Personally, as a PHP rookie but Java veteran, I would say that object-valued expressions SHOULD work, and they DON'T, therefore it's a BUG. Thanks! Reproduce code: --- class C { public function __construct() {} public function f() { return 1234; } }; $y = (new C())-f(); print($y); Expected result: 1234 Actual result: -- Parse error: parse error, unexpected T_OBJECT_OPERATOR in c:\path\test.php on line 5 -- Edit this bug report at http://bugs.php.net/?id=40300edit=1
#40302 [Opn-Bgs]: PHP module compiled with different version API
ID: 40302 Updated by: [EMAIL PROTECTED] Reported By: mcrogerm at stjohn dot ac dot th -Status: Open +Status: Bogus Bug Type: Unknown/Other Function Operating System: Win2k Pro PHP Version: 5CVS-2007-02-01 (snap) New Comment: Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. It says: PHP Warning: PHP Startup: dbg: Unable to initialize module dbg is an external extension that you need to update as well. Previous Comments: [2007-02-01 07:56:36] mcrogerm at stjohn dot ac dot th Description: After I installed ver. 5.2.0, I found a warning message on the command line. I downloaded and installed the latest snapshot version, and the error message is the same except for the version number. I checked, and the file date on php5ts.dll is 2/1/2007, the same as on php.exe. Reproduce code: --- c:\PHPphp --version Expected result: PHP 5.2.1RC5-dev (cli) (built: Feb 1 2007 04:24:39) Copyright (c) 1997-2007 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies Actual result: -- PHP Warning: PHP Startup: dbg: Unable to initialize module Module compiled with module API=20050922, debug=0, thread-safety=1 PHPcompiled with module API=20060613, debug=0, thread-safety=1 These options need to match in Unknown on line 0 PHP 5.2.1RC5-dev (cli) (built: Feb 1 2007 04:24:39) Copyright (c) 1997-2007 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies -- Edit this bug report at http://bugs.php.net/?id=40302edit=1
#33698 [Com]: Conflicts with multiple interfaces sharing common method names
ID: 33698 Comment by: mail at rones dot de Reported By: jason at hybd dot net Status: Suspended Bug Type: Feature/Change Request Operating System: * PHP Version: 5.0.4 New Comment: Is there someone thinking (or even working) on this issue? It is really important if you want to use different 3rd party components which provides interfaces you have to implement to use the components and there exists some methods _with the same signature_ more than once. In case of different signatures I can understand there would occur problems because PHP does not have an method overloading possibility yet. Previous Comments: [2005-07-15 14:13:13] [EMAIL PROTECTED] FWIW, I agree; I think our interface support is pretty crappy because of this. I'm changing this to suspended status, because maybe one day it will appear, it's just not possible at the moment. [2005-07-15 13:57:10] jason at hybd dot net I know PHP != Java, but surely this sort of stuff should be documented? Most people will expect interfaces to work like Java interfaces or C++ interfaces (Pure virtual abstract methods), as many other languages seem to follow this behaviour. As I said this is debatable as it depends how you look at things, and likewise it is fairly easy to work round this issue. [2005-07-15 12:44:04] [EMAIL PROTECTED] PHP != Java [2005-07-14 17:35:15] jason at hybd dot net Description: This is debateable if this is a bug or not. Personally, I don't regard it as a bug. Classes that implement 1 interface that share common methods raise fatal errors. Because of the abstract nature of interfaces, no error or warning should be rasied. I know PHP Java, but Java doesn't raise any errors, and PHP5's OO model is very close to Java's Reproduce code: --- interface FirstInterface { function execute(); } interface SecondInterface { function execute(); } class MyClass implements FirstInterface, SecondInterface { function execute() { echo Hello World; } } $obj = new MyClass(); $obj-execute(); Expected result: Hello World Actual result: -- Can't inherit abstract function SecondInterface::execute() -- Edit this bug report at http://bugs.php.net/?id=33698edit=1
#30013 [Com]: squirrelmail not opening bigger than 1 mb mail
ID: 30013 Comment by: nirmalasoftex_co at rediffmail dot com Reported By: vikasaggarwal78 at yahoo dot com Status: No Feedback Bug Type: Unknown/Other Function Operating System: UNIX PHP Version: Irrelevant New Comment: I want to load the squirrel mail in my server kindly help me out in this regards and let me know the procedure how to link the squirrel mail with our server Thanks Piyush banka Previous Comments: [2004-09-23 01:00:02] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to Open. [2004-09-07 19:57:07] [EMAIL PROTECTED] Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to Open. Thank you for your interest in PHP. [2004-09-07 19:49:23] vikasaggarwal78 at yahoo dot com Description: We have installed squirrelmail on our server.. We then have it customized as per the our requirements.. We recently noticed that it is not opening up any mail bigger than 1 MB .. This could have been a squirelmail issue but then we decided to check it out... We had our older version existing and we opened the same mail there.. and woosh, it opened.. I am not sure where to put this problem (apache forum / squirrelmail / php) .. and actually trying all three... You can check the same at http://qmail.intermesh.net/webmailnew http://qmail.intermesh.net/webmailold user : [EMAIL PROTECTED] pass : 12345 Then check both mails in Vikas folder.. May be someone has already faced this one.. But i was unable to locate in your forums.. Thanks -- Edit this bug report at http://bugs.php.net/?id=30013edit=1
#39213 [Com]: NULL == '' in mssql extention
ID: 39213 Comment by: frode at coretrek dot com Reported By: frediano dot ziglio at vodafone dot com Status: Assigned Bug Type: MSSQL related Operating System: Linux PHP Version: 5.1.6 Assigned To: fmk New Comment: We're running into the same issue. Is the patch that was provided by the bug reporter planned for inclusion in a future release? Previous Comments: [2006-10-20 19:13:54] frediano dot ziglio at vodafone dot com Mmm... perhaps a less invasive change is to add if (data == 0) { ZVAL_NULL(result); return; } after char *data = charcol(offset); line on the same function. [2006-10-20 19:08:15] frediano dot ziglio at vodafone dot com Here you are a simplified version. It require a db but it create the only table it needs and delete it. Expected result: got -- ?php $conn = mssql_connect(server,user,pass) or die(opps); mssql_query(CREATE TABLE #tmp(c VARCHAR(10) NULL), $conn) or die(error querying); mssql_query(INSERT INTO #tmp VALUES(''), $conn) or die(error querying); $res = mssql_query(SELECT * FROM #tmp, $conn) or die(query); $row = mssql_fetch_assoc($res); $s = is_null($row['c']) ? 'NULL' : $row['c']; echo got -$s-\n; ? In http://cvs.php.net/viewvc.cgi/php-src/ext/mssql/php_mssql.c?view=markup you have if (dbdatlen(mssql_ptr-link,offset) == 0) { however in order to fix the problem should be if (dbdatlen(mssql_ptr-link,offset) == 0 dbdata(mssql_ptr-link,offset) == NULL) { note that under Windows Microsoft dblib use only older wire protocol version which do not support empty string so it returns them as a single space. [2006-10-20 15:25:38] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with ?php and ends with ?, is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. [2006-10-20 15:16:45] frediano dot ziglio at vodafone dot com Description: when you get data you assume NULL if dbdatlen == 0 however is possible that data is just an empty string (''), in this case you should check that dbdatlen == 0 and dbdata == NULL. Reproduce code: --- I use this test script (pwd.inc define just variable to connect) ?php // $Id: null.php,v 1.2 2006/10/20 14:38:22 freddy77 Exp $ require_once(pwd.inc); $conn = mssql_connect($server,$user,$pass) or die(opps); mssql_query(CREATE TABLE #MyTable ( myfield VARCHAR(10) NULL, n INT ), $conn) or die(error querying); mssql_query(INSERT INTO #MyTable VALUES('',1) INSERT INTO #MyTable VALUES(NULL,2) INSERT INTO #MyTable VALUES(' ',3) INSERT INTO #MyTable VALUES('a',4), $conn) or die(error querying); $result = 0; function test($sql, $expected) { global $conn, $result; $res = mssql_query($sql, $conn) or die(query); $row = mssql_fetch_assoc($res); $s = $row['myfield']; if (is_null($s)) $s = '(NULL)'; else if ($s == '') $s = '(Empty String)'; else $s = '.str_replace(', '', $s).'; echo $sql - $s\n; if ($s != $expected) { echo error!\n; $result = 1; } } test(SELECT top 1 * FROM #MyTable WHERE n = 1 -- '', (Empty String)); test(SELECT top 1 * FROM #MyTable WHERE n = 2 -- NULL, (NULL)); test(SELECT top 1 * FROM #MyTable WHERE n = 3 -- ' ', ' '); test(SELECT top 1 * FROM #MyTable WHERE n = 4 -- 'a', 'a'); exit($result); ? Expected result: SELECT top 1 * FROM #MyTable WHERE n = 1 -- '' - (Empty String) SELECT top 1 * FROM #MyTable WHERE n = 2 -- NULL - (NULL) SELECT top 1 * FROM #MyTable WHERE n = 3 -- ' ' - ' ' SELECT top 1 * FROM #MyTable WHERE n = 4 -- 'a' - 'a' Actual result: -- SELECT top 1 * FROM #MyTable WHERE n = 1 -- '' - (NULL) error! SELECT top 1 * FROM #MyTable WHERE n = 2 -- NULL - (NULL) SELECT top 1 * FROM #MyTable WHERE n = 3 -- ' ' - ' ' SELECT top 1 * FROM #MyTable WHERE n = 4 -- 'a' - 'a' -- Edit this bug report at http://bugs.php.net/?id=39213edit=1
#40306 [NEW]: Insatallation Error
From: yechi2001 at hotmail dot com Operating system: Windows XP Pro PHP version: 5.2.0 PHP Bug Type: *Configuration Issues Bug description: Insatallation Error Description: When ever I use the windows installer edition of the PHP 5.2.0 version It does not installl fully. I get an error message telling me that the was a package which is damaged which is part of the PHP package and the intallation is ended prematurly. I have tried severla mirrors from usa and uk and I get the same result. -- Edit bug report at http://bugs.php.net/?id=40306edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40306r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40306r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40306r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40306r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40306r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40306r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=40306r=needscript Try newer version:http://bugs.php.net/fix.php?id=40306r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40306r=support Expected behavior:http://bugs.php.net/fix.php?id=40306r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40306r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40306r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40306r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40306r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40306r=dst IIS Stability:http://bugs.php.net/fix.php?id=40306r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40306r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40306r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40306r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=40306r=mysqlcfg
#40306 [Opn-Fbk]: Insatallation Error
ID: 40306 Updated by: [EMAIL PROTECTED] Reported By: yechi2001 at hotmail dot com -Status: Open +Status: Feedback Bug Type: *Configuration Issues Operating System: Windows XP Pro PHP Version: 5.2.0 New Comment: Please try http://downloads.php.net/edink/php-5.2.1RC4-win32-installer.msi Previous Comments: [2007-02-01 16:11:30] yechi2001 at hotmail dot com Description: When ever I use the windows installer edition of the PHP 5.2.0 version It does not installl fully. I get an error message telling me that the was a package which is damaged which is part of the PHP package and the intallation is ended prematurly. I have tried severla mirrors from usa and uk and I get the same result. -- Edit this bug report at http://bugs.php.net/?id=40306edit=1
#40308 [NEW]: RFC822 constant not RFC conform
From: thomas dot weidner at gmx dot at Operating system: all PHP version: 5.2.0 PHP Bug Type: Date/time related Bug description: RFC822 constant not RFC conform Description: The DATE_RFC822 constant produces not RFC822 conform output. RFC822 standard only defines the +xx00, GMT and american abbreviated constants. But not CET and all other timezone abbreviations. For worldwide RFC conform output +xx00 should be used instead of timezone abbreviation. Reproduce code: --- date_default_timezone_set('Europe/Vienna'); print \n.date(DATE_RFC822); Expected result: Thu, 01 Feb 2007 19:38:55 +0100 Actual result: -- Thu, 01 Feb 2007 19:38:55 CET -- Edit bug report at http://bugs.php.net/?id=40308edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40308r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40308r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40308r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40308r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40308r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40308r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=40308r=needscript Try newer version:http://bugs.php.net/fix.php?id=40308r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40308r=support Expected behavior:http://bugs.php.net/fix.php?id=40308r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40308r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40308r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40308r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40308r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40308r=dst IIS Stability:http://bugs.php.net/fix.php?id=40308r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40308r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40308r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40308r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=40308r=mysqlcfg
#40308 [Opn-Fbk]: RFC822 constant not RFC conform
ID: 40308 Updated by: [EMAIL PROTECTED] Reported By: thomas dot weidner at gmx dot at -Status: Open +Status: Feedback Bug Type: Date/time related Operating System: all PHP Version: 5.2.0 New Comment: 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 Previous Comments: [2007-02-01 18:46:35] thomas dot weidner at gmx dot at Description: The DATE_RFC822 constant produces not RFC822 conform output. RFC822 standard only defines the +xx00, GMT and american abbreviated constants. But not CET and all other timezone abbreviations. For worldwide RFC conform output +xx00 should be used instead of timezone abbreviation. Reproduce code: --- date_default_timezone_set('Europe/Vienna'); print \n.date(DATE_RFC822); Expected result: Thu, 01 Feb 2007 19:38:55 +0100 Actual result: -- Thu, 01 Feb 2007 19:38:55 CET -- Edit this bug report at http://bugs.php.net/?id=40308edit=1
#40308 [Fbk-Csd]: RFC822 constant not RFC conform
ID: 40308 Updated by: [EMAIL PROTECTED] Reported By: thomas dot weidner at gmx dot at -Status: Feedback +Status: Closed Bug Type: Date/time related Operating System: all PHP Version: 5.2.0 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. This has already been fixed. Previous Comments: [2007-02-01 18:51:54] [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-01 18:46:35] thomas dot weidner at gmx dot at Description: The DATE_RFC822 constant produces not RFC822 conform output. RFC822 standard only defines the +xx00, GMT and american abbreviated constants. But not CET and all other timezone abbreviations. For worldwide RFC conform output +xx00 should be used instead of timezone abbreviation. Reproduce code: --- date_default_timezone_set('Europe/Vienna'); print \n.date(DATE_RFC822); Expected result: Thu, 01 Feb 2007 19:38:55 +0100 Actual result: -- Thu, 01 Feb 2007 19:38:55 CET -- Edit this bug report at http://bugs.php.net/?id=40308edit=1
#40310 [NEW]: Compile fails in /main/reentrancy.c too many arguments to function
From: sjohns at nerfarena dot org Operating system: Solaris/SPARC V10 PHP version: 5.2.0 PHP Bug Type: Compile Failure Bug description: Compile fails in /main/reentrancy.c too many arguments to function Description: Compile fails in functions php_ctime_r, php_asctime_r, php_readdir_r too many/too few arguments Reproduce code: --- Compile using GCC v3.4.6 ./configure \ --with-apxs2=/usr/local/apache2/bin/apxs \ --enable-libgcc \ --with-openssl=yes \ --with-openssl-dir=/usr/local/ssl \ --with-jpeg-dir=/usr/lib \ --with-png-dir=/usr/lib \ --with-freetype-dir=/usr/local/lib \ --with-xpm-dir=/usr/lib --with-mysql-sock=/tmp/mysql.sock \ --enable-ftp \ --with-mysql \ --with-mysql=/usr/local/mysql \ --with-mysqli \ --with-zlib=/usr/include \ --with-zlib \ --disable-ipv6 Expected result: Successful compilation. Actual result: -- /bin/sh /export/sunsource/php-5.2.0/libtool --silent --preserve-dup-deps --mode= compile gcc -Imain/ -I/export/sunsource/php-5.2.0/main/ -DPHP_ATOM_INC -I/expor t/sunsource/php-5.2.0/include -I/export/sunsource/php-5.2.0/main -I/export/sunso urce/php-5.2.0 -I/usr/local/include/libxml2 -I/usr/sfw/include -I/export/sunsour ce/php-5.2.0/ext/date/lib -I/usr/local/mysql/include/mysql -I/export/sunsource/p hp-5.2.0/TSRM -I/export/sunsource/php-5.2.0/Zend -D_POSIX_PTHREAD_SEMANTICS -I /usr/local/include -g -O2 -c /export/sunsource/php-5.2.0/main/reentrancy.c -o main/reentrancy.lo /export/sunsource/php-5.2.0/main/reentrancy.c: In function `php_ctime_r': /export/sunsource/php-5.2.0/main/reentrancy.c:67: error: too many arguments to f unction `ctime_r' /export/sunsource/php-5.2.0/main/reentrancy.c: In function `php_asctime_r': /export/sunsource/php-5.2.0/main/reentrancy.c:74: error: too many arguments to f unction `asctime_r' /export/sunsource/php-5.2.0/main/reentrancy.c: In function `: /export/sunsource/php-5.2.0/main/reentrancy.c:143: error: too few arguments to f unction `readdir_r' make: *** [main/reentrancy.lo] Error 1 -- Edit bug report at http://bugs.php.net/?id=40310edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40310r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40310r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40310r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40310r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40310r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40310r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=40310r=needscript Try newer version:http://bugs.php.net/fix.php?id=40310r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40310r=support Expected behavior:http://bugs.php.net/fix.php?id=40310r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40310r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40310r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40310r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40310r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40310r=dst IIS Stability:http://bugs.php.net/fix.php?id=40310r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40310r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40310r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40310r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=40310r=mysqlcfg
#40310 [Opn-Fbk]: Compile fails in /main/reentrancy.c too many arguments to function
ID: 40310 Updated by: [EMAIL PROTECTED] Reported By: sjohns at nerfarena dot org -Status: Open +Status: Feedback Bug Type: Compile Failure Operating System: Solaris/SPARC V10 PHP Version: 5.2.0 New Comment: Is it possible to get an unprivileged account on this machine? Previous Comments: [2007-02-01 22:16:08] sjohns at nerfarena dot org Description: Compile fails in functions php_ctime_r, php_asctime_r, php_readdir_r too many/too few arguments Reproduce code: --- Compile using GCC v3.4.6 ./configure \ --with-apxs2=/usr/local/apache2/bin/apxs \ --enable-libgcc \ --with-openssl=yes \ --with-openssl-dir=/usr/local/ssl \ --with-jpeg-dir=/usr/lib \ --with-png-dir=/usr/lib \ --with-freetype-dir=/usr/local/lib \ --with-xpm-dir=/usr/lib --with-mysql-sock=/tmp/mysql.sock \ --enable-ftp \ --with-mysql \ --with-mysql=/usr/local/mysql \ --with-mysqli \ --with-zlib=/usr/include \ --with-zlib \ --disable-ipv6 Expected result: Successful compilation. Actual result: -- /bin/sh /export/sunsource/php-5.2.0/libtool --silent --preserve-dup-deps --mode= compile gcc -Imain/ -I/export/sunsource/php-5.2.0/main/ -DPHP_ATOM_INC -I/expor t/sunsource/php-5.2.0/include -I/export/sunsource/php-5.2.0/main -I/export/sunso urce/php-5.2.0 -I/usr/local/include/libxml2 -I/usr/sfw/include -I/export/sunsour ce/php-5.2.0/ext/date/lib -I/usr/local/mysql/include/mysql -I/export/sunsource/p hp-5.2.0/TSRM -I/export/sunsource/php-5.2.0/Zend -D_POSIX_PTHREAD_SEMANTICS -I /usr/local/include -g -O2 -c /export/sunsource/php-5.2.0/main/reentrancy.c -o main/reentrancy.lo /export/sunsource/php-5.2.0/main/reentrancy.c: In function `php_ctime_r': /export/sunsource/php-5.2.0/main/reentrancy.c:67: error: too many arguments to f unction `ctime_r' /export/sunsource/php-5.2.0/main/reentrancy.c: In function `php_asctime_r': /export/sunsource/php-5.2.0/main/reentrancy.c:74: error: too many arguments to f unction `asctime_r' /export/sunsource/php-5.2.0/main/reentrancy.c: In function `: /export/sunsource/php-5.2.0/main/reentrancy.c:143: error: too few arguments to f unction `readdir_r' make: *** [main/reentrancy.lo] Error 1 -- Edit this bug report at http://bugs.php.net/?id=40310edit=1
#40287 [Opn-Bgs]: Opening stream to 'localhost' fails
ID: 40287 Updated by: [EMAIL PROTECTED] Reported By: torarnek at pvv dot org -Status: Open +Status: Bogus Bug Type: Streams related Operating System: Windows Vista PHP Version: 5.2.0 New Comment: Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. Not PHP problem. Previous Comments: [2007-01-30 13:42:12] torarnek at pvv dot org Description: When opening a stream to a file in an apache server running locally, using an url with 'localhost' to refer the local host, it times out with an error message. However, using 127.0.0.1 to refer the localhost works. I searched the web and found a reference to the issue: Title: Binding to localhost throws exception in http://msdn2.microsoft.com/en-us/vstudio/aa972193.aspx Reproduce code: --- $url = http://localhost/scoop/www/test2.html;; $fil = fopen($url, 'r'); if ($fil) { while(!feof($fil)) { echo fgets($fil); } fclose($fil); } Expected result: Should return a stream to the file. Actual result: -- Warning: fopen(http://localhost/scoop/www/test2.html) [function.fopen]: failed to open stream: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. in E:\workspace\scoop\Scoop\www\test.php on line 6 Fatal error: Maximum execution time of 30 seconds exceeded in E:\workspace\scoop\Scoop\www\test.php on line 6 -- Edit this bug report at http://bugs.php.net/?id=40287edit=1
#40261 [Opn-Asn]: Extremely slow data handling due to memory fragmentation
ID: 40261 Updated by: [EMAIL PROTECTED] Reported By: thuejk at gmail dot com -Status: Open +Status: Assigned Bug Type: Performance problem Operating System: All PHP Version: 5.2.0 Assigned To: dmitry Previous Comments: [2007-01-30 14:53:40] thuejk at gmail dot com The latest PHP snapshot does fix my example, and probably makes my production code work. This will probably fix the problem in far most cases. But it is possible to construct an example which still have the problematic behavior. One example is below. ?php $num = 10; $a = Array(); for ($i=0; $i$num; $i++) { $a[$i] = Array(1); } for ($i=0; $i$num; $i++) { $b[$i] = $a[$i][0]; } unset($a); for ($i=0; $i$num; $i++) { $b[$i] = 1234567890123456789012345678901234567890123456789012345678901234567\ 8901234567890123456789012345678901234567890123456789012345678901234567890123456\ 7890123456789012345678901234567890123456789012345678901234567890123456789012345\ 6789012345678901234567890123456789012345678901234567890123456789012345678901234\ 5678901234567890; } ? [2007-01-30 14:03:32] [EMAIL PROTECTED] Please try PHP_5_2 snapshot. It already uses litle bit different best-fit implementation and this script takes reasonable time (near the same as 5.1). [2007-01-29 13:24:47] thuejk at gmail dot com I added a few printf's and found out that the $num generated holes in the memory are 384 big. Zend has a special system for small allocations, but that only works for holes below ZEND_MM_SMALL_SIZE=280. The $num allocations at the end, which cause the problems, and 40 or 88 long. Note that these numbers are from a 64-bit machine, which of course has 8-byte pointers, and so a larger MM overhead. (The bug does also occur on 32bit machines) One temporary solution could be to raise #define ZEND_MM_NUM_BUCKETS 32 from which ZEND_MM_SMALL_SIZE is defined, so that ZEND_MM_SMALL_SIZE is made twice or perhaps 4 times as big. (I got a segfault when I tried that, haven't looked into why) A better solution would be to organize the free blocks in a balanced tree, instead of a linear list which has to be traversed. [2007-01-29 01:42:28] thuejk at gmail dot com Ok, after a good deal of work I actually tracked down the problem to fragmentation in your memory management. This understanding enabled me to construct a simpler test case. Note that the problem is unrelated to database function, and this new testcase does not require any database. ?php //According to my calculations, setting $num=1800 should make this script take ~one year. $num = 10; $a = Array(); for ($i=0; $i$num; $i++) { $a[$i] = Array(1); } /* The underlying memory now looks something like * row structure * row value * row structure * ... */ $b = Array(); for ($i=0; $i$num; $i++) { $b[$i] = $a[$i][0]; } /* The b rows are allocated * * Though I haven't checked it in the code, I have reason to believe * that the values inserted into the b rows are pointers to the same * memory allocated for the values in the a rows */ unset($a); /* The a rows are unallocated, but the values are still references from $b, so the memory map looks something like * row value * free_block * row_value * free_block * ... * * repeated $num times. */ /* Now, for each memory allocation for a row, PHP runs through all * free blocks checking for a best fit. Since there are $num free * blocks, this takes time. This is done by the function * _zend_mm_alloc_int in PHP 5.2.0 Zend/zend_alloc.c : * * end = heap-free_buckets[0]; * for (p = end-next_free_block; p != end; p = p-next_free_block) { *size_t s = ZEND_MM_FREE_BLOCK_SIZE(p); *if (s true_size) { * if (s best_size) {// better fit *best_fit = p; *best_size = s; * } *} else if (s == true_size) { * // Found big free block of exactly the same size * best_fit = p; * goto zend_mm_finished_searching_for_block; *} * } */ $c = Array(); for ($i=0; $i$num; $i++) { $c[$i] = 1; } ? [2007-01-28 01:52:37] thuejk at gmail dot com On second though, black boxes are not good for testing. A simpler timer added... 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/40261 -- Edit this bug report at http://bugs.php.net/?id=40261edit=1
#40286 [Opn-Asn]: PHP fastcgi with PHP_FCGI_CHILDREN don't kill children when parent is killed
ID: 40286 Updated by: [EMAIL PROTECTED] Reported By: gabriel at oxeva dot fr -Status: Open +Status: Assigned Bug Type: CGI related Operating System: Linux 2.6 PHP Version: 4.4.4 Assigned To: dmitry Previous Comments: [2007-01-31 11:56:49] gabriel at oxeva dot fr And today, I can now confirm that the bugs exists with PHP 5.2.0 too. Here is the backtrace : (gdb) bt #0 0xb7fb2410 in ?? () #1 0xbfc06988 in ?? () #2 0x0008 in ?? () #3 0xbfc069b0 in ?? () #4 0x006ee4f3 in __read_nocancel () from /lib/tls/libc.so.6 #5 0x0841b6d4 in fcgi_init_request () #6 0x0841b770 in fcgi_read () #7 0x0841c546 in fcgi_putenv () #8 0x08382d33 in sapi_deactivate () #9 0x0837c4f6 in php_request_shutdown () #10 0x0841e463 in main () [2007-01-30 14:33:38] gabriel at oxeva dot fr Forgot to mention that the backtrace provided is from a PHP 5.1.4 process, not php 5.2. Sorry for the misreading. I can compile and run a PHP 5.2 process and wait for having one killed without his children, but it will take some time to give you the results. [2007-01-30 14:27:52] gabriel at oxeva dot fr Missed to say that PHP 5 has exactly the same problem [2007-01-30 14:26:42] gabriel at oxeva dot fr strace -p PID provides the following : read(3, unfinished ... and gdb program PID and bt provides : (gdb) bt #0 0xb7fe3410 in ?? () #1 0xbfd86618 in ?? () #2 0x0008 in ?? () #3 0xbfd86600 in ?? () #4 0x008e14f3 in __read_nocancel () from /lib/tls/libc.so.6 #5 0x083ba23e in fcgi_read () #6 0x083bbb38 in FCGX_FPrintF () #7 0x0831ab22 in sapi_deactivate () #8 0x08314a3d in php_request_shutdown () #9 0x083bcdeb in main () Please note that I can't test with debugging symbols (the libraries and PHP are stripped), as this binary is in production environment and the bug occurs only under load. [2007-01-30 13:20:40] [EMAIL PROTECTED] Could you plase attach debugger to non-killed process and provide backtrace. Do php-5.2 has the same problem? 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/40286 -- Edit this bug report at http://bugs.php.net/?id=40286edit=1
#40311 [NEW]: Superglobals appearing as empty within functions
From: tretton at gmail dot com Operating system: WinXP SP2 PHP version: 6CVS-2007-02-01 (snap) PHP Bug Type: Arrays related Bug description: Superglobals appearing as empty within functions Description: empty()/isset() doesn't work (returns opposite of expected) on superglobals when used inside functions. Reproduce code: --- ?php // view script with: test.php?foo=bar function test() { if (!empty($_GET)) { print_r($_GET); } } test(); ? Expected result: When run with something populating $_GET, I expect to see a proper printout from the print_r(). Actual result: -- Nothing. -- Edit bug report at http://bugs.php.net/?id=40311edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40311r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40311r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40311r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40311r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40311r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40311r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=40311r=needscript Try newer version:http://bugs.php.net/fix.php?id=40311r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40311r=support Expected behavior:http://bugs.php.net/fix.php?id=40311r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40311r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40311r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40311r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40311r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40311r=dst IIS Stability:http://bugs.php.net/fix.php?id=40311r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40311r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40311r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40311r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=40311r=mysqlcfg
#32002 [Com]: FATAL erealloc() Restarts
ID: 32002 Comment by: bob at cave dot net Reported By: tlamay at cte1 dot com Status: No Feedback Bug Type: Unknown/Other Function Operating System: Windows 2003 PHP Version: 4CVS-2005-02-17 New Comment: This is not just an apache problem. I am using WebSite Pro under win2000 with php 4.x and get the same error. The website service dies, and the watchdog needs to restart it. Previous Comments: [2006-12-23 02:49:40] vst at gamervision dot net OS: Windows XP Pro and Server 2003 PHP: 4.4.4 Apache: 2.23 CPU: AMD X2 4400+ RAM: 2GB DDR I have the same issue and consider it as CRITICAL. I tried it on many Windows systems and the same results. If I add 'Win32DisableAcceptEx' then I'm getting this issue. But I must use 'Win32DisableAcceptEx' because without it I'm getting some Winsock issues. I can't upgrade to PHP 5 because some of the parts in my side having MySQL connection issues with PHP 5. PLEASE!! PLEASE FIX IT ALREADY!! [2006-12-21 21:00:11] csaba at ai-media dot com Our configuration: Windows2003 Web Edition PHP 5.2, ZendOptimizer 3 Apache 2.2.3 Tomcat 5.5.17 To reproduce: this happens consistently on the Windows platform as long as Win32DisableAcceptEx is enabled in the Apache httpd.conf. Tested with Apache2.0.59, PHP 5.1.6 and PHP 5.2. We get FATAL: erealloc(): Unable to allocate XXX bytes in the Apache2 error log with 5.1.6 and no feedback to the user (could not connect to server), with 5.2 the user sees the same error message in the browser. There's an open issue in the Apache2 bug list here: http://issues.apache.org/bugzilla/show_bug.cgi?id=34664#c8 Comment 8 is particularly interesting: one of the Apache developers say they do not call erealloc. At this point (to me) it's not clear whether this is a PHP or an Apache bug, but it's definitely related to both. [2006-12-12 23:04:20] alex_25052 at hotmail dot com Same thing here. Tons of FATAL: erealloc(): Unable to allocate bytes I config is PHP 4.4.4 Apache 2.2.3 on Windows 2003 Xeon Dual web machine, 2Gb ram. Sometimes apache restarts by itself, sometimes it doesn't and i have to do it manualy Drives me nuts... :) [2006-12-03 12:53:49] levi_tedder at hotmail dot com I have installed PHP 5.2 on the server where I had this issue, and it seems to have fixed it. No fatal for 24 hours, but I will let you know if it reappears when traffic peeks (although traffic was not an issue when this happened). [2006-10-09 06:57:44] levi_tedder at hotmail dot com Hi I have the same problem. My setup: Win2k Server (2 cpu) 2 GB RAM Apache 2.0.59 PHP 5.1.6 OpenSSL 0.9.8c Error message in apache log FATAL: erealloc(): Unable to allocate 1572864 bytes The exact same number of bytes is reported every 10-20 minutes, and after a day or two the apache cannot be restarted and I need to reboot the whole server. Most of my scripts are using Pear DB for database handling. I am unable to find out which script/page is causing this. Also note that I'm using the Win32DisableAcceptEx (as I guess all others are) in apache conf to get rid of slow performance and a bunch of other errors (The specified network name is no longer available). The FATAL error only appear when using Win32DisableAcceptEx. If you have any ideas, please let the PHP guys and me know it :) 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/32002 -- Edit this bug report at http://bugs.php.net/?id=32002edit=1
#40313 [NEW]: oci_close() has no effect when in a transaction
From: christopher dot jones at oracle dot com Operating system: n/a PHP version: 5.2.1RC4 PHP Bug Type: OCI8 related Bug description: oci_close() has no effect when in a transaction Description: The session management differs in some cases when there is an uncommited transaction. Run the test case with and without the parse/execute lines commented. When the lines are commented out an explicit oci_close() or the end of f1() causes the connection to be closed. With the lines active the sessions remain open and the transactions are not rolled back. A third error case is if the sample script is changed to use oci_new_connect(). Confusingly the explict close has no effect but the end-of-scope will rollback and close the connection. This may be a in implementation quirk of reference counting but it is a user level bug. Oci_close() should always close when oci8.oci_old_close_semantics has its default value. The cleanup at end-of-scope should be consistent regardless of the user transaction state. Reproduce code: --- ?php // Create this table first: create table cj1 (a number); $v = ini_get('oci8.old_oci_close_semantics'); echo oci8.old_oci_close_semantics is $v\n; ociinternaldebug(1); echo Test 1\n; $c1 = oci_new_connect(hr, hr, localhost/XE); echo Do statement\n; $s1 = oci_parse($c1, insert into cj1 values(1)); var_dump(oci_execute($s1, OCI_DEFAULT)); echo Before close: transaction should rollback and connection should be closed\n; ocilogoff($c1); echo After close\n; echo Test 2\n; function f1() { echo In f1()\n; $c2 = oci_new_connect(hr, hr, localhost/XE); if (!$c2) { $m = ocierror(); echo $m['message']; exit; } else { echo Connection succeeded\n; } echo Do statement\n; $s2 = oci_parse($c2, insert into cj1 values(1)); var_dump(oci_execute($s2, OCI_DEFAULT)); echo Before end of scope\n; } f1(); echo after f1() call - end of scope\n; echo End of script\n; ? -- Edit bug report at http://bugs.php.net/?id=40313edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40313r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40313r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40313r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40313r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40313r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40313r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=40313r=needscript Try newer version:http://bugs.php.net/fix.php?id=40313r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40313r=support Expected behavior:http://bugs.php.net/fix.php?id=40313r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40313r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40313r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40313r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40313r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40313r=dst IIS Stability:http://bugs.php.net/fix.php?id=40313r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40313r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40313r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40313r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=40313r=mysqlcfg
#40315 [NEW]: Apache crashes with PHP
From: cpf at airenet dot com Operating system: Windows XP PHP version: 5.2.0 PHP Bug Type: Apache2 related Bug description: Apache crashes with PHP Description: The problem is when I load *any* PHP page apache gives by an error ()immediately followed by a http.exe has encountered a problem... and apache crashes. More info: Config line:cscript /nologo configure.js --enable-snapshot-build --with-gd=shared My setup it Apache 2.2.4 with PHP 5.2.0 When running the auto-setup for apache 2.2.x module the PHP install terminates prematurely, but the files are there. After manually configuring httpd.conf for apache 2.2 (LoadModule php5_module c:/php/php5apache2_2.dll AddType application/x-httpd-php .php), yes it is installed there. I attempted to make a backtrace, but php never crashes. Reproduce code: --- ?php phpinfo();? Expected result: Normal PHPINFO() output Actual result: -- This is the error window that pops up on the server: The instruction at 0x008074cd referenced memory at 0x0014. The memory could not be read And in the Apache log: [Thu Feb 01 19:36:08 2007] [notice] Child 1768: Child process is running [Thu Feb 01 19:36:08 2007] [notice] Child 1768: Acquired the start mutex. [Thu Feb 01 19:36:08 2007] [notice] Child 1768: Starting 250 worker threads. [Thu Feb 01 19:36:08 2007] [notice] Child 1768: Starting thread to listen on port 80. Cannot find module (IP-MIB): At line 0 in (none) Cannot find module (IF-MIB): At line 0 in (none) Cannot find module (TCP-MIB): At line 0 in (none) Cannot find module (UDP-MIB): At line 0 in (none) Cannot find module (SNMPv2-MIB): At line 0 in (none) Cannot find module (SNMPv2-SMI): At line 0 in (none) Cannot find module (UCD-SNMP-MIB): At line 0 in (none) Cannot find module (UCD-DEMO-MIB): At line 0 in (none) Cannot find module (SNMP-TARGET-MIB): At line 0 in (none) Cannot find module (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none) Cannot find module (SNMP-COMMUNITY-MIB): At line 0 in (none) Cannot find module (UCD-DLMOD-MIB): At line 0 in (none) Cannot find module (SNMP-FRAMEWORK-MIB): At line 0 in (none) Cannot find module (SNMP-MPD-MIB): At line 0 in (none) Cannot find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none) Cannot find module (SNMP-NOTIFICATION-MIB): At line 0 in (none) Cannot find module (SNMPv2-TM): At line 0 in (none) [Thu Feb 01 19:36:14 2007] [notice] Parent: child process exited with status 3221225477 -- Restarting. -- Edit bug report at http://bugs.php.net/?id=40315edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40315r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40315r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40315r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40315r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40315r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40315r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=40315r=needscript Try newer version:http://bugs.php.net/fix.php?id=40315r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40315r=support Expected behavior:http://bugs.php.net/fix.php?id=40315r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40315r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40315r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40315r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40315r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40315r=dst IIS Stability:http://bugs.php.net/fix.php?id=40315r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40315r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40315r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40315r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=40315r=mysqlcfg
#40318 [NEW]: SOAP_ENC_OBJECT does not encode object properties with namespace
From: bink at eezi dot net dot au Operating system: Redhat PHP version: 5.2.0 PHP Bug Type: SOAP related Bug description: SOAP_ENC_OBJECT does not encode object properties with namespace Description: Possibly a documentation issue = When using a php object to create SOAP request headers, the SoapVAR($obj, SOAP_ENC_OBJECT) and SoapHeader($namespace, $name, $soapvar) does not set the namespace of the object properties to the same as the object itself. Reproduce code: --- $client = new SOAPClient($wsdl, array('trace' = '1')); class headers { function __construct($val1, $val2){ $this-val1 = $val1; $this-val2 = $val2; } } $obj = new headers('val1','val2'); $svval=new SoapVar($obj,SOAP_ENC_OBJECT, NULL, NULL, , http://url.com/namespace2;); $header = new SoapHeader(http://url.com/namespace2;, SoapHeaderMsg, $svval, false); $client-__setSoapHeaders(array($header)); $client-ping(); print_r($client-__getLastRequest()); Expected result: SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:ns1=http://url.com/namespace1; xmlns:ns2=http://url.com/namespace2; SOAP-ENV:Header ns2:SoapHeaderMsg ns2:val1val1/val1 ns2:val2val2/val2 /ns2:SoapHeaderMsg /SOAP-ENV:Header SOAP-ENV:Body ns1:PingRequest/ /SOAP-ENV:Body /SOAP-ENV:Envelope Actual result: -- SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:ns1=http://ow.optus.com.au/b2b/bwsgservices/schema/version/2.0/bilpm; xmlns:ns2=http://ow.optus.com.au/b2b/xwsgservices/schema/wscommon; SOAP-ENV:Header ns2:SoapHeaderMsg val1val1/val1 val2val2/val2 /ns2:SoapHeaderMsg /SOAP-ENV:Header SOAP-ENV:Body ns1:PingRequest/ /SOAP-ENV:Body /SOAP-ENV:Envelope -- Edit bug report at http://bugs.php.net/?id=40318edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40318r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40318r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40318r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40318r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40318r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40318r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=40318r=needscript Try newer version:http://bugs.php.net/fix.php?id=40318r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40318r=support Expected behavior:http://bugs.php.net/fix.php?id=40318r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40318r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40318r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40318r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40318r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40318r=dst IIS Stability:http://bugs.php.net/fix.php?id=40318r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40318r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40318r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40318r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=40318r=mysqlcfg
#40318 [Opn]: SOAP_ENC_OBJECT does not encode object properties with namespace
ID: 40318 User updated by: bink at eezi dot net dot au Reported By: bink at eezi dot net dot au Status: Open Bug Type: SOAP related Operating System: Redhat PHP Version: 5.2.0 New Comment: The Namespaces on the Actual result are incorrect, they should match up with the Expected result Previous Comments: [2007-02-02 06:05:27] bink at eezi dot net dot au Description: Possibly a documentation issue = When using a php object to create SOAP request headers, the SoapVAR($obj, SOAP_ENC_OBJECT) and SoapHeader($namespace, $name, $soapvar) does not set the namespace of the object properties to the same as the object itself. Reproduce code: --- $client = new SOAPClient($wsdl, array('trace' = '1')); class headers { function __construct($val1, $val2){ $this-val1 = $val1; $this-val2 = $val2; } } $obj = new headers('val1','val2'); $svval=new SoapVar($obj,SOAP_ENC_OBJECT, NULL, NULL, , http://url.com/namespace2;); $header = new SoapHeader(http://url.com/namespace2;, SoapHeaderMsg, $svval, false); $client-__setSoapHeaders(array($header)); $client-ping(); print_r($client-__getLastRequest()); Expected result: SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:ns1=http://url.com/namespace1; xmlns:ns2=http://url.com/namespace2; SOAP-ENV:Header ns2:SoapHeaderMsg ns2:val1val1/val1 ns2:val2val2/val2 /ns2:SoapHeaderMsg /SOAP-ENV:Header SOAP-ENV:Body ns1:PingRequest/ /SOAP-ENV:Body /SOAP-ENV:Envelope Actual result: -- SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:ns1=http://ow.optus.com.au/b2b/bwsgservices/schema/version/2.0/bilpm; xmlns:ns2=http://ow.optus.com.au/b2b/xwsgservices/schema/wscommon; SOAP-ENV:Header ns2:SoapHeaderMsg val1val1/val1 val2val2/val2 /ns2:SoapHeaderMsg /SOAP-ENV:Header SOAP-ENV:Body ns1:PingRequest/ /SOAP-ENV:Body /SOAP-ENV:Envelope -- Edit this bug report at http://bugs.php.net/?id=40318edit=1