#42499 [Com]: PDO_MYSQL: multi-statement execution via PDO::exec() makes connection unusable
ID: 42499 Comment by: kingoleg at mail dot ru Reported By: suhachov at gmail dot com Status: Assigned Bug Type: PDO related Operating System: FC PHP Version: 5.2.4 Assigned To: andrey New Comment: Hi, All Is there any solution for this? Previous Comments: [2008-04-05 21:06:13] mgrdinic at sledxchange dot com Any movement here? [2007-09-04 14:45:46] [EMAIL PROTECTED] Andrey, can you check this out please. (or reassing to whoever is supposed to be maintaining ext/pdo_mysql :) [2007-09-04 14:42:22] suhachov at gmail dot com I said it _only_ in reply to your response: > You report the bug with version 5.2.4, yet you seem to > be using 5.1.6?! > How about you try with 5.2.4 first? I mentioned in this issue, that it applies to 5.2.4 and usually it means something (unless reporter is insane). I spent a lot of time to find this peace of code inside PDO and find out how to work it around but you even didn't look to the source file to see that it wasn't changed since 5.1.X. I know you guys aren't paid for this, but we aren't paid for tracing bugs too. So lets respect each others efforts ... > so provide an url to the unified diff http://blog.ru/php-pdo-multi-result.patch > And make the patch against latest CVS snapshot rather than > release, it's lot easier to review and apply it then. ok, but this patch is release-independent, this area is unchanged for a long time. [2007-09-04 10:36:42] [EMAIL PROTECTED] First of all: Check your tone. You're not dealing with people who get paid for reading insults and/or aggressive tone. That is the best way to get your report totally ignored. If I had "brushed aside" this report, I wouldn't have bothered writing anything, this would be bogus right now.. Patches are more than welcome but we'd like to get them as files (this bug system sucks, I know) so provide an url to the unified diff. And make the patch against latest CVS snapshot rather than release, it's lot easier to review and apply it then. [2007-09-03 19:00:49] suhachov at gmail dot com # tar xjf php-5.2.4.tar.bz2 # cd php-5.2.4 # ./configure --disable-all --with-pdo-mysql --enable-pdo --enable-cli --disable-cgi # make # sapi/cli/php -n pdo-mysql-bug.php Warning: PDO::query(): SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute. in /home/andrew/src/php-5.2.4/pdo-mysql-bug.php on line 14 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/42499 -- Edit this bug report at http://bugs.php.net/?id=42499&edit=1
#31575 [Fbk->Opn]: fpassthru, binary mode
ID: 31575 User updated by: kingoleg at mail dot ru Reported By: kingoleg at mail dot ru -Status: Feedback +Status: Open Bug Type: Filesystem function related Operating System: Linux version 2.4.20-8,Red Hat PHP Version: 4.3.10 New Comment: Sorry. I'm found it. It is not a bug. The output of script was buffered by ob_start(); So header() does not send warning. After I turned off buffering, I find a line out of php section in config file of this soft. With commented fpassthru() it outputs "\n\n". Previous Comments: [2005-01-16 20:11:45] [EMAIL PROTECTED] Comment out the fpassthru() call and look at the page output. [2005-01-16 20:10:45] kingoleg at mail dot ru No. Right before @fpassthru ($f); headers sends. So, it can not be a new line before fpassthru, otherwise header(""); write error message. But there is no error messages in error_log, in browset output. And headers are right. [2005-01-16 19:32:28] [EMAIL PROTECTED] You've probably got a newline at the top of your script, before the Expected result: First 8 bytes of saved file via browser: "89 50 4E 47 0D 0A 1A 0A" Actual result: -- First 8 bytes of saved file via browser: "0A 89 50 4E 47 0A 1A 0A" PS. Other bytes of files are equal. -- Edit this bug report at http://bugs.php.net/?id=31575&edit=1
#31575 [Fbk->Opn]: fpassthru, binary mode
ID: 31575 User updated by: kingoleg at mail dot ru Reported By: kingoleg at mail dot ru -Status: Feedback +Status: Open Bug Type: Filesystem function related Operating System: Linux version 2.4.20-8,Red Hat PHP Version: 4.3.10 New Comment: No. Right before @fpassthru ($f); headers sends. So, it can not be a new line before fpassthru, otherwise header(""); write error message. But there is no error messages in error_log, in browset output. And headers are right. Previous Comments: [2005-01-16 19:32:28] [EMAIL PROTECTED] You've probably got a newline at the top of your script, before the Expected result: First 8 bytes of saved file via browser: "89 50 4E 47 0D 0A 1A 0A" Actual result: -- First 8 bytes of saved file via browser: "0A 89 50 4E 47 0A 1A 0A" PS. Other bytes of files are equal. -- Edit this bug report at http://bugs.php.net/?id=31575&edit=1
#31575 [NEW]: fpassthru, binary mode
From: kingoleg at mail dot ru Operating system: Linux version 2.4.20-8,Red Hat PHP version: 4.3.10 PHP Bug Type: Filesystem function related Bug description: fpassthru, binary mode Description: It seems, that fpassthru() is not binary safe Reproduce code: --- First 8 bytes of file (PNG image) on disk: "89 50 4E 47 0D 0A 1A 0A" Expected result: First 8 bytes of saved file via browser: "89 50 4E 47 0D 0A 1A 0A" Actual result: -- First 8 bytes of saved file via browser: "0A 89 50 4E 47 0A 1A 0A" PS. Other bytes of files are equal. -- Edit bug report at http://bugs.php.net/?id=31575&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31575&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31575&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31575&r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=31575&r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=31575&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=31575&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=31575&r=needscript Try newer version: http://bugs.php.net/fix.php?id=31575&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=31575&r=support Expected behavior: http://bugs.php.net/fix.php?id=31575&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=31575&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=31575&r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=31575&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31575&r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=31575&r=dst IIS Stability: http://bugs.php.net/fix.php?id=31575&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=31575&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=31575&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=31575&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=31575&r=mysqlcfg
#29429 [NEW]: unset( $GLOBALS['foo']); unset only global variable, not variables that REFERED
From: kingoleg at mail dot ru Operating system: All PHP version: 4.3.8 PHP Bug Type: Scripting Engine problem Bug description: unset( $GLOBALS['foo']); unset only global variable, not variables that REFERED Description: unset( $GLOBALS['foo']); unset only global variable, not variables that REFERED to global variable How we can unset global variable with all referenced variable using unset() function? Do we must user assign to null? Reproduce code: --- Expected result: NULL NULL Actual result: -- string(6) "not ok" NULL -- Edit bug report at http://bugs.php.net/?id=29429&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29429&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29429&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29429&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29429&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29429&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29429&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29429&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=29429&r=support Expected behavior: http://bugs.php.net/fix.php?id=29429&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=29429&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=29429&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29429&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29429&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29429&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29429&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=29429&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29429&r=float
#27634 [Bgs->Opn]: strtotime(%MySQL datetime(14)%)
ID: 27634 User updated by: kingoleg at mail dot ru Reported By: kingoleg at mail dot ru -Status: Bogus +Status: Open Bug Type: Date/time related Operating System: All -PHP Version: 4.3.4 +PHP Version: 4.3.4, 5CVS New Comment: As I know, in php 4 and php 5 strtotime do support it. It's wrong. Previous Comments: [2004-03-24 04:28:16] kingoleg at corason dot ua "Borders" of this bug: '20040318094229' '20040318094230' Manual: Because strtotime() behaves according to GNU date syntax, have a look at the GNU manual page titled Date Input Formats. Described there is valid syntax for the time parameter. So, neither '20040318094229' nor '20040318094230' are both not valid syntax for the time parameter. But... Test result: 20040318094231 -1 79200 165600 Test source: '; echo ''; echo ''; echo ''; echo strtotime('20040318094229'); echo ''; echo strtotime('20040318094230'); echo ''; echo strtotime('20040318094231'); ?> P.S. Sorry, I wrote "Actual result" as "Expected result". P.P.S. Russian description of this bug is here http://rsdn.ru/Forum/Message.aspx?mid=573729&only=1 [2004-03-18 11:12:46] [EMAIL PROTECTED] Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php strtotime doesn\'t support it. [2004-03-18 11:02:34] kingoleg at mail dot ru Description: strtotime() do not correct work with MySQL datetime(14). Founded in Smarty shared.make_timestamp.php: function smarty_make_timestamp($string) { //Skiped $time = strtotime($string); //For date before 2004031800 return -1 //After 2004031810 return timestamp if (is_numeric($time) && $time != -1) return $time; // is mysql timestamp format of MMDDHHMMSS? if (preg_match('/^\d{14}$/', $string)) { //Skiped } } Reproduce code: --- Type this code: " $t = strtotime('2004031810'); echo $t; ?> Expected result: -1 149979600 Actual result: -- -1 -1 -- Edit this bug report at http://bugs.php.net/?id=27634&edit=1
#27634 [NEW]: strtotime(%MySQL datetime(14)%)
From: kingoleg at mail dot ru Operating system: All PHP version: 4.3.4 PHP Bug Type: Date/time related Bug description: strtotime(%MySQL datetime(14)%) Description: strtotime() do not correct work with MySQL datetime(14). Founded in Smarty shared.make_timestamp.php: function smarty_make_timestamp($string) { //Skiped $time = strtotime($string); //For date before 2004031800 return -1 //After 2004031810 return timestamp if (is_numeric($time) && $time != -1) return $time; // is mysql timestamp format of MMDDHHMMSS? if (preg_match('/^\d{14}$/', $string)) { //Skiped } } Reproduce code: --- Type this code: " $t = strtotime('2004031810'); echo $t; ?> Expected result: -1 149979600 Actual result: -- -1 -1 -- Edit bug report at http://bugs.php.net/?id=27634&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27634&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27634&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=27634&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=27634&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=27634&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=27634&r=needscript Try newer version: http://bugs.php.net/fix.php?id=27634&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=27634&r=support Expected behavior: http://bugs.php.net/fix.php?id=27634&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=27634&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=27634&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=27634&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27634&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=27634&r=dst IIS Stability: http://bugs.php.net/fix.php?id=27634&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=27634&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=27634&r=float