#46360 [NEW]: [patch] Add TCP_NODELAY constant for socket_{get,set}_option
From: bugs at trick dot vanstaveren dot us Operating system: All PHP version: 5.2.6 PHP Bug Type: Sockets related Bug description: [patch] Add TCP_NODELAY constant for socket_{get,set}_option Description: C-level TCP function setsockopt allows users of TCP sockets to set the TCP_NODELAY flag. This flag disable's the typically default use of Nagle's Algorithm[1] on a TCP socket. 1: http://en.wikipedia.org/wiki/Nagle%27s_algorithm Nagle's Algorithm is bad for protocols like the extremely brief one spoken by PHP/Java Bridge. This patch is inspired by my use of PJB on FreeBSD which does not automatically set TCP_NODELAY on localhost connections. PHP does not expose this constant, although it is valid for the sockets library as socket_set_option is a straightforward wrapper around setsockopt. Here is a trivial patch against PHP 5.2.5 to add the PHP constant TCP_NODELAY. I have tested this on FreeBSD 7.0 + PHP 5.2.5. Patch is quite simple so should apply fine against 5.3 / 6 with just a line offset. Constant is the same on Linux so will work fine there; am not sure about win32. Happy to test other versions and platforms if necessary. --- ext/sockets/sockets.c.orig 2008-10-21 22:53:07.0 + +++ ext/sockets/sockets.c 2008-10-21 22:53:00.0 + @@ -509,6 +509,7 @@ REGISTER_LONG_CONSTANT("SO_ERROR", SO_ERROR, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("SOL_SOCKET",SOL_SOCKET, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("SOMAXCONN", SOMAXCONN, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("TCP_NODELAY", TCP_NODELAY,CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("PHP_NORMAL_READ", PHP_NORMAL_READ, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("PHP_BINARY_READ", PHP_BINARY_READ, CONST_CS | CONST_PERSISTENT); Cheers, Patrick van Staveren -- Edit bug report at http://bugs.php.net/?id=46360&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46360&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46360&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46360&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46360&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=46360&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46360&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=46360&r=needscript Try newer version:http://bugs.php.net/fix.php?id=46360&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46360&r=support Expected behavior:http://bugs.php.net/fix.php?id=46360&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46360&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46360&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46360&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46360&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=46360&r=dst IIS Stability:http://bugs.php.net/fix.php?id=46360&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46360&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46360&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46360&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=46360&r=mysqlcfg
#44882 [Opn->Fbk]: SOAP extension object decoding bug
ID: 44882 Updated by: [EMAIL PROTECTED] Reported By: mike at silverorange dot com -Status: Open +Status: Feedback Bug Type: SOAP related Operating System: * PHP Version: 5.2.5 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: [2008-10-01 20:27:38] mike at silverorange dot com I've moved the test provided by anomie into a phpt file at http://labs.silverorange.com/files/php-bug44882/. The WSDL file is not included locally as it is the copyrighted work of PayPal. The test passes using the associated patch but fails against the latest snapshot (5.2-200810011830). What else is needed to get this bug fixed? [2008-06-23 15:23:14] anomie at users dot sf dot net Here is a test case that illustrates the bug, using the same technique the ext/soap test cases in the PHP distribution use. Please excuse the big block-o-base64, the namespace URIs in the XML were apparently triggering your spam filter. https://www.paypal.com/wsdl/PayPalSvc.wsdl";); var_dump($client->GetExpressCheckoutDetails(array('GetExpressCheckoutDetailsRequest'=>array('Version'=>50.0,'Token'=>'dummy'; ?> [2008-05-01 18:02:29] mike at silverorange dot com Description: When decoding a SOAP response into zvals, the decoder sometimes gets confused decoding objects. We noticed this using the PayPal Express Checkout SOAP API. For one request type, the returned XML was correct; however, the decoded PHP objects that were returned were incorrect. One value that should have been a string was a string reference and an object that should have been an object was as string. Upon further investigation, we found other users had been experiencing this specific problem using PayPal's SOAP API with PHP since PHP 5.2.2. After a bit of CVS research, it seems the bug was introduced in 1.103.2.21.2.27 in soap_encoding.c to fix bug #37013. The patch at http://labs.silverorange.com/files/php-patches/soap-object-reference-bug-20080501.patch works around the bug for our needs, but it does not fix the underlying problem and probably reintroduces #37013. Reproduce code: --- I can't provide a runnable test case unless you have PayPal developer API credentials. If so, you can run the unit tests in the package at: http://labs.silverorange.com/files/Payment_PayPal_Soap/Payment_PayPal_Soap-0.0.4.tgz The second test will fail if the bug is present and pass if the bug is fixed. I've attached a var_dump of broken an working SOAP results to illustrate the broken 'PayerInfo' element parsing. Expected result: object(stdClass)#114 (6) { ["Timestamp"]=> string(20) "2008-05-01T17:41:45Z" ["Ack"]=> string(7) "Success" ["CorrelationID"]=> string(13) "9d6aa8c0309df" ["Version"]=> string(8) "1.00" ["Build"]=> string(6) "548868" ["GetExpressCheckoutDetailsResponseDetails"]=> object(stdClass)#113 (2) { ["Token"]=> string(20) "EC-6AU15743MX2745842" ["PayerInfo"]=> object(stdClass)#112 (6) { ["Payer"]=> string(0) "" ["PayerID"]=> string(0) "" ["PayerStatus"]=> string(10) "unverified" ["PayerName"]=> object(stdClass)#110 (5) { ["Salutation"]=> string(0) "" ["FirstName"]=> string(0) "" ["MiddleName"]=> string(0) "" ["LastName"]=> string(0) "" ["Suffix"]=> string(0) "" } ["PayerBusiness"]=> string(0) "" ["Address"]=> object(stdClass)#111 (9) { ["Name"]=> string(0) "" ["Street1"]=> string(0) "" ["Street2"]=> string(0) "" ["CityName"]=> string(0) "" ["StateOrProvince"]=> string(0) "" ["CountryName"]=> string(0) "" ["PostalCode"]=> string(0) "" ["AddressOwner"]=> string(6) "PayPal" ["AddressStatus"]=> string(4) "None" } } } } Actual result: -- object(stdClass)#114 (6) { ["Timestamp"]=> string(20) "2008-05-01T17:56:31Z" ["Ack"]=> string(7) "Success" ["CorrelationID"]=> string(13) "233fdab3c0758" ["Version"]=> string(8) "1.00" ["Build"]=> string(6) "548868" ["GetExpressCheckoutDetailsResponseDetails"]=> object(stdClass)#113 (2) { ["Token"]=> &string(20) "EC-8JA130819B922424F" ["PayerInfo"]=> string(20) "EC-8JA130819B922424F" } } -- Edit this bug report at http://bugs.php.net/?id=44882&edit=1
#44856 [Opn->Fbk]: SOAPAction empty when WSDL has 2+ port bindings
ID: 44856 Updated by: [EMAIL PROTECTED] Reported By: alejandro at vicomstudio dot com -Status: Open +Status: Feedback Bug Type: SOAP related Operating System: Windows PHP Version: 5.2.5 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: [2008-04-28 17:24:31] alejandro at vicomstudio dot com Description: PHP SoapClient seems to have trouble making calls when the WSDL has two or more port bindings present that share function names Reproduce code: --- ' ); return ''; // Response is not important here } } $wsdl = 'http://www.vicomstudio.com/alejandro/WSDL2.wsdl'; $ws = new mySoapClient( $wsdl, array( 'trace' => true ) ); // Create an example request $response = $ws->listOffers( array( 'keywords' => 'dvd', 'itemPage' => 1, 'merchantID' => array( 'value' => 'Amazon' ), 'category' => array( 'name' => 'Automotive', 'value' => 'Automotive' ) ) ); ?> Expected result: SOAPAction: "listOffers" Actual result: -- SOAPAction: "" -- Edit this bug report at http://bugs.php.net/?id=44856&edit=1
#44599 [Opn->Bgs]: Loosing clients will pay for a fix ASAP
ID: 44599 Updated by: [EMAIL PROTECTED] Reported By: RJTrawinski at RJTCOnsulting dot com -Status: Open +Status: Bogus Bug Type: IIS related Operating System: 2003 Server Enterprise PHP Version: 5.2.5 New Comment: We are aware of PHP's problems with stability under IIS and are working to rectify the problem. Unfortunatly your bug report does not contain any extra useful information and we already have enough bug reports open about this issue. If you can provide more detailed information such as a reproducable crash or a backtrace please do so and reopen this bug. Otherwise please keep trying new releases as we are working to resolve the problems on this platform Thanks for your interest in PHP. Previous Comments: [2008-04-02 01:07:29] RJTrawinski at RJTCOnsulting dot com Description: CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers. WA too many hours with this, trying to hang myself. WIll PAY for a fix, i'm loosing clients. I went through all this http://bugs.php.net/bug.php?id=25863. Will give instant VNC or remote desktop access to my server. please help.. will pay. Thanks RIch [EMAIL PROTECTED] -- Edit this bug report at http://bugs.php.net/?id=44599&edit=1
#43639 [Com]: php-5.2.5-win32-installer.msi stops before it is finished.
ID: 43639 Comment by: andreaslustigcom at gmail dot com Reported By: erik dot kullberg at telia dot com Status: Assigned Bug Type: Windows Installer Operating System: Windows Vista PHP Version: 5.2.5 Assigned To: jmertic New Comment: None of the suggestions worked for me. I spent 2 days on this by now. Dedicated box, brand new install (XP pro, SP3) with no result. Ridiculous and very unprofessional. I'm a programmer, too, but if I was to deliver this to my clients I'd be out of work in no time. If PHP/Zend wants to be taken seriously they need to improve their quality assurance process dramatically. 0/10 from me! Previous Comments: [2008-10-05 09:16:14] bad_boy2k8 at msn dot com hey i have installed php-5.2.5-win32 but what is that php for? is it for making website or what please tell me [2008-09-25 18:11:01] jim dot keller at contextsolutions dot net Turning off User Account Control in Vista fixes this problem. Start > Control Panel > (Classic View) > User Accounts > Turn User Account Control Off My guess is that even though the installer is running as administrator, the scripts that run in the background are separate processes, and are therefore subject to "user account control". If you like the User Account Control feature, just re-enable it after install. [2008-09-23 22:40:31] thomas dot j dot owens at gmail dot com I believe this might be related to a bug I file last night at http://bugs.php.net/bug.php?id=46155 [2008-09-21 06:35:53] cfaribault at presencenet dot ca Hi all, Tried 5.2.6 MSI installer from PHP's site as well as the one from "kfou at free dot fr" and both still give me the error. Trying to setup PHP as Apache 2.2.x Module. I'm on XP !SP3 English. Also worth noting, I don't get any error in System Event Viewer. I also want to note that everytime I run the installer (because I've also tried to set it up as Apache CGI as well), it adds the following block of text in httpd.conf: #BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL ScriptAlias /php/ "D:/Program Files/PHP/" Action application/x-httpd-php "D:/Program Files/PHP/php-cgi.exe" PHPIniDir "D:/Program Files/PHP/" LoadModule php5_module "D:/Program Files/PHP/php5apache2_2.dll" PHPIniDir "D:/Program Files/PHP/" LoadModule php5_module "D:/Program Files/PHP/php5apache2.dll" PHPIniDir "D:/Program Files/PHP/" LoadModule php5_module "D:/Program Files/PHP/php5apache.dll" #END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL Over time, I ended up with 4-5 such blocks, all commented but one. Not a problem but still annoying. But there is one problem... Apache won't start unless I comment all "PHPIniDir..." lines but one. Finally, I'd like to point out that the changes made to httpd.conf don't include an association to .php files for application/x-httpd-php ("AddType application/x-httpd-php .php"). Once the installer is done (past the error message) and Apache restarted, I'm prompted for a file download when I try to access a php file. That may be what the script fails to do because of the error, I don't know... But in my present situation, it's something that it's not doing. I guess that'll be enough for now! :) Chris [2008-09-18 01:52:29] kfou at free dot fr I've generated a fixed installer that you can download from http://kfou.free.fr/php/php-5.2.6-win32-installer.msi. Or you can download the original installer from php.net and modify it using Orca to extract the (faulty) script PHPInstallerScripts.vbs, patch it (using http://kfou.free.fr/php/PHPInstallerScripts.patch) and re-import it again using Orca. Kamel. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/43639 -- Edit this bug report at http://bugs.php.net/?id=43639&edit=1
#37527 [Asn->Opn]: Crash - odbc_exec on closed pconnect
ID: 37527 Updated by: [EMAIL PROTECTED] Reported By: bhines at alumni dot ucsd dot edu -Status: Assigned +Status: Open Bug Type: ODBC related Operating System: Windows XP PHP Version: 5.1.6 Assigned To: felipe New Comment: Well, I can't reproduce it. Previous Comments: [2008-10-21 11:38:01] [EMAIL PROTECTED] Was that fix applied? Does this bug exist in PHP_5_2 branch still? If so, please update the version.. [2008-02-17 17:22:46] [EMAIL PROTECTED] Possible fix: http://felipe.ath.cx/diff/bug37527.diff [2007-09-25 13:21:33] alexandra at zend dot com Hi There is a simple work-around to make this script work - there is a problem with the fact that you declared the $mydb var global in one function but not the other. You can change the printPage() function to solve this issue. function printPage() { global $mydb; $mydb = pdb_Connect(); odbc_close($mydb); print "Possibly Crashing now... "; $results = odbc_exec($mydb, 'SELECT * FROM _PDB_Access'); } [2006-09-29 23:22:16] bhines at alumni dot ucsd dot edu Still occurs in 5.1.6 [2006-05-20 21:44:33] bhines at alumni dot ucsd dot edu odbc32.dll!74355a16() odbc32.dll!7432139f() odbc32.dll!74322c5d() odbc32.dll!74325fa0() odbc32.dll!7432740e() php5ts.dll!zif_odbc_exec(int ht=17437576, _zval_struct * return_value=0x010af6f0, _zval_struct * * return_value_ptr=0x, _zval_struct * this_ptr=0x, int return_value_used=1, void * * * tsrm_ls=0x00032608) Line 1285 C php5ts.dll!zend_do_fcall_common_helper_SPEC(_zend_execute_data * execute_data=0x00c0fae8, void * * * tsrm_ls=0x00032608) Line 200 + 0x35C php5ts.dll!ZEND_DO_FCALL_SPEC_CONST_HANDLER(_zend_execute_data * execute_data=0x, void * * * tsrm_ls=0x00032608) Line 1644 + 0xe C php5ts.dll!execute(_zend_op_array * op_array=0x, void * * * tsrm_ls=0x010abb40) Line 92 + 0xc C php5ts.dll!_efree(void * ptr=0x011d5f60) Line 275 + 0xcC php5ts.dll!zend_llist_del_element(_zend_llist * l=0x010ad080, void * element=0x00032608, int (void *, void *)* compare=0x) Line 99 + 0x5 C php5ts.dll!zend_execute_scripts(int type=2009252809, void * * * tsrm_ls=0x0003, _zval_struct * * retval=0x, int file_count=2009252814, ...) Line 1100 C ntdll.dll!7c9106eb() msvcrt.dll!77c2c3ce() msvcrt.dll!77c2c3e7() msvcrt.dll!77c2c42e() php5ts.dll!_zend_hash_add_or_update(_hashtable * ht=0x000d, char * arKey=0x010abb30, unsigned int nKeyLength=268473042, void * pData=0x, unsigned int nDataSize=206344, void * * pDest=0x010abb18, int flag=268473024) Line 248 + 0x2e C php5ts.dll!ts_resource_ex(int id=12648368, unsigned long * th_id=0x) Line 331 C php5ts.dll!php_execute_script(_zend_file_handle * primary_file=0x00c0fedc, void * * * tsrm_ls=0x00032608) Line 1682 + 0x31C php.exe!main(int argc=2, char * * argv=0x000325c8) Line 1094 C php.exe!_mainCRTStartup() + 0xe3 kernel32.dll!7c816d4f() kernel32.dll!7c8399f3() 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/37527 -- Edit this bug report at http://bugs.php.net/?id=37527&edit=1
#46241 [Com]: Error handler stacking broken
ID: 46241 Comment by: clemens dot kalb at netlogix dot de Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Reproducible crash Operating System: Gentoo PHP Version: 5.3.0alpha2 New Comment: Here is one thing that has been more clear in the other, duplicate and now closed - bug entry (#46338). The first code sample with object methods does not only miss out on the second error handler, it also segfaults *on shutdown* of the PHP process: ---SNIP- Starting program: /usr/bin/php5 segfault2.php [Thread debugging using libthread_db enabled] [New Thread -1215695168 (LWP 5622)] Caught on first level: 'Foo' Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1215695168 (LWP 5622)] zend_hash_destroy (ht=0xb786bf08) at /usr/src/dailybuild/builds/20081021/php5-5.3.0-200810211830/Zend/zend_hash.c:524 524 p = p->pListNext; (gdb) bt #0 zend_hash_destroy (ht=0xb786bf08) at /usr/src/dailybuild/builds/20081021/php5-5.3.0-200810211830/Zend/zend_hash.c:524 #1 0x0836dc41 in _zval_dtor_func (zvalue=0xb786bf70) at /usr/src/dailybuild/builds/20081021/php5-5.3.0-200810211830/Zend/zend_variables.c:43 #2 0x0836d3b3 in zend_ptr_stack_apply (stack=0x880d470, func=0x836dbf0 <_zval_dtor_func>) at /usr/src/dailybuild/builds/20081021/php5-5.3.0-200810211830/Zend/zend_ptr_stack.c:90 #3 0x0836d3fd in zend_ptr_stack_clean (stack=0x880d470, func=0x836dbf0 <_zval_dtor_func>, free_elements=1 '\001') at /usr/src/dailybuild/builds/20081021/php5-5.3.0-200810211830/Zend/zend_ptr_stack.c:97 #4 0x08360f68 in shutdown_executor () at /usr/src/dailybuild/builds/20081021/php5-5.3.0-200810211830/Zend/zend_execute_API.c:272 #5 0x0836e28b in zend_deactivate () at /usr/src/dailybuild/builds/20081021/php5-5.3.0-200810211830/Zend/zend.c:899 #6 0x08316df6 in php_request_shutdown (dummy=0x0) at /usr/src/dailybuild/builds/20081021/php5-5.3.0-200810211830/main/main.c:1522 #7 0x08408203 in main (argc=2, argv=0xbffa0b14) at /usr/src/dailybuild/builds/20081021/php5-5.3.0-200810211830/sapi/cli/php_cli.c:1311 ---SNAP- The problem persists with PHP 5.3.0alpha3-dev (cli) (built: Oct 21 2008 22:10:26). Previous Comments: [2008-10-06 13:03:21] [EMAIL PROTECTED] Description: Stacking 2 error handlers is broken. With object methods only the first error handler is invoked, with functions I even get a PHP crash. Reproduce code: --- -- Object methods --- -- Functions --- Expected result: -- Object methods --- Caught on second level: 'Foo' -- Functions --- Caught on second level: 'Foo' Actual result: -- -- Object methods --- Caught on first level: 'Foo' -- Functions --- Caught on first level: 'Foo' zend_mm_heap corrupted -- Edit this bug report at http://bugs.php.net/?id=46241&edit=1
#46357 [Opn->Bgs]: Nothing bad just read it
ID: 46357 Updated by: [EMAIL PROTECTED] Reported By: huntandre at gmail dot con -Status: Open +Status: Bogus Bug Type: *General Issues Operating System: windows xp PHP Version: 5.2.6 New Comment: Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. Previous Comments: [2008-10-21 18:53:28] huntandre at gmail dot con Description: ok this isnt a bug but how do you compile PHP and mysql together can you put it on your site on help because i need to know and im sure others do too Thanks andrew -- Edit this bug report at http://bugs.php.net/?id=46357&edit=1
#37899 [Com]: [PATCH] php_char_to _OLECHAR copies junk bytes
ID: 37899 Comment by: vincent at eal dot com Reported By: okumurya at gmail dot com Status: Assigned Bug Type: COM related Operating System: Windows 2000 Professional PHP Version: 5.2.3 Assigned To: wharmby New Comment: I also have the same problem with PHP 5.2.3. Previous Comments: [2007-08-24 12:16:11] [EMAIL PROTECTED] Assigned to the maintainer. [2007-08-12 07:14:23] okumurya at gmail dot com I tested on PHP-5.2.3, and the problem still occured. [2007-08-12 07:04:37] okumurya at gmail dot com I tested following code on PHP-4.4.7, the problem still occured. http://ml.php.gr.jp/pipermail/php-users/2007-April/032463.html */ ini_set('mbstring.language', 'Japanese'); ini_set('mbstring.internal_encoding', 'UTF-8'); class setWord { var $Word; var $doc; function setWord(){ $this->Word = new COM('Word.Application'); $this->Word->Visible = false; $this->Word->DisplayAlerts = 0; } function documentOpen(){ $this->doc = $this->Word->Documents->Add(); $this->doc->Activate; } function setParam($param){ $this->Word->Selection->TypeText($param); } function SaveAs(){ $this->Word->Documents[1]->SaveAs("C:/TMP/hoge.doc"); } function unsetObj(){ $this->Word->Documents[1]->Close(); $this->Word->Quit(); $this->Word = null; } function returnWord($param){ $this->documentOpen(); $this->setParam($param); $this->SaveAs(); $this->unsetObj(); } } $cls = new setWord(); $cls->returnWord("\x82\xA0\x82\xA2\x82\xA4\x82\xA6\x82\xA8"); // Japanese Hiragana A I U E O ?> [2007-07-11 12:49:49] [EMAIL PROTECTED] And does this problem exist in PHP 5.2.3? (see also previous comment by Stas) [2007-04-02 20:29:11] [EMAIL PROTECTED] Could you provide some example reproducing the problem? Preferably with some COM available on standard Windows/Office machine or easily installable. 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/37899 -- Edit this bug report at http://bugs.php.net/?id=37899&edit=1
#42585 [Com]: die() in event handler => PHP hangs
ID: 42585 Comment by: atomiku at gmail dot com Reported By: csaba at alum dot mit dot edu Status: Assigned Bug Type: COM related Operating System: Win XP Pro PHP Version: 5.2.4 Assigned To: wharmby New Comment: I'm going to take back my previous comment, turns out if you try to view the POST data in firebug of an ajax call which is hanging (while loop or whatever), it'll screw it up, mess the cookies up and do some weird stuff. Please delete this comment and my previous comment. Previous Comments: [2008-10-21 19:43:18] atomiku at gmail dot com I seem to be experiencing this too, this is in my opinion CRITICAL. In the class, it's supposed to die... picture something like this: $someClass->someFunc(); //someFunc is supposed to die. while (true) { echo "Test"; sleep(5); die(); } It actually makes it to the while loop, doesn't print "test" though, it just stops for 5 seconds. If I change to sleep(10), it stops for 10 seconds. No idea what is going on here. [2007-09-07 11:04:43] [EMAIL PROTECTED] Assigned to the COM maintainer. [2007-09-07 09:49:16] csaba at alum dot mit dot edu Description: If I have a COM object call into PHP (via com_event_sink or IE's window.setTimeout) with a die() within the called code, then PHP hangs. In the example below, IE comes up and waits around for 4 seconds, after which an $ie->quit() is issued. In the event handler (function OnQuit()) a die() is issued. While IE does shut down, PHP does not return me the command prompt. This is from PHP CLI, of course. Csaba Gabor from Vienna Reproduce code: --- terminated = true; } } $ie = new COM("InternetExplorer.Application"); $ie->Visible = true; $sink = new IESink; com_event_sink($ie, $sink, "DWebBrowserEvents2"); $ie->Navigate("http://www.php.net/";); $start = time(); $quitted = false; while (!$sink->terminated) { com_message_pump(200); if (time()-$start>4 && !$quitted) { $quitted=true; $ie->quit(); } } print "Finished!\n"; ?> Expected result: I expect to be shown the following three lines, ie to go away, AND for PHP to terminate: title has changed: PHP: Hypertext Preprocessor title has changed: PHP: Hypertext Preprocessor Quitting Actual result: -- The above 3 lines are shown, IE goes away, BUT php does not terminate. Also, note that if I manually shut IE down, instead of waiting the 4 seconds, then I get the following additional line (and PHP still hangs the cmd prompt): Fatal error: Call to undefined method com::quit() in Unknown on line 0 It seems to me that the while loop stays active, since that's the only place that $ie->quit() is issued. -- Edit this bug report at http://bugs.php.net/?id=42585&edit=1
#42585 [Com]: die() in event handler => PHP hangs
ID: 42585 Comment by: atomiku at gmail dot com Reported By: csaba at alum dot mit dot edu Status: Assigned Bug Type: COM related Operating System: Win XP Pro PHP Version: 5.2.4 Assigned To: wharmby New Comment: I seem to be experiencing this too, this is in my opinion CRITICAL. In the class, it's supposed to die... picture something like this: $someClass->someFunc(); //someFunc is supposed to die. while (true) { echo "Test"; sleep(5); die(); } It actually makes it to the while loop, doesn't print "test" though, it just stops for 5 seconds. If I change to sleep(10), it stops for 10 seconds. No idea what is going on here. Previous Comments: [2007-09-07 11:04:43] [EMAIL PROTECTED] Assigned to the COM maintainer. [2007-09-07 09:49:16] csaba at alum dot mit dot edu Description: If I have a COM object call into PHP (via com_event_sink or IE's window.setTimeout) with a die() within the called code, then PHP hangs. In the example below, IE comes up and waits around for 4 seconds, after which an $ie->quit() is issued. In the event handler (function OnQuit()) a die() is issued. While IE does shut down, PHP does not return me the command prompt. This is from PHP CLI, of course. Csaba Gabor from Vienna Reproduce code: --- terminated = true; } } $ie = new COM("InternetExplorer.Application"); $ie->Visible = true; $sink = new IESink; com_event_sink($ie, $sink, "DWebBrowserEvents2"); $ie->Navigate("http://www.php.net/";); $start = time(); $quitted = false; while (!$sink->terminated) { com_message_pump(200); if (time()-$start>4 && !$quitted) { $quitted=true; $ie->quit(); } } print "Finished!\n"; ?> Expected result: I expect to be shown the following three lines, ie to go away, AND for PHP to terminate: title has changed: PHP: Hypertext Preprocessor title has changed: PHP: Hypertext Preprocessor Quitting Actual result: -- The above 3 lines are shown, IE goes away, BUT php does not terminate. Also, note that if I manually shut IE down, instead of waiting the 4 seconds, then I get the following additional line (and PHP still hangs the cmd prompt): Fatal error: Call to undefined method com::quit() in Unknown on line 0 It seems to me that the while loop stays active, since that's the only place that $ie->quit() is issued. -- Edit this bug report at http://bugs.php.net/?id=42585&edit=1
#46326 [Fbk->Opn]: error_reporting ignored in php-cli.ini
ID: 46326 User updated by: RQuadling at GMail dot com Reported By: RQuadling at GMail dot com -Status: Feedback +Status: Open Bug Type: PHP options/info functions Operating System: Windows XP SP3 PHP Version: 5.3CVS-2008-10-17 (snap) New Comment: "real"? But no. I'm all windows here. Previous Comments: [2008-10-21 09:29:02] [EMAIL PROTECTED] Can you reproduce this with some real OS, line Linux? [2008-10-17 13:25:38] RQuadling at GMail dot com Oh and supplying the INI file via the command line on the 5.3 alpha makes no difference either ... C:\>c:\PHP5\php.exe -c C:\php\PHP5\INI\php-cli.ini z:\phpdetails.php php_sapi_name() = cli phpversion()= 5.3.0alpha3-dev php_ini_loaded_file() = C:\PHP\PHP5\INI\php-cli.ini php_ini_scanned_files() = error_reporting() = 22519 INI error_reporting = error_reporting = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR [2008-10-17 12:50:10] RQuadling at GMail dot com Some more examples in playing around with this ... php_sapi_name() = cli phpversion()= 5.3.0alpha3-dev php_ini_loaded_file() = C:\PHP\PHP5\INI\php-cli.ini php_ini_scanned_files() = error_reporting() = 22519 INI error_reporting = error_reporting = E_ALL php_sapi_name() = cli phpversion()= 5.3.0alpha3-dev php_ini_loaded_file() = C:\PHP\PHP5\INI\php-cli.ini php_ini_scanned_files() = error_reporting() = 22519 INI error_reporting = error_reporting = E_ALL & ~E_NOTICE php_sapi_name() = cli phpversion()= 5.3.0alpha3-dev php_ini_loaded_file() = C:\PHP\PHP5\INI\php-cli.ini php_ini_scanned_files() = error_reporting() = 22519 INI error_reporting = error_reporting = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR Just to confirm that last one ... If I use V5.2.6 like so ... C:\>c:\PHP5.2.6\php.exe -c C:\php\PHP5\INI\php-cli.ini z:\phpdetails.php The output is ... php_sapi_name() = cli phpversion()= 5.2.6 php_ini_loaded_file() = C:\PHP\PHP5\INI\php-cli.ini php_ini_scanned_files() = error_reporting() = 4177 INI error_reporting = error_reporting = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR [2008-10-17 11:28:59] RQuadling at GMail dot com Description: No matter what value I set in my php-cli.ini file for error_reporting, it is ignored. Using PHP 5.3.0alpha3-dev (cli) (built: Oct 17 2008 12:03:10) from http://windows.php.net In using ProcMon and looking for Processes like "PHP" and Path ending in ".INI", the only file I am looking at is C:\PHP\PHP5\INI\php- cli.ini Reproduce code: --- http://bugs.php.net/?id=46326&edit=1
#46357 [NEW]: Nothing bad just read it
From: huntandre at gmail dot con Operating system: windows xp PHP version: 5.2.6 PHP Bug Type: *General Issues Bug description: Nothing bad just read it Description: ok this isnt a bug but how do you compile PHP and mysql together can you put it on your site on help because i need to know and im sure others do too Thanks andrew -- Edit bug report at http://bugs.php.net/?id=46357&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46357&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46357&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46357&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46357&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=46357&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46357&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=46357&r=needscript Try newer version:http://bugs.php.net/fix.php?id=46357&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46357&r=support Expected behavior:http://bugs.php.net/fix.php?id=46357&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46357&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46357&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46357&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46357&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=46357&r=dst IIS Stability:http://bugs.php.net/fix.php?id=46357&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46357&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46357&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46357&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=46357&r=mysqlcfg
#46338 [Ver->Csd]: Segfault on multiple error handler
ID: 46338 User updated by: spam at pamignot dot org Reported By: spam at pamignot dot org -Status: Verified +Status: Closed Bug Type: Scripting Engine problem Operating System: Irrelevant PHP Version: 5.3.0alpha3-dev New Comment: Ok, sorry for the noise. Duplicate bug closed, just see : http://bugs.php.net/46241 Previous Comments: [2008-10-21 15:36:53] [EMAIL PROTECTED] Yeah, these are most definitely duplicates. (Doesn't know how to close a bug as a dupe). [2008-10-21 06:35:17] clemens dot kalb at netlogix dot de Setting the error handler twice does indeed seem to be the problem. I can reproduce this with 5.3 alpha3-dev Build Date Oct 19 2008 04:42:11. See #46241 for a possible duplicate of this entry. [2008-10-20 19:00:28] [EMAIL PROTECTED] Oh, also, I tested it on the latest alpha3-dev build. php --version PHP 5.3.0alpha3-dev (cli) (built: Oct 20 2008 20:49:57) Copyright (c) 1997-2008 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2008 Zend Technologies [2008-10-20 18:54:55] [EMAIL PROTECTED] I believe this is a problem with the error handler stack. I get "zend_mm_heap corrupted" when I set the error handler twice. purify('something'); set_error_handler(array('myException', 'exception_error_handler')); ?> 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/46338 -- Edit this bug report at http://bugs.php.net/?id=46338&edit=1
#46338 [Ver]: Segfault on multiple error handler
ID: 46338 Updated by: [EMAIL PROTECTED] Reported By: spam at pamignot dot org Status: Verified Bug Type: Scripting Engine problem Operating System: Irrelevant PHP Version: 5.3.0alpha3-dev New Comment: Yeah, these are most definitely duplicates. (Doesn't know how to close a bug as a dupe). Previous Comments: [2008-10-21 06:35:17] clemens dot kalb at netlogix dot de Setting the error handler twice does indeed seem to be the problem. I can reproduce this with 5.3 alpha3-dev Build Date Oct 19 2008 04:42:11. See #46241 for a possible duplicate of this entry. [2008-10-20 19:00:28] [EMAIL PROTECTED] Oh, also, I tested it on the latest alpha3-dev build. php --version PHP 5.3.0alpha3-dev (cli) (built: Oct 20 2008 20:49:57) Copyright (c) 1997-2008 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2008 Zend Technologies [2008-10-20 18:54:55] [EMAIL PROTECTED] I believe this is a problem with the error handler stack. I get "zend_mm_heap corrupted" when I set the error handler twice. purify('something'); set_error_handler(array('myException', 'exception_error_handler')); ?> [2008-10-20 15:51:12] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with , is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. 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/46338 -- Edit this bug report at http://bugs.php.net/?id=46338&edit=1
#43977 [Opn->Bgs]: chdir() not working with absolute path / CWD not properly reset
ID: 43977 Updated by: [EMAIL PROTECTED] Reported By: sysdev at gmx dot net -Status: Open +Status: Bogus -Bug Type: Directory function related +Bug Type: IIS related Operating System: Windows Server 2003 PHP Version: 5.2.6 New Comment: We are aware of PHP's problems with stability under IIS and are working to rectify the problem. Unfortunatly your bug report does not contain any extra useful information and we already have enough bug reports open about this issue. If you can provide more detailed information such as a reproducable crash or a backtrace please do so and reopen this bug. Otherwise please keep trying new releases as we are working to resolve the problems on this platform Thanks for your interest in PHP. Previous Comments: [2008-05-26 08:09:49] php5 dot 20 dot cheef-daniel at spamgoumet dot com I checked it with php 5.2.5 and 5.2.6 + IIS + Win 2003 Server SP1. Same error on both versions, I even can't include files because of this. include(config.php) [function.include]: failed to open stream: No such file or directory config.php is in the same directory and has same rights than the calling index.php. getcwd, placed on top of index.php shows me everytime I run this script another dir out of the docroot. chdir(basename(__FILE__)) under/above getcwd fails with error 0 like in this bugreport. [2008-01-29 21:49:37] sysdev at gmx dot net Description: IIS 6 with PHP 5 SAPI: In some cases, the CWD of a PHP-script run is not properly reset to the script's directory. Its instead the directory of another previously run script. chdir() with an absulote path fails in these cases if the desired path is no child of the script's path itself, while chdir() with a relative path to the same destination succeedes. Reproduce code: --- Script located in d:\webshare\web3 echo 'CWD is '.getcwd().''; chdir( 'd:\\webshare\\web3' ); echo 'CWD is '.getcwd().''; chdir( 'd:\\webshare\\web3\\test' ); echo 'CWD is '.getcwd().''; Expected result: Script located in d:\webshare\web3 CWD is 'd:\webshare\web3' CWD is 'd:\webshare\web3' CWD is 'd:\webshare\web3\test' Actual result: -- Script located in d:\webshare\web3 CWD is 'd:\webshare\another\scripts\path' Warning: chdir() [function.chdir]: No such file or directory (errno 2) in D:\webshare\web3\test.php on line 4 CWD is 'd:\webshare\another\scripts\path' CWD is 'd:\webshare\web3\test' -- or sometimes -- Script located in d:\webshare\web3 CWD is 'd:\webshare\another\scripts\path' Warning: chdir() [function.chdir]: No error (errno 0) in D:\webshare\web3\test.php on line 4 CWD is 'd:\webshare\another\scripts\path' CWD is 'd:\webshare\web3\test' -- Edit this bug report at http://bugs.php.net/?id=43977&edit=1
#45184 [Ana->Asn]: algorithm to limit random numbers to a certain range is flawed
ID: 45184 Updated by: [EMAIL PROTECTED] Reported By: kala at sankya dot com -Status: Analyzed +Status: Assigned Bug Type: Math related Operating System: Linux PHP Version: 5.2.6 Assigned To: pajoye Previous Comments: [2008-06-26 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". [2008-06-18 16:21:40] [EMAIL PROTECTED] Would you be interested in improving our code? [2008-06-05 11:49:10] kala at sankya dot com Sorry the line int val = (i/divisor)*10; in the example program should be : int val = (i/divisor)*REQUESTED_RANGE; for the program to work correctly for any other range other than 10. [2008-06-05 11:30:09] kala at sankya dot com @pajoye : Yes I'm aware of the limitations of rand() (and LCG generators in general), and have used MT extensively. The problem here isn't with the RNG but with the algorithm used in converting the raw 31 bit random number to one within a given range. This algorithm is common to both the rand() and mt_rand() functions that take min/max arguments (both uses the RANGE_RANDOM macro defined in the file "ext/standard/php_rand.h") . The only work around is to use the no argument variant to get a 31 bit number and and do the scaling yourself. (But obviously the better solution would be to fix the code itself :) ) [2008-06-05 10:37:10] [EMAIL PROTECTED] Have you tried to use mt_rand instead? Rand is known for having "issues". 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/45184 -- Edit this bug report at http://bugs.php.net/?id=45184&edit=1
#44882 [Fbk->Opn]: SOAP extension object decoding bug
ID: 44882 User updated by: mike at silverorange dot com Reported By: mike at silverorange dot com -Status: Feedback +Status: Open Bug Type: SOAP related Operating System: * PHP Version: 5.2.5 New Comment: The test still fails using the 5.2-200810211030 snapshot. Previous Comments: [2008-10-21 11:35:05] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ [2008-10-01 20:27:38] mike at silverorange dot com I've moved the test provided by anomie into a phpt file at http://labs.silverorange.com/files/php-bug44882/. The WSDL file is not included locally as it is the copyrighted work of PayPal. The test passes using the associated patch but fails against the latest snapshot (5.2-200810011830). What else is needed to get this bug fixed? [2008-06-23 15:23:14] anomie at users dot sf dot net Here is a test case that illustrates the bug, using the same technique the ext/soap test cases in the PHP distribution use. Please excuse the big block-o-base64, the namespace URIs in the XML were apparently triggering your spam filter. https://www.paypal.com/wsdl/PayPalSvc.wsdl";); var_dump($client->GetExpressCheckoutDetails(array('GetExpressCheckoutDetailsRequest'=>array('Version'=>50.0,'Token'=>'dummy'; ?> [2008-05-01 18:02:29] mike at silverorange dot com Description: When decoding a SOAP response into zvals, the decoder sometimes gets confused decoding objects. We noticed this using the PayPal Express Checkout SOAP API. For one request type, the returned XML was correct; however, the decoded PHP objects that were returned were incorrect. One value that should have been a string was a string reference and an object that should have been an object was as string. Upon further investigation, we found other users had been experiencing this specific problem using PayPal's SOAP API with PHP since PHP 5.2.2. After a bit of CVS research, it seems the bug was introduced in 1.103.2.21.2.27 in soap_encoding.c to fix bug #37013. The patch at http://labs.silverorange.com/files/php-patches/soap-object-reference-bug-20080501.patch works around the bug for our needs, but it does not fix the underlying problem and probably reintroduces #37013. Reproduce code: --- I can't provide a runnable test case unless you have PayPal developer API credentials. If so, you can run the unit tests in the package at: http://labs.silverorange.com/files/Payment_PayPal_Soap/Payment_PayPal_Soap-0.0.4.tgz The second test will fail if the bug is present and pass if the bug is fixed. I've attached a var_dump of broken an working SOAP results to illustrate the broken 'PayerInfo' element parsing. Expected result: object(stdClass)#114 (6) { ["Timestamp"]=> string(20) "2008-05-01T17:41:45Z" ["Ack"]=> string(7) "Success" ["CorrelationID"]=> string(13) "9d6aa8c0309df" ["Version"]=> string(8) "1.00" ["Build"]=> string(6) "548868" ["GetExpressCheckoutDetailsResponseDetails"]=> object(stdClass)#113 (2) { ["Token"]=> string(20) "EC-6AU15743MX2745842" ["PayerInfo"]=> object(stdClass)#112 (6) { ["Payer"]=> string(0) "" ["PayerID"]=> string(0) "" ["PayerStatus"]=> string(10) "unverified" ["PayerName"]=> object(stdClass)#110 (5) { ["Salutation"]=> string(0) "" ["FirstName"]=> string(0) "" ["MiddleName"]=> string(0) "" ["LastName"]=> string(0) "" ["Suffix"]=> string(0) "" } ["PayerBusiness"]=> string(0) "" ["Address"]=> object(stdClass)#111 (9) { ["Name"]=> string(0) "" ["Street1"]=> string(0) "" ["Street2"]=> string(0) "" ["CityName"]=> string(0) "" ["StateOrProvince"]=> string(0) "" ["CountryName"]=> string(0) "" ["PostalCode"]=> string(0) "" ["AddressOwner"]=> string(6) "PayPal" ["AddressStatus"]=> string(4) "None" } } } } Actual result: -- object(stdClass)#114 (6) { ["Timestamp"]=> string(20) "2008-05-01T17:56:31Z" ["Ack"]=> string(7) "Success" ["CorrelationID"]=> string(13) "233fdab3c0758" ["Version"]=> string(8) "1.00" ["Build"]=> string(6) "548868" ["GetExpressCheckoutDetailsResponseDetails"]=> object(stdClass)#113 (2) { ["Token"]=> &string(20) "EC-8JA130819B922424F" ["PayerInfo"]=> string(20) "EC-8JA130819B922424F" } } ---
#44706 [Com]: Segfault after sending PayPal SOAP request
ID: 44706 Comment by: mike at silverorange dot com Reported By: test1 at boxaroo dot com Status: No Feedback Bug Type: SOAP related Operating System: at least Linux and Mac PHP Version: 5.2.5 New Comment: I can confirm this segmentation fault still occurs using the 5.2-200810211030 snapshot. Please reopen this bug. It's probably related to #44882 because on a patched version of PHP, it doesn't segfault. Previous Comments: [2008-10-06 15:32:49] mike at silverorange dot com I can confirm this segmentation fault still occurs using the 5.2-200810011830 snapshot. Please reopen this bug. It's probably related to #44882 because on a patched version of PHP, it doesn't segfault. [2008-08-20 01:00:01] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". [2008-08-12 16:19:00] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi [2008-05-26 08:39:38] jasper at flyingfish dot nl Hi, We are experiencing the same problem on PHP 5.2.6 on Gentoo. This is a real problem for us. Regards, Jasper [2008-04-12 00:52:09] test1 at boxaroo dot com Description: I get a segault when talking to PayPal via SOAP. It seems like the segfault happens AFTER the Soap call has happened, because I can usually dump the results to the screen just before the crash. This happens on a Mac system with PHP 5.2.4 and a Linux system with 5.2.5. I have tried 3 different ways of talking to PayPal; one using their SDK, one using straight SOAP code I wrote, and one using a SOAP wrapper library I found. All crash the same way. I use SOAP for tons of other things (eBay, for instance) without issues. Reproduce code: --- http://img1.boxaroo.com/images/php_soap_segv.txt And, BTW, you do *not* need to put in your PayPal info (I have mine replaced with '---'). It still crashes in the same way whether it accepts your creds or not. Expected result: Should just be a dump of the return; instead you should see the segfault. Actual result: -- Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x2a26b9e5 0x0028ef3e in zend_objects_store_del_ref_by_handle () (gdb) bt #0 0x0028ef3e in zend_objects_store_del_ref_by_handle () #1 0x0028f0b1 in zend_objects_store_del_ref () #2 0x00264ce7 in _zval_ptr_dtor () #3 0x0027bf90 in zend_hash_destroy () #4 0x0028bb22 in zend_object_std_dtor () #5 0x0028bb4a in zend_objects_free_object_storage () #6 0x0028f097 in zend_objects_store_del_ref_by_handle () #7 0x0028f0b1 in zend_objects_store_del_ref () #8 0x00264ce7 in _zval_ptr_dtor () #9 0x0027bf90 in zend_hash_destroy () #10 0x0028bb22 in zend_object_std_dtor () #11 0x0028bb4a in zend_objects_free_object_storage () #12 0x0028f097 in zend_objects_store_del_ref_by_handle () #13 0x0028f0b1 in zend_objects_store_del_ref () #14 0x00264ce7 in _zval_ptr_dtor () #15 0x0027c12a in zend_hash_apply_deleter () #16 0x0027c47c in zend_hash_reverse_apply () #17 0x00263fba in shutdown_destructors () #18 0x00272541 in zend_call_destructors () #19 0x0022dee3 in php_request_shutdown () #20 0x0030243a in main () -- Edit this bug report at http://bugs.php.net/?id=44706&edit=1
#43896 [Opn]: htmlspecialchars returns empty string on invalid unicode sequence
ID: 43896 Updated by: [EMAIL PROTECTED] Reported By: arnaud dot lb at gmail dot com Status: Open Bug Type: Strings related Operating System: * PHP Version: 5.2CVS, 5.3CVS (2008-07-15) New Comment: Actually "The tool" to use for incoming data is the filter extension.. Previous Comments: [2008-09-11 12:52:16] [EMAIL PROTECTED] Not considering this as a bug (or rather a regression) is a major flaw IMO. htmlspecialchars() is *THE* tool that developers are encouraged to use when escaping output of data that comes from an unknown source. By nature you can't always rely on this data to be perfectly valid. People copy and paste from Word to HTML forms and do all kind of weird stuff to get data into a website. Simply discarding the complete data just because it's not a completely valid character stream is going break all kind of websites with user generated content. [2008-07-18 00:10:45] [EMAIL PROTECTED] I even don't think this is a valid bug in the first place. You passed a string that is encoded in ISO-8859-15 to htmlspecialchars() while specifying UTF-8 to force the string to be treated as "UTF-8". One should never depend on the past wrond behaviour with which invalid byte sequences pass through. Besides, you can always work around it by giving ISO-8859-15 to the third argument. [2008-06-27 17:32:43] sillyxone at yaoo dot com is also affected in 5.2, for example: $str = 'Hello' . chr(160) . 'there'; print(htmlentities($str, ENT_COMPAT, 'UTF-8')); Instead of printing "Hello there", it prints nothing (empty string). The same for htmlspecialchars(). Both functions work fine in 5.1 [2008-05-05 21:00:37] heurika at gmail dot com Hi, I've got the same Bug, posted on #43740. Please fix it. Thanks! [2008-02-17 13:25:22] andreas dot ravnestad at gmail dot com This seems to be breaking PEAR::Text_Wiki completely when using UTF-8: http://pear.php.net/bugs/bug.php?id=13136 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/43896 -- Edit this bug report at http://bugs.php.net/?id=43896&edit=1
#43410 [Opn->Fbk]: SNMP cause "PHP has encountered an Access Violation" when wrong IP or CommStr
ID: 43410 Updated by: [EMAIL PROTECTED] Reported By: andy_wolk at mail dot ru -Status: Open +Status: Feedback Bug Type: SNMP related Operating System: Windows 2003 Server Enterprise PHP Version: 5.2.5 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Do not paste such huge texts here. Put them somewhere in net (like http://phpfi.com/) where we can check them out. Previous Comments: [2008-02-20 14:04:36] andy_wolk at mail dot ru Analysis Summary Type Description Recommendation Error In w3wp__PID__4516__Date__02_18_2008__Time_09_28_27PM__338__Second_Chance_Exception_C005.dmp the assembly instruction at ntdll!ExpInterlockedPopEntrySListFault in C:\WINDOWS\system32\ntdll.dll from Microsoft Corporation has caused an access violation exception (0xC005) when trying to read from memory location 0x20657355 on thread 10 Heap corruption was detected in heap 0x0003, however pageheap was not enabled in this dump. Please follow the instructions in the recommendation section for troubleshooting heap corruption issues. Current NTGlobalFlags value: 0x0 An access violation exception thrown by a heap memory manager function indicates heap corruption. Please follow the steps outlined in the following Knowledge Base article: 300966 Howto debug heap corruption issues in Internet Information Services (IIS) Error In w3wp__PID__7844__Date__02_18_2008__Time_07_48_46PM__213__Second_Chance_Exception_C005.dmp the assembly instruction at ntdll!RtlAllocateHeap+579 in C:\WINDOWS\system32\ntdll.dll from Microsoft Corporation has caused an access violation exception (0xC005) when trying to read from memory location 0x on thread 54 Heap corruption was detected in heap 0x0003, however pageheap was not enabled in this dump. Please follow the instructions in the recommendation section for troubleshooting heap corruption issues. Current NTGlobalFlags value: 0x0 An access violation exception thrown by a heap memory manager function indicates heap corruption. Please follow the steps outlined in the following Knowledge Base article: 300966 Howto debug heap corruption issues in Internet Information Services (IIS) Error In w3wp__PID__3460__Date__02_20_2008__Time_04_56_39PM__556__Second_Chance_Exception_C005.dmp the assembly instruction at ntdll!ExpInterlockedPopEntrySListFault in C:\WINDOWS\system32\ntdll.dll from Microsoft Corporation has caused an access violation exception (0xC005) when trying to read from memory location 0x64006f00 on thread 2 Heap corruption was detected in heap 0x0003, however pageheap was not enabled in this dump. Please follow the instructions in the recommendation section for troubleshooting heap corruption issues. Current NTGlobalFlags value: 0x0 An access violation exception thrown by a heap memory manager function indicates heap corruption. Please follow the steps outlined in the following Knowledge Base article: 300966 Howto debug heap corruption issues in Internet Information Services (IIS) Information DebugDiag determined that this dump file (w3wp__PID__7844__Date__02_18_2008__Time_07_48_46PM__213__Second_Chance_Exception_C005.dmp) is a crash dump and did not perform any hang analysis. If you wish to enable combined crash and hang analysis for crash dumps, edit the CrashHangAnalysis.asp script (located in the DebugDiag\Scripts folder) and set the g_DoCombinedAnalysis constant to True. Information DebugDiag determined that this dump file (w3wp__PID__4516__Date__02_18_2008__Time_09_28_27PM__338__Second_Chance_Exception_C005.dmp) is a crash dump and did not perform any hang analysis. If you wish to enable combined crash and hang analysis for crash dumps, edit the CrashHangAnalysis.asp script (located in the DebugDiag\Scripts folder) and set the g_DoCombinedAnalysis constant to True. Information DebugDiag determined that this dump file (w3wp__PID__3460__Date__02_20_2008__Time_04_56_39PM__556__Second_Chance_Exception_C005.dmp) is a crash dump and did not perform any hang analysis. If you wish to enable combined crash and hang analysis for crash dumps, edit the CrashHangAnalysis.asp script (located in the DebugDiag\Scripts folder) and set the g_DoCombinedAnalysis constant to True. Analysis Details Your browser settings are currently prohibiting this report's scripts from running. This is preventing some features of this analysis report from displaying properly. To enable scripts to run, right-click the security warning above and choose "Allow Blocked Content..." or enable the "Allow active content to run in files on My Computer*" setting on the Advanced tab of your "Internet Options" dialog to avoid being prompted in the future Table Of Contents w3wp__PID__3460__Date__02_2
#43452 [Opn->Asn]: strtotime returns wrong date when requested day is same as first day of the mon
ID: 43452 Updated by: [EMAIL PROTECTED] Reported By: sean dot thorne at gmail dot com -Status: Open +Status: Assigned Bug Type: Date/time related Operating System: Mac OS X 10.4.11 PHP Version: 5.2CVS-2007-11-29 (CVS) Assigned To: derick New Comment: Derick, feedback was given.. Previous Comments: [2008-10-16 23:18:39] [EMAIL PROTECTED] Confirmed it broken in 5.2.7-dev as well. Since it appears to be fixed in 5.3-alpha3-dev, is there any chance this fix can be backported? [2008-10-16 22:56:28] [EMAIL PROTECTED] I had second thoughts about the "timestamp" passed into strtotime(), so I tried to create the date in a slightly different way but it failed never the less. I can also confirm this on 5.2.6_2 on FreeBSD. Additional code: Works: Does not: [2008-10-16 16:29:22] [EMAIL PROTECTED] Sorry to re-open, I found the same bug on: PHP Version 5.2.6-pl6-gentoo Some code to reproduce: Shows 2008-12-08, while indeed the first Monday in December is 2008-12-01. [2008-07-23 18:50:15] [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. [2008-07-17 10:32:00] [EMAIL PROTECTED] Yeah, and I've done some work on that -- but it's not ready yet. 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/43452 -- Edit this bug report at http://bugs.php.net/?id=43452&edit=1
#44018 [Opn->Asn]: RecursiveDirectoryIterator options inconsistancy
ID: 44018 Updated by: [EMAIL PROTECTED] Reported By: jordan dot raub at dataxltd dot com -Status: Open +Status: Assigned Bug Type: SPL related Operating System: * PHP Version: 5.3.0alpha2 Assigned To: colder New Comment: Seems to be continuous regression? :) Previous Comments: [2008-10-08 20:21:38] jordan dot raub at dataxltd dot com The bug was reintroduced. $obj = new RecursiveDirectoryIterator(dirname(__FILE__), 0); $obj->current(); //should return a RecursiveDirectoryIterator $obj = new RecursiveDirectoryIterator(dirname(__FILE__)); $obj->current(); //should return a RecursiveDirectoryIterator both of these return SplFileObjects. So it looks like CURRENT_AS_FILEINFO and CURRENT_AS_SELF should be switched. CURRENT_AS_SELF === 0? [2008-10-08 19:41:22] [EMAIL PROTECTED] Using a test script testing some possibilities, I get such results: Format is ($options) $key => type($val) when foreach'ing a RecursiveDirectoryIterator with the following options. Default: () /home/colder/cvs/php5.2/ext/spl/doxygen.cfg =>SplFileInfo Options = 0: (0) /home/colder/cvs/php5.2/ext/spl/doxygen.cfg =>SplFileInfo Options = CURRENT_AS_FILEINFO: (0) /home/colder/cvs/php5.2/ext/spl/doxygen.cfg =>SplFileInfo Options = CURRENT_AS_SELF: (16) /home/colder/cvs/php5.2/ext/spl/doxygen.cfg =>RecursiveDirectoryIterator Options = CURRENT_AS_PATHNAME: (32) /home/colder/cvs/php5.2/ext/spl/doxygen.cfg =>(string) /home/colder/cvs/php5.2/ext/spl/doxygen.cfg Options = KEY_AS_FILENAME: (256) doxygen.cfg =>SplFileInfo Options = KEY_AS_FILENAME|CURRENT_AS_FILEINFO: (256) doxygen.cfg =>SplFileInfo Options = NEW_CURRENT_AND_KEY: (256) doxygen.cfg =>SplFileInfo Options = KEY_MODE_MASK: (3840) /home/colder/cvs/php5.2/ext/spl/doxygen.cfg =>SplFileInfo This is consistent across 5.2, 5.3 and HEAD, and looks consistent to me. Where is the actual problem? Is it a regression? Documentation problem? [2008-10-08 18:17:26] [EMAIL PROTECTED] Assigned to the maintainer.. [2008-10-03 16:32:10] jordan dot raub at dataxltd dot com this also got reintroduced to 5.3, tests fail w/ 5.3alpha2 [2008-09-30 22:18:50] jordan dot raub at dataxltd dot com patch diff php5.2-200809302030/ext/spl/spl_directory.c php52/ext/spl/spl_directory.c 683,686c683 < } else if (SPL_FILE_DIR_CURRENT(intern, SPL_FILE_DIR_CURRENT_AS_FILEINFO)) { < spl_filesystem_object_get_file_name(intern TSRMLS_CC); < spl_filesystem_object_create_type(0, intern, SPL_FS_INFO, NULL, return_value TSRMLS_CC); < } else { --- > } else if (SPL_FILE_DIR_CURRENT(intern, SPL_FILE_DIR_CURRENT_AS_SELF)) { 688a686,688 > } else { > spl_filesystem_object_get_file_name(intern TSRMLS_CC); > spl_filesystem_object_create_type(0, intern, SPL_FS_INFO, NULL, return_value TSRMLS_CC); 966c966 < long flags = SPL_FILE_DIR_KEY_AS_PATHNAME|SPL_FILE_DIR_CURRENT_AS_FILEINFO; --- > long flags = SPL_FILE_DIR_KEY_AS_PATHNAME|SPL_FILE_DIR_CURRENT_AS_SELF; 1258c1258,1260 < } else if (SPL_FILE_DIR_CURRENT(object, SPL_FILE_DIR_CURRENT_AS_FILEINFO)) { --- > } else if (SPL_FILE_DIR_CURRENT(object, SPL_FILE_DIR_CURRENT_AS_SELF)) { > *data = (zval**)&iterator->intern.data; > } else { 1265,1266d1266 < } else { < *data = (zval**)&iterator->intern.data; diff php5.2-200809302030/ext/spl/spl_directory.h php52/ext/spl/spl_directory.h 96,97c96,97 < #define SPL_FILE_DIR_CURRENT_AS_FILEINFO 0x /* make RecursiveDirectoryTree::current() return SplFileInfo */ < #define SPL_FILE_DIR_CURRENT_AS_SELF 0x0010 /* make RecursiveDirectoryTree::current() return getSelf() */ --- > #define SPL_FILE_DIR_CURRENT_AS_FILEINFO 0x0010 /* make RecursiveDirectoryTree::current() return SplFileInfo */ > #define SPL_FILE_DIR_CURRENT_AS_SELF 0x /* make RecursiveDirectoryTree::current() return getSelf() */ UnitTest --TEST-- Bug #44018 (RecursiveDirectoryIterator options inconsistancy) --FILE-- $file) { if(strpos($key, '/tests') !== false) { echo get_class($file) . "\n"; } } $options = 0; foreach(new RecursiveDirectoryIterator(dirname(dirname(__FILE__)), $options) as $key => $file) { if(strpos($key, '/tests') !== false) { echo get_class($file) . "\n"; } } $options = RecursiveDirectoryIterator::CURRENT_AS_FILEINFO; foreach(new RecursiveDirectoryIterator(dirname(dirname(__FILE__)), $options) as $key => $file) { if(strpos($key, '/tests') !== false) { echo get_class($file) . "\n";
#46038 [Opn->Asn]: imagepsloadfont not working
ID: 46038 Updated by: [EMAIL PROTECTED] Reported By: cory dot mawhorter at ephective dot com -Status: Open +Status: Assigned Bug Type: GD related Operating System: Windows Vista PHP Version: 5.2.6 Assigned To: pajoye Previous Comments: [2008-09-22 09:36:51] cory dot mawhorter at ephective dot com If you didn't receive the email with the font files I can make them available for you to download elsewhere. [2008-09-15 08:24:04] cory dot mawhorter at ephective dot com I didnt want to make them available online because of copyright. Ive emailed you the two fonts I most recently tried. The first is Adobes Albertus MT and the second is Porcelain. Let me know if for some reason you can't receive the attachment or don't receive the email and I'll upload them someplace. [2008-09-15 06:01:54] [EMAIL PROTECTED] you do not need (and should not) download the T1Lib dll. It is already in the extension. Do you have the font files please? [2008-09-15 00:38:48] [EMAIL PROTECTED] Pierre, any idea? [2008-09-10 06:03:14] cory dot mawhorter at ephective dot com Description: I can't get the the example given at http://php.net/imagepstext to work at all under Windows. I have GD with t1lib enabled but it is producing an error and will not load the font. The same code runs fine under linux. Originally, I was getting a "Font file not found" error even though the font file was definitely there. I downloaded and installed the T1Lib from sourceforge [ http://gnuwin32.sourceforge.net/packages/t1lib.htm ] for giggles and the error changed to the one below. This may just be a coincidence, though. Reproduce code: --- Code from http://php.net/imagepstext example. Comments removed. Expected result: Image rendered without errors. Actual result: -- Trying to run the above code gives the following error: Warning: imagepstext() [function.imagepstext]: T1Lib Error: Syntactical Error Scanning Font File in [path]\pstest.php on line 13 I've tried with a couple different fonts and always get the same result. I run the same code on my linux server with the same fonts without issue. -- Edit this bug report at http://bugs.php.net/?id=46038&edit=1
#44639 [Com]: PDO quotes integers in prepared statement
ID: 44639 Comment by: jgauld at blueyonder dot co dot uk Reported By: jgauld at blueyonder dot co dot uk Status: Feedback Bug Type: PDO related Operating System: WinXP PHP Version: 5.2.5 New Comment: Tried windows snapshot as suggested (5.2.7RC2-dev), but no joy. Result is same, ie: select * from my_table where id>'13' If it helps, phpinfo() reports: PDO Driver for MySQL, client library version5.0.51a Previous Comments: [2008-10-21 11:27:05] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ [2008-07-03 15:17:35] [EMAIL PROTECTED] This is not a driver issue. Its the PDO SQL driver messing up SQL statements. [2008-06-12 13:42:35] dobamail at gmail dot com Hi. PDO::MySQL The code: $stmt = $db->prepare(' SELECT id, hu_name, ord FROMproducts ORDER BY ord DESC, hu_name LIMIT :offset, :limit '); $stmt->bindValue(':offset', ($offset*$limit)); $stmt->bindValue(':limit', $limit); $stmt->execute(); It is work on: - PHP Version 5.2.0-8+etch11; - PDO Driver for MySQL, client library version 5.0.32 - MySQL version: 5.0.32-Debian_7etch5-log Not work on: - PHP Version 5.2.3-1ubuntu6.3 - PDO Driver for MySQL, client library version 5.0.45 - 5.0.45-Debian_1ubuntu3.3 I hope this help you. Best regards. [2008-04-04 15:16:33] jgauld at blueyonder dot co dot uk Description: When executing a prepared statement with bound values, any integer types are seemingly treated as strings and quoted in the final SQL statement (SQL statements taken from MySQL server log). I realise I've not used the 'data_type' parameter for the ->bindValue() method, but according to the PHP manual I shouldn't need to ... "Explicit data type for the parameter using the PDO::PARAM_* constants. Defaults to PHP native type." So the PHP native type in the shown case is an integer - equivalent to PDO::PARAM_INT, yes? Reproduce code: --- CREATE TABLE my_db.my_table ( id int(10) unsigned NOT NULL auto_increment, PRIMARY KEY (id) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; prepare('select * from my_table where id>?'); $stmt->bindValue(1, 13); $stmt->execute(); ?> or prepare('select * from my_table where id>?'); $stmt->execute(array(13)); ?> Expected result: select * from my_table where id>13 Actual result: -- select * from my_table where id>'13' -- Edit this bug report at http://bugs.php.net/?id=44639&edit=1
#37527 [Opn->Asn]: Crash - odbc_exec on closed pconnect
ID: 37527 Updated by: [EMAIL PROTECTED] Reported By: bhines at alumni dot ucsd dot edu -Status: Open +Status: Assigned Bug Type: ODBC related Operating System: Windows XP PHP Version: 5.1.6 -Assigned To: +Assigned To: felipe New Comment: Was that fix applied? Does this bug exist in PHP_5_2 branch still? If so, please update the version.. Previous Comments: [2008-02-17 17:22:46] [EMAIL PROTECTED] Possible fix: http://felipe.ath.cx/diff/bug37527.diff [2007-09-25 13:21:33] alexandra at zend dot com Hi There is a simple work-around to make this script work - there is a problem with the fact that you declared the $mydb var global in one function but not the other. You can change the printPage() function to solve this issue. function printPage() { global $mydb; $mydb = pdb_Connect(); odbc_close($mydb); print "Possibly Crashing now... "; $results = odbc_exec($mydb, 'SELECT * FROM _PDB_Access'); } [2006-09-29 23:22:16] bhines at alumni dot ucsd dot edu Still occurs in 5.1.6 [2006-05-20 21:44:33] bhines at alumni dot ucsd dot edu odbc32.dll!74355a16() odbc32.dll!7432139f() odbc32.dll!74322c5d() odbc32.dll!74325fa0() odbc32.dll!7432740e() php5ts.dll!zif_odbc_exec(int ht=17437576, _zval_struct * return_value=0x010af6f0, _zval_struct * * return_value_ptr=0x, _zval_struct * this_ptr=0x, int return_value_used=1, void * * * tsrm_ls=0x00032608) Line 1285 C php5ts.dll!zend_do_fcall_common_helper_SPEC(_zend_execute_data * execute_data=0x00c0fae8, void * * * tsrm_ls=0x00032608) Line 200 + 0x35C php5ts.dll!ZEND_DO_FCALL_SPEC_CONST_HANDLER(_zend_execute_data * execute_data=0x, void * * * tsrm_ls=0x00032608) Line 1644 + 0xe C php5ts.dll!execute(_zend_op_array * op_array=0x, void * * * tsrm_ls=0x010abb40) Line 92 + 0xc C php5ts.dll!_efree(void * ptr=0x011d5f60) Line 275 + 0xcC php5ts.dll!zend_llist_del_element(_zend_llist * l=0x010ad080, void * element=0x00032608, int (void *, void *)* compare=0x) Line 99 + 0x5 C php5ts.dll!zend_execute_scripts(int type=2009252809, void * * * tsrm_ls=0x0003, _zval_struct * * retval=0x, int file_count=2009252814, ...) Line 1100 C ntdll.dll!7c9106eb() msvcrt.dll!77c2c3ce() msvcrt.dll!77c2c3e7() msvcrt.dll!77c2c42e() php5ts.dll!_zend_hash_add_or_update(_hashtable * ht=0x000d, char * arKey=0x010abb30, unsigned int nKeyLength=268473042, void * pData=0x, unsigned int nDataSize=206344, void * * pDest=0x010abb18, int flag=268473024) Line 248 + 0x2e C php5ts.dll!ts_resource_ex(int id=12648368, unsigned long * th_id=0x) Line 331 C php5ts.dll!php_execute_script(_zend_file_handle * primary_file=0x00c0fedc, void * * * tsrm_ls=0x00032608) Line 1682 + 0x31C php.exe!main(int argc=2, char * * argv=0x000325c8) Line 1094 C php.exe!_mainCRTStartup() + 0xe3 kernel32.dll!7c816d4f() kernel32.dll!7c8399f3() [2006-05-19 20:06:48] bhines at alumni dot ucsd dot edu Description: php crashes if i connect to a closed ODBC pconnect. I know this is very bad code below, but php should probably not crash. I reproed this with both 5.1.4 and today's 5.2 snapshot. Reproduce code: --- Expected result: With warnings on, i'd expect something like: Possibly Crashing now... Warning: odbc_exec(): supplied argument is not a valid ODBC-Link resource in d:\inetpub\wwwroot\include\test\testcrash.php on line 20 Actual result: -- Possibly Crashing now... PHP has encountered an Access Violation at 7C901010 -- Edit this bug report at http://bugs.php.net/?id=37527&edit=1
#42935 [Opn->Fbk]: pdo error handler is broken
ID: 42935 Updated by: [EMAIL PROTECTED] Reported By: denis at mesoconcepts dot com -Status: Open +Status: Feedback Bug Type: PDO related Operating System: freebsd PHP Version: 5.2.4 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: [2007-10-11 21:36:17] denis at mesoconcepts dot com pdo should generate an error when it cannot assign a type for a prepared statement [2007-10-11 21:29:53] denis at mesoconcepts dot com further investigation led us to identify this query as a solution: $dbs = $dbh->prepare(' SELECT 1 WHERE (?)::int4 IS NOT NULL '); nonetheless, it would be sweet if pdo identified the first as an integer indeed. [2007-10-11 21:23:12] denis at mesoconcepts dot com was of course meant: when something is __not__ null [2007-10-11 21:20:53] denis at mesoconcepts dot com Description: using select 1 where something is null returns an empty array D. Reproduce code: --- try { $dbh =& new PDO( 'pgsql:host=' . $db_host . ';dbname=' . $db_name, $db_user, $db_pass ); } $dbs = $dbh->prepare(" SELECT 1 WHERE ? IS NOT NULL "); $dbs->execute(array(1)); $res = $dbs->fetchAll(); var_dump($res); Expected result: a row Actual result: -- no rows -- Edit this bug report at http://bugs.php.net/?id=42935&edit=1
#44422 [Opn->WFx]: Server Crash with php5isapi
ID: 44422 Updated by: [EMAIL PROTECTED] Reported By: drew at tribalectic dot com -Status: Open +Status: Wont fix Bug Type: IIS related Operating System: Windows 2003 Server PHP Version: 5.2.5 New Comment: Save yourself a lot of trouble and start using FastCGI instead of ISAPI module. It actually works.. Previous Comments: [2008-07-13 06:16:14] d dot runkel at nanotron dot com We have the same here using Server 2008 (IIS7) / PHP 5.2.6. I lowered the Idle-Timeout of the default App Pool from 20min to 1 min. Whenever i browse a Page containing phpinfo as a single line and wait for the timeout events 5186 ( Apppool idle shutdown) 5009 (Appool crash due to php5isapi dll heap problem) are logged. I just tested with actual snapshot 5.2.7 and the problem persists. Any updates on this ? [2008-03-17 20:00:33] drew at tribalectic dot com I have upgraded to 5.2.6RC3-dev and the problems continue. This is killing our server with these resets, we really need HELP and the server is live with lots of traffic so the sooner the better! Here is the latest backtrace: In w3wp__PID__1348__Date__03_17_2008__Time_12_52_29PM__578__First chance exception 0XC005.dmp the assembly instruction at msvcrt!_strdup+12 in C:\WINDOWS\system32\msvcrt.dll from Microsoft Corporation has caused an access violation exception (0xC005) when trying to read from memory location 0x on thread 126 Thread 126 - System ID 5804 Entry point w3tp!THREAD_MANAGER::ThreadManagerThread Create time 3/17/2008 12:52:23 PM Time spent in user mode 0 Days 00:00:00.00 Time spent in kernel mode 0 Days 00:00:00.00 This thread is calling an ISAPI Filter php5isapi Function Source msvcrt!_strdup+12 php5ts!WspiapiLegacyGetNameInfo+23f ntdll!RtlCreateHeap+6bd php5ts!zif_bcdiv+c4 php5isapi!HttpExtensionProc+3a w3core!W3_METADATA::GetAndRefVrAccessToken+3b 0x4b81fbcc w3core!W3_CONTEXT::InternalDetermineHandler+6ee 0x8000` Let me know, thank you! -Drew [2008-03-12 22:33:26] drew at tribalectic dot com Upgrading is slightly time consuming and difficult, does the windows installer overwrite my php.ini file? Can I just use that to upgrade or do I need to manually overwrite all files? Is the problem I have described fixed in the latest version? This is a production site so I am a little worried about tinkering too much. -Drew [2008-03-12 21:44:42] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi [2008-03-12 18:35:33] drew at tribalectic dot com Description: PHP 5.2.3 was causing server crashes every so often on the application pool. So, we just upgreaded to 5.2.5 and are still getting application crashes. Here's my backtrace... php5isapi!php_isapi_report_exception+17 1216f970 0033 031bfd58 php5isapi!HttpExtensionProc+2e0 01088d20 01087a28 010886b0 w3isapi!ProcessIsapiRequest+100 01088c98 01cc1de0 1216fe50 w3core+68ff 01087a28 w3core+67e0 1216fee8 01087a28 w3core+6764 01087a28 1216fec4 w3core+66f4 01087a30 01087a28 0001 w3core+66ae 0001 1216fee8 0026bc78 w3core+6648 w3core+2264 w3core+65ea 01086f60 01086f60 5a361650 w3dt!UlAtqAllocateMemory+16f 051e 01086f64 w3dt!UlAtqAllocateMemory+19a 051e 01086f64 w3tp!THREAD_POOL::PostCompletion+c9 109d7bb0 5a30 w3tp!THREAD_POOL::~THREAD_POOL+153 00268700 w3tp+1da9 109d7bb0 kernel32!GetModuleHandleA+df 5a301d70 109d7bb0 PHP5ISAPI!PHP_ISAPI_REPORT_EXCEPTION+17In w3wp__PID__2444__Date__03_12_2008__Time_12_01_04PM__156__Second_Chance_Exception_C005.dmp the assembly instruction at php5isapi!php_isapi_report_exception+17 in \\?\C:\PHP\php5isapi.dll from The PHP Group has caused an access violation exception (0xC005) when trying to read from memory location 0x0090 on thread 0 Module Information Image Name: \\?\C:\PHP\php5isapi.dll Symbol Type: PDB Base address: 0x01cc Time Stamp: Thu Nov 08 21:18:54 2007 Checksum
#44278 [Opn->Fbk]: nvarchar(max) mangled
ID: 44278 Updated by: [EMAIL PROTECTED] Reported By: ethan dot nelson at ltd dot org -Status: Open +Status: Feedback Bug Type: PDO related Operating System: win2k3 PHP Version: 5.2.5 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: [2008-02-28 00:51:28] ethan dot nelson at ltd dot org Description: I'm using PDO and the ODBC extension. Also I've installed the latest version of the SQL 2005 client tools so that I could create a System DSN using the SQLNative driver. That in place, I've run into trouble when selecting data out of nvarchar(max) fields. nvarchar works fine, nvarchar(max) fails. Additionally, it appears that I can insert data into these columns without issue. Try something simple... Reproduce code: --- $pdo = new PDO("odbc:systemdsn"); $query = "SELECT CAST('asdfasdfasdf' AS nvarchar) AS good, CAST('asdfasdfasdf' AS nvarchar(max)) AS garbled"; $poo = $pdo->prepare($query); $poo->execute(); $row = $poo->fetch(PDO::FETCH_ASSOC); print_r($row); Expected result: Array ( [good] => asdfasdfasdf [garbled] => asdfasdfasdf ) Actual result: -- Array ( [good] => asdfasdfasdf [garbled] => ��L �L��� ) -- Edit this bug report at http://bugs.php.net/?id=44278&edit=1
#44267 [Opn->Fbk]: soap server not persistence
ID: 44267 Updated by: [EMAIL PROTECTED] Reported By: falk dot herrmann at bike24 dot net -Status: Open +Status: Feedback Bug Type: SOAP related Operating System: Linux 2.6.23 PHP Version: 5.2.5 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: [2008-07-10 18:48:33] davy dot defaud at free dot fr It still doesn't work for me even in 5.2.6. I tried everything I could, I'm really lazzy. [2008-05-18 20:06:07] falk dot herrmann at bike24 dot net It seems that the code work with PHP 5.2.6 [2008-04-20 16:17:34] davy dot defaud at free dot fr I experienced the same problem on the same version 5.2.5, for a 2.6.24 kernel both on a i586 and a x86_64 systems (but I don't think it's system related). I already had this problem with an old 5.0.4 PHP but my code was working on a 5.2.1 including Suhosin so I was confident that it would work on my brand new mandriva 2008.1 server with the latest PHP, but it doesn't :-( This is a really critical bug for those using PHP as a SOAP server. We really need a quick fix. [2008-02-27 14:25:18] falk dot herrmann at bike24 dot net Description: A soap server with SOAP_PERSISTENCE_SESSION is not persistence if the class Bar extends class Foo and the class Foo was included via include() or required(). If the class Foo is directly in the server code file (server.php), soap server works correct. Reproduce code: --- server.php == var++; return $this->var; } } $server = new SoapServer(NULL, array('uri' => 'http://localhost/')); $server->setClass('Bar'); $server->setPersistence(SOAP_PERSISTENCE_SESSION); $server->handle(); ?> client.php == "http://localhost/server.php";, "uri" => "urn:xmethodsTest", 'trace' => 1 )); # SOAP requests try { $session = $client->login(); $client->__setCookie('PSESSION', $session); print $client->incVar(); print "\n"; print $client->incVar(); print "\n"; print $client->incVar(); print "\n"; print $client->incVar(); print "\n"; print $client->incVar(); print "\n"; } catch (SoapFault $sf) { # ... } ?> Foo.php === Expected result: 1 2 3 4 5 Actual result: -- 1 1 1 1 1 -- Edit this bug report at http://bugs.php.net/?id=44267&edit=1
#44265 [Opn->Fbk]: incorrect SOAP Encoding ERROR on response
ID: 44265 Updated by: [EMAIL PROTECTED] Reported By: gdk-spam at yes-co dot nl -Status: Open +Status: Feedback Bug Type: SOAP related Operating System: Debian r4.0 PHP Version: 5.2.5 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: [2008-10-08 08:02:56] benprim at gmail dot com I had the same issue when i change my WSDL from RPC/Encoded to document literal. But i think the problem comes from the former way i Use to return my results. My Response message looks something like this So i had to change my server code from function updateUser($user){ // Internal Code return $value; } to function updateUser($user){ // Internal Code return array("ReturnValue" => $value); } So I think your server client should be changed to public function GetKadastraalBericht($request) { $response = new StdClass(); return array("Letter" => $response->Letter,"Volgnummer" =>$response->Volgnummer); } [2008-02-27 13:54:34] gdk-spam at yes-co dot nl Description: The PHP SOAP server incorrectly reports an SOAP-ERROR when the SOAP response is returned in WSDL mode. The error indicates an optional property is missing. The property is defined within a XML Schema sequence which has its 'minOccurs' attribute set to '0', which should make the properties optional. The WSDL validates correctly against WS-I Basic Profile 1.1 + SOAP Binding Profile 1.0 checks using Mindreef SOAPscope. We recently upgraded from PHP 5.1.4 to PHP 5.2.4 (ZendCore package). We are unable to reproduce this error in 5.1.4. We've stripped down the Webservice and request/response, the production code is ofcourse much more complicated. If you uncomment the 'Letter' and 'Volgnummer' properties the SOAP response is returned without a problem Reproduce code: --- WSDL: http://devel.yes-co.com/zendbugs/ws_kadaster.wsdl SOAP Server: http://devel.yes-co.com/zendbugs/ws_kadaster.phps SOAP Client: http://devel.yes-co.com/zendbugs/ws_kadaster_client.phps Expected result: ws_kadaster_client.php output: stdClass Object ( ) Actual result: -- ws_kadaster_client.php output: SoapFault Object ( [message:protected] => SOAP-ERROR: Encoding: object hasn't 'Letter' property [string:private] => [code:protected] => 0 [file:protected] => /vol/vol0/home/geoffrey/public_html/ws_kadaster_client.php [line:protected] => 11 [trace:private] => Array ( [0] => Array ( [function] => __call [class] => SoapClient [type] => -> [args] => Array ( [0] => GetKadastraalBericht [1] => Array ( [0] => stdClass Object ( ) ) ) ) [1] => Array ( [file] => /vol/vol0/home/geoffrey/public_html/ws_kadaster_client.php [line] => 11 [function] => GetKadastraalBericht [class] => SoapClient [type] => -> [args] => Array ( [0] => stdClass Object ( ) ) ) ) [faultstring] => SOAP-ERROR: Encoding: object hasn't 'Letter' property [faultcode] => SOAP-ENV:Server ) http://schemas.xmlsoap.org/soap/envelope/"; xmlns:ns1="http://webservice.yes-co.nl/ws_kadaster";> http://schemas.xmlsoap.org/soap/envelope/";>SOAP-ENV:ServerSOAP-ERROR: Encoding: object hasn't 'Letter' property -- Edit this bug report at http://bugs.php.net/?id=44265&edit=1
#44263 [Opn->Fbk]: Soap error when dealing with private or protected properties
ID: 44263 Updated by: [EMAIL PROTECTED] Reported By: andrew at tvisted dot net -Status: Open +Status: Feedback Bug Type: SOAP related Operating System: Linux/OSX/Windows PHP Version: 5.2.5 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: [2008-02-27 11:49:30] andrew at tvisted dot net Description: Seems to be similar to Bug #30928 code can access and submit data via a WSDL without problem, but when trying to submit an array of object (eg NewCustomer) because certain fields are protected on the soapserver an error is returned, When a local version of the WSDL is created and the protected properties are removed from the class. The soapserver is working correctly as solutions using ASP and Javascript currently work. A copy of the WSDL is available at http://tvisted.net:1024/wsdl/IIntact --- './configure' '--prefix=/Applications/xampp/xamppfiles' '--program- suffix=-5.2.5' '--libdir=/Applications/xampp/xamppfiles/lib/php/php5' '--includedir=/Applications/xampp/xamppfiles/include/php/php5' '-- with-apxs2=/Applications/xampp/xamppfiles/bin/apxs' '--with-config- file-path=/Applications/xampp/etc' '--with- mysql=/Applications/xampp/xamppfiles' '--disable-debug' '--enable- bcmath' '--enable-calendar' '--enable-ctype' '--enable-dbase' '-- enable-discard-path' '--enable-exif' '--enable-filepro' '--enable- force-cgi-redirect' '--enable-ftp' '--enable-gd-imgstrttf' '--enable- gd-native-ttf' '--with-ttf' '--enable-magic-quotes' '--enable-memory- limit' '--enable-safe-mode' '--enable-shmop' '--enable-sigchild' '-- enable-sysvsem' '--enable-sysvshm' '--enable-track-vars' '--enable- trans-sid' '--enable-wddx' '--enable-yp' '--with-ftp' '--with- ncurses=/Applications/xampp/xamppfiles' '--with- gdbm=/Applications/xampp/xamppfiles' '--with-jpeg- dir=/Applications/xampp/xamppfiles' '--with-png- dir=/Applications/xampp/xamppfiles' '--with-freetype- dir=/Applications/xampp/xamppfiles' '--without-xpm' '--with-zlib=yes' '--with-zlib-dir=/Applications/xampp/xamppfiles' '--with- openssl=/Applications/xampp/xamppfiles' '--with-expat- dir=/Applications/xampp/xamppfiles' '--enable- xslt=/Applications/xampp/xamppfiles' '--with- xsl=/Applications/xampp/xamppfiles' '--with- dom=/Applications/xampp/xamppfiles' '--with- ldap=/Applications/xampp/xamppfiles' '--with- gd=/Applications/xampp/xamppfiles' '--with-mysql- sock=/Applications/xampp/xamppfiles/var/mysql/mysql.sock' '--with- mcrypt=/Applications/xampp/xamppfiles' '--with- mhash=/Applications/xampp/xamppfiles' '--enable-sockets' '--with- curl=/Applications/xampp/xamppfiles' '--enable-mbregex' '--enable- zend-multibyte' '--with-zip=/Applications/xampp/xamppfiles' '--enable- exif' '--with-sqlite' '--with-libxml- dir=/Applications/xampp/xamppfiles' '--enable-soap' '--enable-pcntl' '--enable-dbx' '--with- mysqli=/Applications/xampp/xamppfiles/bin/mysql_config' '--with- bz2=/Applications/xampp/xamppfiles' '--with- ming=shared,/Applications/xampp/xamppfiles' '--with- pear=/Applications/xampp/xamppfiles/lib/php/pear' '--with- mssql=/Applications/xampp/xamppfiles' '--with-imap- dir=/Applications/xampp/xamppfiles' '--with- imap=/Applications/xampp/xamppfiles' '--enable-mbstring=all' '--with- pgsql=shared,/usr' '--with-gettext=/Applications/xampp/xamppfiles' '-- with-pdo-mysql=/Applications/xampp/xamppfiles' --- soap.wsdl_cache = 0; soap.wsdl_cache_enabled = 0; Reproduce code: --- Part of the code used is: class TIntactCustomer { public $Code; // string public $Name; // string public $Address1; // string public $Address2; // string public $Address3; // string public $Address4; // string public $Address5; // string public $PostCode; // string public $OnOrder; // double public $Unbilled; // double public $UnAllocated; // double public $CreditLimit; // double public $Phone1; // string public $Phone2; // string public $Fax; // string public $EMail; // string public $DeliveryAddress1; // string public $DeliveryAddress2; // string public $DeliveryAddress3; // string public $DeliveryAddress4; // string public $DeliveryAddress5; // string public $DefaultVATRate; // double public $HoCode; // string public $IsHo; // boolean } public function IIntactservice($wsdl = "http://localhost/intact/lib/IIntactWSDL.xml";, $options = array()) { foreach(self::$classmap as $key => $value) { if(!isset($options['classmap'][$key])) { $options['classmap'][$key] = $value; } } parent::__construct($wsdl, $options); } /** * * * @param TIntactCustomer $ACustomer * @return int */ public function AddNewCustomer(TIntactCustomer $ACustomer) { return $this->__soapCall('AddNewCustomer', array($ACustomer), array(
#44835 [Opn->Fbk]: DBLIB driver - Weird NULL behavior
ID: 44835 Updated by: [EMAIL PROTECTED] Reported By: alexandre at gaigalas dot net -Status: Open +Status: Feedback Bug Type: PDO related Operating System: SuSE Enterprise PHP Version: 5.2.5 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: [2008-04-25 19:08:34] alexandre at gaigalas dot net Description: Fetching data on BIT columns with NULL values return 0 (zero) instead of NULL. Reproduce code: --- query("SELECT CONVERT(BIT,NULL) AS THIS_MUST_BE_BLANK")->fetch(PDO::FETCH_ASSOC)); Expected result: Array ( [THIS_MUST_BE_BLANK] => ) Actual result: -- Array ( [THIS_MUST_BE_BLANK] => 0 ) -- Edit this bug report at http://bugs.php.net/?id=44835&edit=1
#44777 [Opn->Bgs]: PHP ISAPI random working dir only in Root of website
ID: 44777 Updated by: [EMAIL PROTECTED] Reported By: toby at simmonsconsulting dot com -Status: Open +Status: Bogus Bug Type: IIS related Operating System: Windows 2003 Server PHP Version: 5.2.5 New Comment: We are aware of PHP's problems with stability under IIS and are working to rectify the problem. Unfortunatly your bug report does not contain any extra useful information and we already have enough bug reports open about this issue. If you can provide more detailed information such as a reproducable crash or a backtrace please do so and reopen this bug. Otherwise please keep trying new releases as we are working to resolve the problems on this platform Thanks for your interest in PHP. Previous Comments: [2008-06-09 20:59:13] don dot lebert at crystaltech dot com I too am still having this problem which was originally posted here: http://bugs.php.net/bug.php?id=43309&edit=2 [2008-06-04 19:30:23] asset at impactdamage dot com I am having this same issue, however I get this when using either ISAPI or FASTCGI. It can be resolved by giving list folder permissions on the parent folder. I cant seem to find a workaround to this, as in a shared environment I dont want to give list permissions on the parent. [2008-04-18 14:49:27] toby at simmonsconsulting dot com FYI, PHP CGI/FastCGI does not have this problem. [2008-04-18 14:44:15] toby at simmonsconsulting dot com Description: PHP ISAPI under IIS 6.x (Windows 2003 Server) reports an inconsistent working directory ONLY in the root of a web site. The working directory is perfectly consistent when checked in a subdirectory of a web site. I have seen similar bugs reported but they were either BOGUS or no longer open. I understand ISAPI is unstable (according to Bug #42460) but this bug only seems to occur in the root of a web site. Say the root of your web site is D:\websites\testsite. If you create a php file with the following code: \n"; ?> and place it in the above directory then load it (http://testsite/cwd.php), loading will produce a random directory. If you place this file in a subdirectory, say D:\websites\testsite\testdir, and load the page (from the new location, http://testsite/testdir/cwd.php) it will produce the expected results: D:\websites\testsite\testdir. Reproduce code: --- \n"; ?> Expected result: In the root folder of your website (say, D:\websites\testsite) you would expect D:\websites\testsite. In a subdirectory of your website (say, D:\websites\testsite\testdir) you would expect just that, D:\websites\testsite\testdir. Actual result: -- In the root folder of your website (say, D:\websites\testsite) you get random results, anything from C:\WINDOWS\System32 to various subdirectories in your website (or other websites if you host more than one.) In a subdirectory of your website (say, D:\websites\testsite\testdir) it seems to work fine. -- Edit this bug report at http://bugs.php.net/?id=44777&edit=1
#44760 [Opn->WFx]: The info test page works once, then fails.
ID: 44760 Updated by: [EMAIL PROTECTED] Reported By: ahorwitz at numoda dot com -Status: Open +Status: Wont fix Bug Type: IIS related Operating System: XP PHP Version: 5.2.5 New Comment: Use FastCGI instead. Previous Comments: [2008-04-18 12:58:18] ahorwitz at numoda dot com I installed PHP exactly the way the php.net instructions told me to do. It is a brand new machine with a clean install of Windows XP. Also, I am able to stop and start the web site through the IIS Management console. But, IIS crashes if I try to stop and start World Wide Web Services from the services management console. Is PHP 5 just completely unstable in a Windows XP/IIS 5 environment? Any comments would be appreciated. [2008-04-17 13:49:54] ahorwitz at numoda dot com Description: Trying to install PHP 5 on XP with IIS. The following page runs once, then fails when refresh is clicked. If I close the browser and try the page again, the page loads once, then fails on refresh. Reproduce code: --- PHP Test The browser you're using is Your browser's capabilities are: Expected result: It should work more than once without closing and opening my web browser. Actual result: -- Page just attempts to load. -- Edit this bug report at http://bugs.php.net/?id=44760&edit=1
#44746 [Opn->Bgs]: SoapFault: Only http and https are allowed
ID: 44746 Updated by: [EMAIL PROTECTED] Reported By: rbrodka at kraftmaid dot com -Status: Open +Status: Bogus Bug Type: SOAP related Operating System: Windows Server 2003 Std PHP Version: 5.2.5 New Comment: Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely to be the same. Thank you for your interest in PHP. Previous Comments: [2008-04-16 18:20:28] rbrodka at kraftmaid dot com Description: This seems to be the same error as bug #42637, but I got it on Windows Server 2003 Standard and PHP version 5.2.5. I received the following error when trying to execute a soap client function (invokeService): Fatal error: SOAP Fault: (faultcode: HTTP, faultstring: Unknown protocol. Only http and https are allowed.) in C:\randall\grid.php on line 36 The following functions work fine: var_dump($client->__getFunctions()); var_dump($client->__getTypes()); Reproduce code: --- try { $wsdl = 'http://KM2BPM1/ApplicationServiceGateway.wsdl'; $client = new SoapClient($wsdl); $params = array(); $params['commandLine'] = 'GET.PHONE.EXTENSION.FOR.USER USER=rbrodka'; $params['options'] = ''; echo $client->invokeService($params); } catch (SoapFault $fault) { trigger_error("SOAP Fault: (faultcode: {$fault->faultcode}, faultstring: {$fault->faultstring})", E_USER_ERROR); } Expected result: I expected the code to execute without triggering an error. -- Edit this bug report at http://bugs.php.net/?id=44746&edit=1
#44727 [Opn->WFx]: PHP installs but will not serve pages
ID: 44727 Updated by: [EMAIL PROTECTED] Reported By: stevenhunt_ at hotmail dot com -Status: Open +Status: Wont fix Bug Type: IIS related Operating System: Windows Vista Ultimate 64bit PHP Version: 5.2.5 New Comment: use the fastcgi instead. Previous Comments: [2008-04-14 21:23:29] stevenhunt_ at hotmail dot com Description: After successfully installing PHP i ryed to run a basic php info page and got an extension error. as best i can see this is due to it beinf a 32bit application but changeing the proccess thread to allow 32 bit applications then causes a service unavailable and crashed the process thread. Reproduce code: --- install and try PHP on vista ultimate 64bit edition. Expected result: phpinfo() to execute and pages to run Actual result: -- HTTP Error 500.21 - Internal Server Error Handler "PHP-ISAPI" has a bad module "IsapiModule" in its module list Module IIS Web Core Notification ExecuteRequestHandler Handler PHP-ISAPI Error Code 0x8007000d Requested URL http://localhost:80/info.php Physical Path C:\inetpub\wwwroot\info.php Logon Method Anonymous Logon User Anonymous -- Edit this bug report at http://bugs.php.net/?id=44727&edit=1
#44707 [Opn->Bgs]: The MySQL PDO driver resets variable content after bindParam on tinyint field
ID: 44707 Updated by: [EMAIL PROTECTED] Reported By: regli at yahoo dot com -Status: Open +Status: Bogus Bug Type: PDO related Operating System: Windows Vista PHP Version: 5.2.5 New Comment: What uwe said.. Previous Comments: [2008-07-03 19:55:43] [EMAIL PROTECTED] An *important* addition to --- Bug 2 --- PDOs SQL parser : It is your task to teach the SQL parser that a value shall not be interpreted as a string. Make use of the PDO::PARAM_ constants! PDO can't know what you intend to do. PDO will always fall back to the safe default of strings and quote even integers unless you tell PDO not to do so! [2008-07-03 15:08:23] [EMAIL PROTECTED] What a lovely variation of the old theme "The PDO SQL parser breaks your SQL". This is not a MySQL bug. This is not a driver bug. You have hit two PDO bugs! However, you bug report is close to Bogus. Please pay more attention on your bug report. Well prepared bugs, including reproducible code examples, have a higher chance to be taken care of then bug reports like yours. --- Bug 1 -- Type conversion Your example is bogus. PDO does not promise not to change the variable type of a bound variable. PHP is dynamic and loosely typed. Its very "PHPish" from PDO not to take too much care about it. However, if you care about types you should read the manually carefully and try all options on types which the API provides: bool PDOStatement::bindParam ( mixed $parameter , mixed &$variable [, int $data_type [, int $length [, mixed $driver_options ]]] ) You can give PDO a type hint when binding parameters. Make use of it: $id = 1; $mybool = false; $stmt = $db->prepare('INSERT INTO test(id, mybool) VALUES (?, ?)'); $stmt->bindParam(1, $id); $stmt->bindParam(2, $mybool, PDO::PARAM_BOOL); If you do so, your variable will at least not change its type before you call execute(). If you omit this additional parameter your variable will be converted into a string by the call to bindParam(). However, at lastest the type of your variable $mybool will change from boolean to string due to a bug in ext/pdo/pdo_sql_parser.c upon execution of the statement. The file pdo_sql_parser.c comes from the PDO core module. It has nothing to do with MySQL. The "bug" (PDO does not promise not to change the type of your bound parameters!) is around line 480. PDO recognizes that it got a boolean value and converts it into an PHP integer (long). It does this within a switch-case construct and falls through to the default handling. The default handling will convert the variable again from integer to string. You can check this yourself and do a quick hack of the parser using a "convert_back_to_boolean" flag. And why do you try to bind a PHP boolean variable to an integer SQL column? Wouldn't it be more appropriate to use a PHP integer variable for a SQL integer column? PDO has not automatic PHP to SQL type mapping. --- Bug 2 --- PDOs SQL parser PDOs SQL parser is very, very basic. It takes your INSERT statement and replaces all placeholders with string values! For example, INSERT INTO test(id, mybool) VALUES (?, ?) will be converted by the INSERT INTO test(id, mybool) VALUES ('', ''). Of course MySQL will bail at you, if you send such a SQL statement! Search the bug archive for more examples of PDO generating invalid SQL. --- What can you do? --- - use ext/mysqli and be happy (nothing) (nothing) (nothing) - fix PDO - use MySQLs native prepared statements and keep your fingers off from named parameters and the PDO SQL parser [2008-04-12 01:30:02] regli at yahoo dot com Description: In a prepare/bindParam scenario where the variable is already preset before the bindParam has been executed, a boolean field gets reset by the driver. In the case of TRUE it resets it to "1" and in the case of FALSE it rests it to ''. Obviously this is highly undesirable as I get the input parameters in a function and then simply execute the prepare/bindParam. However, as the database field is defined as tinyint, I naturally get a PDOException. I tested the same code with IBM DB2 and this issue does not occur and it works perfectly (obviously the field definition is smallint). If I reset the field after bindParam to FALSE and then again execute the statement, it works perfectly as it should. The problem seems clearly to be in bindParam. I tested this using the latest php_pdo_mysql.dll php-5.2.1(5_2) from 2008-01-11. Reproduce code: --- $stmt = db::getInstance()->prepare("INSERT INTO session (sessionName, privateSessionBool); $stmt->bindParam(':sessionName', $sessionName); $privateSessionBool) = false; echo $privateSessionBool; // here is where the problem occurs. $stmt
#44693 [Opn->Fbk]: read blob; ibase_blob_echo: BLOB not found
ID: 44693 Updated by: [EMAIL PROTECTED] Reported By: david at zegrange dot com -Status: Open +Status: Feedback Bug Type: InterBase related Operating System: Mandriva 2008.1 PHP Version: 5.2.5 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: [2008-05-16 07:57:00] ale dot pas at tiscali dot it Might be related with http://bugs.php.net/bug.php?id=42266 this just adds a record to the long list of firebird blob related bugs introduced after 5.2.1 [2008-04-11 09:38:24] david at zegrange dot com Description: Hello. We were using PHP 5.1.6 (mandriva 2007) with not problem, then we ugraded to PHP 5.2.5 (mandriva 2008 or 2008.1) on new server and suddenly our BLOB fiels (is a small image) are not being returned. I have verified that they still store properly in the Firebird 2.0 database. No problem with the other functions. If i downgrade back to PHP 5.1.6 (mandriva 2007) on new sever, the problem is fixed. Other Interbase/Firebird functions are working well. Thank's for your feeback. Reproduce code: --- The table in dbtest.fdb: CREATE TABLE DF_ETAT ( ETAT_NO SMALLINT NOT NULL, ICONE BLOB SUB_TYPE 0 SEGMENT SIZE 80, ); The php file : test.php ICONE); $ibase_close($dbi); ?> Expected result: I expected to see my BLOB fields on the web page test.php Actual result: -- I didn't see my BLOB fields. Error log message for httpd return : [error] [client 192.168.1.57] PHP Warning: ibase_blob_echo() [function.fbird-blob-echo]: BLOB not found in /var/www/html/test.php on line 6 -- Edit this bug report at http://bugs.php.net/?id=44693&edit=1
#44686 [Opn->Fbk]: SOAP-ERROR: Parsing WSDL
ID: 44686 Updated by: [EMAIL PROTECTED] Reported By: dmittner at llnw dot com -Status: Open +Status: Feedback Bug Type: SOAP related Operating System: Gentoo PHP Version: 5.2.5 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: [2008-04-14 22:42:28] dmittner at llnw dot com I've narrowed it down, I think. Relevant excerpts from the WSDL: ... ... No "name" is specified in the upper block of XML, for the line with the "ref=". If I specify a name the WSDL parses. I believe the correct behavior would be for PHP to acquire the name from the complexType declaration. I don't know if this should always be the case for references, or only when no name is provided - if providing a name is even valid for them. This is just a guess, though. I've dealt very little with references so do not know the standards surrounding them; only what digging into the XML has revealed. [2008-04-11 05:54:01] dmittner at llnw dot com I have also found this to occur on PHP 5.0.5, also on Gentoo. [2008-04-10 23:52:37] dmittner at llnw dot com Description: Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing Schema: unresolved element 'ref' attribute. C# generated WSDL. I saw an older bug with similar characteristics, but that was 4 years old, supposedly resolved, and on a different OS. Several validators I tried are able to consume the WSDL. Reproduce code: --- http://gpn.webservice.gomez.com/GpnProvisioningService/ProvisioningWS.asmx?wsdl";; $soap = new SoapClient($wsdl,array("trace"=>true,"features"=>SOAP_SINGLE_ELEMENT_ARRAYS)); ?> Expected result: No explicit output. Actual result: -- Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing Schema: unresolved element 'ref' attribute in /home/dmittner/temp.php:3 Stack trace: #0 /home/dmittner/temp.php(3): SoapClient->SoapClient('http://gpn.webs...', Array) #1 {main} thrown in /home/dmittner/temp.php on line 3 -- Edit this bug report at http://bugs.php.net/?id=44686&edit=1
#44643 [Opn->Fbk]: bound parameters ignore explicit type definitions
ID: 44643 Updated by: [EMAIL PROTECTED] Reported By: ethan dot nelson at ltd dot org -Status: Open +Status: Feedback Bug Type: PDO related Operating System: win2k3 PHP Version: 5.2.5 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: [2008-04-05 00:19:04] ethan dot nelson at ltd dot org Description: There is a type switching problem with bound parameters in PDO when the query contains a WHERE clause: works - "SELECT * FROM (SELECT 'test' = 1) a" works - "SELECT * FROM (SELECT 'test' = 1) a WHERE a.test = 1" fails - "SELECT * FROM (SELECT 'test' = :id) a WHERE a.test = 1" works - "SELECT * FROM (SELECT 'test' = 1) a WHERE a.test = :id" fails - "SELECT * FROM (SELECT 'test' = :id) a WHERE a.test = :id2" Reproduce code: --- $con = new PDO('odbc:Brokerage EPC Database'); $query = "SELECT * FROM (SELECT 'test' = 1) a"; $stm = $con->prepare($query); echo $query."\n"; if ($stm->execute()) echo "Yea!\n"; else echo "Boo!\n"; $query = "SELECT * FROM (SELECT 'test' = 1) a WHERE a.test = 1"; $stm = $con->prepare($query); echo $query."\n"; if ($stm->execute()) echo "Yea!\n"; else echo "Boo!\n"; $query = "SELECT * FROM (SELECT 'test' = :id) a WHERE a.test = 1"; $stm = $con->prepare($query); echo $query."\n"; $id = 1; $stm->bindParam(':id',$id,PDO::PARAM_INT); if ($stm->execute()) echo "Yea!\n"; else echo "Boo!\n"; $query = "SELECT * FROM (SELECT 'test' = 1) a WHERE a.test = :id2"; $stm = $con->prepare($query); echo $query."\n"; $id2 = 1; $stm->bindParam(':id2',$id2,PDO::PARAM_INT); if ($stm->execute()) echo "Yea!\n"; else echo "Boo!\n"; $query = "SELECT * FROM (SELECT 'test' = :id) a WHERE a.test = :id2"; $stm = $con->prepare($query); echo $query."\n"; $id = 1; $stm->bindParam(':id',$id,PDO::PARAM_INT); $id2 = 1; $stm->bindParam(':id2',$id2,PDO::PARAM_INT); if ($stm->execute()) echo "Yea!\n"; else echo "Boo!\n"; Expected result: SELECT * FROM (SELECT 'test' = 1) a Yea! SELECT * FROM (SELECT 'test' = 1) a WHERE a.test = 1 Yea! SELECT * FROM (SELECT 'test' = :id) a WHERE a.test = 1 Yea! SELECT * FROM (SELECT 'test' = 1) a WHERE a.test = :id2 Yea! SELECT * FROM (SELECT 'test' = :id) a WHERE a.test = :id2 Yea! Actual result: -- SELECT * FROM (SELECT 'test' = 1) a Yea! SELECT * FROM (SELECT 'test' = 1) a WHERE a.test = 1 Yea! SELECT * FROM (SELECT 'test' = :id) a WHERE a.test = 1 Boo! SELECT * FROM (SELECT 'test' = 1) a WHERE a.test = :id2 Yea! SELECT * FROM (SELECT 'test' = :id) a WHERE a.test = :id2 Boo! Clearly, by the time the bound parameters hit the database, they've been turned into text type parameters even though they were explicitly bound as int parameters. Error message: Warning: PDOStatement::execute() [function.PDOStatement-execute]: SQLSTATE[22018]: Invalid character value for cast specification: 206 [Microsoft][SQL Native Client][SQL Server]Operand type clash: text is incompatible with int (SQLExecute[206] at ext\pdo_odbc\odbc_stmt.c:133) in D:\Inetpub\include\config.inc on line 173 SQL Profiler trace: declare @p1 int set @p1=NULL exec sp_prepare @p1 output,N'@P1 text,@P2 text',N'SELECT * FROM ptrips_readable() a WHERE a.ptripgroupid = ( SELECT ptripgroupid FROM ptrips_readable() b WHERE b.ptripid = @P1 ) AND a.actiontypeid <> @P2',1 select @p1 -- Edit this bug report at http://bugs.php.net/?id=44643&edit=1
#44639 [Opn->Fbk]: PDO quotes integers in prepared statement
ID: 44639 Updated by: [EMAIL PROTECTED] Reported By: jgauld at blueyonder dot co dot uk -Status: Open +Status: Feedback Bug Type: PDO related Operating System: WinXP PHP Version: 5.2.5 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: [2008-07-03 15:17:35] [EMAIL PROTECTED] This is not a driver issue. Its the PDO SQL driver messing up SQL statements. [2008-06-12 13:42:35] dobamail at gmail dot com Hi. PDO::MySQL The code: $stmt = $db->prepare(' SELECT id, hu_name, ord FROMproducts ORDER BY ord DESC, hu_name LIMIT :offset, :limit '); $stmt->bindValue(':offset', ($offset*$limit)); $stmt->bindValue(':limit', $limit); $stmt->execute(); It is work on: - PHP Version 5.2.0-8+etch11; - PDO Driver for MySQL, client library version 5.0.32 - MySQL version: 5.0.32-Debian_7etch5-log Not work on: - PHP Version 5.2.3-1ubuntu6.3 - PDO Driver for MySQL, client library version 5.0.45 - 5.0.45-Debian_1ubuntu3.3 I hope this help you. Best regards. [2008-04-04 15:16:33] jgauld at blueyonder dot co dot uk Description: When executing a prepared statement with bound values, any integer types are seemingly treated as strings and quoted in the final SQL statement (SQL statements taken from MySQL server log). I realise I've not used the 'data_type' parameter for the ->bindValue() method, but according to the PHP manual I shouldn't need to ... "Explicit data type for the parameter using the PDO::PARAM_* constants. Defaults to PHP native type." So the PHP native type in the shown case is an integer - equivalent to PDO::PARAM_INT, yes? Reproduce code: --- CREATE TABLE my_db.my_table ( id int(10) unsigned NOT NULL auto_increment, PRIMARY KEY (id) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; prepare('select * from my_table where id>?'); $stmt->bindValue(1, 13); $stmt->execute(); ?> or prepare('select * from my_table where id>?'); $stmt->execute(array(13)); ?> Expected result: select * from my_table where id>13 Actual result: -- select * from my_table where id>'13' -- Edit this bug report at http://bugs.php.net/?id=44639&edit=1
#44628 [Opn->Bgs]: PHP ISAPI causes ASP to malfunction
ID: 44628 Updated by: [EMAIL PROTECTED] Reported By: kzopfi at co dot orange dot nc dot us -Status: Open +Status: Bogus Bug Type: IIS related Operating System: Windows 2000 PHP Version: 5.2.5 New Comment: use FastCGI instead. (that's what Microsoft suggests too..) Previous Comments: [2008-04-03 13:36:55] kzopfi at co dot orange dot nc dot us Description: I am experiencing the same problem as bug #11151 which has been closed. I have PHP 5.2.5 on IIS 5.0 (W2K with SP4) using ISAPI. PHP is running without problems but after browsing PHP pages on the web server, ASP sites on the server report the following error: -2147417842 (0x8001010e) Restarting the web server resolves the problem. Is there a permanent fix or work-around for this problem? -- Edit this bug report at http://bugs.php.net/?id=44628&edit=1
#42294 [Opn->Asn]: round will not use PHP_ROUND_FUZZ on 64bit CPUs
ID: 42294 Updated by: [EMAIL PROTECTED] Reported By: oliver at teqneers dot de -Status: Open +Status: Assigned Bug Type: *General Issues Operating System: * PHP Version: 5CVS-2007-10-30 Assigned To: iliaa New Comment: Ilia, no comments? Previous Comments: [2007-10-30 22:20:33] [EMAIL PROTECTED] Previous comment has good points. I'm leaning towards the C99 approach..but that's for Ilia to decide. :) [2007-08-16 12:53:18] chris_se at gmx dot net I just read this bug report and wanted to add a few things. Rounding floating point numbers is anything but trivial. The core issue is that certain numbers which are representable with only a finite amount of digits in the decimal system are not necessarily representable with a finite amount of digits in the binary system. The number 0.285 in this bug report is an example for that: In the binary system, its representation is periodic - just as 1/3 can only be displayed as a periodic number (0.3...) in the decimal system. Since a floating point number only supports a finite number of digits, the period is "cut off" and therefore the number 0.285 stored as a float is not exactly 0.285 but slightly smaller, you can try it yourself: 2 0.28497558 (The exact representation may vary depending on how percise the floating point unit in your processor is.) Another number 1.285 mentioned in this thread also has the same problem: 1.28492006 Now, the traditional rounding method in the decimal system is to take the lower number for the digits 0, 1, 2, 3 and 4 and the higher number for the digits 5, 6, 7, 8 and 9. So 1.4 becomes 1 and 1.5 becomes 2 if rounded to zero digits precision. The problem is that if the internal representation of the floating point number is 0.2849...something instead of 0.285, the rounding algorithm will incorrectly assume the last digit is a 4 and not a 5 and then return the lower number instead of the higher one. Now one may ask why does 1.285 work and 0.285 doesn't if both are not representable using finite digits in the binary system? This is due to the way the rounding algorithm works: It first multiplies the numbers by 10 to the power of the places of precision (with 2 places precision, it multiplies them with 100) and then it rounds to the next integer. Now, if you have a look at the representation of 1.285 * 100 and 0.285 * 100, you will get: 128.5000 28.49644729 Of course, one might argue that 28.5 is infact representable as a floating point number - sure, but that does not matter the computer always calculates with floating point numbers - so in the case of 128.5 the computer actually makes two errors due to decreased precision: The first is not being able to correctly represent 1.285 and the second is to accidentally compensate that error due to lack of precision. With 0.285, only the first error happens and so the result is incorrect. So that's the reason why round() does not always work as expected. Now there are two possibilities to solve this: 1) Don't give a shit about the error and simply calculate as before. This is what the Linux implementation of the C99 function round(3) does (and probably the C99 standard itself, but I don't know since I haven't looked into it). 2) Try to correct the error: This is what the PHP_ROUND_FUZZ code is fore. A bit of background: A round() function is available in C only from C99 onwards - to ensure compability, PHP does rounding manually using floor/ceil. In order to keep this post short, I'll just look at positive numbers. So the current implementation of PHP's round() as found in ext/standard/math.c does the following: #define PHP_ROUND_WITH_FUZZ(val, places) { \ double tmp_val=val, f = pow(10.0, (double) places); \ tmp_val *= f; \ if (tmp_val >= 0.0) { \ tmp_val = floor(tmp_val + PHP_ROUND_FUZZ); \ } else {\ tmp_val = ceil(tmp_val - PHP_ROUND_FUZZ); \ } \ tmp_val /= f; \ val = !zend_isnan(tmp_val) ? tmp_val : val; \ } \ Let's assume for a moment that PHP_ROUND_FUZZ is 0.5, then the code is obvious: 0.5 is added to the number and then floor() is called. That will produce the identical result for positive numbers as round() does. Now, a possible correction for the rounding error is setting PHP_ROUND_FUZZ to 0.501 - the last digit 1 does just enough to make round() work as expected. Obviously, this code has one minor drawback: If one wants to ro
#42294 [Asn->Opn]: round will not use PHP_ROUND_FUZZ on 64bit CPUs
ID: 42294 Updated by: [EMAIL PROTECTED] Reported By: oliver at teqneers dot de -Status: Assigned +Status: Open Bug Type: *General Issues Operating System: * PHP Version: 5CVS-2007-10-30 Assigned To: iliaa Previous Comments: [2007-10-30 22:20:33] [EMAIL PROTECTED] Previous comment has good points. I'm leaning towards the C99 approach..but that's for Ilia to decide. :) [2007-08-16 12:53:18] chris_se at gmx dot net I just read this bug report and wanted to add a few things. Rounding floating point numbers is anything but trivial. The core issue is that certain numbers which are representable with only a finite amount of digits in the decimal system are not necessarily representable with a finite amount of digits in the binary system. The number 0.285 in this bug report is an example for that: In the binary system, its representation is periodic - just as 1/3 can only be displayed as a periodic number (0.3...) in the decimal system. Since a floating point number only supports a finite number of digits, the period is "cut off" and therefore the number 0.285 stored as a float is not exactly 0.285 but slightly smaller, you can try it yourself: 2 0.28497558 (The exact representation may vary depending on how percise the floating point unit in your processor is.) Another number 1.285 mentioned in this thread also has the same problem: 1.28492006 Now, the traditional rounding method in the decimal system is to take the lower number for the digits 0, 1, 2, 3 and 4 and the higher number for the digits 5, 6, 7, 8 and 9. So 1.4 becomes 1 and 1.5 becomes 2 if rounded to zero digits precision. The problem is that if the internal representation of the floating point number is 0.2849...something instead of 0.285, the rounding algorithm will incorrectly assume the last digit is a 4 and not a 5 and then return the lower number instead of the higher one. Now one may ask why does 1.285 work and 0.285 doesn't if both are not representable using finite digits in the binary system? This is due to the way the rounding algorithm works: It first multiplies the numbers by 10 to the power of the places of precision (with 2 places precision, it multiplies them with 100) and then it rounds to the next integer. Now, if you have a look at the representation of 1.285 * 100 and 0.285 * 100, you will get: 128.5000 28.49644729 Of course, one might argue that 28.5 is infact representable as a floating point number - sure, but that does not matter the computer always calculates with floating point numbers - so in the case of 128.5 the computer actually makes two errors due to decreased precision: The first is not being able to correctly represent 1.285 and the second is to accidentally compensate that error due to lack of precision. With 0.285, only the first error happens and so the result is incorrect. So that's the reason why round() does not always work as expected. Now there are two possibilities to solve this: 1) Don't give a shit about the error and simply calculate as before. This is what the Linux implementation of the C99 function round(3) does (and probably the C99 standard itself, but I don't know since I haven't looked into it). 2) Try to correct the error: This is what the PHP_ROUND_FUZZ code is fore. A bit of background: A round() function is available in C only from C99 onwards - to ensure compability, PHP does rounding manually using floor/ceil. In order to keep this post short, I'll just look at positive numbers. So the current implementation of PHP's round() as found in ext/standard/math.c does the following: #define PHP_ROUND_WITH_FUZZ(val, places) { \ double tmp_val=val, f = pow(10.0, (double) places); \ tmp_val *= f; \ if (tmp_val >= 0.0) { \ tmp_val = floor(tmp_val + PHP_ROUND_FUZZ); \ } else {\ tmp_val = ceil(tmp_val - PHP_ROUND_FUZZ); \ } \ tmp_val /= f; \ val = !zend_isnan(tmp_val) ? tmp_val : val; \ } \ Let's assume for a moment that PHP_ROUND_FUZZ is 0.5, then the code is obvious: 0.5 is added to the number and then floor() is called. That will produce the identical result for positive numbers as round() does. Now, a possible correction for the rounding error is setting PHP_ROUND_FUZZ to 0.501 - the last digit 1 does just enough to make round() work as expected. Obviously, this code has one minor drawback: If one wants to round 0.499 to 0 places prec
#43256 [Opn->Fbk]: wrong behaviour with header()
ID: 43256 Updated by: [EMAIL PROTECTED] Reported By: carsten_sttgt at gmx dot de -Status: Open +Status: Feedback Bug Type: IIS related Operating System: Windows_NT PHP Version: 5.2.5 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: [2007-11-19 14:57:46] carsten_sttgt at gmx dot de > Where are you reporting the bug? In ISAPI or CGI? Both. With only using this code: | header('Location: http://www.example.com/', true, 303); ISAPI does not set the (default) reason phrase. CGI (NPH) does not return a complete HTTP response message. The status line is missing. [2007-11-19 14:44:52] [EMAIL PROTECTED] Okay, I'm a bit confused now. Where are you reporting the bug? In ISAPI or CGI? [2007-11-19 01:27:26] carsten_sttgt at gmx dot de > There's also this setting: > ; cgi.nph = 1 There is no difference: | D:\PHP>cat nph-test.php | http://www.example.com/', true, 303); | ?> | | D:\PHP>pear-request -r 0 -S -o http://localhost/phpinfo.php |\ | grep -E "cgi.rfc2616_headers|cgi.nph" | cgi.nph11 | cgi.rfc2616_headers11 | | D:\PHP>pear-request -r 0 -S http://localhost/nph-test.php | GET http://localhost/nph-test.php --> ERROR: Malformed response BTW: This setting is only available with CGI, but not with ISAPI. Regards, Carsten [2007-11-17 22:20:49] [EMAIL PROTECTED] There's also this setting: ; cgi.nph = 1 Try to turn that off / on. [2007-11-17 12:03:15] carsten_sttgt at gmx dot de > what is this set in your php.ini: cgi.rfc2616_headers = 0 Now you address the NPH-CGI issue. Correct, my first tests was with "0". Now with "1": | D:\PHP>pear-request -r 0 -S -o http://localhost/phpinfo.php |\ | grep "cgi.rfc2616_headers" | cgi.rfc2616_headers11 with Testscript 1: -- | D:\PHP>pear-request -r 0 -S http://localhost/nph-test.php | GET http://localhost/nph-test.php --> 303 See Other Works now. (thanks for the hint) with Testscript 2: -- | D:\PHP>pear-request -r 0 -S http://localhost/nph-test.php | GET http://localhost/nph-test.php --> ERROR: Malformed response Don't work. So we have a similar result as with ISAPI. There is only a correct result, if you also explicitly set the "Status" header. Only setting the "Location" header with the code parameter does not work correctly. Regards, Carsten 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/43256 -- Edit this bug report at http://bugs.php.net/?id=43256&edit=1
#46355 [NEW]: Query logger
From: olafvdspek at gmail dot com Operating system: * PHP version: 6CVS-2008-10-21 (CVS) PHP Bug Type: Feature/Change Request Bug description: Query logger Description: Hi, Could you add a (MySQL) query logger? It'd log each query, including the duration and number of rows affected. This is very useful to diagnose slow pages. See below for an idea of what interface could be provided. Reproduce code: --- mysql_log_queries(true); mysql_query("select * from T"); $a = mysql_get_log(); foreach ($a as $row) { printf("%.1f ms - %d rows - %s", $row['duration'], $row['affected_rows'], htmlspecialchars($row['query'])); } Expected result: - Actual result: -- - -- Edit bug report at http://bugs.php.net/?id=46355&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46355&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46355&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46355&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46355&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=46355&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46355&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=46355&r=needscript Try newer version:http://bugs.php.net/fix.php?id=46355&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46355&r=support Expected behavior:http://bugs.php.net/fix.php?id=46355&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46355&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46355&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46355&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46355&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=46355&r=dst IIS Stability:http://bugs.php.net/fix.php?id=46355&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46355&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46355&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46355&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=46355&r=mysqlcfg
#41778 [Com]: Always get the SSL connection error
ID: 41778 Comment by: zimage at icdsoft dot com Reported By: mail at tobias-wassermann dot de Status: Assigned Bug Type: MySQLi related Operating System: Windows XP PHP Version: 5.2.5 Assigned To: andrey New Comment: Can't establish a SSL connection with php 5.2.6 and mysql 5.0.67. error); mysqli_real_connect($mysqli, DB_HOST, $user, $pass, DB_DATABASE, NULL, NULL, MYSQLI_CLIENT_SSL) or die('Connect failed: '.mysqli_connect_error()); $result = mysqli_query($mysqli, "SHOW STATUS LIKE 'ssl_cipher'") or die('Error executing query: '.$mysqli->error); while ($row = mysqli_fetch_row($result)) { printf("> %s\n", $row[0]); } ?> Expected result: The real_connect()-call should connect via SSL to the MySQL-Server and ssl_cipher (show status) should contain something like 'DHE-RSA-AES256-SHA'. Or eventually throw an error. Actual result: -- I got a mysql connection but no SSL is in use and ssl_cipher is empty. Previous Comments: [2008-07-28 10:20:38] ilredil at yahoo dot com I am able to duplicate this with 5.0.32-Debian_7etch5-log. MySQL works fine from the CLI, but not via PHP. I also tried using mysql_connect("localhost", "myuser", "mypassword", false, MYSQL_CLIENT_SSL) and mysql_pconnect("localhost", "myuser", "mypassword", MYSQL_CLIENT_SSL) and both resulted in the same "Unable to connect to MySQL server. SSL connection error" error. [2008-04-24 11:22:16] [EMAIL PROTECTED] Feedback given. [2008-04-22 20:01:24] mail at tobias-wassermann dot de Hi, reconstructed the case again - sorry for the delay - with the following code: ssl_set("C:/proj/test/test.crt", "C:/proj/test/ca.crt", "C:/proj/test/ca2.crt", NULL, NULL); $conn->real_connect("www.iba-ag.com", "user", "pass", "db", 3306, NULL, MYSQLI_CLIENT_SSL); echo $conn->errno; $res = $conn->query("SELECT * FROM catalog"); echo " - COUNT: {$res->num_rows}"; ?> The big BUT: Everytime I connect, I got a connection and the correct count of the SELECT - it works if the ssl-files exists or not exists. So it seems to be that never ever a ssl-connection will be established now - whats the problem? I tried this with a 5.2.3 PHP on Windows and a 5.2.5 PHP on Linux - in both cases with enabled OpenSSL-support [2008-01-23 13:22:27] [EMAIL PROTECTED] Could you please try to use the full path instead of just giving the file name? Thanks. I can't get that error message. [2007-06-22 08:37:23] mail at tobias-wassermann dot de Description: If I want to connect via SSL to my MySQL-Server, mysqli_real_connect always returns this error: Warning: mysqli::real_connect() [function.mysqli-real-connect]: (HY000/2026): SSL connection error in C:\proj\wampp\htdocs\test\db\mysql_ssl.php on line 7 I use mysqli_init(), to init the mysqli-object and then use ssl_set() to set the SSL-stuff and then real_connect(). A connect with the mysql-command-line client and the ssl-ca-option works perfect - i get a ssl encrypted connection. Reproduce code: --- Start MySQL-Server with: mysqld-nt.exe --ssl --ssl-ca=ca.crt --ssl-cert=server.crt --ssl-key=server.pem [The key is not secured by any password or such things] Use the MySQL-Client from another machine to connect via ssl: mysql.exe -u test -h server --ssl-ca=ca.crt Check if SSL works with command line client: mysql> SHOW STATUS LIKE 'Ssl_cipher'; +---++ | Variable_name | Value | +---++ | Ssl_cipher| DHE-RSA-AES256-SHA | +---++ 1 row in set (0.02 sec) It works. Now my PHP code: ssl_set(NULL, NULL, "ca.crt", NULL, NULL); $conn->real_connect("server", "root", NULL, "iba", 3306, NULL, MYSQLI_CLIENT_SSL); ?> Expected result: The real_connect()-call should connect via SSL to the MySQL-Server. Actual result: -- real_connect() doesn't connect, returns error message: Warning: mysqli::real_connect() [function.mysqli-real-connect]: (HY000/2026): SSL connection error in C:\proj\wampp\htdocs\test\db\mysql_ssl.php on line 7 I know, HY000/2026 is a MySQL error - but the command line connect with same user and same CA-Certificate works fine. I tested it also on other machines. The error occurs if the db-server is another machine as the webserver - and also occurs if it's the same pc. The problem also exists if i provide a client-certificate and key to the ssl_set()-function -- Edit this bug report at http://bugs.php.n
#46352 [Opn->Bgs]: addAttribute and HTML entities
ID: 46352 Updated by: [EMAIL PROTECTED] Reported By: gregoire dot berclaz at students dot hevs dot ch -Status: Open +Status: Bogus Bug Type: SimpleXML related Operating System: Windows PHP Version: 5.2.6 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 need to use DOM for the more complex functionality due to attribute escaping rules. Previous Comments: [2008-10-21 07:44:52] gregoire dot berclaz at students dot hevs dot ch Description: The function addAttribute convert html entities like "é" => "é" Reproduce code: --- $simpleXml = simplexml_load_string("http://www.monsite.dev/dtd.dtd\";>", null, LIBXML_DTDLOAD); $config = $simpleXml->addChild("config", "é"); $config->addAttribute("langue", "é"); Expected result: é Actual result: -- é -- Edit this bug report at http://bugs.php.net/?id=46352&edit=1
#46321 [Opn->Bgs]: Make fails with lots of OCI errors
ID: 46321 Updated by: [EMAIL PROTECTED] Reported By: krish dot v at gmail dot com -Status: Open +Status: Bogus Bug Type: OCI8 related Operating System: HP UX 11.11 PHP Version: 5.2.6 New Comment: Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. Previous Comments: [2008-10-20 05:18:33] krish dot v at gmail dot com HI sixd Thanks for your comments. Actually oracle instant client has some issues. Its always crashing. [2008-10-19 17:07:41] [EMAIL PROTECTED] The Oracle environment looks like it is missing the Oracle header files - note the error saying OCI_SUCCESS is not declared. Install the Oracle client option. Or consider using Oracle Instant Client 10g or 11g - you will still be able to connect to an Oracle 9.2 database. I am able to build 5.2.6 with Oracle 9.2. [2008-10-19 14:16:15] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ [2008-10-16 22:03:59] krish dot v at gmail dot com Description: Hi, I could not complie php5.2.6 with OCI8. Attched is the error messages during make. /tmp/php/php-5.2.6/ext/oci8/oci8.c:1412: error: 'php_oci_connection' has no member named 'hash_key' /tmp/php/php-5.2.6/ext/oci8/oci8.c:1412: error: 'php_oci_connection' has no member named 'hash_key' /tmp/php/php-5.2.6/ext/oci8/oci8.c:1412: warning: passing argument 1 of 'strlen' from incompatible pointer type /tmp/php/php-5.2.6/ext/oci8/oci8.c:1412: warning: passing argument 2 of '_zend_hash_add_or_update' from incompatible pointer type /tmp/php/php-5.2.6/ext/oci8/oci8.c:1413: error: 'zend_oci_globals' has no member named 'num_persistent' /tmp/php/php-5.2.6/ext/oci8/oci8.c:1413: error: lvalue required as increment operand /tmp/php/php-5.2.6/ext/oci8/oci8.c:1415: error: 'php_oci_connection' has no member named 'rsrc_id' /tmp/php/php-5.2.6/ext/oci8/oci8.c:1416: error: 'php_oci_connection' has no member named 'rsrc_id' /tmp/php/php-5.2.6/ext/oci8/oci8.c:1418: error: 'php_oci_connection' has no member named 'hash_key' /tmp/php/php-5.2.6/ext/oci8/oci8.c:1418: error: 'php_oci_connection' has no member named 'hash_key' /tmp/php/php-5.2.6/ext/oci8/oci8.c:1418: warning: passing argument 1 of 'strlen' from incompatible pointer type /tmp/php/php-5.2.6/ext/oci8/oci8.c:1418: warning: passing argument 2 of '_zend_hash_add_or_update' from incompatible pointer type /tmp/php/php-5.2.6/ext/oci8/oci8.c:1419: error: 'zend_oci_globals' has no member named 'num_links' /tmp/php/php-5.2.6/ext/oci8/oci8.c:1419: error: lvalue required as increment operand /tmp/php/php-5.2.6/ext/oci8/oci8.c:1421: error: 'php_oci_connection' has no member named 'rsrc_id' /tmp/php/php-5.2.6/ext/oci8/oci8.c:1422: error: 'zend_oci_globals' has no member named 'num_links' /tmp/php/php-5.2.6/ext/oci8/oci8.c:1422: error: lvalue required as increment operand /tmp/php/php-5.2.6/ext/oci8/oci8.c: In function 'php_oci_connection_ping': /tmp/php/php-5.2.6/ext/oci8/oci8.c:1438: error: 'zend_oci_globals' has no member named 'debug_mode' /tmp/php/php-5.2.6/ext/oci8/oci8.c:1438: error: 'zend_oci_globals' has no member named 'in_call' /tmp/php/php-5.2.6/ext/oci8/oci8.c:1438: error: 'zend_oci_globals' has no member named 'errcode' /tmp/php/php-5.2.6/ext/oci8/oci8.c:1438: error: 'php_oci_connection' has no member named 'server' /tmp/php/php-5.2.6/ext/oci8/oci8.c:1438: error: 'zend_oci_globals' has no member named 'err' /tmp/php/php-5.2.6/ext/oci8/oci8.c:1438: error: 'text' undeclared (first use in this function) /tmp/php/php-5.2.6/ext/oci8/oci8.c:1438: error: expected expression before ')' token /tmp/php/php-5.2.6/ext/oci8/oci8.c:1438: error: invalid operands to binary * (have 'struct zend_ini_entry *' and 'struct zend_ini_entry *') /tmp/php/php-5.2.6/ext/oci8/oci8.c:1438: error: 'zend_oci_globals' has no member named 'in_call' /tmp/php/php-5.2.6/ext/oci8/oci8.c:1441: error: 'zend_oci_globals' has no member named 'errcode' /tmp/php/php-5.2.6/ext/oci8/oci8.c:1441: error: 'OCI_SUCCESS' undeclared (first use in this function) /tmp/php/php-5.2.6/ext/oci8/oci8.c: In function 'php_oci_connection_status': /tmp/php/php-5.2.6/ext/oci8/oci8.c:1455: error: 'ub4' undeclared (first use in this function) /tmp/php/php-5.2.6/ext/
#46326 [Opn->Fbk]: error_reporting ignored in php-cli.ini
ID: 46326 Updated by: [EMAIL PROTECTED] Reported By: RQuadling at GMail dot com -Status: Open +Status: Feedback Bug Type: PHP options/info functions Operating System: Windows XP SP3 PHP Version: 5.3CVS-2008-10-17 (snap) New Comment: Can you reproduce this with some real OS, line Linux? Previous Comments: [2008-10-17 13:25:38] RQuadling at GMail dot com Oh and supplying the INI file via the command line on the 5.3 alpha makes no difference either ... C:\>c:\PHP5\php.exe -c C:\php\PHP5\INI\php-cli.ini z:\phpdetails.php php_sapi_name() = cli phpversion()= 5.3.0alpha3-dev php_ini_loaded_file() = C:\PHP\PHP5\INI\php-cli.ini php_ini_scanned_files() = error_reporting() = 22519 INI error_reporting = error_reporting = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR [2008-10-17 12:50:10] RQuadling at GMail dot com Some more examples in playing around with this ... php_sapi_name() = cli phpversion()= 5.3.0alpha3-dev php_ini_loaded_file() = C:\PHP\PHP5\INI\php-cli.ini php_ini_scanned_files() = error_reporting() = 22519 INI error_reporting = error_reporting = E_ALL php_sapi_name() = cli phpversion()= 5.3.0alpha3-dev php_ini_loaded_file() = C:\PHP\PHP5\INI\php-cli.ini php_ini_scanned_files() = error_reporting() = 22519 INI error_reporting = error_reporting = E_ALL & ~E_NOTICE php_sapi_name() = cli phpversion()= 5.3.0alpha3-dev php_ini_loaded_file() = C:\PHP\PHP5\INI\php-cli.ini php_ini_scanned_files() = error_reporting() = 22519 INI error_reporting = error_reporting = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR Just to confirm that last one ... If I use V5.2.6 like so ... C:\>c:\PHP5.2.6\php.exe -c C:\php\PHP5\INI\php-cli.ini z:\phpdetails.php The output is ... php_sapi_name() = cli phpversion()= 5.2.6 php_ini_loaded_file() = C:\PHP\PHP5\INI\php-cli.ini php_ini_scanned_files() = error_reporting() = 4177 INI error_reporting = error_reporting = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR [2008-10-17 11:28:59] RQuadling at GMail dot com Description: No matter what value I set in my php-cli.ini file for error_reporting, it is ignored. Using PHP 5.3.0alpha3-dev (cli) (built: Oct 17 2008 12:03:10) from http://windows.php.net In using ProcMon and looking for Processes like "PHP" and Path ending in ".INI", the only file I am looking at is C:\PHP\PHP5\INI\php- cli.ini Reproduce code: --- http://bugs.php.net/?id=46326&edit=1
#46342 [Opn->Fbk]: IMAP support breaks libphp5.so
ID: 46342 Updated by: [EMAIL PROTECTED] Reported By: paul dot goorskis at ctco dot lv -Status: Open +Status: Feedback Bug Type: IMAP related Operating System: OpenBSD 3.3 PHP Version: 5.2.6 New Comment: Check that all the libraries you're linking with are shared ones. And check the config.log (diff between working and non-working might help?). Previous Comments: [2008-10-21 06:40:03] paul dot goorskis at ctco dot lv Apache/1.3.27 is used from the original distro. The following versions were used during build process: lrwxr-xr-x 1 root wheel 11 Oct 18 17:30 curl -> curl-7.19.0 drwxr-xr-x 6 root wheel 512 Oct 18 17:34 curl-7.19.0 lrwxr-xr-x 1 root wheel 10 Oct 19 20:21 imap -> imap-2006k drwxr-xr-x 4 root wheel 512 Oct 19 20:15 imap-2000b drwxr-xr-x 4 root wheel 512 Oct 19 20:29 imap-2006k drwxr-xr-x 4 root wheel 512 Oct 19 13:28 imap-2007b lrwxr-xr-x 1 root wheel 15 Oct 19 05:46 kerberos5 -> kerberos5- 1.6.3 drwxr-xr-x 8 root wheel 512 Oct 19 06:05 kerberos5-1.6.3 lrwxr-xr-x 1 root wheel 14 Oct 18 10:43 libxml2 -> libxml2- 2.6.32 drwxr-xr-x 6 root wheel 512 Oct 18 16:01 libxml2-2.6.32 lrwxr-xr-x 1 root wheel 12 Oct 18 08:06 mysql -> mysql-5.0.67 drwxr-xr-x 12 mysql mysql 512 Oct 18 09:03 mysql-5.0.67 lrwxr-xr-x 1 root wheel 13 Oct 18 20:42 openssl -> openssl- 0.9.7 drwxr-xr-x 6 root wheel 512 Oct 18 20:50 openssl-0.9.7 drwxr-xr-x 6 root wheel 512 Oct 18 14:42 php lrwxr-xr-x 1 root wheel 10 Oct 19 18:40 zlib -> zlib-1.2.3 drwxr-xr-x 5 root wheel 512 Oct 19 18:41 zlib-1.2.3 I've tried imap both latest (2007b) and the one mentioned in http://php.net/manual/en/imap.setup.php (2000b). The latter even doesn't passes through PHP config-tests because of UTF-8, so I've tried also with 2006k - config-tests passed, make passed but no libphp5.so was generated during make install. If i exclude "--with-imap-ssl=/opt/openssl --with-imap=/opt/imap" from configure line and run: # ./configure --prefix=/opt/php --with-apxs=/usr/sbin/apxs --enable-mbstring --with-libxml-dir=/opt/libxml2 --with- curl=/opt/curl --with-mysql=/opt/mysql --with-zlib=/opt/zlib -- without-iconv --without-pear --disable-dom --without-sqlite -- without-pdo-sqlite --with-kerberos=/opt/kerberos5 ... # make ... Build OK ... # make install everything works fine Previously similar bug was submitted at http://bugs.php.net/bug.php? id=29453 but marked as bogus. [2008-10-20 17:18:59] [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. [2008-10-20 09:13:51] paul dot goorskis at ctco dot lv Description: After adding '--with-imap' to configure build completes, but no libphp5.so generated. Reproduce code: --- # ./configure --prefix=/opt/php --with-apxs=/usr/sbin/apxs --enable-mbstring --with-libxml-dir=/opt/libxml2 --with-curl=/opt/curl --with-mysql=/opt/mysql --with-zlib=/opt/zlib --without-iconv --without-pear --disable-dom --without-sqlite --without-pdo-sqlite --with-kerberos=/opt/kerberos5 --with-imap-ssl=/opt/openssl --with-imap=/opt/imap # make ... Build complete. ... # make install Expected result: # make install Installing PHP SAPI module: apache [activating module `php5' in /var/www/conf/httpd.conf] cp libs/libphp5.so /usr/lib/apache/modules/libphp5.so chmod 755 /usr/lib/apache/modules/libphp5.so cp /var/www/conf/httpd.conf /var/www/conf/httpd.conf.bak cp /var/www/conf/httpd.conf.new /var/www/conf/httpd.conf rm /var/www/conf/httpd.conf.new Installing PHP CLI binary:/opt/php/bin/ Installing PHP CLI man page: /opt/php/man/man1/ Installing build environment: /opt/php/lib/php/build/ Installing header files: /opt/php/include/php/ Installing helper programs: /opt/php/bin/ program: phpize program: php-config Installing man pages: /opt/php/man/man1/ page: phpize.1 page: php-config.1 Installing PDO headers: /opt/php/include/php/ext/pdo/ Actual result: -- # make install Installing PHP SAPI module: apache [activating module `php5' in /var/www/conf/httpd.conf] cp libs/libphp5.so /usr/lib/apache/modules/libphp5.so cp: libs/libphp5.so: No such file or directory Installing PHP CLI binary:/opt/php/bin/ Installing PHP CLI man page: /opt/php/man/man1/ Installing build environment: /opt/php/lib/php/build/ Installing header files: /opt/php/include/php/ Installing
#44942 [Com]: exec() hangs apache
ID: 44942 Comment by: neododge at free dot fr Reported By: inqualab1985 at gmail dot com Status: No Feedback Bug Type: Program Execution Operating System: Windows 2000 SP4 PHP Version: 5.2.5 New Comment: The same problem happens for me on PHP 5.2.6 / Apache 2.2.9, Apache won't run any PHP after I try an exec/passthru/`` -no matter what command I try. Only way to get PHP back seems to be closing all browser windows that point to my server and waiting for a while before trying to use a PHP page again. Previous Comments: [2008-09-15 17:01:02] vlabella at uamail dot albany dot edu We have been having the same issue for a long time on win2003 with php version 5.2.X and apache 5.2.x calling both perl scripts and .exe with the exec fuinction. We found that it mostly happens when php runs exec concurrently on the same process. For example we would have ajax call do an exec on the server to read some data and feed it back to the user every 5 seconds. In addition the user could do an ajax call to do something as well on this page. if the user call came at the same time as the schdeduled call then php would hang and we would have to restart apache. We found it also happens on pages where there are multiple exec() calls. We find that all the scripts and programs we call run fine its just that php hangs when they finish for some reason. We have our max_execution_time set to 30 minutes so its not a timeout issue. We found that calling session_write_close(); before each exec call seemed to resolve this issue. But we are not really sure why and what other effects session_write_close(); may have on other processes. Hope this helps resolve this issue. it is a major headache for us for the past 2 years!! [2008-08-08 18:55:29] jumpbackhack at gmail dot com this is still a bug. this is not an apache issue as I have tested various versions ranging from 2.0.x to 2.2.x I have tested php v5.2.6 and even a late development version. This happens on linux OS as well even with shell_exec() would there be a backtrace on a hang? it appears that the hang happens after a successful script executes, the following time the script runs there is the hang. usually lasts 2-5 minutes before it allows apache to run any php again. note that apache will serve static/html files without issue while any php files are not called. even a restart of apache does not resolve. [2008-07-22 01:00:01] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". [2008-07-14 21:14:29] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php for *NIX and http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32 Once you have generated a backtrace, please submit it to this bug report and change the status back to "Open". Thank you for helping us make PHP better. [2008-07-09 13:17:48] lk at profline dot ch I forgot the specifications, we use: Windows XP Apache 2.2.8 PHP 5.2.6 Is that an apache or a php related problem ? The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/44942 -- Edit this bug report at http://bugs.php.net/?id=44942&edit=1
#46344 [Opn->Bgs]: Possible memory-leak. autoload not always called
ID: 46344 Updated by: [EMAIL PROTECTED] Reported By: troelskn at gmail dot com -Status: Open +Status: Bogus -Bug Type: Unknown/Other Function +Bug Type: Scripting Engine problem Operating System: FreeBSD 7.0-RELEASE-p5 PHP Version: 5.2.6 New Comment: As long as you don't use the sources (without any 3rd party patches) we provide, there is no bug. Previous Comments: [2008-10-21 07:57:49] troelskn at gmail dot com I'm not able to reduce the script any further. The behaviour is affected by the code, even when it shouldn't. For example, if I comment out line 13, the behaviour changes, even though this particular line is never executed. Currently, we're just using the latest ports version from bsd. I'll see if I can try without Suhosin, but this is our production server, so I'll have to barter with our Sysadm about recompiling PHP. Since I submitted the bug, I removed the use of spl_autoload_register and replaced with __autoload. This made the bug disappear in this test-script, but I later discovered it elsewhere in the system. This suggests that it has nothing to do with SPL. I'm sorry I can't be more specific -- this is a very evasive bug. [2008-10-21 00:27:10] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with , is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. Could you please reduce the reproduce script as short as possible ? Also, try without suhosin and see if you can still reproduce it. [2008-10-20 11:40:47] troelskn at gmail dot com Description: After upgrading to a new server, we started seeing very inexplicable bugs in the system. I *think* I traced it down to the autoload functionality. In some situations, the autoloader doesn't seem to be triggered. Reproducing the bug is extremely hard; If I alter the code of the classloader, the error goes away. Also, I can't reproduce it on other systems. I am not sure if this is a problem with SPL, with PHP or perhaps with PDO, but my guess is that spl_autoload_register somehow allocates memory for the callback wrongly, allowing other code to overwrite it. Full system details follows: $ php --version PHP 5.2.6 with Suhosin-Patch 0.9.6.2 (cli) (built: Aug 29 2008 10:03:19) Copyright (c) 1997-2008 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies $ uname -a FreeBSD xxx.xxx.dk 7.0-RELEASE-p5 FreeBSD 7.0-RELEASE-p5 #0: Wed Oct 1 07:51:58 UTC 2008 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/GENERIC amd64 Reproduce code: --- http://pastebin.com/f4625a564 In addition, you need a file datadictionary.php, containing: class DataDictionary {} Expected result: OK .. class has loaded Actual result: -- PHP Fatal error: Class 'DataDictionary' not found in /usr/home/tkn/test.php on line 89 -- Edit this bug report at http://bugs.php.net/?id=46344&edit=1
#46354 [Opn->Bgs]: array_key_exists() vs. ArrayObject
ID: 46354 Updated by: [EMAIL PROTECTED] -Summary: Array_key_exists vs. ArrayObject Reported By: david at grudl dot com -Status: Open +Status: Bogus Bug Type:SPL related PHP Version: 5.3CVS-2008-10-21 (snap) New Comment: Expected behaviour, object is not an array. Previous Comments: [2008-10-21 08:18:02] david at grudl dot com Description: Array_key_exists accepts ArrayObject since PHP 5.0.0, but 5.3.0 refuse it. Feature or bug? Reproduce code: --- $arr = array('a' => 10); $obj = new ArrayObject($arr); echo array_key_exists('a', $obj); Expected result: TRUE Actual result: -- Warning: array_key_exists() expects parameter 2 to be array, object given NULL -- Edit this bug report at http://bugs.php.net/?id=46354&edit=1
#46313 [Csd]: Magic quotes broke $_FILES
ID: 46313 User updated by: david at grudl dot com Reported By: david at grudl dot com Status: Closed Bug Type: HTTP related Operating System: windows xp PHP Version: 5.3.0alpha2 New Comment: Thank you for fix. ad truncated filenames: the name is truncated after apostrophe (there is no slash in the file name) and only when magic quotes are on. Previous Comments: [2008-10-20 18:49:44] [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. Fixed for slashes vs non-slashed keys in $_FILES. For truncated filenames, it seems to be wanted on Windows, as \ is a path separator. [2008-10-16 11:36:40] david at grudl dot com Description: When magic_quotes_gpc are enabled, array $_FILES in weird. 1) truncated file name (see "closed" bug #29369) 2) slashes and non-slashed keys Reproduce code: --- Lets upload file named o'brazek.png (there are quotes in element name and in file name to demonstrate both errors) Expected result: array(2) { "o\'file" => array(4) { "name" => string(11) "o'brazek.png" // or o\'brazek.png ? "type" => string(11) "image/x-png" "error" => int(0) "size" => int(20624) "tmp_name" => string(23) "C:\PHP\temp\php3ED8.tmp" } } Actual result: -- array(2) { "o\'file" => array(4) { "name" => string(11) "o" // name is truncated after quote "type" => string(11) "image/x-png" "error" => int(0) "size" => int(20624) } "o'file" => array(1) { // tmp_name is stored in different key "tmp_name" => string(23) "C:\PHP\temp\php3ED8.tmp" } } -- Edit this bug report at http://bugs.php.net/?id=46313&edit=1
#46354 [NEW]: Array_key_exists vs. ArrayObject
From: david at grudl dot com Operating system: PHP version: 5.3CVS-2008-10-21 (snap) PHP Bug Type: SPL related Bug description: Array_key_exists vs. ArrayObject Description: Array_key_exists accepts ArrayObject since PHP 5.0.0, but 5.3.0 refuse it. Feature or bug? Reproduce code: --- $arr = array('a' => 10); $obj = new ArrayObject($arr); echo array_key_exists('a', $obj); Expected result: TRUE Actual result: -- Warning: array_key_exists() expects parameter 2 to be array, object given NULL -- Edit bug report at http://bugs.php.net/?id=46354&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46354&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46354&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46354&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46354&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=46354&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46354&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=46354&r=needscript Try newer version:http://bugs.php.net/fix.php?id=46354&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46354&r=support Expected behavior:http://bugs.php.net/fix.php?id=46354&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46354&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46354&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46354&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46354&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=46354&r=dst IIS Stability:http://bugs.php.net/fix.php?id=46354&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46354&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46354&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46354&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=46354&r=mysqlcfg
#46353 [NEW]: string cocatination leaking memeory when using execute
From: anders at freeones dot com Operating system: Linux 2.6.20-1.2320 PHP version: 5.2.6 PHP Bug Type: MySQL related Bug description: string cocatination leaking memeory when using execute Description: I run some code 5 million itteration yesterday, today I change my string building to use single quotes and the dot operator. That version was able to do aprox 25k itterations then the script died due memory leak. Reproduce code: --- # Makign a string like this leaks NOT memory # $lInsert = "Insert into {$this->mTable} (datetime,entity_id,entity_type,domain,country,location,raws,uniques)" . #" values ('{$this->getDateTime()}',{$this->getEntityId()},{$this->getEntityType()},{$this->getDomain()}," . # "{$this->getCountry()},{$this->getLocation()},{$this->getRaws()},{$this->getUniques()});"; # Making a string liek this leaks memory when doign execute $lInsert = 'Insert into '.$this->mTable.' (datetime,entity_id,entity_type,domain,country,location,raws,uniques)' . ' values ("'.$this->getDateTime().'",'.$this->getEntityId().','.$this->getEntityType().','.$this->getDomain().',' .$this->getCountry().','.$this->getLocation().','.$this->getRaws().','.$this->getUniques().');'; # $lInsert = "Insert into {$this->mTable} (datetime,entity_id,entity_type,domain,country,location,raws,uniques)" . # " values ('{$lTimeStamp}',{$lEntityId},{$lEntityType},{$lDomain},{$lCountry},{$lLocation},{$lRaws},{$lUniques})"; # print memory_get_usage()."\n"; $lStatement =& $this->mDbh->prepare($lInsert); if (MDB2::isError($lStatement)){ error_log($lStatement->getMessage().';query:'.$lInsert.' '.$lStatement->userinfo); $lResult = false; } else { $lResult =& $lStatement->execute(); $lStatement->free(); } Expected result: See code comments Actual result: -- see code comments -- Edit bug report at http://bugs.php.net/?id=46353&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46353&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46353&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46353&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46353&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=46353&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46353&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=46353&r=needscript Try newer version:http://bugs.php.net/fix.php?id=46353&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46353&r=support Expected behavior:http://bugs.php.net/fix.php?id=46353&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46353&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46353&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46353&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46353&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=46353&r=dst IIS Stability:http://bugs.php.net/fix.php?id=46353&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46353&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46353&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46353&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=46353&r=mysqlcfg
#46344 [Fbk->Opn]: Possible memory-leak. autoload not always called
ID: 46344 User updated by: troelskn at gmail dot com Reported By: troelskn at gmail dot com -Status: Feedback +Status: Open -Bug Type: SPL related +Bug Type: Unknown/Other Function Operating System: FreeBSD 7.0-RELEASE-p5 PHP Version: 5.2.6 New Comment: I'm not able to reduce the script any further. The behaviour is affected by the code, even when it shouldn't. For example, if I comment out line 13, the behaviour changes, even though this particular line is never executed. Currently, we're just using the latest ports version from bsd. I'll see if I can try without Suhosin, but this is our production server, so I'll have to barter with our Sysadm about recompiling PHP. Since I submitted the bug, I removed the use of spl_autoload_register and replaced with __autoload. This made the bug disappear in this test-script, but I later discovered it elsewhere in the system. This suggests that it has nothing to do with SPL. I'm sorry I can't be more specific -- this is a very evasive bug. Previous Comments: [2008-10-21 00:27:10] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with , is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. Could you please reduce the reproduce script as short as possible ? Also, try without suhosin and see if you can still reproduce it. [2008-10-20 11:40:47] troelskn at gmail dot com Description: After upgrading to a new server, we started seeing very inexplicable bugs in the system. I *think* I traced it down to the autoload functionality. In some situations, the autoloader doesn't seem to be triggered. Reproducing the bug is extremely hard; If I alter the code of the classloader, the error goes away. Also, I can't reproduce it on other systems. I am not sure if this is a problem with SPL, with PHP or perhaps with PDO, but my guess is that spl_autoload_register somehow allocates memory for the callback wrongly, allowing other code to overwrite it. Full system details follows: $ php --version PHP 5.2.6 with Suhosin-Patch 0.9.6.2 (cli) (built: Aug 29 2008 10:03:19) Copyright (c) 1997-2008 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies $ uname -a FreeBSD xxx.xxx.dk 7.0-RELEASE-p5 FreeBSD 7.0-RELEASE-p5 #0: Wed Oct 1 07:51:58 UTC 2008 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/GENERIC amd64 Reproduce code: --- http://pastebin.com/f4625a564 In addition, you need a file datadictionary.php, containing: class DataDictionary {} Expected result: OK .. class has loaded Actual result: -- PHP Fatal error: Class 'DataDictionary' not found in /usr/home/tkn/test.php on line 89 -- Edit this bug report at http://bugs.php.net/?id=46344&edit=1
#46352 [NEW]: addAttribute and HTML entities
From: gregoire dot berclaz at students dot hevs dot ch Operating system: Windows PHP version: 5.2.6 PHP Bug Type: SimpleXML related Bug description: addAttribute and HTML entities Description: The function addAttribute convert html entities like "é" => "é" Reproduce code: --- $simpleXml = simplexml_load_string("http://www.monsite.dev/dtd.dtd\";>", null, LIBXML_DTDLOAD); $config = $simpleXml->addChild("config", "é"); $config->addAttribute("langue", "é"); Expected result: é Actual result: -- é -- Edit bug report at http://bugs.php.net/?id=46352&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46352&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46352&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46352&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46352&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=46352&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46352&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=46352&r=needscript Try newer version:http://bugs.php.net/fix.php?id=46352&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46352&r=support Expected behavior:http://bugs.php.net/fix.php?id=46352&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46352&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46352&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46352&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46352&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=46352&r=dst IIS Stability:http://bugs.php.net/fix.php?id=46352&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46352&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46352&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46352&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=46352&r=mysqlcfg
#45585 [Com]: fread() return value for EOF inconsistent between PHP 5 and 6
ID: 45585 Comment by: mike at mikegerwitz dot com Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Filesystem function related Operating System: * PHP Version: 6CVS-2008-07-21 (CVS) New Comment: Confirmed in php6.0-200810110430. Cannot reliably loop through data using feof() when recognizing FALSE as an error. while ( !( feof( $handle ) ) ) { if ( ( $text = fread( $handle, 1024 ) ) === FALSE ) { // When attempting to read past the EOF, PHP 6 returns FALSE rather than an empty string die( 'Error!' ); } $data .= $text; } In PHP < 6, the above code will not display the error. In PHP 6, it does a good job of breaking a lot of code. Is this new functionality intended or are there plans to fix it? Previous Comments: [2008-07-21 16:34:04] [EMAIL PROTECTED] In 5.2/5.3 it returns empty string, in PHP 6 FALSE. [2008-07-21 16:33:34] [EMAIL PROTECTED] Description: # echo "1" > /tmp/test.txt # php_5_2/sapi/cli/php -n -r '$fp=fopen("/tmp/test.txt", "r"); while(1) {$a=fread($fp, 8192); if (!$a) {var_dump($a); exit;}}' string(0) "" # php_5_3/sapi/cli/php -n -r '$fp=fopen("/tmp/test.txt", "r"); while(1) {$a=fread($fp, 8192); if (!$a) {var_dump($a); exit;}}' string(0) "" # php_6/sapi/cli/php -n -r '$fp=fopen("/tmp/test.txt", "r"); while(1) {$a=fread($fp, 8192); if (!$a) {var_dump($a); exit;}}' bool(false) -- Edit this bug report at http://bugs.php.net/?id=45585&edit=1