#37496 [Asn-Csd]: FastCGI output buffer overrun
ID: 37496 Updated by: [EMAIL PROTECTED] Reported By: gacek at intertele dot pl -Status: Assigned +Status: Closed Bug Type: CGI related Operating System: Linux PHP Version: 5CVS-2006-05-18 (snap) Assigned To: dmitry New Comment: Thank you for your help. Fixed in CVS HEAD, PHP_5_2 and PHP_5_1. Previous Comments: [2006-05-24 12:44:06] gacek at intertele dot pl Unfortunately your fix introduced another bug: limit variable goes negative if free buffer length sizeof(fcgi_header) and req-out_hdr is NULL. memcpy crashes, when copying region with negative length. Change condition: } else if (len - limit sizeof(req-out_buf) - sizeof(fcgi_header)) { to: } else if (limit 0 len - limit sizeof(req-out_buf) - sizeof(fcgi_header)) { [2006-05-24 09:12:16] gacek at intertele dot pl Bug has gone. [2006-05-22 09:27:52] [EMAIL PROTECTED] The patch is partially commited into HEAD, PHP_5_2 and PHP_5_1. Did bug go away? [2006-05-22 07:03:47] gacek at intertele dot pl Actually, these are two bugs: 1. Interrupted flush_cgi() does not reset request-out_pos. Thus we must check flush_cgi return code and stop filling buffer if flush_cgi fails. 2. In fcgi_request structure there is additional reserve allocated after out_buf. It's of sizeof(fcgi_header)+sizeof(_fcgi_end_reuest) afair. But at certain fcgi_write str lengths, there were three consecutive operations on buffer: close_packet() - ads 8-byte padding open_packet() - ads header fcgi_flush() - calls close_packet(), which ads 8-byte padding again Last call might overrun buffer+reserve up to 7 bytes, smashing env table pointer. Changing first close_packet to fcgi_flush() eliminates this risk. Patch against 5.1.4 below: diff -ru php-5.1.4/sapi/cgi/fastcgi.c php-5.1.4-patched/sapi/cgi/fastcgi.c --- php-5.1.4/sapi/cgi/fastcgi.c2006-05-03 17:39:16.0 +0200 +++ php-5.1.4-patched/sapi/cgi/fastcgi.c2006-05-22 08:40:56.0 +0200 @@ -813,7 +813,10 @@ } memcpy(req-out_pos, str, limit); req-out_pos += limit; - fcgi_flush(req, 0); + if (!fcgi_flush(req, 0)) { + req-keep = 0; + return -1; + } open_packet(req, type); memcpy(req-out_pos, str + limit, len - limit); req-out_pos += len - limit; @@ -821,12 +824,19 @@ int pos = 0; int pad; - close_packet(req); + if (!fcgi_flush(req, 0)) { + req-keep = 0; + return -1; + } + while ((len - pos) 0x) { open_packet(req, type); fcgi_make_header(req-out_hdr, type, req-id, 0xfff8); req-out_hdr = NULL; - fcgi_flush(req, 0); + if (!fcgi_flush(req, 0)) { + req-keep = 0; + return -1; + } if (safe_write(req, str + pos, 0xfff8) != 0xfff8) { req-keep = 0; return -1; @@ -840,7 +850,10 @@ open_packet(req, type); fcgi_make_header(req-out_hdr, type, req-id, (len - pos) - rest); req-out_hdr = NULL; - fcgi_flush(req, 0); + if (!fcgi_flush(req, 0)) { + req-keep = 0; + return -1; + } if (safe_write(req, str + pos, (len - pos) - rest) != (len - pos) - rest) { req-keep = 0; return -1; [2006-05-18 13:01:29] gacek at intertele dot pl Description: FastCGI buffer output (request-out_buf) is overwritten. Reproduce code: --- Not easily reproducible, but happens several times per hour on our servers. Have multiple corefiles, all generated by this bug. Actual result: -- Core analysis (5.2 snapshot downloaded today): (gdb) bt #0 zend_hash_destroy (ht=0x7fd50f88) at /usr/src/debug/php-5.1.4/Zend/zend_hash.c:519 #1 0x005e95c2 in fcgi_finish_request (req=0x7fd4ef50) at /usr/src/debug/php-5.1.4/sapi/cgi/fastcgi.c:600 #2 0x005e9d1e in fcgi_accept_request (req=0x7fd4ef50) at /usr/src/debug/php-5.1.4/sapi/cgi/fastcgi.c:630 #3 0x005ebaf3 in main (argc=3, argv=0x7fd51348) at /usr/src/debug/php-5.1.4/sapi/cgi/cgi_main.c:1334 (gdb)
#37584 [Opn-Bgs]: is a problem with the constructor functions
ID: 37584 Updated by: [EMAIL PROTECTED] Reported By: daniel dot forero at hotmail dot com -Status: Open +Status: Bogus Bug Type: Class/Object related Operating System: windows, linux PHP Version: 5.1.4 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 Access the properties without $ sign, like $this-nombre. Previous Comments: [2006-05-25 05:50:00] baby dot bjorn at yahoo dot com It's $this-nombre not $this-$nombre [2006-05-25 00:56:38] daniel dot forero at hotmail dot com Description: I have a class that have a constructor function, you can study the code, the result of execute the script is diferent for the expect Reproduce code: --- ?php class usuario { var $nombre; var $edad; var $cargo; function set_name($name) { $this-$nombre=$name; } function usuario() { $this-$nombre=(Undefined); $this-$edad=0; $this-$cargo=(not a charge); } } $daniel = new usuario; $daniel-set_name(daniel); echo $daniel-$nombre; echo 'br'; echo $daniel-$edad; echo 'br'; echo $daniel-$cargo; ? Expected result: daniel 0 (not a charge) Actual result: -- daniel daniel daniel -- Edit this bug report at http://bugs.php.net/?id=37584edit=1
#37576 [Asn-Csd]: FastCGI env (cgi vars) table overflow
ID: 37576 Updated by: [EMAIL PROTECTED] Reported By: gacek at intertele dot pl -Status: Assigned +Status: Closed Bug Type: Reproducible crash Operating System: Linux PHP Version: 5.1.5CVS Assigned To: dmitry New Comment: Patch is applied to PHP_5_1. The problem is already fixed in HEAD and PHP_5_2. Previous Comments: [2006-05-24 09:42:51] gacek at intertele dot pl Description: To many CGI variables overflows cgi var table (128 entries) in fastcgi mode, crashing php process. Default env table size (127 usable entries) may be to small in cgi+ssl+force_redirect. Apparently it's fixed in 5.2 branch, but not in 5.1. Expected result: No crash, larger env table. Actual result: -- Simple fix below increases env table to 256 (255 usable entries) and performs checks where apropriate. diff -ru php-5.1.4/sapi/cgi/fastcgi.c php-5.1.4-patched/sapi/cgi/fastcgi.c --- php-5.1.4/sapi/cgi/fastcgi.c2006-05-23 14:23:08.0 +0200 +++ php-5.1.4-patched/sapi/cgi/fastcgi.c2006-05-23 08:14:25.0 +0200 @@ -401,7 +401,7 @@ int name_len, val_len; char *s; - while (p end) { + while (p end n FCGI_MAX_ENV_VARS - 1) { name_len = *p++; if (name_len = 128) { name_len = ((name_len 0x7f) 24); @@ -928,7 +928,9 @@ } env++; } - *env = fcgi_strndup(var, var_len); + + if (env req-env + sizeof(req-env) - 1) + *env = fcgi_strndup(var, var_len); } } diff -ru php-5.1.4/sapi/cgi/fastcgi.h php-5.1.4-patched/sapi/cgi/fastcgi.h --- php-5.1.4/sapi/cgi/fastcgi.h2006-05-03 17:39:16.0 +0200 +++ php-5.1.4-patched/sapi/cgi/fastcgi.h2006-05-23 07:59:36.0 +0200 @@ -26,6 +26,8 @@ #define FCGI_KEEP_CONN 1 +#define FCGI_MAX_ENV_VARS 256 + typedef enum _fcgi_role { FCGI_RESPONDER = 1, FCGI_AUTHORIZER = 2, @@ -105,7 +107,7 @@ unsigned char out_buf[1024*8]; unsigned char reserved[sizeof(fcgi_end_request_rec)]; - char *env[128]; + char *env[FCGI_MAX_ENV_VARS]; } fcgi_request; int fcgi_init(void); -- Edit this bug report at http://bugs.php.net/?id=37576edit=1
#37558 [Asn-Csd]: timeout functionality doesn't work after a second PHP starup on the same thread
ID: 37558 Updated by: [EMAIL PROTECTED] Reported By: p dot desarnaud at wanadoo dot fr -Status: Assigned +Status: Closed Bug Type: Scripting Engine problem Operating System: win32 PHP Version: 5CVS-2006-05-23 (snap) Assigned To: dmitry New Comment: Usually PHP does startup/shutdown secuence only once per process. php_module_startup/php_module_shutdown shouldn't be called several times. BTW: you patch is proper. I committed it into CVS HEAD and PHP_5_2. Previous Comments: [2006-05-23 08:22:33] p dot desarnaud at wanadoo dot fr Description: On win32 platform, if I try to startup/shutdown PHP several times during the same thread, after the 2nd startup, the timeout functionality doesn't work, and there is an Windows exception (invalid handle) during the 2nd shutdown. Reproduce code: --- // 1° startup php_module_startup(...) php_module_shutdown(..) .. // 2° startup/shutdown php_module_startup(...) // from now the function zend_set_timeout() will not work Actual result: -- The static variable timeout_thread_initalized declared in the file zend_execute_API.c is not reset to 0 after a shutdown, and so, the next startup will not initialize the timeout thread, and the next shutdown will try to close an invalid handle CloseHandle(timeout_thread_handle) inside the function zend_shutdown_timeout_thread(), and I get an exception . The patch to solve the problem : --- fix/zend_execute_API.c 2006-04-21 00:49:20.0 +0200 +++ zend_execute_API.c 2006-05-23 09:20:38.953125000 +0200 @@ -1339,6 +1339,7 @@ /* Wait for thread termination */ WaitForSingleObject(timeout_thread_handle, 5000); CloseHandle(timeout_thread_handle); + timeout_thread_initialized=0; } #endif But, is it allowed to startup/shutdown several times during the same thread ??? If yes: there is a bug on Win32... If no: there is no bug.. -- Edit this bug report at http://bugs.php.net/?id=37558edit=1
#37278 [Asn-Csd]: SOAP not respecting uri in __soapCall
ID: 37278 Updated by: [EMAIL PROTECTED] Reported By: jgillis at optaros dot com -Status: Assigned +Status: Closed Bug Type: SOAP related Operating System: debian 3.1/Linux 2.6.16.5 PHP Version: 5.1.3 Assigned To: dmitry New Comment: Fixed in CVS HEAD, PHP_5_2 and PHP_5_1. Previous Comments: [2006-05-02 15:04:58] jgillis at optaros dot com Description: I am trying to connect PHP to Bricolage (a CMS) using SOAP. Bricolage doesn't seem to have a WSDL, but they do have a SOAP interface. In order to make a request, I must first authenticate them make my request. This requires changing namespaces. Unfortunately, using a uri parameter when calling __soapCall doesn't seem to change the namespace, as I would expect. The code I've included is simplified to show just the error, so you don't see me using the default namespace. Reproduce code: --- $opts = Array(location = http://localhost:8080/soap;, uri = http://bricolage.sourceforge.net/Bric/SOAP/Auth;, trace= 1); $client = new SoapClient(null, $options); $newNS = http://bricolage.sourceforge.net/Bric/SOAP/Story;; try { $ret = $this-__soapCall(list_ids,Array(),Array(uri = $newNS)); } catch (Exception $e) { print $client-__getLastRequest(); } Expected result: ?xml version=1.0 encoding=UTF-8? SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:ns1=http://bricolage.sourceforge.net/Bric/SOAP/Story; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:SOAP-ENC=http://schemas.xmlsoap.org/soap/encoding/; SOAP-ENV:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;SOAP-ENV:Bodyns1:list_ids//SOAP-ENV:Body/SOAP-ENV:Envelope Actual result: -- ?xml version=1.0 encoding=UTF-8? SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:ns1=http://bricolage.sourceforge.net/Bric/SOAP/Auth; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:SOAP-ENC=http://schemas.xmlsoap.org/soap/encoding/; SOAP-ENV:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;SOAP-ENV:Bodyns1:list_ids//SOAP-ENV:Body/SOAP-ENV:Envelope -- Edit this bug report at http://bugs.php.net/?id=37278edit=1
#37418 [Csd]: tidy module crashes CLI version of PHP
ID: 37418 User updated by: RQuadling at GMail dot com Reported By: RQuadling at GMail dot com Status: Closed Bug Type: Reproducible crash Operating System: Windows XP SP2 PHP Version: 5.1.4 New Comment: Ha! No shutdown functions! Oops! Will try later today. Thank you nlopess! Previous Comments: [2006-05-24 21:34:43] [EMAIL PROTECTED] 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. [2006-05-15 07:12:46] RQuadling at GMail dot com The $_POST issue that is part of the problem with the released 5.1.3 does not affect the version of the 5.1.3-dev I have. So I'm sticking with the 5.1.3-dev until the 5.1.4 is fixed. I'll be trying a snapshot today (can't use CVS source as no compiler for Windows - grrr!) [2006-05-12 18:33:49] judas dot iscariote at gmail dot com works prefectly OK in Linux, and run away from 5.1.3 ASAP ;-) [2006-05-12 13:33:03] RQuadling at GMail dot com Description: Runnin php -m at the command line without tidy module loaded produces ... [PHP Modules] bcmath calendar com_dotnet ctype date dom ftp hash iconv libxml odbc pcre Reflection session SimpleXML SPL standard tokenizer wddx xml xmlreader xmlwriter Zend Optimizer zlib [Zend Modules] Zend Extension Manager Zend Optimizer With Tidy enabled, module is loaded OK, but crashes whilst unloading. Generates a Dr.Watson error report log and I'm sending them to MS as it asks me ever so nicely! Tried it without Zend Optimizer loaded - no different. Reverted back to PHP 5.1.3-dev (cli) (built: Feb 20 2006 00:29:25) and all is ok. NOTE: No changes to php-cli.ini or php-isapi.ini -- Edit this bug report at http://bugs.php.net/?id=37418edit=1
#37355 [Asn-Bgs]: SOAP uses deprecated __call method by default
ID: 37355 Updated by: [EMAIL PROTECTED] Reported By: daniel dot oconnor at gmail dot com -Status: Assigned +Status: Bogus Bug Type: SOAP related Operating System: Windows PHP Version: 5.1.4 Assigned To: dmitry New Comment: This is not a bug. __call() is a magic function that used for method call overloading. So when you call login() PHP calls __call(). SoapClient::__call() and SoapClient::__soapCall() are different names of the same function. The fault that you have is generated by server. Probably server tries send a SoapFault, but does somthing wrong. It calls SoapFault constructor with wrong arguments. Previous Comments: [2006-05-08 03:23:08] daniel dot oconnor at gmail dot com Description: 5.1.4 appears to be still using __call instead of __soapCall, in at least one place this causes exceptions without error codes to be thrown. Reproduce code: --- ?php $wsdl = 'http://vx.valex.com.au/soap/vxsoap.wsdl'; $client = new SoapClient($wsdl); $result = $client-login(array(username = fake, password = user)); ? Expected result: No SoapFaults thrown, or a SoapFault is thrown with a meaningful error. Actual result: -- -- php -- Fatal error: Uncaught SoapFault exception: [SOAP-ENV:Server] SoapFault::__construct() [a href='function.SoapFault---construct'function.SoapFault---construct/a]: Invalid parameters. Invalid fault code. in C:\vx\tests\unit\soap\LoginTest.php:42 Stack trace: #0 [internal function]: SoapClient-__call('login', Array) #1 C:\vx\tests\unit\soap\LoginTest.php(42): SoapClient-login(Array) #2 {main} thrown in C:\vx\tests\unit\soap\LoginTest.php on line 42 Output completed (0 sec consumed) - Normal Termination -- Edit this bug report at http://bugs.php.net/?id=37355edit=1
#37588 [NEW]: COM Property propputref converts to PHP function and can't be accesed
From: dtyschenko at soft-ukraine dot com Operating system: Windows XP SP2 PHP version: 5.1.4 PHP Bug Type: COM related Bug description: COM Property propputref converts to PHP function and can't be accesed Description: When COM property is marked with propputref it looks like function in com_print_typeinfo and can't be accessed by: $a-property = $b or $a-property($b) I'm just get com_exception with message 'Error [0x80020003] Member not found.' Reproduce code: --- ?php $Engine = new COM(SAPI.SpVoice); $File = new COM(SAPI.SpFileStream); $File-Open(C:\\1.wav, 3, false); $Engine-AudioOutputStream = $File; // com_exception $Engine-Speak(Hello World!, 0); $File-Close(); unset($File); unset($Engine); ? -- Edit bug report at http://bugs.php.net/?id=37588edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37588r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=37588r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37588r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=37588r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=37588r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=37588r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=37588r=needscript Try newer version:http://bugs.php.net/fix.php?id=37588r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=37588r=support Expected behavior:http://bugs.php.net/fix.php?id=37588r=notwrong Not enough info: http://bugs.php.net/fix.php?id=37588r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=37588r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=37588r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37588r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=37588r=dst IIS Stability:http://bugs.php.net/fix.php?id=37588r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=37588r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=37588r=float No Zend Extensions: http://bugs.php.net/fix.php?id=37588r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=37588r=mysqlcfg
#34047 [Com]: When compile php cannot generate libphp5.so
ID: 34047 Comment by: smirko at poczta dot onet dot pl Reported By: calvinscy at hotmail dot com Status: No Feedback Bug Type: Compile Failure Operating System: Solaris 8 PHP Version: 5.0.4 New Comment: Just compiled PHP-5.1.4. Same issue - Apache not starting with message libphp5.so is garbled. Hope it's resolved soon... Previous Comments: [2006-05-10 06:44:45] info at urs-martini dot de I have apache2.2.2 on my debian box and tried to install php5 (5.1.2 and 5.1.4 don't work!). Compiling is without problems but apache does not start anymore: httpd: Syntax error on line 128 of /usr/local/apache2/conf/httpd.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/php5.load: API module structure `php5_module' in file /usr/local/apache2/modules/libphp5.so is garbled - perhaps this is not an Apache module DSO? I did not find anything helpful on the net... [2005-12-31 05:38:10] ian at manageads dot com httpd-2.2.0 MySQL-5.0.18-0 PHP-5.1.1 Same stinking message! httpd failed. The error was: Starting httpd: Syntax error on line 33 of /etc/httpd/conf/httpd.conf: API module structure `php5_module' in file /usr/local/apache2/modules/libphp5.so is garbled - perhaps this is not an Apache module DSO? [FAILED] [2005-12-19 19:07:34] till at klimpong dot com I'm having the same issue (it didn't build libphp5.so) with the 5.1.1 when I downloaded it from the website. My OS: FreeBSD 4.11-stable My libtool is: 1.5.x Using the latest snapshot solves this problem, but I am wondering why. Happy to provide more feedback when asked. :-) [2005-08-28 21:26:21] rob at silverarcher dot com sunfreeware doesn't work either. I'm using Fedora Core 4 and cannot get this one part to compile. [2005-08-28 21:12:45] rob at silverarcher dot com The problem still seems to be occurring. php-5.0.4 and php- latest both will not compile the libphp5.so. I'm hoping sunfreeware.com 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/34047 -- Edit this bug report at http://bugs.php.net/?id=34047edit=1
#37563 [Csd-Opn]: array_key_exists performance is poor for $array
ID: 37563 User updated by: bugs dot php dot net at nanonanonano dot net Reported By: bugs dot php dot net at nanonanonano dot net -Status: Closed +Status: Open Bug Type: Performance problem Operating System: Linux PHP Version: 5CVS-2006-05-23 (snap) Assigned To: ilia New Comment: Thanks for the prompt attention. Just one last thing -- the fix only went into 5CVS and as noted in the original bug report the problem exists in 4CVS too. Any chance of backporting the fix? # test with 4CVS (php4-STABLE-200605250830) Test with no refs:0.0027539730072021 Test with a ref to the array: 0.8985073853 Test with a ref to the array and pass by ref: 0.0028078556060791 Thanks in advance! Previous Comments: [2006-05-24 23:14:42] [EMAIL PROTECTED] 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. [2006-05-24 20:07:02] [EMAIL PROTECTED] Ilia, could you plz have a look at it? [2006-05-23 17:16:29] bugs dot php dot net at nanonanonano dot net Description: If there is a reference taken to an array ($b = $a) then the performance of array_key_exists($foo, $a) drops off enormously unless array_key_exists($foo, $a) is used. (Note this is identical to #30295 which is marked as fixed in CVS but doesn't appear to be fixed at all: it is found in both 4CVS and 5CVS) Reproduce code: --- Based on the code in bug #30295: http://pastebin.com/733286 Expected result: Time for the following operations should be approximately the same: array_key_exists($i, $a); $b = $a; array_key_exists($i, $a); $b = $a; array_key_exists($i, $a); Actual result: -- Time for $b = $a; array_key_exists($i, $a); is significantly greater than for the others. Sample times from running the reproduce code: Test with no refs:0.0012528896331787 Test with a ref to the array: 0.78344106674194 Test with a ref to the array and pass by ref: 0.0019340515136719 -- Edit this bug report at http://bugs.php.net/?id=37563edit=1
#37589 [NEW]: dbase_open doesnt act like it should
From: coffy at bluecups dot net Operating system: Linux PHP version: 5.1.4 PHP Bug Type: dBase related Bug description: dbase_open doesnt act like it should Description: When you try to open(mode 0) not correct dbase file using dbase_open it should return just FALSE according to http://www.php.net/manual/en/function.dbase-open.php, instead it prints unable to get header and Warning: dbase_open(): unable to open database. Reproduce code: --- code 1 ?php $db = dbase_open(ERR.DBF, 0); dbase_close($db); ? code 2 ?php $db = @dbase_open(ERR.DBF, 0); @dbase_close($db); ? Expected result: No warning or unable to get header, it should just return false (according to currenct documentation). Even if the warning is right behavior(and it's just missing from documentation), it still should be possible to hide unable to get header using @. Actual result: -- Fill ERR.DBF with anything else than correct dbase info and you get the unable to get header and Warning ... (code 1). Also it's not possible to hide unable to get header message, code 2 is using @-s and it still prints unable to get header, when you dont use correct dbf file. -- Edit bug report at http://bugs.php.net/?id=37589edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37589r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=37589r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37589r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=37589r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=37589r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=37589r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=37589r=needscript Try newer version:http://bugs.php.net/fix.php?id=37589r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=37589r=support Expected behavior:http://bugs.php.net/fix.php?id=37589r=notwrong Not enough info: http://bugs.php.net/fix.php?id=37589r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=37589r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=37589r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37589r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=37589r=dst IIS Stability:http://bugs.php.net/fix.php?id=37589r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=37589r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=37589r=float No Zend Extensions: http://bugs.php.net/fix.php?id=37589r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=37589r=mysqlcfg
#37587 [Opn-Csd]: var without attribute causes segfault.
ID: 37587 Updated by: [EMAIL PROTECTED] Reported By: alan at akbkhome dot com -Status: Open +Status: Closed Bug Type: WDDX related -Operating System: linux +Operating System: * -PHP Version: 5CVS-2006-05-25 (CVS) +PHP Version: 5.1.4 -Assigned To: +Assigned To: helly 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: [2006-05-25 05:11:31] alan at akbkhome dot com probably worth changing all the for (i=0;att[i];i++) to for (i=0;att att[i];i++) in that whole function. [2006-05-25 05:04:01] alan at akbkhome dot com Description: var with out attributes causes segfault due to no checking on att patch to fix: ? run-tests.php cvs diff: Diffing . Index: wddx.c === RCS file: /repository/php-src/ext/wddx/wddx.c,v retrieving revision 1.119.2.10 diff -u -r1.119.2.10 wddx.c --- wddx.c 23 Apr 2006 16:02:05 - 1.119.2.10 +++ wddx.c 25 May 2006 05:00:10 - @@ -811,14 +811,15 @@ wddx_stack_push((wddx_stack *)stack, ent, sizeof(st_entry)); } else if (!strcmp(name, EL_VAR)) { int i; - - for (i = 0; atts[i]; i++) { - if (!strcmp(atts[i], EL_NAME) atts[++i] atts[i][0]) { - char *decoded; - int decoded_len; - decoded = xml_utf8_decode(atts[i], strlen(atts[i]), decoded_len, ISO-8859-1); - stack-varname = decoded; - break; + if (atts) { + for (i = 0; atts[i]; i++) { + if (!strcmp(atts[i], EL_NAME) atts[++i] atts[i][0]) { + char *decoded; + int decoded_len; + decoded = xml_utf8_decode(atts[i], strlen(atts[i]), decoded_len, ISO-8859-1); + stack-varname = decoded; + break; + } } } } else if (!strcmp(name, EL_RECORDSET)) { Reproduce code: --- php -r 'var_dump(wddx_deserialize(file_get_contents(http://www.akbkhome.com/svn/hebehaven2/templates/backend/members_edit.html.rules.wddx;))); Expected result: a nice printout Actual result: -- segfault backtrace basically says att = 0x0 -- Edit this bug report at http://bugs.php.net/?id=37587edit=1
#34047 [Com]: When compile php cannot generate libphp5.so
ID: 34047 Comment by: smirko at poczta dot onet dot pl Reported By: calvinscy at hotmail dot com Status: No Feedback Bug Type: Compile Failure Operating System: Solaris 8 PHP Version: 5.0.4 New Comment: I'm pleased to say - it was rather an Apache issue than that of PHP. I've just installed Apache 2.2.2 and voila. Works like a charm! No garbled libphp... Previous Comments: [2006-05-25 10:13:10] smirko at poczta dot onet dot pl Just compiled PHP-5.1.4. Same issue - Apache not starting with message libphp5.so is garbled. Hope it's resolved soon... [2006-05-10 06:44:45] info at urs-martini dot de I have apache2.2.2 on my debian box and tried to install php5 (5.1.2 and 5.1.4 don't work!). Compiling is without problems but apache does not start anymore: httpd: Syntax error on line 128 of /usr/local/apache2/conf/httpd.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/php5.load: API module structure `php5_module' in file /usr/local/apache2/modules/libphp5.so is garbled - perhaps this is not an Apache module DSO? I did not find anything helpful on the net... [2005-12-31 05:38:10] ian at manageads dot com httpd-2.2.0 MySQL-5.0.18-0 PHP-5.1.1 Same stinking message! httpd failed. The error was: Starting httpd: Syntax error on line 33 of /etc/httpd/conf/httpd.conf: API module structure `php5_module' in file /usr/local/apache2/modules/libphp5.so is garbled - perhaps this is not an Apache module DSO? [FAILED] [2005-12-19 19:07:34] till at klimpong dot com I'm having the same issue (it didn't build libphp5.so) with the 5.1.1 when I downloaded it from the website. My OS: FreeBSD 4.11-stable My libtool is: 1.5.x Using the latest snapshot solves this problem, but I am wondering why. Happy to provide more feedback when asked. :-) [2005-08-28 21:26:21] rob at silverarcher dot com sunfreeware doesn't work either. I'm using Fedora Core 4 and cannot get this one part to compile. 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/34047 -- Edit this bug report at http://bugs.php.net/?id=34047edit=1
#37589 [Opn-Csd]: dbase_open doesnt act like it should
ID: 37589 Updated by: [EMAIL PROTECTED] Reported By: coffy at bluecups dot net -Status: Open +Status: Closed Bug Type: dBase related Operating System: Linux PHP Version: 5.1.4 New Comment: I removed the unable to get headers error message, but the PHP Warning must be there, as you should be able to know the reason why dbase_open() returns FALSE. Previous Comments: [2006-05-25 10:52:13] coffy at bluecups dot net Description: When you try to open(mode 0) not correct dbase file using dbase_open it should return just FALSE according to http://www.php.net/manual/en/function.dbase-open.php, instead it prints unable to get header and Warning: dbase_open(): unable to open database. Reproduce code: --- code 1 ?php $db = dbase_open(ERR.DBF, 0); dbase_close($db); ? code 2 ?php $db = @dbase_open(ERR.DBF, 0); @dbase_close($db); ? Expected result: No warning or unable to get header, it should just return false (according to currenct documentation). Even if the warning is right behavior(and it's just missing from documentation), it still should be possible to hide unable to get header using @. Actual result: -- Fill ERR.DBF with anything else than correct dbase info and you get the unable to get header and Warning ... (code 1). Also it's not possible to hide unable to get header message, code 2 is using @-s and it still prints unable to get header, when you dont use correct dbf file. -- Edit this bug report at http://bugs.php.net/?id=37589edit=1
#37571 [Bgs-Opn]: WDDX cannot deserialize serialized UTF-8 encoded non-ASCII text
ID: 37571 User updated by: jdolecek at NetBSD dot org Reported By: jdolecek at NetBSD dot org -Status: Bogus +Status: Open Bug Type: WDDX related Operating System: Any PHP Version: 5.1.4 New Comment: You probably don't understand the problem. I'm not talking about problem encoding iso-8859-1 text, but problem encoding text in _UTF-8_. UTF-8 stream legally contains characters in 128-160 range. Hopefully we agree here. WDDX uses iscntrl() to determine if it should record the character to char code=XX/ form. So it takes each character of multicharacter UTF-8 sequence and if _the single character of the sequence_ is determined to be control character according to current locale, it turns the component of multibyte sequence into char code=XX/ construct. So, it turns perfectly valid UTF-8 stream into invalid text stream, where some UTF-8 sequences are valid and some not. The problem is that it uses iscntrl(), while it arguably should enforce valid UTF-8 input and use something along iswcntrl(). But this would change the interface and likely break existing code using WDDX which depend on using iso-8859-1 text as input to serializer. Using iscntrl() + isascii() definitely solves the problem in the least obtrusive way AFAICS. Previous Comments: [2006-05-24 06:46:22] [EMAIL PROTECTED] Latin 1 doesn't define those characters in the 128-160 range... so it's perfectly correct not to encode them to UTF-8. You simply need to make sure you have valid text in the first place. [2006-05-23 22:50:20] jdolecek at NetBSD dot org Description: WDDX cannot be used to encode certain UTF8-encoded iso-8859-1 text. Particularily those iso-8859-1 characters, which after conversion to UTF-8 generate sequence of characters with value in 128-160 range, which are recognized as control characters. Control characters are turned into char code=XX/ sequence by WDDX. wddx_deserialize() expects UTF-8 encoded string, and implicitly converts the text back to iso-8859-1 before deserializing the structure. This is done _before_ the char code=XX/ is replaced by the character. The is thus recognized as part of the UTF-8 sequence, two-byte sequence is recoded to single-byte character and the result contains invalid XML (fragment 'char code=XX/'). Deserialization thus fails silently. I.e.: 1. iso-8859-1 is Z (ord(Z) 128) 2. UTF-8 string is XY 3. WDDX serializes that as Xchar code=ord(Y)/ 4. deserializer converts UTF-8 input to iso-8859-1 before starting deserialization, result is Bchar code=ord(Y)/ 5. deserializer detects invalid XML and aborts the decode, returns empty string Fix: Only recode ASCII control characters to char code=XX / sequence: --- wddx.c.orig 2006-05-24 00:39:34.0 +0200 +++ wddx.c @@ -399,7 +399,8 @@ static void php_wddx_serialize_string(wd break; default: - if (iscntrl((int)*(unsigned char *)p)) { + if (iscntrl((int)*(unsigned char *)p) +isascii((int)*(unsigned char *)p)) { FLUSH_BUF(); sprintf(control_buf, WDDX_CHAR, *p); php_wddx_add_chunk(packet, control_buf); Note - this patch also makes problem of Bug #37569 go away, but that patch is still useful to apply for code clarity. This bug is probably same problem as Bug #35241. Reproduce code: --- On UNIX with iso-8859-1 locale or Windows with Windows-1250 locale: var_dump( wddx_deserialize(wddx_serialize_value(utf8_encode(chr(200 ); Expected result: string(1) #268; Actual result: -- string(0) -- Edit this bug report at http://bugs.php.net/?id=37571edit=1
#37589 [Csd]: dbase_open doesnt act like it should
ID: 37589 User updated by: coffy at bluecups dot net Reported By: coffy at bluecups dot net Status: Closed Bug Type: dBase related Operating System: Linux PHP Version: 5.1.4 New Comment: there is similar bug that i found, you can't also hide (with @) error open: No such file or directory, if the file you are trying to open with dbase_open() doesn't exist; Previous Comments: [2006-05-25 11:48:17] [EMAIL PROTECTED] I removed the unable to get headers error message, but the PHP Warning must be there, as you should be able to know the reason why dbase_open() returns FALSE. [2006-05-25 10:52:13] coffy at bluecups dot net Description: When you try to open(mode 0) not correct dbase file using dbase_open it should return just FALSE according to http://www.php.net/manual/en/function.dbase-open.php, instead it prints unable to get header and Warning: dbase_open(): unable to open database. Reproduce code: --- code 1 ?php $db = dbase_open(ERR.DBF, 0); dbase_close($db); ? code 2 ?php $db = @dbase_open(ERR.DBF, 0); @dbase_close($db); ? Expected result: No warning or unable to get header, it should just return false (according to currenct documentation). Even if the warning is right behavior(and it's just missing from documentation), it still should be possible to hide unable to get header using @. Actual result: -- Fill ERR.DBF with anything else than correct dbase info and you get the unable to get header and Warning ... (code 1). Also it's not possible to hide unable to get header message, code 2 is using @-s and it still prints unable to get header, when you dont use correct dbf file. -- Edit this bug report at http://bugs.php.net/?id=37589edit=1
#37590 [NEW]: Bit operators not responding equally
From: jesse at eonstreet dot com Operating system: Windows Xp / FC 3 PHP version: 5.1.4 PHP Bug Type: *Math Functions Bug description: Bit operators not responding equally Description: ** Sorry if I havfe put this in hte wrong category. I have encountered a difference in the output of a bit operator combination between windows and FC3. The example below is part of the code that produces the Google Checksum when submitting to get a page rank. In Mozilla Javascript and windows Javascript and well as PHP 5.1.4 on whindows XP the bit operation returns correclty but under linux there is a difference I don't no why. Reproduce code: --- ? $a = -4738698913; echo $a ^= 43814; ? Expected result: In Windows the result is -443704711 In Linux FC3 the result is -2147439834 -- Edit bug report at http://bugs.php.net/?id=37590edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37590r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=37590r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37590r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=37590r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=37590r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=37590r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=37590r=needscript Try newer version:http://bugs.php.net/fix.php?id=37590r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=37590r=support Expected behavior:http://bugs.php.net/fix.php?id=37590r=notwrong Not enough info: http://bugs.php.net/fix.php?id=37590r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=37590r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=37590r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37590r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=37590r=dst IIS Stability:http://bugs.php.net/fix.php?id=37590r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=37590r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=37590r=float No Zend Extensions: http://bugs.php.net/fix.php?id=37590r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=37590r=mysqlcfg
#34180 [Asn-Csd]: --with-curlwrappers causes PHP to disregard some HTTP stream context options
ID: 34180 Updated by: [EMAIL PROTECTED] Reported By: ibrash at gmail dot com -Status: Assigned +Status: Closed Bug Type: cURL related Operating System: * PHP Version: 5CVS-2005-08-30 Assigned To: pollita 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: [2005-08-18 06:38:14] ibrash at gmail dot com Description: When PHP is compiled with --with-curl --with-curlwrappers, setting the HTTP method to POST in a stream context is disregarded and GET is used instead. This affects both 5.0 and 5.1 and presumably HEAD (haven't checked). Reproduce code: --- ?php $opts = array( 'http' = array( 'method' = 'POST', 'header' = Content-Type: application/x-www-form-urlencoded, 'content' = 'foo=bar' ) ); $context = stream_context_create($opts); readfile ('http://gaernin.aswwc.net/~ibrash/temp/dumprequestinfo.php', false, $context); ? For reference, dumprequestinfo.php is ?php var_dump($_SERVER['REQUEST_METHOD']); print_r($_POST); ? Expected result: string(4) POST Array ( [foo] = bar ) Actual result: -- string(3) GET Array ( ) -- Edit this bug report at http://bugs.php.net/?id=34180edit=1
#37590 [Opn-Bgs]: Bit operators not responding equally
ID: 37590 Updated by: [EMAIL PROTECTED] Reported By: jesse at eonstreet dot com -Status: Open +Status: Bogus Bug Type: *Math Functions Operating System: Windows Xp / FC 3 PHP Version: 5.1.4 New Comment: Bitwise operators are architecture dependent. And -4738698913 is actually not an integer, but a float on 32bit platform. Previous Comments: [2006-05-25 13:08:07] jesse at eonstreet dot com Description: ** Sorry if I havfe put this in hte wrong category. I have encountered a difference in the output of a bit operator combination between windows and FC3. The example below is part of the code that produces the Google Checksum when submitting to get a page rank. In Mozilla Javascript and windows Javascript and well as PHP 5.1.4 on whindows XP the bit operation returns correclty but under linux there is a difference I don't no why. Reproduce code: --- ? $a = -4738698913; echo $a ^= 43814; ? Expected result: In Windows the result is -443704711 In Linux FC3 the result is -2147439834 -- Edit this bug report at http://bugs.php.net/?id=37590edit=1
#37590 [Bgs-Opn]: Bit operators not responding equally
ID: 37590 User updated by: jesse at eonstreet dot com Reported By: jesse at eonstreet dot com -Status: Bogus +Status: Open Bug Type: *Math Functions Operating System: Windows Xp / FC 3 PHP Version: 5.1.4 New Comment: Yes, they are dependent to a point. But in 5.0.4 they returned the same end value. Something has changed in 5.1.x that no longer produces the correct value. Previous Comments: [2006-05-25 13:17:54] [EMAIL PROTECTED] Bitwise operators are architecture dependent. And -4738698913 is actually not an integer, but a float on 32bit platform. [2006-05-25 13:08:07] jesse at eonstreet dot com Description: ** Sorry if I havfe put this in hte wrong category. I have encountered a difference in the output of a bit operator combination between windows and FC3. The example below is part of the code that produces the Google Checksum when submitting to get a page rank. In Mozilla Javascript and windows Javascript and well as PHP 5.1.4 on whindows XP the bit operation returns correclty but under linux there is a difference I don't no why. Reproduce code: --- ? $a = -4738698913; echo $a ^= 43814; ? Expected result: In Windows the result is -443704711 In Linux FC3 the result is -2147439834 -- Edit this bug report at http://bugs.php.net/?id=37590edit=1
#37274 [Com]: Array style COM property access
ID: 37274 Comment by: dtyschenko at soft-ukraine dot com Reported By: tp at synolon dot gr Status: Open Bug Type: COM related Operating System: Windows XP Pro PHP Version: 5.1.3 New Comment: $this-kbmDetail-Field[ fieldname ]-Value = $fieldvalue; Is it okay, that you type filedname without '$' ??? Previous Comments: [2006-05-02 09:59:52] tp at synolon dot gr Description: This seems to be related with bug #28161 that, as I read, was fixed since version 5.0. I want to access an array style COM property that is actually an object and then get or set a property of that object. I get a COM exception when I do that followed by apache crash. I have tried all binary PHP distributions for Windows that I found from 5.1.2 to 5.1.3 (cvs also) and did not work. My PHP setup is the typical one described in 'install.txt' of the PHP package. The only change that I have made in php.ini (except of the doc_root) is 'com.allow_dcom = true'. I use Apache 1.3.27. Please help! Reproduce code: --- public function setField( $fieldname , $fieldvalue , $masterobj = true ) { // kbm kbmDetail are class member variables // that were previously instanciated like this: // $this-kbm = new COM( SasClient.kbm ); // The kbm object has an array style property // 'Field' that returns an object. We want to // set the 'Value' property. // In VB this code looks like this: // kbm.Field( fieldname ).Value = fieldvalue try { if( $masterobj ) $this-kbm-Field[ $fieldname ]-Value = $fieldvalue; else $this-kbmDetail-Field[ fieldname ]-Value = $fieldvalue; } catch( com_exception $e ) { print( $e-__toString( ) ); } } Expected result: The property should be set Actual result: -- exception 'com_exception' with message 'Error [0x8002000e] Invalid number of parameters. ' in c:\data\www\senapi\CSen.php:259 Stack trace: #0 c:\data\www\senapi\CSen.php(259): CSen::setField() #1 c:\data\www\senapi\sentest.php(206): CSen-setField('docid', -1001) #2 {main}docid = -1001 -- Edit this bug report at http://bugs.php.net/?id=37274edit=1
#37591 [NEW]: PHP MEM and CPU resource management
From: msho at exabytes dot com Operating system: Windows 2003 PHP version: 4.4.2 PHP Bug Type: IIS related Bug description: PHP MEM and CPU resource management Description: When adding PHP Engine mapping to IIS with Verify that file exists option turned off, IIS will execute PHP engine to serve the requested php file (not matter the file is exist or not exist). PHP loaded with certain amount of memory usage which will be in deep trouble if there is a lot of request to an invalid files via http. To have this issue reproduce: 1. Mapped the PHP engine to IIS with Verify that file exists option turned off. 2. Setup a normal php script that query on the webserver for an invalid php file via http infinitely, for example: http://server_ip//invalid_path 3. Run multiple (more than 100) instances at a time for the same script. The sample script on requesting the script infinitely can be retrieved on the Reproduce code section. Reproduce code: --- ? while(1) { $request_url = enter_the_url_here; //eg. http://server_ip//invalid_path $temp = file($request_url); unset($temp); } ? Expected result: You will see the CPU usage and MEM usage will shoot on the Windows webserver. Actual result: -- It will be great if PHP can reduce the CPU and MEM usage when dealing with the invalid file request via http. -- Edit bug report at http://bugs.php.net/?id=37591edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37591r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=37591r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37591r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=37591r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=37591r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=37591r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=37591r=needscript Try newer version:http://bugs.php.net/fix.php?id=37591r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=37591r=support Expected behavior:http://bugs.php.net/fix.php?id=37591r=notwrong Not enough info: http://bugs.php.net/fix.php?id=37591r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=37591r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=37591r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37591r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=37591r=dst IIS Stability:http://bugs.php.net/fix.php?id=37591r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=37591r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=37591r=float No Zend Extensions: http://bugs.php.net/fix.php?id=37591r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=37591r=mysqlcfg
#37590 [Opn]: Bit operators not responding equally
ID: 37590 User updated by: jesse at eonstreet dot com Reported By: jesse at eonstreet dot com Status: Open Bug Type: *Math Functions Operating System: Windows Xp / FC 3 PHP Version: 5.1.4 New Comment: Here is the code that had worked under 5.0.4 Windows / linux: ?php define('GOOGLE_MAGIC', 0xE6359A60); class googleTools{ public static $url; public function __construct($url = false){ } public function GoogleCH($url, $length=null, $init=GOOGLE_MAGIC) { if(is_null($length)) { $length = sizeof($url); } $a = $b = 0x9E3779B9; $c = $init; $k = 0; $len = $length; while($len = 12) { $a += ($url[$k+0] +($url[$k+1]8) +($url[$k+2]16) +($url[$k+3]24)); $b += ($url[$k+4] +($url[$k+5]8) +($url[$k+6]16) +($url[$k+7]24)); $c += ($url[$k+8] +($url[$k+9]8) +($url[$k+10]16)+($url[$k+11]24)); $mix = googleTools::mix($a,$b,$c); $a = $mix[0]; $b = $mix[1]; $c = $mix[2]; $k += 12; $len -= 12; } $c += $length; switch($len) /* all the case statements fall through */ { case 11: $c+=($url[$k+10]24); case 10: $c+=($url[$k+9]16); case 9 : $c+=($url[$k+8]8); /* the first byte of c is reserved for the length */ case 8 : $b+=($url[$k+7]24); case 7 : $b+=($url[$k+6]16); case 6 : $b+=($url[$k+5]8); case 5 : $b+=($url[$k+4]); case 4 : $a+=($url[$k+3]24); case 3 : $a+=($url[$k+2]16); case 2 : $a+=($url[$k+1]8); case 1 : $a+=($url[$k+0]); /* case 0: nothing left to add */ } $mix = googleTools::mix($a,$b,$c); /* report the result */ return $mix[2]; } public function doGetRank($url) { $url = 'info:'.$url; $GoogleCH = googleTools::GoogleCH(googleTools::strord($url)); $url = urlencode($url); $file = http://www.google.com/search?client=navclient-autoch=6$GoogleCHfeatures=Rankq=$url;; //$data = file($file); $ch = curl_init();// initialize curl handle curl_setopt($ch, CURLOPT_URL,$file); // set url to post to curl_setopt($ch, CURLOPT_FAILONERROR, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);// allow redirects curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); // return into a variable curl_setopt($ch, CURLOPT_TIMEOUT, 25); // times out after 4s $data = curl_exec($ch); // run the whole process curl_close($ch); $rankarray = explode (':', $data); $rank = $rankarray[2]; return $rank; } //converts a string into an array of integers containing the numeric value of the char private function strord($string) { for($i=0;$istrlen($string);$i++) { $result[$i] = ord($string{$i}); $strResult .= $i .-.$result[$i]; } // echo br.$strResult.br; return $result; } //unsigned shift right private function zeroFill($a, $b) { $aTemp =$a; $z = hexdec(8000); if ($z $a) { $a = ($a1); $a = (~$z); $a |= 0x4000; $a = ($a($b-1)); } else { $a = ($a$b); } return $a; } private function mix($a,$b,$c) { $a -= $b; $a -= $c; $aTemp = $a; $a ^= (googleTools::zeroFill($c,13)); $b -= $c; $b -= $a; $b ^= ($a8); $c -= $a; $c -= $b; $c ^= (googleTools::zeroFill($b,13));
#37349 [Fbk-Asn]: memory corruption within run-tests.php
ID: 37349 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Feedback +Status: Assigned Bug Type: Streams related Operating System: n/a PHP Version: 6CVS-2006-05-07 (CVS) Assigned To: pollita New Comment: yep, it is still valid. This bug has nothing to do with tidy itself. It happens that I made a test for tidy that triggered a problem somewhere else. Previous Comments: [2006-05-24 21:53:47] [EMAIL PROTECTED] Is this still valid? I can't reproduce it with the latest CVS. [2006-05-07 22:24:04] [EMAIL PROTECTED] Maybe Sara is the best person to look into this (as she implemented the Unicode streams stuff). [2006-05-07 18:50:35] [EMAIL PROTECTED] I already sent a mail to the mailing list with more details. I just opened the bug so that it doesn't get lost. http://news.php.net/php.internals/23030 [2006-05-07 18:41:19] [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. [2006-05-07 17:40:59] [EMAIL PROTECTED] Description: the streams layer corrupt the memory when running the run-tests.php on a tidy extension test Reproduce code: --- TEST_PHP_EXECUTABLE=./sapi/cli/php valgrind ./sapi/cli/php run-tests.php -U ext/tidy/tests/020.phpt -- Edit this bug report at http://bugs.php.net/?id=37349edit=1
#37590 [Com]: Bit operators not responding equally
ID: 37590 Comment by: judas dot iscariote at gmail dot com Reported By: jesse at eonstreet dot com Status: Open Bug Type: *Math Functions Operating System: Windows Xp / FC 3 PHP Version: 5.1.4 New Comment: your first test returns -4738672007 on Linux 64 bit. PHP_5_2 CVS. Previous Comments: [2006-05-25 16:31:32] jesse at eonstreet dot com Here is the code that had worked under 5.0.4 Windows / linux: ?php define('GOOGLE_MAGIC', 0xE6359A60); class googleTools{ public static $url; public function __construct($url = false){ } public function GoogleCH($url, $length=null, $init=GOOGLE_MAGIC) { if(is_null($length)) { $length = sizeof($url); } $a = $b = 0x9E3779B9; $c = $init; $k = 0; $len = $length; while($len = 12) { $a += ($url[$k+0] +($url[$k+1]8) +($url[$k+2]16) +($url[$k+3]24)); $b += ($url[$k+4] +($url[$k+5]8) +($url[$k+6]16) +($url[$k+7]24)); $c += ($url[$k+8] +($url[$k+9]8) +($url[$k+10]16)+($url[$k+11]24)); $mix = googleTools::mix($a,$b,$c); $a = $mix[0]; $b = $mix[1]; $c = $mix[2]; $k += 12; $len -= 12; } $c += $length; switch($len) /* all the case statements fall through */ { case 11: $c+=($url[$k+10]24); case 10: $c+=($url[$k+9]16); case 9 : $c+=($url[$k+8]8); /* the first byte of c is reserved for the length */ case 8 : $b+=($url[$k+7]24); case 7 : $b+=($url[$k+6]16); case 6 : $b+=($url[$k+5]8); case 5 : $b+=($url[$k+4]); case 4 : $a+=($url[$k+3]24); case 3 : $a+=($url[$k+2]16); case 2 : $a+=($url[$k+1]8); case 1 : $a+=($url[$k+0]); /* case 0: nothing left to add */ } $mix = googleTools::mix($a,$b,$c); /* report the result */ return $mix[2]; } public function doGetRank($url) { $url = 'info:'.$url; $GoogleCH = googleTools::GoogleCH(googleTools::strord($url)); $url = urlencode($url); $file = http://www.google.com/search?client=navclient-autoch=6$GoogleCHfeatures=Rankq=$url;; //$data = file($file); $ch = curl_init();// initialize curl handle curl_setopt($ch, CURLOPT_URL,$file); // set url to post to curl_setopt($ch, CURLOPT_FAILONERROR, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);// allow redirects curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); // return into a variable curl_setopt($ch, CURLOPT_TIMEOUT, 25); // times out after 4s $data = curl_exec($ch); // run the whole process curl_close($ch); $rankarray = explode (':', $data); $rank = $rankarray[2]; return $rank; } //converts a string into an array of integers containing the numeric value of the char private function strord($string) { for($i=0;$istrlen($string);$i++) { $result[$i] = ord($string{$i}); $strResult .= $i .-.$result[$i]; } // echo br.$strResult.br; return $result; } //unsigned shift right private function zeroFill($a, $b) { $aTemp =$a; $z = hexdec(8000); if ($z $a) { $a = ($a1); $a = (~$z); $a |= 0x4000; $a = ($a($b-1)); } else { $a = ($a$b); } return $a; } private function
#20745 [Com]: socket_accept() in blocking mode doesn't handle signal interrupts
ID: 20745 Comment by: lindsay at bitleap dot com Reported By: polone at townnews dot com Status: No Feedback Bug Type: Sockets related Operating System: Linux PHP Version: 4.2.3 New Comment: I still see this issue with php 5.1.4. I did notice that the signal will queue up and on the next inbound connection the queued signal executes. Previous Comments: [2006-02-09 18:55:35] flachi at gmail dot com I also have this problem with PHP 4.4.2. Is there any way to fix it ? [2003-01-02 02:50:09] piotr at t-p-l dot com I'd like to revive this bug .. as of 4.3.0 this beheaviour persists .. I even tried this define(ticks=1); approach quoted in one of the related bugs .. it didnt help .. during a call to socket_accept() as far as I can see (I've tested only with SIGTERM and SIGINT) .. those handlers never get called .. with the new feature (the 3rd param on pcntl_signal() .. set to false) .. the socket_accept() call gets interrupted, but the handler is still not called. I would say there is a need to resolve this .. right now there is no way to cleanly kill a daemon process running php unless non blocking sockets are used .. which is basicaly a waste of cpu cycles .. Please respond as to the status of this problem asap. [2002-12-15 04:05:02] [EMAIL PROTECTED] No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to Open. Thank you. [2002-12-01 14:31:23] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-latest.zip [2002-12-01 07:59:34] polone at townnews dot com The socket_accept() function doesn't appear to handle kernel level system interrupts. This is a problem because PHP scripts written to use pcntl_signal() won't be executed while socket_accept() is in blocking mode. THAT is a problem because the script can't be killed with: kill -s SIGUSR1 [pid] and can't reap zombie processes when SIGCHLD is given (not that is much of a problem on Linux, since you can use SIG_IGN). A workaround I've made is to set a socket to non-blocking mode: socket_set_nonblock($hSocket); And then use a while loop like so: while (($hClient = @socket_accept($hSocket)) === false) { // If this is a real error, we need to handle it. Unfortunately, in this // event we just die() essentially. if (!is_resource($hSocket)) { error_log(socket_strerror(socket_last_error($hSocket))); exit; } // We need to sleep for one second so that CPU isn't absorbed with this // process. This may seem clunky, but select() doesn't appear to work // correctly with accept() in PHP in blocking mode (that is EINTR does // not appear to work correctly), thus preventing signals from being // received. This, in effect, makes the process unkillable. This is the // workaround, for the moment. sleep(1); } While this works, it would be much better if it just returned when a system interrupt is given like the C-equivalent does. This works because the system can't receive messages from the kernel because it isn't blocking. -- Edit this bug report at http://bugs.php.net/?id=20745edit=1
#37367 [NoF-Csd]: WNOHANG option causes no PID to be returned.
ID: 37367 User updated by: doprea at chimesnet dot com Reported By: doprea at chimesnet dot com -Status: No Feedback +Status: Closed Bug Type: PCNTL related Operating System: Fedora 4 PHP Version: 5.1.4 New Comment: Stand by. This error occured on several versions of PHP overall several systems for several days, but is now working (the script I provided was uploaded right after being tested). I have to spend more time on this. Thanks for looking, though. Previous Comments: [2006-05-23 01:00:00] 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. [2006-05-15 21:55:57] [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 possible, make the script source available online and provide an URL to it here. Try to avoid embedding huge scripts into the report. [2006-05-08 16:59:55] doprea at chimesnet dot com Sorry for the multiple posts: There is only one file at that location, called 'multitiered.php'. Clearly, I'm losing my mind. [2006-05-08 16:58:07] doprea at chimesnet dot com Please use email address doprea at chimesnet dot com. [2006-05-08 16:56:44] [EMAIL PROTECTED] (email change.) 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/37367 -- Edit this bug report at http://bugs.php.net/?id=37367edit=1
#36853 [Com]: Worker process crashes after application pool recycle
ID: 36853 Comment by: sschefer at scheferonline dot net Reported By: kleef84 at hotmail dot com Status: No Feedback Bug Type: IIS related Operating System: Windows Server 2003 SP1 PHP Version: 5CVS-2006-03-24 (CVS) New Comment: Applies to all W2K3 versions after SP1 with DEP. My Installation is W2K3-R2 64bit -- The problem described is in the order in which the extensions are loading from the ini file. IIS fails to register the out of order dll. When a dependency is run agains the unregistered dll, windows DEP sees it as a threat and shuts down the worker process. Pretty sweet actually. The immediate solution is to comment out all of the extensions in your ini file and then one at a time, (very important), uncomment them and do a full reboot. DEP needs to be restarted clean so an IIS restart is not enough. When the offending extension causes the fault, cut and paste it one level above the last uncommented extension. You're probably going to do this several times before you get it right but eventually you will hit the sweet spot. The key is not to load extension you don't need. If this were any other vendors product I would find something better but the fact is that the product is so good that its worth the extra work to get it up and running. Note: You might be able to, (in fact you can), get away with just turning off DEP to get rid of the surface level problem but that would not solve the real problem. Previous Comments: [2006-04-03 01:00:04] 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. [2006-04-01 02:11:17] funkyonex at hotmail dot com Try changing the identity of the application pool from NETWORK SERVEICE to IWAM_[SERVERNAME]. From the IIS console, right-click on the AppPool -- Properties -- Identity tab. [2006-03-26 12:34:40] [EMAIL PROTECTED] I mean grab the binaries, not the sources and try them please. [2006-03-26 04:02:52] kleef84 at hotmail dot com I've tried with php5.1-200603252330.tar.gz, but unfortunately no positive effect. Debug Diagnostic Tool also gives the same result. I'm using Microsoft Visual C++ 6.0 to build PHP. The configure command I used is: cscript /nologo configure.js --enable-isapi --enable-cli-win32 --with-config-file-scan-dir=c:\php5 --with-mysqli --with-mysql --enable-pdo --with-pdo-mysql Any more actions I can take to provide you with more information on this? And what do you mean with 'official' in: Please try _official_ snapshots. [2006-03-26 00:57:14] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.1-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.1-win32-latest.zip Please try _official_ snapshots. 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/36853 -- Edit this bug report at http://bugs.php.net/?id=36853edit=1
#37593 [NEW]: extract() does not work for accented keys
From: gallard at mmic dot net Operating system: Linux Mandriva 2006 PHP version: 5.1.4 PHP Bug Type: *Languages/Translation Bug description: extract() does not work for accented keys Description: Problem seen in PHP5.0.4 extract() will not extract an array element if the key name contain an accented character. In the following example, the third element is not extracted. Reproduce code: --- $x['aa']=1; $x['ae']=2; $x['aé']=3; $x['af']=4; extract($x); print_r( get_defined_vars()); Expected result: Array ( [x] = Array ( [aa] = 1 [ae] = 2 [aé] = 3 [af] = 4 ) [aa] = 1 [ae] = 2 [aé] = 3 [af] = 4 ) Actual result: -- Array ( [x] = Array ( [aa] = 1 [ae] = 2 [aé] = 3 [af] = 4 ) [aa] = 1 [ae] = 2 [af] = 4 ) -- Edit bug report at http://bugs.php.net/?id=37593edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37593r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=37593r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37593r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=37593r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=37593r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=37593r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=37593r=needscript Try newer version:http://bugs.php.net/fix.php?id=37593r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=37593r=support Expected behavior:http://bugs.php.net/fix.php?id=37593r=notwrong Not enough info: http://bugs.php.net/fix.php?id=37593r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=37593r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=37593r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37593r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=37593r=dst IIS Stability:http://bugs.php.net/fix.php?id=37593r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=37593r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=37593r=float No Zend Extensions: http://bugs.php.net/fix.php?id=37593r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=37593r=mysqlcfg
#37563 [Opn-Csd]: array_key_exists performance is poor for $array
ID: 37563 Updated by: [EMAIL PROTECTED] Reported By: bugs dot php dot net at nanonanonano dot net -Status: Open +Status: Closed Bug Type: Performance problem Operating System: Linux PHP Version: 5CVS-2006-05-23 (snap) Assigned To: ilia 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. it cannot be back ported to PHP4 as the fix relies on PHP 5 only code. Previous Comments: [2006-05-25 10:15:15] bugs dot php dot net at nanonanonano dot net Thanks for the prompt attention. Just one last thing -- the fix only went into 5CVS and as noted in the original bug report the problem exists in 4CVS too. Any chance of backporting the fix? # test with 4CVS (php4-STABLE-200605250830) Test with no refs:0.0027539730072021 Test with a ref to the array: 0.8985073853 Test with a ref to the array and pass by ref: 0.0028078556060791 Thanks in advance! [2006-05-24 23:14:42] [EMAIL PROTECTED] 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. [2006-05-24 20:07:02] [EMAIL PROTECTED] Ilia, could you plz have a look at it? [2006-05-23 17:16:29] bugs dot php dot net at nanonanonano dot net Description: If there is a reference taken to an array ($b = $a) then the performance of array_key_exists($foo, $a) drops off enormously unless array_key_exists($foo, $a) is used. (Note this is identical to #30295 which is marked as fixed in CVS but doesn't appear to be fixed at all: it is found in both 4CVS and 5CVS) Reproduce code: --- Based on the code in bug #30295: http://pastebin.com/733286 Expected result: Time for the following operations should be approximately the same: array_key_exists($i, $a); $b = $a; array_key_exists($i, $a); $b = $a; array_key_exists($i, $a); Actual result: -- Time for $b = $a; array_key_exists($i, $a); is significantly greater than for the others. Sample times from running the reproduce code: Test with no refs:0.0012528896331787 Test with a ref to the array: 0.78344106674194 Test with a ref to the array and pass by ref: 0.0019340515136719 -- Edit this bug report at http://bugs.php.net/?id=37563edit=1
#37569 [Asn-Csd]: WDDX bad character encoding
ID: 37569 Updated by: [EMAIL PROTECTED] Reported By: jdolecek at NetBSD dot org -Status: Assigned +Status: Closed Bug Type: WDDX related Operating System: Any PHP Version: 5.1.4 Assigned To: iliaa 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: [2006-05-23 22:19:21] jdolecek at NetBSD dot org Description: WDDX serializes control charactes using a char code=XX/ construct, However, the code contains sign extension bug, and on platforms with signed char the result XX contains incorrect (sign-extended) code. This affects e.g. UTF8-encoded non-ASCII text, which can contain characters in 128-160 range. Fix: --- wddx.c.orig 2006-05-23 23:58:54.0 +0200 +++ wddx.c @@ -401,7 +401,7 @@ static void php_wddx_serialize_string(wd default: if (iscntrl((int)*(unsigned char *)p)) { FLUSH_BUF(); - sprintf(control_buf, WDDX_CHAR, *p); + sprintf(control_buf, WDDX_CHAR, (int)*(unsigned char *)p); php_wddx_add_chunk(packet, control_buf); } else buf[l++] = *p; Reproduce code: --- On UNIX with iso-8859-1 locale: echo wddx_serialize_value(chr(1)).\n; echo wddx_serialize_value(chr(128)).\n; Expected result: wddxPacket version='1.0'header/datastringchar code='01'//string/data/wddxPacket wddxPacket version='1.0'header/datastringchar code='80'//string/data/wddxPacket Actual result: -- wddxPacket version='1.0'header/datastringchar code='01'//string/data/wddxPacket wddxPacket version='1.0'header/datastringchar code='FF80'//string/data/wddxPacket -- Edit this bug report at http://bugs.php.net/?id=37569edit=1
#37594 [NEW]: mssql fails under load
From: mzamora at meritlending dot com Operating system: windows 2000 sp4 PHP version: 5.1.4 PHP Bug Type: MSSQL related Bug description: mssql fails under load Description: Under heavy load the server responds with the following: Warning: mssql_pconnect() [function.mssql-pconnect]: Unable to connect to server: servername We see the same type issue with the connect function. Our configuration is as follows: OS - Windows 2000 SP4 Apache - 2.0.0.58 PHP - 5.1.4 Changes to the PHP.ini include Enabling the following extensions extension=php_curl.dll extension=php_mime_magic.dll extension=php_mssql.dll extension=php_openssl.dll extension=php_printer.dll All mssql relevant settings have been not been changed from php.ini-dist Please let me know what we can do to help find a resolution to this issue. As a note the issue we are encountering is exactly like the one reported in bug #32854 -- Edit bug report at http://bugs.php.net/?id=37594edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37594r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=37594r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37594r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=37594r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=37594r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=37594r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=37594r=needscript Try newer version:http://bugs.php.net/fix.php?id=37594r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=37594r=support Expected behavior:http://bugs.php.net/fix.php?id=37594r=notwrong Not enough info: http://bugs.php.net/fix.php?id=37594r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=37594r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=37594r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37594r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=37594r=dst IIS Stability:http://bugs.php.net/fix.php?id=37594r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=37594r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=37594r=float No Zend Extensions: http://bugs.php.net/fix.php?id=37594r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=37594r=mysqlcfg
#37595 [NEW]: last part of the string is lost at decoding
From: coditza at cluj dot astral dot ro Operating system: windows PHP version: 4.4.2 PHP Bug Type: mcrypt related Bug description: last part of the string is lost at decoding Description: If the lenght of the encoded string is a multiple of chipher block size, the last blocksize part of the chipher is lost at decoding. Reproduce code: --- Use the script at: http://www.coada.net/develop/crypt.phps to produce an encoded file, then, from shell: openssl bf-cbc -in out.dat -out out.dec -K 000102030405060708090a0b0c0d0e0f -iv 0102030405060708 -d and cat out.dec Expected result: [EMAIL PROTECTED] [EMAIL PROTECTED] Actual result: -- bad decrypt 31976:error:06065064:digital envelope routines:EVP_DecryptFinal:bad decrypt:/usr/src/secure/lib/libcrypto/../../../crypto/openssl/crypto/evp/evp_enc.c:450: [EMAIL PROTECTED] cat out.dec [EMAIL PROTECTED] -- Edit bug report at http://bugs.php.net/?id=37595edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37595r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=37595r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37595r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=37595r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=37595r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=37595r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=37595r=needscript Try newer version:http://bugs.php.net/fix.php?id=37595r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=37595r=support Expected behavior:http://bugs.php.net/fix.php?id=37595r=notwrong Not enough info: http://bugs.php.net/fix.php?id=37595r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=37595r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=37595r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37595r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=37595r=dst IIS Stability:http://bugs.php.net/fix.php?id=37595r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=37595r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=37595r=float No Zend Extensions: http://bugs.php.net/fix.php?id=37595r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=37595r=mysqlcfg
#37594 [Opn-Fbk]: mssql fails under load
ID: 37594 Updated by: [EMAIL PROTECTED] Reported By: mzamora at meritlending dot com -Status: Open +Status: Feedback Bug Type: MSSQL related Operating System: windows 2000 sp4 PHP Version: 5.1.4 -Assigned To: +Assigned To: fmk New Comment: Are you using CGI or php5apache2.dll? The library used by the mssql extension is not thread safe. You might want to try php_dblib.dll. It's the same mssql_*() functions but it's compiled against FreeTDS. Previous Comments: [2006-05-25 23:42:43] mzamora at meritlending dot com Description: Under heavy load the server responds with the following: Warning: mssql_pconnect() [function.mssql-pconnect]: Unable to connect to server: servername We see the same type issue with the connect function. Our configuration is as follows: OS - Windows 2000 SP4 Apache - 2.0.0.58 PHP - 5.1.4 Changes to the PHP.ini include Enabling the following extensions extension=php_curl.dll extension=php_mime_magic.dll extension=php_mssql.dll extension=php_openssl.dll extension=php_printer.dll All mssql relevant settings have been not been changed from php.ini-dist Please let me know what we can do to help find a resolution to this issue. As a note the issue we are encountering is exactly like the one reported in bug #32854 -- Edit this bug report at http://bugs.php.net/?id=37594edit=1
#37594 [Fbk-Opn]: mssql fails under load
ID: 37594 User updated by: mzamora at meritlending dot com Reported By: mzamora at meritlending dot com -Status: Feedback +Status: Open Bug Type: MSSQL related Operating System: windows 2000 sp4 PHP Version: 5.1.4 Assigned To: fmk New Comment: we are using php5apache2.dll. It will be some time tomorrow before I get a chance to do any testing with php_dblib.dll. Previous Comments: [2006-05-25 23:54:13] [EMAIL PROTECTED] Are you using CGI or php5apache2.dll? The library used by the mssql extension is not thread safe. You might want to try php_dblib.dll. It's the same mssql_*() functions but it's compiled against FreeTDS. [2006-05-25 23:42:43] mzamora at meritlending dot com Description: Under heavy load the server responds with the following: Warning: mssql_pconnect() [function.mssql-pconnect]: Unable to connect to server: servername We see the same type issue with the connect function. Our configuration is as follows: OS - Windows 2000 SP4 Apache - 2.0.0.58 PHP - 5.1.4 Changes to the PHP.ini include Enabling the following extensions extension=php_curl.dll extension=php_mime_magic.dll extension=php_mssql.dll extension=php_openssl.dll extension=php_printer.dll All mssql relevant settings have been not been changed from php.ini-dist Please let me know what we can do to help find a resolution to this issue. As a note the issue we are encountering is exactly like the one reported in bug #32854 -- Edit this bug report at http://bugs.php.net/?id=37594edit=1
#37596 [NEW]: sha1_file() eating memory like so much nami
From: jlevy at imerica dot com Operating system: Debian GNU/Linux PHP version: 5.1.4 PHP Bug Type: Unknown/Other Function Bug description: sha1_file() eating memory like so much nami Description: sha1_file() not releasing memory. After calling thousands of sha1_file() I noticed that memory resources are not being freed. Script evenually bombs due to lack of resources. ** Note ** I think md5_file() is doing the same thing. Reproduce code: --- function getFiles($rdi,$depth=0) { if (!is_object($rdi)) return; for ($rdi-rewind();$rdi-valid();$rdi-next()) { if ($rdi-isDot()) continue; if ($rdi-isDir() || $rdi-isFile()) { if($rdi-isFile() echo sha1_file($rdi-current()); if ($rdi-hasChildren()) getFiles($rdi-getChildren(),1+$depth); } } } //** I figured that calling clearstatcache() might help, but no, it didn't **// -- Edit bug report at http://bugs.php.net/?id=37596edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37596r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=37596r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37596r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=37596r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=37596r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=37596r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=37596r=needscript Try newer version:http://bugs.php.net/fix.php?id=37596r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=37596r=support Expected behavior:http://bugs.php.net/fix.php?id=37596r=notwrong Not enough info: http://bugs.php.net/fix.php?id=37596r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=37596r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=37596r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37596r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=37596r=dst IIS Stability:http://bugs.php.net/fix.php?id=37596r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=37596r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=37596r=float No Zend Extensions: http://bugs.php.net/fix.php?id=37596r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=37596r=mysqlcfg
#37445 [Com]: Reproducible segfault
ID: 37445 Comment by: php at seven dot net dot nz Reported By: dhrubab at gmail dot com Status: Assigned Bug Type: PDO related Operating System: Linux PHP Version: 5.1.4 Assigned To: wez New Comment: I too was going nuts from this bug. I know no C so I can't help too much, but here's my GDB trace for people that understand it. So far I can't narrow down exactly what code is causing the segfault. Reverting the diff as suggested by indeyets at gmail dot com solved the problem. ./configure --enable-debug --with-apxs2=/usr/bin/apxs2 --with-zlib --with-bz2 --with-gd --with-ttf --with-pdo-mysql --with-mysql --with-xmlrpc --with-curl Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1214347584 (LWP 14636)] 0xb7401950 in mysql_more_results () from /usr/lib/libmysqlclient.so.15 (gdb) where #0 0xb7401950 in mysql_more_results () from /usr/lib/libmysqlclient.so.15 #1 0xb76ff78c in pdo_mysql_stmt_dtor (stmt=0x8399a74) at /tmp/php-5.1.4/ext/pdo_mysql/mysql_statement.c:71 #2 0xb76f9713 in free_statement (stmt=0x8399a74) at /tmp/php-5.1.4/ext/pdo/pdo_stmt.c:2200 #3 0xb786485b in zend_objects_store_free_object_storage (objects=0xb79e396c) at /tmp/php-5.1.4/Zend/zend_objects_API.c:86 #4 0xb783b851 in shutdown_executor () at /tmp/php-5.1.4/Zend/zend_execute_API.c:281 #5 0xb7848645 in zend_deactivate () at /tmp/php-5.1.4/Zend/zend.c:854 #6 0xb7806229 in php_request_shutdown (dummy=0x0) at /tmp/php-5.1.4/main/main.c:1287 #7 0xb78e71b7 in php_handler (r=0x82af068) at /tmp/php-5.1.4/sapi/apache2handler/sapi_apache2.c:445 #8 0x08077e38 in ap_run_handler () #9 0x080781bc in ap_invoke_handler () #10 0x080698c3 in ap_internal_redirect () #11 0xb717cc03 in ?? () from /usr/lib/apache2/modules/mod_rewrite.so #12 0x082af058 in ?? () #13 0x082a66b0 in ?? () #14 0x in ?? () Previous Comments: [2006-05-19 09:21:12] greg dot smith at gr-tech dot net I have reproduced the bug on Centos 4 64bit and 32 bit and Fedora core 5 as well as Suse 10.1 [2006-05-15 12:40:11] indeyets at gmail dot com reverting this diff helps to solve problem, while the proper resolution is not available: http://cvs.php.net/viewcvs.cgi/php-src/ext/pdo_mysql/mysql_statement.c?r1=1.48.2.12r2=1.48.2.13 [2006-05-15 10:20:58] dhrubab at gmail dot com A note to say I'm using latest php (5.1.4), mysql (5.0.21), pecl-pdo (1.0.3) and pecl-pdo-mysql (1.0.2). The example code relies on mysql5 default tables being there. [2006-05-15 10:01:57] dhrubab at gmail dot com Description: The provided code causes a segfault. My php.ini settings are as below. short_open_tag = Off allow_call_time_pass_reference = Off error_reporting = E_ALL display_errors = On display_startup_errors = On log_errors = Off variables_order = GPCS register_globals = Off register_long_arrays = Off register_argc_argv = Off magic_quotes_gpc = Off magic_quotes_runtime = Off allow_url_fopen = On session.name = GRTSESSID session.use_trans_sid = 0 session.hash_function = 1 session.hash_bits_per_character = 5 My configure is as below. './configure' '--prefix=/usr/lib/php5' '--sysconfdir=/etc' '--cache-file=./config.cache' '--disable-cli' '--with-apxs2=/usr/sbin/apxs2' '--with-config-file-path=/etc/php/apache2-php5' '--with-config-file-scan-dir=/etc/php/apache2-php5/ext-active' '--without-pear' '--disable-bcmath' '--with-bz2=shared' '--enable-calendar=shared' '--with-curl=shared' '--with-curlwrappers=shared' '--disable-dbase' '--enable-exif=shared' '--without-fbsql' '--without-fdftk' '--disable-filepro' '--enable-ftp=shared' '--with-gettext=shared' '--without-gmp' '--without-hwapi' '--without-informix' '--disable-ipv6' '--without-kerberos' '--enable-mbstring=shared' '--with-mcrypt=shared' '--disable-memory-limit' '--with-mhash=shared' '--without-ming' '--without-msql' '--without-mssql' '--with-ncurses=shared' '--with-openssl' '--with-openssl-dir=/usr' '--enable-pcntl=shared' '--disable-pdo' '--without-pgsql' '--with-pspell=shared' '--without-recode' '--disable-shmop' '--without-snmp' '--enable-soap=shared' '--enable-sockets=shared' '--without-sybase' '--without-sybase-ct' '--disable-sysvmsg' '--disable-sysvsem' '--disable-sysvshm' '--with-tidy=shared' '--enable-wddx=shared' '--with-xmlrpc=shared' '--with-xsl=shared' '--with-zlib=shared' '--enable-debug' '--without-cdb' '--without-db4' '--without-flatfile' '--without-gdbm' '--without-inifile' '--without-qdbm' '--with-freetype-dir=/usr' '--with-t1lib=/usr' '--disable-gd-jis-conv' '--enable-gd-native-ttf' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--without-xpm-dir' '--with-gd' '--with-imap=shared' '--with-imap-ssl'
#37597 [NEW]: Cannot stringify objects without __toString
From: doublecompile at gmail dot com Operating system: Ubuntu Linux 5.04 PHP version: 5CVS-2006-05-26 (snap) PHP Bug Type: Strings related Bug description: Cannot stringify objects without __toString Description: Attempting to stringify (casting, strval, echo) an instantiated class without a __toString() method results in the following error: Catchable fatal error: Object of class test could not be converted to string in... Built using php5.2-200605252230 Snap with the following config statement: './configure' '--with-mysql=/usr/local/php5/ext/mysql' '--with-pdo' '--with-pdo-mysql' '--with-apxs2=/usr/bin/apxs2' '--with-zlib' '--enable-bcmath' '--enable-calendar' '--with-gd=/usr' '--with-jpeg-dir=/usr/include' '--with-zlib-dir=/usr/include' '--with-png-dir=/usr/include' '--with-xpm-dir=/usr/include' '--with-freetype-dir=/usr/include' '--with-ldap' '--with-mcrypt' '--with-mhash' '--with-bz2' '--with-curl' '--enable-ftp' '--with-openssl' '--with-mysqli' '--enable-exif' '--enable-wddx' '--with-xsl' '--enable-sockets' '--enable-soap' '--with-pgsql=/usr/lib/postgresql' '--with-pdo-pgsql=/usr/lib/postgresql' '--with-sqlite' '--with-pdo-sqlite' '--with-ibm-db2=/home/db2inst1/sqllib' '--with-pdo-odbc=ibm-db2,/home/db2inst1/sqllib' '--enable-mbstring' '--with-gettext' Reproduce code: --- class test { } $test = new test(); // any of the following would produce the error $value = (string)$test; $value = strval($test); echo $test; Expected result: $value to be set to Object #1 or the echo to output Object #1 Actual result: -- Catchable fatal error: Object of class test could not be converted to string in... -- Edit bug report at http://bugs.php.net/?id=37597edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37597r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=37597r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37597r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=37597r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=37597r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=37597r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=37597r=needscript Try newer version:http://bugs.php.net/fix.php?id=37597r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=37597r=support Expected behavior:http://bugs.php.net/fix.php?id=37597r=notwrong Not enough info: http://bugs.php.net/fix.php?id=37597r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=37597r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=37597r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37597r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=37597r=dst IIS Stability:http://bugs.php.net/fix.php?id=37597r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=37597r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=37597r=float No Zend Extensions: http://bugs.php.net/fix.php?id=37597r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=37597r=mysqlcfg
#37597 [Opn-Bgs]: Cannot stringify objects without __toString
ID: 37597 Updated by: [EMAIL PROTECTED] Reported By: doublecompile at gmail dot com -Status: Open +Status: Bogus Bug Type: Strings related -Operating System: Ubuntu Linux 5.04 +Operating System: * -PHP Version: 5CVS-2006-05-26 (snap) +PHP Version: 5.2.* -Assigned To: +Assigned To: helly 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 The object id is not useable in any way. Previous Comments: [2006-05-26 01:49:53] doublecompile at gmail dot com Description: Attempting to stringify (casting, strval, echo) an instantiated class without a __toString() method results in the following error: Catchable fatal error: Object of class test could not be converted to string in... Built using php5.2-200605252230 Snap with the following config statement: './configure' '--with-mysql=/usr/local/php5/ext/mysql' '--with-pdo' '--with-pdo-mysql' '--with-apxs2=/usr/bin/apxs2' '--with-zlib' '--enable-bcmath' '--enable-calendar' '--with-gd=/usr' '--with-jpeg-dir=/usr/include' '--with-zlib-dir=/usr/include' '--with-png-dir=/usr/include' '--with-xpm-dir=/usr/include' '--with-freetype-dir=/usr/include' '--with-ldap' '--with-mcrypt' '--with-mhash' '--with-bz2' '--with-curl' '--enable-ftp' '--with-openssl' '--with-mysqli' '--enable-exif' '--enable-wddx' '--with-xsl' '--enable-sockets' '--enable-soap' '--with-pgsql=/usr/lib/postgresql' '--with-pdo-pgsql=/usr/lib/postgresql' '--with-sqlite' '--with-pdo-sqlite' '--with-ibm-db2=/home/db2inst1/sqllib' '--with-pdo-odbc=ibm-db2,/home/db2inst1/sqllib' '--enable-mbstring' '--with-gettext' Reproduce code: --- class test { } $test = new test(); // any of the following would produce the error $value = (string)$test; $value = strval($test); echo $test; Expected result: $value to be set to Object #1 or the echo to output Object #1 Actual result: -- Catchable fatal error: Object of class test could not be converted to string in... -- Edit this bug report at http://bugs.php.net/?id=37597edit=1
#37598 [NEW]: prev() fonction crash the array pointer
From: jerebenz at gmail dot com Operating system: Unix PHP version: 4.4.2 PHP Bug Type: Scripting Engine problem Bug description: prev() fonction crash the array pointer Description: Hi, The problem occur the pointer of an array is at the start and I do a prev(). If I try to do current() after that, I see nothing, and if I try next() and current() again, still nothing. Bye Reproduce code: --- ?php $tab = array('4', '6'); echo current($tab); prev($tab); echo current($tab); next($tab); echo current($tab); ? Expected result: 446 Actual result: -- 4 -- Edit bug report at http://bugs.php.net/?id=37598edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37598r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=37598r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37598r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=37598r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=37598r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=37598r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=37598r=needscript Try newer version:http://bugs.php.net/fix.php?id=37598r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=37598r=support Expected behavior:http://bugs.php.net/fix.php?id=37598r=notwrong Not enough info: http://bugs.php.net/fix.php?id=37598r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=37598r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=37598r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37598r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=37598r=dst IIS Stability:http://bugs.php.net/fix.php?id=37598r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=37598r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=37598r=float No Zend Extensions: http://bugs.php.net/fix.php?id=37598r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=37598r=mysqlcfg
#37597 [Bgs-Opn]: Cannot stringify objects without __toString
ID: 37597 User updated by: doublecompile at gmail dot com Reported By: doublecompile at gmail dot com -Status: Bogus +Status: Open Bug Type: Strings related Operating System: * PHP Version: 5.2.* Assigned To: helly New Comment: Try this on for size: ?php class test { public $value; } $test = new test(); $test-value = 1234; $test2 = new test(); $test-value = 5678; $test3 = new test(); $test-value = 7890; $example = array( $test, $test2, $test3, $test3 ); $filtered = array_unique( $example ); ? Outputs: Catchable fatal error: Object of class test could not be converted to string in ... Previous Comments: [2006-05-26 01:56:29] [EMAIL PROTECTED] Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php The object id is not useable in any way. [2006-05-26 01:49:53] doublecompile at gmail dot com Description: Attempting to stringify (casting, strval, echo) an instantiated class without a __toString() method results in the following error: Catchable fatal error: Object of class test could not be converted to string in... Built using php5.2-200605252230 Snap with the following config statement: './configure' '--with-mysql=/usr/local/php5/ext/mysql' '--with-pdo' '--with-pdo-mysql' '--with-apxs2=/usr/bin/apxs2' '--with-zlib' '--enable-bcmath' '--enable-calendar' '--with-gd=/usr' '--with-jpeg-dir=/usr/include' '--with-zlib-dir=/usr/include' '--with-png-dir=/usr/include' '--with-xpm-dir=/usr/include' '--with-freetype-dir=/usr/include' '--with-ldap' '--with-mcrypt' '--with-mhash' '--with-bz2' '--with-curl' '--enable-ftp' '--with-openssl' '--with-mysqli' '--enable-exif' '--enable-wddx' '--with-xsl' '--enable-sockets' '--enable-soap' '--with-pgsql=/usr/lib/postgresql' '--with-pdo-pgsql=/usr/lib/postgresql' '--with-sqlite' '--with-pdo-sqlite' '--with-ibm-db2=/home/db2inst1/sqllib' '--with-pdo-odbc=ibm-db2,/home/db2inst1/sqllib' '--enable-mbstring' '--with-gettext' Reproduce code: --- class test { } $test = new test(); // any of the following would produce the error $value = (string)$test; $value = strval($test); echo $test; Expected result: $value to be set to Object #1 or the echo to output Object #1 Actual result: -- Catchable fatal error: Object of class test could not be converted to string in... -- Edit this bug report at http://bugs.php.net/?id=37597edit=1
#37560 [Com]: MySQLi connection is not cleaned up properly
ID: 37560 Comment by: soussey at network54 dot com Reported By: tsr2600 at gmail dot com Status: Assigned Bug Type: MySQLi related Operating System: FreeBSD 6.1 PHP Version: 5.1.4 Assigned To: georg New Comment: I can confirm this. It also happens under FastCGI. If a page can be found that produces an error, an attacker can use this repeatedly to shut down an entire site. The attack need only be a person and a browser and need not to continue in order to DOS and bring down a site. Previous Comments: [2006-05-23 11:42:53] tsr2600 at gmail dot com Description: When a MySQLi resource is created, a fatal error or exception (possibly others) will result in the script terminating but MySQL's SHOW PROCESSLIST; will report a Reading from net state indefinitely for as many connections as were created before script termination. These connections will be accumulated until MySQL fails with too many connections. This only occurs when PHP is running as an Apache module, it does not occur when PHP is running from the command line. Also, this does not occur with the MySQL PHP functions, only MySQLi. I have tested this on: FreeBSD 6.1, PHP 5.1.4, Apache 2.0.58, MySQL 4.0.19 Gentoo, PHP 5.1.4, Apache 2.2.0, MySQL 4.0.19 Reproduce code: --- ?php $dbh = mysqli_connect($any, $valid, $params, $work); some_undefined_function_resulting_in_error(); ? Expected result: A fatal error, telling me that I made a call to an undefined function. I expect no residual MySQLi connections. Actual result: -- A fatal error, telling me that I made a call to an undefined function. However, I still have a residual MySQLi connection, as reported by MySQL's SHOW PROCESSLIST; -- Edit this bug report at http://bugs.php.net/?id=37560edit=1
#37598 [Opn]: prev() fonction crash the array pointer
ID: 37598 User updated by: jerebenz at gmail dot com Reported By: jerebenz at gmail dot com Status: Open Bug Type: Scripting Engine problem Operating System: Unix PHP Version: 4.4.2 New Comment: Hi, The problem occur when the pointer of an array is at the start and I do a prev(). If I try to do current() after that, I see nothing, and if I try next() and current() again, still nothing. Bye Previous Comments: [2006-05-26 01:58:40] jerebenz at gmail dot com Description: Hi, The problem occur the pointer of an array is at the start and I do a prev(). If I try to do current() after that, I see nothing, and if I try next() and current() again, still nothing. Bye Reproduce code: --- ?php $tab = array('4', '6'); echo current($tab); prev($tab); echo current($tab); next($tab); echo current($tab); ? Expected result: 446 Actual result: -- 4 -- Edit this bug report at http://bugs.php.net/?id=37598edit=1
#37560 [Com]: MySQLi connection is not cleaned up properly
ID: 37560 Comment by: sroussey at network54 dot com Reported By: tsr2600 at gmail dot com Status: Assigned Bug Type: MySQLi related Operating System: FreeBSD 6.1 PHP Version: 5.1.4 Assigned To: georg New Comment: I should add, that I could not confirm this with Exceptions, only fatal errors. Previous Comments: [2006-05-26 02:08:27] soussey at network54 dot com I can confirm this. It also happens under FastCGI. If a page can be found that produces an error, an attacker can use this repeatedly to shut down an entire site. The attack need only be a person and a browser and need not to continue in order to DOS and bring down a site. [2006-05-23 11:42:53] tsr2600 at gmail dot com Description: When a MySQLi resource is created, a fatal error or exception (possibly others) will result in the script terminating but MySQL's SHOW PROCESSLIST; will report a Reading from net state indefinitely for as many connections as were created before script termination. These connections will be accumulated until MySQL fails with too many connections. This only occurs when PHP is running as an Apache module, it does not occur when PHP is running from the command line. Also, this does not occur with the MySQL PHP functions, only MySQLi. I have tested this on: FreeBSD 6.1, PHP 5.1.4, Apache 2.0.58, MySQL 4.0.19 Gentoo, PHP 5.1.4, Apache 2.2.0, MySQL 4.0.19 Reproduce code: --- ?php $dbh = mysqli_connect($any, $valid, $params, $work); some_undefined_function_resulting_in_error(); ? Expected result: A fatal error, telling me that I made a call to an undefined function. I expect no residual MySQLi connections. Actual result: -- A fatal error, telling me that I made a call to an undefined function. However, I still have a residual MySQLi connection, as reported by MySQL's SHOW PROCESSLIST; -- Edit this bug report at http://bugs.php.net/?id=37560edit=1
#36445 [Com]: Cannot enable encryption for stream server
ID: 36445 Comment by: e at osterman dot com Reported By: Jacek at veo dot pl Status: Assigned Bug Type: Sockets related Operating System: SuSE Linux 9.1 PHP Version: 5.1.3 Assigned To: wez New Comment: I too had problems with this. It works for me on PHP 5.1.2- 1+b1 (cli) (built: Mar 20 2006 04:17:24). You must specify the certificate in PEM format, and use ssl as the key for the resource context. How to create PEM file? go here: http://sial.org/howto/openssl/self-signed/ Previous Comments: [2006-05-05 18:43:16] eddi at ai000 dot de OS: GNU/Linux 2.6.16.14 (gentoo) OpenSSL: 0.9.7i PHP: 5.1.4 CLI Today I got this warning: Warning: stream_socket_enable_crypto(): SSL_R_NO_SHARED_CIPHER: no suitable shared cipher could be used. This could be because the server is missing an SSL certificate (local_cert context option) ... (file xp_ssl.c line 131) To do that (set option) there are no way. [2006-05-05 12:55:32] Jacek at veo dot pl Description: I (re)compiled OpenSSL 0.9.8b and PHP 5.1.3 Actual result: -- My first code: 12Segmentation fault From [EMAIL PROTECTED]: Warning: stream_socket_enable_crypto(): SSL operation failed with code 111. OpenSSL Error messages: error::lib(0):func(0):reason(0) in /test.php on line 4 GDB: gdb --args php /test.php (gdb) run Starting program: /usr/bin/php /test.php [Thread debugging using libthread_db enabled] [New Thread 1082760448 (LWP 2419)] 12 Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 1082760448 (LWP 2419)] 0x40390beb in sk_num () from /usr/local/ssl/lib/libcrypto.so.0.9.8 (gdb) quit The program is running. Exit anyway? (y or n) y [2006-05-04 19:15:24] eddi at ai000 dot de #!/opt/php/513/bin/php ?php error_reporting(2047); $c=array('tls'=array( 'verify_peer' =false, 'allow_self_signed' =true, 'cafile' ='/opt/php/testscripts/newkey.pem', 'capath'='/opt/php/testscripts/', 'local_cert' ='/opt/php/testscripts/newkey.pem', 'passphrase'='smtp', 'CN_match' ='ai000.de' ) ); $tls=stream_context_create($c); $c=stream_socket_server('tcp://127.0.0.1:1100',$er,$es,STREAM_SERVER_BIND|STREAM_SERVER_LISTEN,$tls); while(1){ if([EMAIL PROTECTED]($c)){ echo Verbindung\n.openssl_error_string().\n\n; @fwrite($s,220 ESMTP\r\n); echo @fgets($s); @fwrite($s,250 STARTTLS\r\n); echo @fgets($s); @fwrite($s,220 ESMTP\r\n); var_dump(stream_socket_enable_crypto($s,true,STREAM_CRYPTO_METHOD_TLS_SERVER)); echo @fgets($s); } } ? This is my test code. The negotation is endless among server script and Mozilla-Thunderbird. When I start the script below, my browser tell me: there are no conforming algorithms available. $c=stream_socket_server('ssl://127.0.0.1:1100',$er,$es,STREAM_SERVER_BIND|STREAM_SERVER_LISTEN,$tls); The Discription (stream_socket_enable_crypto ( resource stream, bool enable [, int crypto_type [, resource session_stream]] )) is obscure. What is resource session_stream? This word is singly used there and no records describe it. [2006-02-22 11:13:23] Jacek at veo dot pl The same problem. [2006-02-22 11:06:28] [EMAIL PROTECTED] Wez, plz take a look at this reproduce code: ?php $ssl = stream_socket_server('tcp://127.0.0.1:4445', $errnum, $errstr); stream_socket_enable_crypto($ssl, TRUE, STREAM_CRYPTO_METHOD_SSLv23_SERVER); ? 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/36445 -- Edit this bug report at http://bugs.php.net/?id=36445edit=1
#37388 [Com]: Missing SSL support
ID: 37388 Comment by: sfm_home at yahoo dot com Reported By: s dot s at terra dot com dot br Status: Open Bug Type: MySQLi related Operating System: Slackware Linux 10.2 PHP Version: 5.1.4 New Comment: Thanks for the -lmygcc workaround. It did the trick for me on RedHat 8 (gcc-3.2-7) with MySQL 5.0.21 and PHP 5.1.4, but I had to edit the Makefile to append -lmygcc to both EXTRA_LIBS and MYSQL_LIBS. If I did not append it to MYSQL_LIBS, the make completed; but I got a runtime error starting Apache (1.3.32) and needed to start over with make clean first and then make. The runtime error I saw is Syntax error on line 205 of /www/conf/httpd.conf: Cannot load /www/libexec/libphp5.so into server: /www/libexec/libphp5.so: undefined symbol: __builtin_delete Previous Comments: [2006-05-17 01:37:23] s dot s at terra dot com dot br I have try to change the configure script, but it dont work. May its becose my poor skills on sh scripting :\ Digging the mysql bug database I have found the same bug reported, if it can help... http://bugs.mysql.com/bug.php?id=19817 [2006-05-17 01:02:19] s dot s at terra dot com dot br Partial fix: Reading better the suggested bug http://bugs.mysql.com/bug.php?id=4921 I start trying to compile the mysql_error() check by hand. conftest.c - #include confdefs.h /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char mysql_error(); int main() { mysql_error() ; return 0; } - Compilation commandline (configure generated): gcc -o conftest conftest.c -I/usr/include -g -O2 -pthread -D_REENTRANT -Wl,-rpath,/usr/local/mysql/lib -L/usr/local/mysql/lib -L/usr/lib -L/usr/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib -Wl,-rpath,/usr -L/usr -lmysqlclient -lz -lgd -lfreetype -lpng -lz -ljpeg -ldb-3.3 -ldb-3.3 -lgdbm -lbz2 -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lssl -lcrypto -ldl -lxml2 -lz -lm -lssl -lcrypto -ldl Working compilation line: gcc -o conftest conftest.c -I/usr/include -g -O2 -pthread -D_REENTRANT -Wl,-rpath,/usr/local/mysql/lib -L/usr/local/mysql/lib -L/usr/lib -L/usr/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib -Wl,-rpath,/usr -L/usr -lmysqlclient -lz -lgd -lfreetype -lpng -lz -ljpeg -ldb-3.3 -ldb-3.3 -lgdbm -lbz2 -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lssl -lcrypto -ldl -lxml2 -lz -lm -lssl -lcrypto -ldl -lmygcc Note the -lmygcc to link with this library on the working compilation line. I gess we need to change the configure to check its presence for MySQL versions over 5.0.20 Compilation status: UNTESTED I will try to change the configure (Im not familiar with configure/Makefile scripts) to use the mygcc library on linking process. [2006-05-17 00:56:10] s dot s at terra dot com dot br Step 1: Remove the libmysqlclient.a Step 2: Try to run configure again on PHP 5.1.4 source tree --- checking for MySQL support... yes checking for specified location of the MySQL UNIX socket... yes checking for MySQL UNIX socket location... /tmp/mysql.sock configure: error: Cannot find libmysqlclient under /usr/local/mysql. Note that the MySQL client library is not bundled anymore! --- [2006-05-16 06:28:16] [EMAIL PROTECTED] Please remove libmysqlclient.a and try again. See http://bugs.mysql.com/bug.php?id=4921 for details. [2006-05-16 01:17:22] s dot s at terra dot com dot br Hi, you can see the full config.log file on: http://lhotian.no-ip.org:8000/php/config.log Machine setup to reproduce the error: Apache 2.2.2 (untested on other versions, but thats not the point) PHP 5.1.4 (tested with 5.1.3 and got the same error) MySQL 5.0.21 (binary standard) (tested with 5.0.20 and 5.0.20a and got the same error) It compiles clearly with MySQL 5.0.19 (binary standard), using the same setup. 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/37388 -- Edit this bug report at http://bugs.php.net/?id=37388edit=1
#37598 [Opn-Bgs]: prev() fonction crash the array pointer
ID: 37598 Updated by: [EMAIL PROTECTED] Reported By: jerebenz at gmail dot com -Status: Open +Status: Bogus Bug Type: Scripting Engine problem Operating System: Unix PHP Version: 4.4.2 New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php You should check the return value of prev and next. The state is undefined as out of range. Reset the array after having reached the end or beginning. Previous Comments: [2006-05-26 02:08:33] jerebenz at gmail dot com Hi, The problem occur when the pointer of an array is at the start and I do a prev(). If I try to do current() after that, I see nothing, and if I try next() and current() again, still nothing. Bye [2006-05-26 01:58:40] jerebenz at gmail dot com Description: Hi, The problem occur the pointer of an array is at the start and I do a prev(). If I try to do current() after that, I see nothing, and if I try next() and current() again, still nothing. Bye Reproduce code: --- ?php $tab = array('4', '6'); echo current($tab); prev($tab); echo current($tab); next($tab); echo current($tab); ? Expected result: 446 Actual result: -- 4 -- Edit this bug report at http://bugs.php.net/?id=37598edit=1