#47507 [Com]: PHP Notice: iconv(): Wrong charset
ID: 47507 Comment by: aboh24 at gmx dot de Reported By: aboh24 at gmx dot de Status: Open Bug Type: ICONV related Operating System: Solaris 10 / 64-bit PHP Version: 5.2.8 New Comment: I rebuilt the codes with -m32 (this is default and means 32-bit binaries) and it is the same problem. Previous Comments: [2009-02-26 07:12:49] aboh24 at gmx dot de Description: The iconv-function is not working correct on my Solaris 10 / 64-bit. libiconv and php-5-2-8 (and others) were compiled with CFLAGS=-m64 and CXXFLAGS=-m64 to enable 64-bit binaries. ./configure --prefix=$PX \ --with-config-file-path=$PX/etc \ --with-apxs2=$PX/apache2/bin/apxs \ --with-iconv-dir=$PX \ --with-libxml-dir=$PX \ --with-zlib=$PX \ --with-zlib-dir=$PX \ --enable-mbstring \ --without-pear php.ini changes: extension=bitset.so Reproduce code: --- #!/home/si/suchopac/rt/bin/php -q Expected result: A verison implementaion and version number and six times "test" Actual result: -- Only get 2 "test" string and 4 "tests" fails. Array ( [input_encoding] => ISO-8859-1 [output_encoding] => ISO-8859-1 [internal_encoding] => ISO-8859-1 ) Array ( [0] => xmlwriter ... [16] => mbstring [17] => json [18] => iconv [19] => hash [20] => filter [21] => date [22] => ctype [23] => zlib [24] => bitset ) Array ( ... [iconv] => Array ( [ICONV_IMPL] => unknown [ICONV_VERSION] => unknown [ICONV_MIME_DECODE_STRICT] => 1 [ICONV_MIME_DECODE_CONTINUE_ON_ERROR] => 2 ) ... ) unknown unknown PHP Notice: iconv(): Wrong charset, conversion from `UTF-8' to `ASCII//TRANSLIT' is not allowed in /test.php on line 10 PHP Notice: iconv(): Wrong charset, conversion from `ASCII' to `UTF-8//TRANSLIT' is not allowed in /test.php on line 11 PHP Notice: iconv(): Wrong charset, conversion from `UTF-8' to `ISO-8859-1//TRANSLIT' is not allowed in /test.php on line 13 PHP Notice: iconv(): Wrong charset, conversion from `ISO-8859-1' to `UTF-8//TRANSLIT' is not allowed in /test.php on line 14 testtest -- Edit this bug report at http://bugs.php.net/?id=47507&edit=1
#47507 [NEW]: PHP Notice: iconv(): Wrong charset
From: aboh24 at gmx dot de Operating system: Solaris 10 / 64-bit PHP version: 5.2.8 PHP Bug Type: ICONV related Bug description: PHP Notice: iconv(): Wrong charset Description: The iconv-function is not working correct on my Solaris 10 / 64-bit. libiconv and php-5-2-8 (and others) were compiled with CFLAGS=-m64 and CXXFLAGS=-m64 to enable 64-bit binaries. ./configure --prefix=$PX \ --with-config-file-path=$PX/etc \ --with-apxs2=$PX/apache2/bin/apxs \ --with-iconv-dir=$PX \ --with-libxml-dir=$PX \ --with-zlib=$PX \ --with-zlib-dir=$PX \ --enable-mbstring \ --without-pear php.ini changes: extension=bitset.so Reproduce code: --- #!/home/si/suchopac/rt/bin/php -q Expected result: A verison implementaion and version number and six times "test" Actual result: -- Only get 2 "test" string and 4 "tests" fails. Array ( [input_encoding] => ISO-8859-1 [output_encoding] => ISO-8859-1 [internal_encoding] => ISO-8859-1 ) Array ( [0] => xmlwriter ... [16] => mbstring [17] => json [18] => iconv [19] => hash [20] => filter [21] => date [22] => ctype [23] => zlib [24] => bitset ) Array ( ... [iconv] => Array ( [ICONV_IMPL] => unknown [ICONV_VERSION] => unknown [ICONV_MIME_DECODE_STRICT] => 1 [ICONV_MIME_DECODE_CONTINUE_ON_ERROR] => 2 ) ... ) unknown unknown PHP Notice: iconv(): Wrong charset, conversion from `UTF-8' to `ASCII//TRANSLIT' is not allowed in /test.php on line 10 PHP Notice: iconv(): Wrong charset, conversion from `ASCII' to `UTF-8//TRANSLIT' is not allowed in /test.php on line 11 PHP Notice: iconv(): Wrong charset, conversion from `UTF-8' to `ISO-8859-1//TRANSLIT' is not allowed in /test.php on line 13 PHP Notice: iconv(): Wrong charset, conversion from `ISO-8859-1' to `UTF-8//TRANSLIT' is not allowed in /test.php on line 14 testtest -- Edit bug report at http://bugs.php.net/?id=47507&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47507&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47507&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47507&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=47507&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47507&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=47507&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=47507&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=47507&r=needscript Try newer version: http://bugs.php.net/fix.php?id=47507&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=47507&r=support Expected behavior: http://bugs.php.net/fix.php?id=47507&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=47507&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=47507&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=47507&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47507&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=47507&r=dst IIS Stability: http://bugs.php.net/fix.php?id=47507&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=47507&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=47507&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=47507&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=47507&r=mysqlcfg
#44096 [Com]: iconv: wrong charset
ID: 44096 Comment by: aboh24 at gmx dot de Reported By: cpuidle at gmx dot de Status: No Feedback Bug Type: ICONV related Operating System: WinXP PHP Version: 5.2.5 New Comment: Same problem on Solaris 10 and explicit compiled and linked libiconv-1.12 and php 5.2.8. with --with-iconv-dir= PHP Notice: iconv(): Wrong charset, conversion from `UTF-8' to `ASCII//TRANSLIT' is not allowed in /sisis/home/sisis/suchopac/query.php on line 39 PHP Notice: iconv(): Wrong charset, conversion from `ASCII' to `UTF-8//TRANSLIT' is not allowed in /sisis/home/sisis/suchopac/query.php on line 40 PHP Notice: iconv(): Wrong charset, conversion from `UTF-8' to `ISO-8859-1//TRANSLIT' is not allowed in /sisis/home/sisis/suchopac/query.php on line 42 PHP Notice: iconv(): Wrong charset, conversion from `ISO-8859-1' to `UTF-8//TRANSLIT' is not allowed in /sisis/home/sisis/suchopac/query.php on line 43 Previous Comments: [2009-02-12 06:40:47] niloat at gmail dot com Please check whether necessary so files exists in /usr/lib/gconv. You can copy those files from other's linux system if missing someone. [2008-05-13 05:11:40] iconv dot 20 dot cheef-daniel at spamgourmet dot com Notice: iconv() [function.iconv]: Wrong charset, conversion from `ISO-8859-1' to `UTF-8//TRANSLIT' is not allowed in /var/www/test.php on line 7 Same here with libapache2-mod-php5.2.6 on my debian etch based system. I first thought it has to do with my chroot-setup and spent 2 days searching what goes wrong and found nothing. It works fine with an old php4-binary, iconv directly called in the shell works too. samples from ANSI encoded file: echo iconv('UTF-8', 'ASCII//TRANSLIT', "test"); // works echo iconv('ASCII', 'UTF-8//TRANSLIT', "test"); // works echo iconv('UTF-8', 'ISO-8859-1//TRANSLIT', "test"); // works not echo iconv('ISO-8859-1', 'UTF-8//TRANSLIT', "test"); // works not [2008-04-17 08:41:49] i dot pavlov at korekom dot net The same thing here. But the problem is far from Windows-specific. Debian based system in my case. No usefull info found for now. [2008-02-25 01:31:35] ras...@php.net Weird Windows-specific thing. The test case works fine on 6 different UNIX variants I just tried it on. [2008-02-24 23:45:29] darop68 at poczta dot onet dot pl I have the same problem in php 5.2.5. My code: iconv('iso-8859-2', 'utf-8', 'test'); 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/44096 -- Edit this bug report at http://bugs.php.net/?id=44096&edit=1
#47506 [NEW]: ocilogon returns error very rarely.
From: yoshida at zend dot co dot jp Operating system: Solaris Sparc 9 PHP version: 5.2.8 PHP Bug Type: OCI8 related Bug description: ocilogon returns error very rarely. Description: I find warnings that occurres each about 1 or 3 days. The warning says, PHP warning: ocilogon() function.ocilogon OCIEnvNlsCreate() failed. There is something wrong with your system - please check that LD_LIBRARY_PATH includes the directory with Oracle Instant Client libraries But the LD_LIBRARY_PATH, the arguments to ocilogon() are all correct. The warning continues 5 or 15 minutes, but no all ocilogon() fails. Some ocilogon() fails, Others not fail in the same period. I change ocilogon() to oci_connect(), but the warning also returns. I could not find the warning when I use the Oracle Instant Client 9.2.0.5 and php 4.3.8, but I find now the message. I use now the Oracle Instant Client 10.2.0.3 and php 5.2.8 pair. I doubt OCI_G(errcode) may return error rarely in spite of correct arguments. The OCI_G(errcode) is at 1237 line in /ext/oci8/oci8.c . OCI_G(errcode) seems to use Oracle API at 446 line in /ext/oci8/php_oci8_int.h . Reproduce code: --- $ID = "userid"; $PW = "userpass"; $DB = "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=userhost)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=usersrvname)))"; return OCILogon($ID, $PW, $DB); -- Edit bug report at http://bugs.php.net/?id=47506&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47506&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47506&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47506&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=47506&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47506&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=47506&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=47506&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=47506&r=needscript Try newer version: http://bugs.php.net/fix.php?id=47506&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=47506&r=support Expected behavior: http://bugs.php.net/fix.php?id=47506&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=47506&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=47506&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=47506&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47506&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=47506&r=dst IIS Stability: http://bugs.php.net/fix.php?id=47506&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=47506&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=47506&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=47506&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=47506&r=mysqlcfg
#45546 [Com]: PCRE with utf8 kill apache childprocess
ID: 45546 Comment by: joe at lastpass dot com Reported By: kaiser at macbureau dot de Status: No Feedback Bug Type: PCRE related Operating System: FreeBSD 7 PHP Version: 5.2.6 New Comment: Happens at somewhere between 3500 and 6400 characters on every Linux platform I have access to (x86 and x86_64): PHP 5.2.6-3ubuntu2 with Suhosin-Patch 0.9.6.2 (cli) (built: Feb 13 2009 20:07:08) PHP 5.2.6-2ubuntu4.1 with Suhosin-Patch 0.9.6.2 (cli) (built: Feb 11 2009 20:44:58) PHP 5.2.4-2ubuntu5.5 with Suhosin-Patch 0.9.6.2 (cli) (built: Feb 11 2009 20:09:11) PHP 5.2.6-3ubuntu2 with Suhosin-Patch 0.9.6.2 (cli) (built: Feb 13 2009 20:20:01) Previous Comments: [2009-02-08 11:55:20] vanav at vanav dot com dot ua Two gdb examples: gdb66: Program received signal SIGSEGV, Segmentation fault. match ( eptr=0x29385a68 "3'\";\n$select[] = \"SELECT p1.id, nick, p1.creation_date, p1.modification_date, p1.post_title, p1.post_text, p1.parent_post_id, p2.post_title AS parent_post_title, p3.post_title AS answer_parent_post_ti"..., ecode=0x28f160ed "\034\"T", mstart=0x293854bc ", ?00\223 заМ217вил ?232М203ниМ206М213н. даже М201М200еднемМ203 клаМ201М201М203>, ?00\223 заМ217вил ?232М203ниМ206М213н. ?237о мнениМ216 ?232М203ниМ206М213на, кМ200М213мМ201кие влаМ201М202и должнМ213 даМ202М214 возможноМ201М202М214 М201М200еднемМ203 клаМ201М201М203 капиМ202ализиМ200оваМ202М214 иМ205 М201беМ200ежен?..., offset_top=4, md=0xbfbf89d0, ims=0, eptrb=0xbfa006a0, flags=2, rdepth=1388) at /usr/ports/lang/php5/work/php-5.2.8/ext/pcre/pcrelib/pcre_exec.c:2160 2160/usr/ports/lang/php5/work/php-5.2.8/ext/pcre/pcrelib/pcre_exec.c: No such file or directory. in /usr/ports/lang/php5/work/php-5.2.8/ext/pcre/pcrelib/pcre_exec.c [2009-02-05 01:43:05] vanav at vanav dot com dot ua Got the same bug, PHP 5.2.8/PCRE 7.8, Apache 2.2.11, Freebsd. [2009-01-27 12:37:10] keltia at gmail dot com I have a similar problem after upgrading to PHP 5.2.8/PCRE 7.8 on a FreeBSD 7.1/amd64. I'm trying to upgrade Gallery2 to 2.3 and the installer fails with that error. [Tue Jan 27 12:28:12 2009] [notice] child pid 92633 exit signal Illegal instruction (4) [2009-01-27 02:16:43] jdw at wheelhouse dot org We are also having this problem on FreeBSD 7 with Apache 1.3. The stack trace is the same: #0 0x286dcbc7 in match () from /usr/local/lib/libpcre.so.0 #1 0x286e3aba in match () from /usr/local/lib/libpcre.so.0 #2 0x286e3aba in match () from /usr/local/lib/libpcre.so.0 #3 0x286e469e in match () from /usr/local/lib/libpcre.so.0 #4 0x286dd629 in match () from /usr/local/lib/libpcre.so.0 #5 0x286e76c4 in pcre_exec () from /usr/local/lib/libpcre.so.0 #6 0x284b72fe in php_pcre_match_impl () from /nfsn/apps/apache/libexec/libphp5.so #7 0x284b7cac in php_do_pcre_match () from /nfsn/apps/apache/libexec/libphp5.so #8 0x285db1a8 in zend_do_fcall_common_helper_SPEC () from /nfsn/apps/apache/libexec/libphp5.so #9 0x285cca7f in execute () from /nfsn/apps/apache/libexec/libphp5.so #10 0x28b2f0c2 in _su3jdmx () from /nfsn/apps/php5/lib/php/extensions/no-debug-non-zts- 20060613/ioncube_loader_fre_5.2.so #11 0x2af863d8 in ?? () #12 0x29e80750 in ?? () #13 0x29e7f75c in ?? () #14 0x285dac0e in zend_do_fcall_common_helper_SPEC () from /nfsn/apps/apache/libexec/libphp5.so (This version was built with the FreeBSD PCRE instead of the builtin in case that helped; it didn't.) In one case, a customer has to set pcre.backtrack_limit and pcre.recursion_limit to 10 to get a Wordpress RSS feed to load. Are those considered "sane" values? Or is this getting ignored due to the incorrect "No Feedback" status? [2009-01-14 13:00:22] jdc at parodius dot com I've built PHP 5.2.8 with debugging enabled, and ran the following script under PHP via the CLI, under gdb: It's important to note that if I change the str_repeat() length from 1244 to 1243, the segfault doesn't happen. The system limits: Resource limits (current): cputime infinity secs filesize infinity kB datasize 786432 kB stacksize 131072 kB coredumpsize infinity kB memoryuseinfinity kB memorylocked infinity kB maxprocesses 5547 openfiles 11095 sbsize infinity bytes vmemoryuse infinity kB Anyway, the results of the gdb backtrace are here (~790KB file): http://www.malkavian.com/~jdc/php.bug45546.backtrace.txt Hope this helps. The remainder of the comments for this report are too l
#47505 [NEW]: SPL and apache module crash in SSL
From: lordsabre at hotmail dot com Operating system: Freebsd 4.9 & freebsd 6.3 AMD64 PHP version: 5.2.8 PHP Bug Type: Reproducible crash Bug description: SPL and apache module crash in SSL Description: Freebsd 4.9 Apache 2.0.59 php 5.2.8 Upgrading for new install of php 5.2.8 causes a general fault in the SSL apache engine, resulting in a core dump. It is noted that when the server is started in non SSL mode the server starts and no core dump. However, $_post causes a php error of out of memory. Tracing back it comes from the array table SPL. The same exact configuration was used for 5.2.6 which is not experiencing this problem. Recompiled and install 5.2.6 as a work around. The config is as follows: ./configure --prefix=/usr/local/php --mandir=/usr/share/man --enable-force-cgi-redirect --with-openssl=/usr/local/ssl --with-mysql=/usr/local/mysql --with-mysql-sock=/var/mysqlsocket/mysql.sock --with-apxs2=/usr/local/apache/bin/apxs --with-jpeg-dir=/usr/local/libjpeg --with-png-dir=/usr/local/libpng --with-zlib-dir=/usr/local/zlib --with-gd --with-freetype-dir=/usr/local/freetype --with-config-file-path=/usr/local/php/etc --with-iconv=/usr/local/libiconv -with-mcrypt=/usr/local/libmcrypt --with-libxml-dir=/usr/local/libxml --with-imap=/usr/local/imapclient --with-imap-ssl --disable-ipv6 --with-curl=/usr/local/curl --enable-bcmath --enable-ftp Tried the same on a newer machine: Freebsd 6.3 AMD64 apache 2.2.9 Compiled 5.2.8 and same exact results as 4.9. Core dump. Interesting aspect there is absolutely no information other than using gdb to step through apache. Slight different config. Because of package locations. ./configure --prefix=/usr/local/php --mandir=/usr/share/man --enable-force-cgi-redirect --with-openssl=/usr --with-mysql=/usr/local/mysql --with-mysql-sock=/var/socket/mysqlsocket --with-apxs2=/usr/local/apache/sbin/apxs --with-jpeg-dir=/usr/local/libjpeg --with-png-dir=/usr/local/libpng --with-zlib-dir=/usr/local/zlib --with-gd --with-freetype-dir=/usr/local/freetype --with-config-file-path=/usr/local/php/etc --with-libxml-dir=/usr/local/libxml --with-iconv=/usr/local/libiconv --with-curl=/usr/local/curl --with-mcrypt=/usr/local/mcrypt --with-imap=/usr/local/imapclient --with-imap-ssl --disable-ipv6 --with-ftp During the tests this failure of 5.2.8 during make test was observed. SPL: ArrayObject::__construct basic usage with ArrayObject::ARRAY_AS_PROPS. [ext/spl/tests/arrayObject___construct_basic4.phpt] SPL: ArrayObject::__construct basic usage with ArrayObject::STD_PROP_LIST|ArrayObject::ARRAY_AS_PROPS. [ext/spl/tests/arrayObject___construct_basic5.phpt] SPL: ArrayObject::exchangeArray() basic usage with object as underlying data store. [ext/spl/tests/arrayObject_exchangeArray_basic3.phpt] SPL: ArrayObject::setFlags basic usage with ArrayObject::ARRAY_AS_PROPS. [ext/spl/tests/arrayObject_setFlags_basic1.phpt] Reproduce code: --- None required. See above Expected result: See description core dump Actual result: -- See description. not overly long. No field for this part: Also note http://www.freebsd.org/cgi/ports.cgi?query=php+&stype=all&sektion=lang, there a number of files/patches for 5.2.8 that is not included or shown in php. I have not retested with the patches, since php should compile and operate out of the box. Not everyone agrees with the changes of directory structure in Freebsd. -- Edit bug report at http://bugs.php.net/?id=47505&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47505&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47505&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47505&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=47505&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47505&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=47505&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=47505&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=47505&r=needscript Try newer version: http://bugs.php.net/fix.php?id=47505&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=47505&r=support Expected behavior: http://bugs.php.net/fix.php?id=47505&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=47505&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=47505&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=47505&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47505&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=47505&r=dst IIS Stability: http://bugs.php.net/fix.php?id=47505&r=isa
#47504 [NEW]: error "SQLSTATE[HY000]: General error: 2014" with sql comments
From: admin at ifyouwantblood dot de Operating system: Windows XP SP 3 PHP version: 5.2.8 PHP Bug Type: PDO related Bug description: error "SQLSTATE[HY000]: General error: 2014" with sql comments Description: i get this error with following code: - 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. HY000 #0 D:\_projects\web\1.php(13): PDO->query('INSERT INTO `te...') #1 {main} -- removing !SQL COMMENTS! will solve this. this only appears on windows (XP), linux is fine. mysql version is 5.0.51a. latest XAMPP package was used to test this (without modifications). Reproduce code: --- setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION); $pdo->query(' CREATE TABLE IF NOT EXISTS `test` ( `some` VARCHAR( 100 ) NOT NULL ) ENGINE = INNODB '); $pdo->query('SET TRANSACTION ISOLATION LEVEL SERIALIZABLE'); $pdo->query('START TRANSACTION'); $pdo->query("INSERT INTO `test` (some) VALUES (''), ('1'); -- I AM AN SQL COMMENT, REMOVING ME WILL SOLVE THIS PROBLEM"); $pdo->query("INSERT INTO `test` (some) VALUES (''), ('1')"); $pdo->query('COMMIT'); function ehandler($exception) { echo ''."\r\n"; echo $exception->getMessage().' '.$exception->getCode(); echo "\r\n\r\n"; echo $exception->getTraceAsString(); echo ''; } Expected result: nothing Actual result: -- 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. HY000 #0 D:\_projects\web\1.php(13): PDO->query('INSERT INTO `te...') #1 {main} -- Edit bug report at http://bugs.php.net/?id=47504&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47504&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47504&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47504&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=47504&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47504&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=47504&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=47504&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=47504&r=needscript Try newer version: http://bugs.php.net/fix.php?id=47504&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=47504&r=support Expected behavior: http://bugs.php.net/fix.php?id=47504&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=47504&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=47504&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=47504&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47504&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=47504&r=dst IIS Stability: http://bugs.php.net/fix.php?id=47504&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=47504&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=47504&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=47504&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=47504&r=mysqlcfg
#47503 [Opn->Fbk]: apache start terminated
ID: 47503 Updated by: j...@php.net Reported By: roland dot ziegler at bsgti dot ch -Status: Open +Status: Feedback Bug Type: Apache related Operating System: Fedora Linux 2.6.22.9-61.fc6 PHP Version: 5.2.8 New Comment: Check that your httpd.conf (and possible included configuration files in it) do not load anything but the libphp5.so. You should also consider upgrading to Apache 2. Also, what was the configure line you used when compiling PHP? Previous Comments: [2009-02-25 17:02:48] roland dot ziegler at bsgti dot ch Description: Similar to Bug #17147 Installed Apache 1.3.41 and PHP 5.2.8 - after start i got this message: Syntax error on line 206 of /usr/local/apache_1.3.41/conf/httpd.conf: Cannot load /usr/local/apache_1.3.41/libexec/libphp5.so into server: /usr/local/apache_1.3.41/libexec/libphp5.so: undefined symbol: sapi_globals /usr/local/apache_1.3.41/bin/apachectl start: httpd could not be started -- Edit this bug report at http://bugs.php.net/?id=47503&edit=1
#47495 [Csd->Fbk]: headers_list returns an empty array
ID: 47495 Updated by: theta...@php.net Reported By: leha at inkin dot ru -Status: Closed +Status: Feedback Bug Type: iPlanet related Operating System: Linux 2.6.26 PHP Version: 5.2.8 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ I fixed this also in 5.2 (was simple, I just kept the header in the internal sapi list), it may go into the shortly to be released PHP 5.2.9. To your problem with 5.3: I tried it out, it works here on Solaris 10 X64. This error message is mostly because of a missing library. PHP 5.3 has some more external dependencies (as I can see libintl.so.3 is additionally needed now on Sol). Previous Comments: [2009-02-25 18:51:45] leha at inkin dot ru I built both 5.3.0beta1 and the latest snapshot with the very same configure as 5.2.8, but both didn't run with my SJSWS: Sun Java System Web Server 7.0U3 B06/16/2008 09:44 failure: CORE2253: Error running Init function load-modules: dlsym for php5_init failed (/opt/webserver7u3/bin/libphp5.so: undefined symbol: php5_init) Still "--with-nsapi=..." presents. Perhaps it's my personal configuration installation issue. I don't have time to investigate unstable releases, and I hope headers_list() will work as you say with stable 5.3. [2009-02-25 11:43:50] theta...@php.net Please try using this CVS snapshot: http://snaps.php.net/php5.3-latest.tar.gz For Windows: http://windows.php.net/snapshots/ As headers_list was a addition to PHP 5, not all SAPIs were aware of this and can handle it correctly. The PHP SAPI layer has two possibilities, to handle the headers: - a callback that sets the header (NSAPI and other SAPIs use this, parse the header and set it in the webserver internal hashtable), SAPI will forget about the header after that. - the headers are sent, when the response is committed, SAPI collects all headers in a SAPI-internal list. The first solution had the problem, that the SAPIs manage the complete header addition and the PHP SAPI layer does not know anything about previously set headers (because the list of headers is not replicated). Calls to nsapi_response_headers (you should use this function, as apache_response_headers is only available in NSAPI for compatibility) retrieve the headers directly from the underlying webserver (you will also see headers, like "Connection" or other Keep-alive-headers, that were not set by PHP). In NSAPI (and other SAPIs) headers_list() does not return anything, because the PHP-internal header list is always empty (because headers are managed by webserver only). In PHP 5.3 a new SAPI callback that is also able to remove headers was implemented. This new SAPI-layer always caches the header list additionally to the webserver, so header_list will return the PHP-set headers here (but no lower-level headers by the webserver). This bug will not be fixed in 5.2, can you please try PHP 5.3 snapshot and report if it works correctly there? [2009-02-24 15:06:17] leha at inkin dot ru The whole php.ini: [PHP] magic_quotes_gpc = off include_path = ".:/usr:/usr/share/php" upload_max_filesize = 10M [2009-02-24 15:02:15] leha at inkin dot ru Description: headers_list() returns an empty array. Though apache_response_headers() works fine. Using Sun Java System Web Server 7.0 Update 3 + PHP 5.2.8. The same problem is with older SJSWS 7.0 U1 + PHP 5.2.1. ./configure --with-nsapi=/opt/webserver7u3 --with-openssl=/usr --with- enable-dbase --enable-exif --enable-ftp --with-gd --with-ttf --with-t1lib=/usr --with- enable-mbstring --with-libmbfl --with-mcrypt --with-mhash --with-ming --with- with-libxml-dir --with-freetype-dir --with-xsl Reproduce code: --- Expected result: array(4) { [0]=> string(23) "X-Powered-By: PHP/5.2.8" [1]=> string(23) "Content-type: text/html" } Actual result: -- array(0) { } -- Edit this bug report at http://bugs.php.net/?id=47495&edit=1
#47471 [Tbd]: MySQLi, SP, loop count and the amount of result sets
ID: 47471 User updated by: pcdinh at gmail dot com Reported By: pcdinh at gmail dot com Status: To be documented Bug Type: MySQLi related Operating System: Windows XP SP3 PHP Version: 5.3.0beta1 New Comment: So why did MySQli iterate 3 times meanwhile there were 2 result sets? Why are there always an additional loop when all of the result sets are retrieved? According to your explanation, the additional loop should go first, not last, because the sequence of queries should go as follows: 1 - CALL foo: true 2 - SELECT 'foo' FROM DUAL; : true 3 - SELECT 'bar', 'bar2' FROM DUAL; : true Previous Comments: [2009-02-25 13:31:55] johan...@php.net The interface is a bit weird, yes. mysqli_next_result() returns false in case the query is wrong. It will always return true in case the query was ok, independent from the number of fetched/available result sets. To check whether there are more result sets use mysqli_more_results() or check the return value of storing it. [2009-02-22 10:14:11] pcdinh at gmail dot com Description: When executing a stored procedure that returns multiple result sets, MySQLi driver always does an additional loop after all the result set are returned. The last loop always returns a FALSE without any error, which indicates as if there is a query that does not return a result set in the SP. PHP Manual does not mention about the additional special loop. SP: CREATE PROCEDURE foo() BEGIN SELECT 'foo' FROM DUAL; SELECT 'bar', 'bar2' FROM DUAL; END $$ Reproduce code: --- real_query("CALL foo()")) { do { $loopCount++; if ($hasNext === null) { echo 'Loop begins before any check. The first result set is available. '."\n"; } else { echo "Check if there is any result set: ".(int)$hasNext." at loop ".$loopCount.". \n"; } $result = $mysqli->store_result(); if ($mysqli->errno > 0) { echo "Error: ".$mysqli->error." "; continue; } if (is_object($result)) { $rsCount++; // $result->free_result(); echo 'Result set at loop '.$loopCount.'.'."\n"; } else { // No result set returns echo 'No result set at loop '.$loopCount.'.'."\n"; } } while ($hasNext = $mysqli->next_result()); // mysqli_next_result always returns true if an error occured. } echo "Total loop: $loopCount; Total result sets: $rsCount;"; /* close connection */ $mysqli->close(); ?> Expected result: I created a stored procedure named foo() that is expected to return 2 result sets DELIMITER $$ DROP PROCEDURE IF EXISTS foo $$ CREATE PROCEDURE foo() BEGIN SELECT 'foo' FROM DUAL; SELECT 'bar', 'bar2' FROM DUAL; END $$ The PHP code should print out: Loop begins before any check. The first result set is available. Result set at loop 1. Check if there is any result set: 1 at loop 2. Result set at loop 2. Total loop: 2; Total result sets: 2; Actual result: -- The PHP code prints out: Loop begins before any check. The first result set is available. Result set at loop 1. Check if there is any result set: 1 at loop 2. Result set at loop 2. Check if there is any result set: 1 at loop 3. No result set at loop 3. Total loop: 3; Total result sets: 2; -- Edit this bug report at http://bugs.php.net/?id=47471&edit=1
#47495 [Fbk->Csd]: headers_list returns an empty array
ID: 47495 User updated by: leha at inkin dot ru Reported By: leha at inkin dot ru -Status: Feedback +Status: Closed Bug Type: iPlanet related Operating System: Linux 2.6.26 PHP Version: 5.2.8 New Comment: I built both 5.3.0beta1 and the latest snapshot with the very same configure as 5.2.8, but both didn't run with my SJSWS: Sun Java System Web Server 7.0U3 B06/16/2008 09:44 failure: CORE2253: Error running Init function load-modules: dlsym for php5_init failed (/opt/webserver7u3/bin/libphp5.so: undefined symbol: php5_init) Still "--with-nsapi=..." presents. Perhaps it's my personal configuration installation issue. I don't have time to investigate unstable releases, and I hope headers_list() will work as you say with stable 5.3. Previous Comments: [2009-02-25 11:43:50] theta...@php.net Please try using this CVS snapshot: http://snaps.php.net/php5.3-latest.tar.gz For Windows: http://windows.php.net/snapshots/ As headers_list was a addition to PHP 5, not all SAPIs were aware of this and can handle it correctly. The PHP SAPI layer has two possibilities, to handle the headers: - a callback that sets the header (NSAPI and other SAPIs use this, parse the header and set it in the webserver internal hashtable), SAPI will forget about the header after that. - the headers are sent, when the response is committed, SAPI collects all headers in a SAPI-internal list. The first solution had the problem, that the SAPIs manage the complete header addition and the PHP SAPI layer does not know anything about previously set headers (because the list of headers is not replicated). Calls to nsapi_response_headers (you should use this function, as apache_response_headers is only available in NSAPI for compatibility) retrieve the headers directly from the underlying webserver (you will also see headers, like "Connection" or other Keep-alive-headers, that were not set by PHP). In NSAPI (and other SAPIs) headers_list() does not return anything, because the PHP-internal header list is always empty (because headers are managed by webserver only). In PHP 5.3 a new SAPI callback that is also able to remove headers was implemented. This new SAPI-layer always caches the header list additionally to the webserver, so header_list will return the PHP-set headers here (but no lower-level headers by the webserver). This bug will not be fixed in 5.2, can you please try PHP 5.3 snapshot and report if it works correctly there? [2009-02-24 15:06:17] leha at inkin dot ru The whole php.ini: [PHP] magic_quotes_gpc = off include_path = ".:/usr:/usr/share/php" upload_max_filesize = 10M [2009-02-24 15:02:15] leha at inkin dot ru Description: headers_list() returns an empty array. Though apache_response_headers() works fine. Using Sun Java System Web Server 7.0 Update 3 + PHP 5.2.8. The same problem is with older SJSWS 7.0 U1 + PHP 5.2.1. ./configure --with-nsapi=/opt/webserver7u3 --with-openssl=/usr --with- enable-dbase --enable-exif --enable-ftp --with-gd --with-ttf --with-t1lib=/usr --with- enable-mbstring --with-libmbfl --with-mcrypt --with-mhash --with-ming --with- with-libxml-dir --with-freetype-dir --with-xsl Reproduce code: --- Expected result: array(4) { [0]=> string(23) "X-Powered-By: PHP/5.2.8" [1]=> string(23) "Content-type: text/html" } Actual result: -- array(0) { } -- Edit this bug report at http://bugs.php.net/?id=47495&edit=1
#40479 [Com]: zend_mm_heap corrupted
ID: 40479 Comment by: lcvalentine at gmail dot com Reported By: rrossi at maggioli dot it Status: No Feedback Bug Type: Reproducible crash Operating System: Suse Linux 9.0 PHP Version: 5.2.1 New Comment: Apache/2.0.63 (Win32) PHP/5.2.8 FWIW, this happens when running as a service. Running in the console it's fine. I found it in response to bug #46842, after rolling back from Apache/2.2. I cannot say for sure if they are related. Previous Comments: [2009-02-20 18:34:02] php at wijzijnhet dot nl Just ran into the same problem problem on PHP5.3b1, so it seems this error is bug is still around. Unfortunately, I don't have a simple script to reproduce the problem. My config.nice: './configure' \ '--prefix=/opt' \ '--with-apxs2=/usr/bin/apxs2' \ '--disable-short-tags' \ '--with-openssl' \ '--with-zlib' \ '--enable-bcmath' \ '--with-bz2=/bin/bzip2' \ '--enable-calendar' \ '--with-curl' \ '--with-curlwrappers' \ '--enable-exif' \ '--enable-ftp' \ '--with-gd' \ '--with-jpeg-dir=/usr/lib' \ '--with-png-dir=/usr/lib' \ '--with-xpm-dir=/usr/lib' \ '--with-ttf' \ '--with-t1lib' \ '--enable-gd-native-ttf' \ '--enable-gd-jis-conv' \ '--with-gettext' \ '--with-imap' \ '--with-imap-ssl' \ '--with-ldap' \ '--with-ldap-sasl' \ '--enable-mbstring' \ '--with-mcrypt' \ '--with-mhash' \ '--with-ming' \ '--with-mysql=mysqlnd' \ '--with-mysqli=mysqlnd' \ '--with-ncurses' \ '--with-pdo-mysql' \ '--with-pspell' \ '--with-readline' \ '--with-snmp' \ '--enable-soap' \ '--enable-sockets' \ '--without-sqlite' \ '--enable-sqlite-utf8' \ '--with-tidy' \ '--enable-wddx' \ '--with-xmlrpc' \ '--with-xsl' \ '--enable-zip' \ '--with-pear' \ '--with-kerberos' \ '--with-config-file-path=/etc/php5-3' \ System configuration: OS: Ubuntu Linux 8.10 Apache 2.2.9 [2009-01-27 16:10:11] dominik at dadadom dot de Interestingly enough, changing values in php.ini helps: http://trac.macports.org/ticket/18004#comment:10 [2009-01-23 05:18:43] pablo at dalloglio dot net This script may help to reproduce the bug. It is a stupid script, but sometimes the two generated files (teste.txt, teste1.txt) are different. But they should be identical. [2008-12-12 20:10:29] peter at f-is dot eu I have run into this problem too. I have not been able to make a short example script to demonstrate the problem since removing seemingly unrelated parts of code makes the problem disappear. The error is generated after the PHP script has completed. The actual problem seems to stem from calling a some static method from a class that has not yet been included. The class is included by an __autoload function. Manually including the class first seems to fix the problem, but doing random stuff in general seems to do that :) The problem occurs when returning from the function, since throwing an exception or die()-ing at that point does not show the problem. When building php with --enable-debug, the problem goes away. The problem also goes away when not using --enable-debug, but adding -DZEND_MM_HEAP_PROTECTION. Since the problem goes away when using --enable-debug, I generated the following backtraces with a modified zend_mm_panic(...) in zend_alloc.c to remove the #if ZEND_DEBUG macro. #0 0x7f9b736d45a7 in kill () from /lib/libc.so.6 #1 0x00596440 in zend_mm_panic (message=) at /usr/local/src/php-5.2.8/Zend/zend_alloc.c:94 #2 0x00596a45 in _zend_mm_free_int (heap=0x96f300, p=0xb) at /usr/local/src/php-5.2.8/Zend/zend_alloc.c:833 #3 0x005bc298 in zend_hash_destroy (ht=0xd71040) at /usr/local/src/php-5.2.8/Zend/zend_hash.c:526 #4 0x005cbb49 in zend_object_std_dtor (object=0xd6c570) at /usr/local/src/php-5.2.8/Zend/zend_objects.c:45 #5 0x005cbb69 in zend_objects_free_object_storage (object=0x25e3) at /usr/local/src/php-5.2.8/Zend/zend_objects.c:122 #6 0x005cf1ae in zend_objects_store_del_ref_by_handle (handle=63) at /usr/local/src/php-5.2.8/Zend/zend_objects_API.c:206 #7 0x005cf1de in zend_objects_store_del_ref (zobject=0xd6ffe8) at /usr/local/src/php-5.2.8/Zend/zend_objects_API.c:168 #8 0x005a4d16 in _zval_ptr_dtor (zval_ptr=0xd79d38) at /usr/local/src/php-5.2.8/Zend/zend_variables.h:35 #9 0x005bc298 in zend_hash_destroy (ht=0xcf42f8) at /usr/local/src/php-5.2.8/Zend/zend_hash.c:526 #10 0x005b12bf in _zval_dtor_func (zvalue=0xd77118) at /usr/local/src/php-5.2.8/Zend/zend_variables.c:43 #11 0x005a4d16 in _zval_ptr_dtor (zval_ptr=0xb74de0) at /usr/local/src/php-5.2.8/Zend/zend_variables.h:35 #12 0x005bc298 in zend_hash_destroy (ht=0xd01938) at /usr/local/src/php-5.2.8/Zend/zend_hash.c:526 #13 0x005cbb49 i
#47387 [Opn->Asn]: Load stmt result bool false
ID: 47387 Updated by: johan...@php.net Reported By: lars dot a dot johansson at se dot atlascopco dot com -Status: Open +Status: Assigned Bug Type: MySQLi related Operating System: Linux mandriva 2009 PHP Version: 5.3CVS-2009-02-14 (snap) -Assigned To: +Assigned To: mysql New Comment: I couldn't reproduce using myslqnd and libmysql currently creates other trouble for me. but I'll investigate. Thanks for the short script so far :-) Previous Comments: [2009-02-25 15:23:28] lars dot a dot johansson at se dot atlascopco dot com Hi, I can reproduce 'the bug' with attached ugly code. you can use the infile I supplied earlier. the problem seems a bit tricky. 1 $result = $mysqli->query('CREATE TABLE IF NOT EXISTS ...' 2 $result = $mysqli->query("SHOW WARNINGS", MYSQLI_USE_RESULT... this shows one warning: Note (1050): Table 'PROJECT_DETAIL' already exists 3 $result->close(); 4 Now when I run $result = $mysqli->query(LOAD DATA LOCAL INFILE ... then $result is false and I get the warning: //PHP Warning: mysqli::query(): (0/0): ... Note! this only happen in 5.3, in 5.2 $result is true. Look in the code for the snippet that prevent the 'bug'. Please let me know if there anything more I can do. #!/home/tooljn/PHP5.3/local/bin/php query($sqlstmt); var_dump($result); //if($result) $result->close(); if ($result = $mysqli->query("SELECT DATABASE()")) { $row = $result->fetch_row(); $result->close(); } var_dump($row); $sqlstmt = 'CREATE TABLE IF NOT EXISTS PROJECT_DETAIL (`PROJECT_DEFINITION` CHAR(24),`DESCRIPTION` CHAR(40),`MASK_ID` CHAR(24),`RESPONSIBLE_NO` DECIMAL(8,0),`APPLICANT_NO` DECIMAL(8,0),`COMP_CODE` CHAR(4),`BUS_AREA` CHAR(4),`CONTROLLING_AREA` CHAR(4),`PROFIT_CTR` CHAR(10),`PROJECT_CURRENCY` CHAR(5),`PROJECT_CURRENCY_ISO` CHAR(3),`NETWORK_ASSIGNMENT` DECIMAL(1,0),`START` DATE,`FINISH` DATE,`PLANT` CHAR(4),`CALENDAR` CHAR(2),`PLAN_BASIC` DECIMAL(1,0),`PLAN_FCST` DECIMAL(1,0),`TIME_UNIT` CHAR(3),`TIME_UNIT_ISO` CHAR(3),`NETWORK_PROFILE` CHAR(7),`PROJECT_PROFILE` CHAR(7),`BUDGET_PROFILE` CHAR(6),`PROJECT_STOCK` CHAR(1),`OBJECTCLASS` CHAR(2),`STATISTICAL` CHAR(1),`TAXJURCODE` CHAR(15),`INT_PROFILE` CHAR(7),`WBS_SCHED_PROFILE` CHAR(12),`CSH_BDGT_PROFILE` CHAR(6),`PLAN_PROFILE` CHAR(6),`JOINT_VENTURE` CHAR(6),`RECOVERY_IND` CHAR(2),`EQUITY_TYPE` CHAR(3),`JV_OBJECT_TYPE` CHAR(4),`JV_JIB_CLASS` CHAR(3),`JV_JIB_SUB_CLASS_A` CHAR(5),`DELETION_FLAG` CHAR(1),`OBJECTCLASS_EXT` CHAR(5),`FUNC_AREA` CHAR(4),`FUNC_AREA_LONG` CHAR(16) ,PRIMARY KEY (`PROJECT_DEFINITION`));'; $result = $mysqli->query($sqlstmt); var_dump($result); if($result) { if ($mysqli->field_count) $result->close(); } if ($mysqli->warning_count) { if ($result = $mysqli->query("SHOW WARNINGS", MYSQLI_USE_RESULT)) { while ($row = $result->fetch_row()) { printf("%s (%d): %s\n", $row[0], $row[1], $row[2]); } } $result->close(); } /* // prevent bug from happen $result = $mysqli->query('delete from PROJECT_DETAIL where 1=2'); if($result) { if ($mysqli->field_count) $result->close(); } if ($mysqli->warning_count) { if ($result = $mysqli->query("SHOW WARNINGS", MYSQLI_USE_RESULT)) { while ($row = $result->fetch_row()) { printf("%s (%d): %s\n", $row[0], $row[1], $row[2]); } } $result->close(); } // end of bug prevention */ $sqlstmt = "LOAD DATA LOCAL INFILE 'PROJECT_DEFINITION_STRU.CSV' replace INTO TABLE PROJECT_DETAIL FIELDS TERMINATED BY ';' IGNORE 0 LINES(`PROJECT_DEFINITION`,`DESCRIPTION`,`MASK_ID`,`RESPONSIBLE_NO`,`APPLICANT_NO`,`COMP_CODE`,`BUS_AREA`,`CONTROLLING_AREA`,`PROFIT_CTR`,`PROJECT_CURRENCY`,`PROJECT_CURRENCY_ISO`,`NETWORK_ASSIGNMENT`,`START`,`FINISH`,`PLANT`,`CALENDAR`,`PLAN_BASIC`,`PLAN_FCST`,`TIME_UNIT`,`TIME_UNIT_ISO`,`NETWORK_PROFILE`,`PROJECT_PROFILE`,`BUDGET_PROFILE`,`PROJECT_STOCK`,`OBJECTCLASS`,`STATISTICAL`,`TAXJURCODE`,`INT_PROFILE`,`WBS_SCHED_PROFILE`,`CSH_BDGT_PROFILE`,`PLAN_PROFILE`,`JOINT_VENTURE`,`RECOVERY_IND`,`EQUITY_TYPE`,`JV_OBJECT_TYPE`,`JV_JIB_CLASS`,`JV_JIB_SUB_CLASS_A`,`DELETION_FLAG`,`OBJECTCLASS_EXT`,`FUNC_AREA`,`FUNC_AREA_LONG`);"; $result = $mysqli->query($sqlstmt); // When running 5.3 $result is false and I got the following err msg if the table PROJECT_DETAIL already exists in create above //PHP Warning: mysqli::query(): (0/0): in /home/tooljn/dw/data/090217173424_chopsap01/projectDetails0/err53.php on line 61 // var_dump($result); if($result) { if ($mysqli->field_count) $result->close(); } if ($mysqli->warning_count) { if ($result = $mysqli->query("SHOW WARNINGS", MYSQLI_USE_RESULT)) { while ($row = $result->fetch_row()) { printf("%s (%d): %s\n", $row[0], $row[1], $row[2]);
#47503 [NEW]: apache start terminated
From: roland dot ziegler at bsgti dot ch Operating system: Fedora Linux 2.6.22.9-61.fc6 PHP version: 5.2.8 PHP Bug Type: Apache related Bug description: apache start terminated Description: Similar to Bug #17147 Installed Apache 1.3.41 and PHP 5.2.8 - after start i got this message: Syntax error on line 206 of /usr/local/apache_1.3.41/conf/httpd.conf: Cannot load /usr/local/apache_1.3.41/libexec/libphp5.so into server: /usr/local/apache_1.3.41/libexec/libphp5.so: undefined symbol: sapi_globals /usr/local/apache_1.3.41/bin/apachectl start: httpd could not be started -- Edit bug report at http://bugs.php.net/?id=47503&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47503&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47503&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47503&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=47503&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47503&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=47503&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=47503&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=47503&r=needscript Try newer version: http://bugs.php.net/fix.php?id=47503&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=47503&r=support Expected behavior: http://bugs.php.net/fix.php?id=47503&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=47503&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=47503&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=47503&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47503&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=47503&r=dst IIS Stability: http://bugs.php.net/fix.php?id=47503&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=47503&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=47503&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=47503&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=47503&r=mysqlcfg
#47502 [NEW]: xml_get_current_byte_index inside character data handler returns wrong offset
From: grodny at oneclick dot sk Operating system: Windows PHP version: 5.3CVS-2009-02-25 (snap) PHP Bug Type: XML related Bug description: xml_get_current_byte_index inside character data handler returns wrong offset Description: Byte index returned by xml_get_current_byte_index() call in character data handler, points to different locations of XML source, based on character data being parsed. If parsed string passed as second argument to handler starts with ASCII non-white space character, byte index is offset to location before parsed string. If parsed string starts with white space, or UTF-8 character, it points after parsed string. To keep consistency with other handlers, it should return offset to location after parsed string, in all cases. Reproduce code: --- $xml = 'before' .html_entity_decode('§', ENT_COMPAT, 'UTF-8') .'after afterbefore '; function cdata ($p, $cdata) { global $xml; $off = xml_get_current_byte_index($p); echo 'CDATA: "', htmlentities($cdata, ENT_COMPAT, 'UTF-8'), '"', PHP_EOL, 'AFTER-INDEX: "', htmlentities(substr($xml, $off), ENT_COMPAT, 'UTF-8'), '"', PHP_EOL; } $p = xml_parser_create('UTF-8'); xml_set_character_data_handler($p, 'cdata'); xml_parse($p, $xml, true); xml_parser_free($p); Expected result: CDATA: "before" AFTER-INDEX: "§after afterbefore " CDATA: "§after" AFTER-INDEX: " afterbefore " CDATA: " after" AFTER-INDEX: "before " CDATA: "before " AFTER-INDEX: "" Actual result: -- CDATA: "before" AFTER-INDEX: "before§after afterbefore " CDATA: "§after" AFTER-INDEX: " afterbefore " CDATA: " after" AFTER-INDEX: "before " CDATA: "before " AFTER-INDEX: "before " -- Edit bug report at http://bugs.php.net/?id=47502&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47502&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47502&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47502&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=47502&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47502&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=47502&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=47502&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=47502&r=needscript Try newer version: http://bugs.php.net/fix.php?id=47502&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=47502&r=support Expected behavior: http://bugs.php.net/fix.php?id=47502&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=47502&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=47502&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=47502&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47502&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=47502&r=dst IIS Stability: http://bugs.php.net/fix.php?id=47502&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=47502&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=47502&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=47502&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=47502&r=mysqlcfg
#47387 [Opn]: Load stmt result bool false
ID: 47387 User updated by: lars dot a dot johansson at se dot atlascopco dot com Reported By: lars dot a dot johansson at se dot atlascopco dot com Status: Open Bug Type: MySQLi related Operating System: Linux mandriva 2009 PHP Version: 5.3CVS-2009-02-14 (snap) New Comment: Hi, I can reproduce 'the bug' with attached ugly code. you can use the infile I supplied earlier. the problem seems a bit tricky. 1 $result = $mysqli->query('CREATE TABLE IF NOT EXISTS ...' 2 $result = $mysqli->query("SHOW WARNINGS", MYSQLI_USE_RESULT... this shows one warning: Note (1050): Table 'PROJECT_DETAIL' already exists 3 $result->close(); 4 Now when I run $result = $mysqli->query(LOAD DATA LOCAL INFILE ... then $result is false and I get the warning: //PHP Warning: mysqli::query(): (0/0): ... Note! this only happen in 5.3, in 5.2 $result is true. Look in the code for the snippet that prevent the 'bug'. Please let me know if there anything more I can do. #!/home/tooljn/PHP5.3/local/bin/php query($sqlstmt); var_dump($result); //if($result) $result->close(); if ($result = $mysqli->query("SELECT DATABASE()")) { $row = $result->fetch_row(); $result->close(); } var_dump($row); $sqlstmt = 'CREATE TABLE IF NOT EXISTS PROJECT_DETAIL (`PROJECT_DEFINITION` CHAR(24),`DESCRIPTION` CHAR(40),`MASK_ID` CHAR(24),`RESPONSIBLE_NO` DECIMAL(8,0),`APPLICANT_NO` DECIMAL(8,0),`COMP_CODE` CHAR(4),`BUS_AREA` CHAR(4),`CONTROLLING_AREA` CHAR(4),`PROFIT_CTR` CHAR(10),`PROJECT_CURRENCY` CHAR(5),`PROJECT_CURRENCY_ISO` CHAR(3),`NETWORK_ASSIGNMENT` DECIMAL(1,0),`START` DATE,`FINISH` DATE,`PLANT` CHAR(4),`CALENDAR` CHAR(2),`PLAN_BASIC` DECIMAL(1,0),`PLAN_FCST` DECIMAL(1,0),`TIME_UNIT` CHAR(3),`TIME_UNIT_ISO` CHAR(3),`NETWORK_PROFILE` CHAR(7),`PROJECT_PROFILE` CHAR(7),`BUDGET_PROFILE` CHAR(6),`PROJECT_STOCK` CHAR(1),`OBJECTCLASS` CHAR(2),`STATISTICAL` CHAR(1),`TAXJURCODE` CHAR(15),`INT_PROFILE` CHAR(7),`WBS_SCHED_PROFILE` CHAR(12),`CSH_BDGT_PROFILE` CHAR(6),`PLAN_PROFILE` CHAR(6),`JOINT_VENTURE` CHAR(6),`RECOVERY_IND` CHAR(2),`EQUITY_TYPE` CHAR(3),`JV_OBJECT_TYPE` CHAR(4),`JV_JIB_CLASS` CHAR(3),`JV_JIB_SUB_CLASS_A` CHAR(5),`DELETION_FLAG` CHAR(1),`OBJECTCLASS_EXT` CHAR(5),`FUNC_AREA` CHAR(4),`FUNC_AREA_LONG` CHAR(16) ,PRIMARY KEY (`PROJECT_DEFINITION`));'; $result = $mysqli->query($sqlstmt); var_dump($result); if($result) { if ($mysqli->field_count) $result->close(); } if ($mysqli->warning_count) { if ($result = $mysqli->query("SHOW WARNINGS", MYSQLI_USE_RESULT)) { while ($row = $result->fetch_row()) { printf("%s (%d): %s\n", $row[0], $row[1], $row[2]); } } $result->close(); } /* // prevent bug from happen $result = $mysqli->query('delete from PROJECT_DETAIL where 1=2'); if($result) { if ($mysqli->field_count) $result->close(); } if ($mysqli->warning_count) { if ($result = $mysqli->query("SHOW WARNINGS", MYSQLI_USE_RESULT)) { while ($row = $result->fetch_row()) { printf("%s (%d): %s\n", $row[0], $row[1], $row[2]); } } $result->close(); } // end of bug prevention */ $sqlstmt = "LOAD DATA LOCAL INFILE 'PROJECT_DEFINITION_STRU.CSV' replace INTO TABLE PROJECT_DETAIL FIELDS TERMINATED BY ';' IGNORE 0 LINES(`PROJECT_DEFINITION`,`DESCRIPTION`,`MASK_ID`,`RESPONSIBLE_NO`,`APPLICANT_NO`,`COMP_CODE`,`BUS_AREA`,`CONTROLLING_AREA`,`PROFIT_CTR`,`PROJECT_CURRENCY`,`PROJECT_CURRENCY_ISO`,`NETWORK_ASSIGNMENT`,`START`,`FINISH`,`PLANT`,`CALENDAR`,`PLAN_BASIC`,`PLAN_FCST`,`TIME_UNIT`,`TIME_UNIT_ISO`,`NETWORK_PROFILE`,`PROJECT_PROFILE`,`BUDGET_PROFILE`,`PROJECT_STOCK`,`OBJECTCLASS`,`STATISTICAL`,`TAXJURCODE`,`INT_PROFILE`,`WBS_SCHED_PROFILE`,`CSH_BDGT_PROFILE`,`PLAN_PROFILE`,`JOINT_VENTURE`,`RECOVERY_IND`,`EQUITY_TYPE`,`JV_OBJECT_TYPE`,`JV_JIB_CLASS`,`JV_JIB_SUB_CLASS_A`,`DELETION_FLAG`,`OBJECTCLASS_EXT`,`FUNC_AREA`,`FUNC_AREA_LONG`);"; $result = $mysqli->query($sqlstmt); // When running 5.3 $result is false and I got the following err msg if the table PROJECT_DETAIL already exists in create above //PHP Warning: mysqli::query(): (0/0): in /home/tooljn/dw/data/090217173424_chopsap01/projectDetails0/err53.php on line 61 // var_dump($result); if($result) { if ($mysqli->field_count) $result->close(); } if ($mysqli->warning_count) { if ($result = $mysqli->query("SHOW WARNINGS", MYSQLI_USE_RESULT)) { while ($row = $result->fetch_row()) { printf("%s (%d): %s\n", $row[0], $row[1], $row[2]); } } $result->close(); } } Previous Comments: [2009-02-24 08:35:59] lars dot a dot johansson at se dot atlascopco dot com Hi, how do I use/set 'feedback'? I have made my script a bit simpler. I can reproduce this without forking. What seems to trigger
#47501 [Fbk->Opn]: stripslashes() converts \0 into a null character
ID: 47501 User updated by: gazheyes at gmail dot com Reported By: gazheyes at gmail dot com -Status: Feedback +Status: Open Bug Type: Strings related Operating System: * PHP Version: 5.2.8 New Comment: Result:- string(2) "\0" string(1) " " Previous Comments: [2009-02-25 13:37:33] j...@php.net Try this script instead: [2009-02-25 11:15:51] gazheyes at gmail dot com Description: Stripslashes appears to be converting null escapes into a null character. I've tested other unicode characters from 0 to 100,000 and only null escapes are converted. IMO you shouldn't be able to decode null chars from a url like this. Marc Zimmerli originally found this bug. Reproduce code: --- the url contains page.php?x=\0 Expected result: 0 Actual result: -- null -- Edit this bug report at http://bugs.php.net/?id=47501&edit=1
#47324 [Fbk]: still not working after trying most versions
ID: 47324 Updated by: paj...@php.net Reported By: kmteoh at hotmail dot com Status: Feedback Bug Type: Zip Related Operating System: w2k PHP Version: 5.2.9RC1 Assigned To: pajoye New Comment: Other question, are you sure you are creating a fresh new archive and not opening an already corrupted archive? Try: if ($zip->open('test.zip', ZIPARCHIVE::CREATE) === TRUE)... (create a new one but does not overwrite an existing archive) or if ($zip->open('test.zip', ZIPARCHIVE::OVERWRITE) === TRUE).. Previous Comments: [2009-02-25 14:55:35] paj...@php.net please provide a link to the file you are adding. Also the windows files are in http://windows.php.net/snapshots/ [2009-02-09 04:53:19] kmteoh at hotmail dot com extension dir is definitely correct. the same script worked in cli but not browser (isapi). tried http://snaps.php.net/php5.2-latest.tar.gz still no luck. i ended up using system() with external rar.exe and unrar.exe to do the job which is perfect. though certain system setup will not allow system() or exec() due to permission settings, which is why i am keen to have my product coded with php internal lib rather than using external tools. [2009-02-06 08:30:21] paj...@php.net And be sure to actually use the correct extension dir. [2009-02-06 08:29:51] paj...@php.net Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ [2009-02-06 04:43:26] kmteoh at hotmail dot com Description: can't get the ziparchive to add files correctly. tried different version of php_zip.dll same thing happen, and it generates funny files. followed instructions in #46985, used php_zip.dll version 5.2.5.5, 5.2.8.8, 5.2.9.9 all not work. it only work in cli but not browser (isapi). it generates files like test.zip.b03252 and test.zip.a03252 for me instead of actual test.zip. i renamed to test.zip then tried to extract but crc error. Reproduce code: --- open('test.zip') === TRUE) { $zip->addFile('index.txt', 'newname.txt'); $zip->close(); echo 'ok'; } else { echo 'failed'; } ?> Expected result: should be able to open the test.zip with winzip or winrar easily Actual result: -- crc error. -- Edit this bug report at http://bugs.php.net/?id=47324&edit=1
#47324 [Asn->Fbk]: still not working after trying most versions
ID: 47324 Updated by: paj...@php.net Reported By: kmteoh at hotmail dot com -Status: Assigned +Status: Feedback Bug Type: Zip Related Operating System: w2k PHP Version: 5.2.9RC1 Assigned To: pajoye New Comment: please provide a link to the file you are adding. Also the windows files are in http://windows.php.net/snapshots/ Previous Comments: [2009-02-09 04:53:19] kmteoh at hotmail dot com extension dir is definitely correct. the same script worked in cli but not browser (isapi). tried http://snaps.php.net/php5.2-latest.tar.gz still no luck. i ended up using system() with external rar.exe and unrar.exe to do the job which is perfect. though certain system setup will not allow system() or exec() due to permission settings, which is why i am keen to have my product coded with php internal lib rather than using external tools. [2009-02-06 08:30:21] paj...@php.net And be sure to actually use the correct extension dir. [2009-02-06 08:29:51] paj...@php.net Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ [2009-02-06 04:43:26] kmteoh at hotmail dot com Description: can't get the ziparchive to add files correctly. tried different version of php_zip.dll same thing happen, and it generates funny files. followed instructions in #46985, used php_zip.dll version 5.2.5.5, 5.2.8.8, 5.2.9.9 all not work. it only work in cli but not browser (isapi). it generates files like test.zip.b03252 and test.zip.a03252 for me instead of actual test.zip. i renamed to test.zip then tried to extract but crc error. Reproduce code: --- open('test.zip') === TRUE) { $zip->addFile('index.txt', 'newname.txt'); $zip->close(); echo 'ok'; } else { echo 'failed'; } ?> Expected result: should be able to open the test.zip with winzip or winrar easily Actual result: -- crc error. -- Edit this bug report at http://bugs.php.net/?id=47324&edit=1
#47473 [Opn->Fbk]: set_error_handler() crashes the
ID: 47473 Updated by: paj...@php.net Reported By: typo3 at maltejansen dot de -Status: Open +Status: Feedback Bug Type: Reproducible crash Operating System: Windows Vista PHP Version: 5.3.0beta1 New Comment: I don't see why the max path lenght limit (which can affect other systems as well) is related to this backtrace. Can you try it using a threaded SAPI under linux or using fastcgi on windows please? Previous Comments: [2009-02-25 10:21:26] typo3 at maltejansen dot de No, on Linux it's running smoothly (with SAPI I don't know, but it should), because otherwise Robert or Karsten (Project-Leader) would already be in contact, what there a with other bugs. It's just on windows, they using mac/linux. It seems to be something like the length of a filename on windows with just 260 characters. The first time the crash occured, switching from alpha1 to alpha2. In alpha3 it seems to be solved, because we thought it was connected to this bug [1] and it was not crashing anymore. In beta1 it was there again. [1] http://bugs.php.net/bug.php?id=46241 [2009-02-25 10:06:18] paj...@php.net Do you mean that you can't reproduce this bug on Linux/Unix (and thread safe SAPI)? We still a self contained script to reproduce the problem. [2009-02-25 10:00:33] typo3 at maltejansen dot de It's just a problem on Windows Vista (and properbly on Windows XP): So I have made the backtrace of the apache. The just using the php.exe does not work right now. (There is somewhere a bug in the CLI-version of the FLOW3-controller) So this one will follow, tomorrow. But for now: PHP-Version: Wed Feb 25 09:04:13 2009 apache__PID__4956__Date__02_25_2009__Time_10_26_11AM__627__Second_Chance_Exception_C005.dmp Type of Analysis Performed Crash Analysis Machine Name ~...~ Operating System Windows Vista Service Pack 1 Number Of Processors 2 Process ID 4956 Process Image ~\workspaces\flow3\xampplite\apache\bin\apache.exe System Up-Time 1 day(s) 01:42:07 Process Up-Time 00:06:50 Thread 240 - System ID 5404 Entry point msvcr71!endthreadex+31 Create time 25.02.2009 10:19:23 Time spent in user mode 0 Days 0:0:2.59 Time spent in kernel mode 0 Days 0:0:8.954 Function Arg 1 Arg 2 Arg 3 Source php5ts!zend_hash_apply+37 08702778 01aa0070 03d68fc0 php5ts!zval_mark_grey+8c 08707b78 03d68fc0 769c9d32 php5ts!gc_mark_roots+95 03d68fc0 769c9d32 0792fa54 php5ts!gc_collect_cycles+64 03d68fc0 03d68fc0 0013 php5ts!zend_deactivate+12d PHP5TS!ZEND_HASH_APPLY+37In apache__PID__4956__Date__02_25_2009__Time_10_26_11AM__627__Second_Chance_Exception_C005.dmp the assembly instruction at php5ts!zend_hash_apply+37 in ~\workspaces\flow3\xampplite\apache\bin\php5ts.dll from The PHP Group has caused an access violation exception (0xC005) when trying to read from memory location 0x000d on thread 240 This is my first time with bug-backtrace. So, tell me, if there is something else to adjust, except from the manual. I have include php like this in the apache: LoadModule php5_module "~/workspaces/flow3/xampplite/apache/bin/php5apache2_2.dll" [2009-02-24 10:48:10] j...@php.net You can always try generating a backtrace of that crash yourself, instructions are here: http://bugs.php.net/bugs-generating-backtrace win32.php It's propably easier to accomplish with better tools like valgrind on any *nix system. Unless of course this happens only within win32 env. [2009-02-23 21:59:25] typo3 at maltejansen dot de I'm not so deep in the development of the FLOW3-package. I'm just developing an other package. The main part is developed on linux or mac. The constructor [1] is called twice and second time it seems to crash. But just calling it twice does not crash it. Is there a php-function, which shows the content, which was set via set_error_handler()? I have not found one... [1] http://forge.typo3.org/repositories/entry/package-flow3/trunk/Classes/Error/ErrorHandler.php 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/47473 -- Edit this bug report at http://bugs.php.net/?id=47473&edit=1
#44081 [Com]: Cannot execute queries while other unbuffered queries are active
ID: 44081 Comment by: stewart dot duncan at rocketmail dot com Reported By: abouzekry at gmail dot com Status: Open Bug Type: PDO related Operating System: Windows XP SP2 PHP Version: 5.2.5 New Comment: Really annoying this one. Reproduced on 5.2.8. Previous Comments: [2008-02-09 11:46:41] abouzekry at gmail dot com Description: the same code runs on php5.2.0 without any problems, while it's problematic with php5.2.5 i don't know why!, it insists on giving me the following message... 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 however i closed the cursor after each result fetch Reproduce code: --- if(isset($_POST['user_name'], $_POST['pass'])) { /* check wether the user exists or not */ $result = $db->query("CALL proc_check_user('{$_POST['user_name']}', '{$_POST['pass']}')") or die('0-1-Database-Query-Error-login.php:'.print_r($db->errorInfo())); $row = $result->fetchAll(PDO::FETCH_ASSOC) or die('0-2-Database-Fetch-Error-login.php:'.print_r($db->errorInfo())); /* close the DB cursor to be able to perform the other querie(s)*/ $result->closeCursor(); /* if the user doesn't exist exit prematurely! */ if($row['userExists'] == 0) { exit('0-2-Authentication-Error-login.php: User Doesnt Exist!'); } /* get the user_id and full_name */ $result = $db->query("CALL proc_get_user_data('{$_POST['user_name']}', '{$_POST['pass']}')") or die('0-3-Database-Query-Error-login.php:'.print_r($db->errorInfo())); $row = $result->fetch(PDO::FETCH_ASSOC); } Expected result: the machine with php5.2.0 installed when running the same code produces a correct authentication for valid users (POSTed) and error for invalid users. -- Edit this bug report at http://bugs.php.net/?id=44081&edit=1
#47494 [Opn->Bgs]: htmlspecialchars does not throw E_WARNING on multibyte problems
ID: 47494 Updated by: j...@php.net Reported By: philipp dot feigl at gmail dot com -Status: Open +Status: Bogus Bug Type: Strings related Operating System: CentOS5 PHP Version: 5.2.8 New Comment: It's intentional. If you disagree, please ask s...@php.net why it is like this (I once reverted that :) Previous Comments: [2009-02-24 13:57:32] philipp dot feigl at gmail dot com Description: When using htmlspecialchars with a invalid multibyte string and using UTF-8 as encoding, there are two possible outcomes based on the "display_errors" ini setting: 1. display_errors=1 => empty string is returned 2. display_errors=0 => E_WARNING is thrown This is exactly what the code states. Can be viewed in http://cvs.php.net/viewvc.cgi/php-src/ext/standard/html.c?view=markup on line 1147 However this is VERY confusing as a developer point of view. As I have display_errors always set to "1" for debugging purposes, I never realized, one of our locale strings was corrupt, as it was just emptied out. Now in the production environment, our error handler terminates the script because of the E_WARNING beeing thrown. While both of the ways (empty string / error) are acceptable for me - because ofcourse the input string is invalid, it is very confusing to have different behaviors of PHP based on the display_errors setting. Reproduce code: --- echo 'a' . htmlspecialchars(substr(utf8_encode('aü'), 0, 2), ENT_QUOTES, 'UTF-8') . 'b'; Expected result: Either 'ab' Or PHP E_WARNING However not both based on display_errors Actual result: -- display_errors=1 => 'ab' display_errors=0 => E_WARNING -- Edit this bug report at http://bugs.php.net/?id=47494&edit=1
#47501 [Opn->Fbk]: stripslashes() converts \0 into a null character
ID: 47501 Updated by: j...@php.net Reported By: gazheyes at gmail dot com -Status: Open +Status: Feedback Bug Type: Strings related Operating System: * PHP Version: 5.2.8 New Comment: Try this script instead: Previous Comments: [2009-02-25 11:15:51] gazheyes at gmail dot com Description: Stripslashes appears to be converting null escapes into a null character. I've tested other unicode characters from 0 to 100,000 and only null escapes are converted. IMO you shouldn't be able to decode null chars from a url like this. Marc Zimmerli originally found this bug. Reproduce code: --- the url contains page.php?x=\0 Expected result: 0 Actual result: -- null -- Edit this bug report at http://bugs.php.net/?id=47501&edit=1
#47471 [Opn->Tbd]: MySQLi, SP, loop count and the amount of result sets
ID: 47471 Updated by: johan...@php.net Reported By: pcdinh at gmail dot com -Status: Open +Status: To be documented Bug Type: MySQLi related Operating System: Windows XP SP3 PHP Version: 5.3.0beta1 New Comment: The interface is a bit weird, yes. mysqli_next_result() returns false in case the query is wrong. It will always return true in case the query was ok, independent from the number of fetched/available result sets. To check whether there are more result sets use mysqli_more_results() or check the return value of storing it. Previous Comments: [2009-02-22 10:14:11] pcdinh at gmail dot com Description: When executing a stored procedure that returns multiple result sets, MySQLi driver always does an additional loop after all the result set are returned. The last loop always returns a FALSE without any error, which indicates as if there is a query that does not return a result set in the SP. PHP Manual does not mention about the additional special loop. SP: CREATE PROCEDURE foo() BEGIN SELECT 'foo' FROM DUAL; SELECT 'bar', 'bar2' FROM DUAL; END $$ Reproduce code: --- real_query("CALL foo()")) { do { $loopCount++; if ($hasNext === null) { echo 'Loop begins before any check. The first result set is available. '."\n"; } else { echo "Check if there is any result set: ".(int)$hasNext." at loop ".$loopCount.". \n"; } $result = $mysqli->store_result(); if ($mysqli->errno > 0) { echo "Error: ".$mysqli->error." "; continue; } if (is_object($result)) { $rsCount++; // $result->free_result(); echo 'Result set at loop '.$loopCount.'.'."\n"; } else { // No result set returns echo 'No result set at loop '.$loopCount.'.'."\n"; } } while ($hasNext = $mysqli->next_result()); // mysqli_next_result always returns true if an error occured. } echo "Total loop: $loopCount; Total result sets: $rsCount;"; /* close connection */ $mysqli->close(); ?> Expected result: I created a stored procedure named foo() that is expected to return 2 result sets DELIMITER $$ DROP PROCEDURE IF EXISTS foo $$ CREATE PROCEDURE foo() BEGIN SELECT 'foo' FROM DUAL; SELECT 'bar', 'bar2' FROM DUAL; END $$ The PHP code should print out: Loop begins before any check. The first result set is available. Result set at loop 1. Check if there is any result set: 1 at loop 2. Result set at loop 2. Total loop: 2; Total result sets: 2; Actual result: -- The PHP code prints out: Loop begins before any check. The first result set is available. Result set at loop 1. Check if there is any result set: 1 at loop 2. Result set at loop 2. Check if there is any result set: 1 at loop 3. No result set at loop 3. Total loop: 3; Total result sets: 2; -- Edit this bug report at http://bugs.php.net/?id=47471&edit=1
#47487 [Asn]: [PATCH]php_stream_fill_read_buffer() performance degraded after fix of bug 44607
ID: 47487 Updated by: lbarn...@php.net Reported By: basant dot kukreja at gmail dot com Status: Assigned Bug Type: Streams related Operating System: Solaris 10 PHP Version: 5.2.9RC3 Assigned To: lbarnaud New Comment: Thanks. The following patch reverts the performance penalty introduced in the fix of #44607 : --- main/streams/streams.c 8 Jan 2009 19:21:25 - 1.82.2.6.2.33 +++ main/streams/streams.c 25 Feb 2009 12:09:01 - @@ -597,7 +597,7 @@ PHPAPI size_t _php_stream_read(php_strea if (!stream->readfilters.head && (stream->flags & PHP_STREAM_FLAG_NO_BUFFER || stream->chunk_size == 1)) { toread = stream->ops->read(stream, buf, size TSRMLS_CC); } else { - php_stream_fill_read_buffer(stream, size TSRMLS_CC); + php_stream_fill_read_buffer(stream, MIN(size, stream->chunk_size) TSRMLS_CC); toread = stream->writepos - stream->readpos; if (toread > size) { I will do more tests on this and commit after 5.2.9 is out. Previous Comments: [2009-02-24 20:18:37] basant dot kukreja at gmail dot com Here is the script : testinc.php : $ mkfile 60k /tmp/index $ ./sapi/cli/php /tmp/testinc.php Hello php_stream_fill_read_buffer :reallocating 8192 php_stream_fill_read_buffer :reallocating 16384 php_stream_fill_read_buffer :reallocating 24576 php_stream_fill_read_buffer :reallocating 32768 php_stream_fill_read_buffer :reallocating 40960 php_stream_fill_read_buffer :reallocating 49152 php_stream_fill_read_buffer :reallocating 57344 --- printfs are coming from my fprintf addition in php_stream_fill_read_buffer: fprintf(stderr, "php_stream_fill_read_buffer :reallocating %d\n", stream->readbuflen); --- [2009-02-24 17:10:34] lbarn...@php.net Do you mean that you experience this problem when including files ? I believe the parser/scanner reads by chunks of 8K. Can you please provide a reproduce script (with the large file) ? The fix for #44607 fixed php_stream_fill_read_buffer() so that it fills the buffer with "size" bytes, as it is expected to do, and as it was already doing on filtered streams. If you call fread() with a size of 60K, php_stream_fill_read_buffer() will return 60K. Before the fix, it returned 8K, and php_stream_read() had to call it again and to do memcpy()s too. [2009-02-24 15:39:10] johan...@php.net Arnaud, you fixed the other issue, can you please take a look at this regression. Thanks. [2009-02-24 09:10:00] basant dot kukreja at gmail dot com Sorry, file name was missing from the patch : --- a/php-5.2.9RC3/main/streams/streams.c Sun Feb 22 19:57:30 2009 -0800 +++ b/php-5.2.9RC3/main/streams/streams.c Tue Feb 24 00:50:21 2009 -0800 @@ -1251,6 +1253,11 @@ * 2K). */ if (php_stream_stat(src, &ssbuf) == 0 && ssbuf.sb.st_size > 0) { max_len = ssbuf.sb.st_size + step; + if (max_len > src->readbuflen) { + src->readbuflen = max_len; + src->readbuf = perealloc(src->readbuf, src->readbuflen, + src->is_persistent); + } } else { max_len = step; } [2009-02-24 08:59:45] basant dot kukreja at gmail dot com There might be several possible way to fix it. Here is one alternative which requires more memory but avoid includes : @@ -1251,6 +1253,11 @@ * 2K). */ if (php_stream_stat(src, &ssbuf) == 0 && ssbuf.sb.st_size > 0) { max_len = ssbuf.sb.st_size + step; + if (max_len > src->readbuflen) { + src->readbuflen = max_len; + src->readbuf = perealloc(src->readbuf, src->readbuflen, + src->is_persistent); + } } else { max_len = step; } The above patch though have single alloc but still require large memory allocation. Before this patch too, large memory is allocated but by several folds. Before PR http://bugs.php.net/bug.php?id=44607 was fixed, php only required 8KB memory at a time and no reallocs happened. The remainder of the comments for this report are too long. To view the rest of the comments, pleas
#47495 [Opn->Fbk]: headers_list returns an empty array
ID: 47495 Updated by: theta...@php.net Reported By: leha at inkin dot ru -Status: Open +Status: Feedback Bug Type: iPlanet related Operating System: Linux 2.6.26 PHP Version: 5.2.8 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.3-latest.tar.gz For Windows: http://windows.php.net/snapshots/ As headers_list was a addition to PHP 5, not all SAPIs were aware of this and can handle it correctly. The PHP SAPI layer has two possibilities, to handle the headers: - a callback that sets the header (NSAPI and other SAPIs use this, parse the header and set it in the webserver internal hashtable), SAPI will forget about the header after that. - the headers are sent, when the response is committed, SAPI collects all headers in a SAPI-internal list. The first solution had the problem, that the SAPIs manage the complete header addition and the PHP SAPI layer does not know anything about previously set headers (because the list of headers is not replicated). Calls to nsapi_response_headers (you should use this function, as apache_response_headers is only available in NSAPI for compatibility) retrieve the headers directly from the underlying webserver (you will also see headers, like "Connection" or other Keep-alive-headers, that were not set by PHP). In NSAPI (and other SAPIs) headers_list() does not return anything, because the PHP-internal header list is always empty (because headers are managed by webserver only). In PHP 5.3 a new SAPI callback that is also able to remove headers was implemented. This new SAPI-layer always caches the header list additionally to the webserver, so header_list will return the PHP-set headers here (but no lower-level headers by the webserver). This bug will not be fixed in 5.2, can you please try PHP 5.3 snapshot and report if it works correctly there? Previous Comments: [2009-02-24 15:06:17] leha at inkin dot ru The whole php.ini: [PHP] magic_quotes_gpc = off include_path = ".:/usr:/usr/share/php" upload_max_filesize = 10M [2009-02-24 15:02:15] leha at inkin dot ru Description: headers_list() returns an empty array. Though apache_response_headers() works fine. Using Sun Java System Web Server 7.0 Update 3 + PHP 5.2.8. The same problem is with older SJSWS 7.0 U1 + PHP 5.2.1. ./configure --with-nsapi=/opt/webserver7u3 --with-openssl=/usr --with- enable-dbase --enable-exif --enable-ftp --with-gd --with-ttf --with-t1lib=/usr --with- enable-mbstring --with-libmbfl --with-mcrypt --with-mhash --with-ming --with- with-libxml-dir --with-freetype-dir --with-xsl Reproduce code: --- Expected result: array(4) { [0]=> string(23) "X-Powered-By: PHP/5.2.8" [1]=> string(23) "Content-type: text/html" } Actual result: -- array(0) { } -- Edit this bug report at http://bugs.php.net/?id=47495&edit=1
#47501 [NEW]: Stripslashes function is converting \0 into a null character
From: gazheyes at gmail dot com Operating system: All PHP version: 5.2.8 PHP Bug Type: Strings related Bug description: Stripslashes function is converting \0 into a null character Description: Stripslashes appears to be converting null escapes into a null character. I've tested other unicode characters from 0 to 100,000 and only null escapes are converted. IMO you shouldn't be able to decode null chars from a url like this. Marc Zimmerli originally found this bug. Reproduce code: --- the url contains page.php?x=\0 Expected result: 0 Actual result: -- null -- Edit bug report at http://bugs.php.net/?id=47501&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47501&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47501&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47501&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=47501&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47501&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=47501&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=47501&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=47501&r=needscript Try newer version: http://bugs.php.net/fix.php?id=47501&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=47501&r=support Expected behavior: http://bugs.php.net/fix.php?id=47501&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=47501&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=47501&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=47501&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47501&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=47501&r=dst IIS Stability: http://bugs.php.net/fix.php?id=47501&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=47501&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=47501&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=47501&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=47501&r=mysqlcfg
#47473 [Fbk->Opn]: set_error_handler() crashes the
ID: 47473 User updated by: typo3 at maltejansen dot de Reported By: typo3 at maltejansen dot de -Status: Feedback +Status: Open Bug Type: Reproducible crash Operating System: Windows Vista PHP Version: 5.3.0beta1 New Comment: No, on Linux it's running smoothly (with SAPI I don't know, but it should), because otherwise Robert or Karsten (Project-Leader) would already be in contact, what there a with other bugs. It's just on windows, they using mac/linux. It seems to be something like the length of a filename on windows with just 260 characters. The first time the crash occured, switching from alpha1 to alpha2. In alpha3 it seems to be solved, because we thought it was connected to this bug [1] and it was not crashing anymore. In beta1 it was there again. [1] http://bugs.php.net/bug.php?id=46241 Previous Comments: [2009-02-25 10:06:18] paj...@php.net Do you mean that you can't reproduce this bug on Linux/Unix (and thread safe SAPI)? We still a self contained script to reproduce the problem. [2009-02-25 10:00:33] typo3 at maltejansen dot de It's just a problem on Windows Vista (and properbly on Windows XP): So I have made the backtrace of the apache. The just using the php.exe does not work right now. (There is somewhere a bug in the CLI-version of the FLOW3-controller) So this one will follow, tomorrow. But for now: PHP-Version: Wed Feb 25 09:04:13 2009 apache__PID__4956__Date__02_25_2009__Time_10_26_11AM__627__Second_Chance_Exception_C005.dmp Type of Analysis Performed Crash Analysis Machine Name ~...~ Operating System Windows Vista Service Pack 1 Number Of Processors 2 Process ID 4956 Process Image ~\workspaces\flow3\xampplite\apache\bin\apache.exe System Up-Time 1 day(s) 01:42:07 Process Up-Time 00:06:50 Thread 240 - System ID 5404 Entry point msvcr71!endthreadex+31 Create time 25.02.2009 10:19:23 Time spent in user mode 0 Days 0:0:2.59 Time spent in kernel mode 0 Days 0:0:8.954 Function Arg 1 Arg 2 Arg 3 Source php5ts!zend_hash_apply+37 08702778 01aa0070 03d68fc0 php5ts!zval_mark_grey+8c 08707b78 03d68fc0 769c9d32 php5ts!gc_mark_roots+95 03d68fc0 769c9d32 0792fa54 php5ts!gc_collect_cycles+64 03d68fc0 03d68fc0 0013 php5ts!zend_deactivate+12d PHP5TS!ZEND_HASH_APPLY+37In apache__PID__4956__Date__02_25_2009__Time_10_26_11AM__627__Second_Chance_Exception_C005.dmp the assembly instruction at php5ts!zend_hash_apply+37 in ~\workspaces\flow3\xampplite\apache\bin\php5ts.dll from The PHP Group has caused an access violation exception (0xC005) when trying to read from memory location 0x000d on thread 240 This is my first time with bug-backtrace. So, tell me, if there is something else to adjust, except from the manual. I have include php like this in the apache: LoadModule php5_module "~/workspaces/flow3/xampplite/apache/bin/php5apache2_2.dll" [2009-02-24 10:48:10] j...@php.net You can always try generating a backtrace of that crash yourself, instructions are here: http://bugs.php.net/bugs-generating-backtrace win32.php It's propably easier to accomplish with better tools like valgrind on any *nix system. Unless of course this happens only within win32 env. [2009-02-23 21:59:25] typo3 at maltejansen dot de I'm not so deep in the development of the FLOW3-package. I'm just developing an other package. The main part is developed on linux or mac. The constructor [1] is called twice and second time it seems to crash. But just calling it twice does not crash it. Is there a php-function, which shows the content, which was set via set_error_handler()? I have not found one... [1] http://forge.typo3.org/repositories/entry/package-flow3/trunk/Classes/Error/ErrorHandler.php [2009-02-23 15:41:19] paj...@php.net Please provide a small (or the smallest possible script) script to reproduce your problem. Do not take it too badly but I do not have the time to fetch and install Flow3 (or any dependency). We really need a self contained script to be able to efficiently fix this bug. It is easy to crash an app but not to create a small script, and as you know this app better than us... :) By the way, the SSL certificate for this URL is not valid. 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/47473 -- Edit this bug report at
#47473 [Opn->Fbk]: set_error_handler() crashes the
ID: 47473 Updated by: paj...@php.net Reported By: typo3 at maltejansen dot de -Status: Open +Status: Feedback Bug Type: Reproducible crash Operating System: Windows Vista PHP Version: 5.3.0beta1 New Comment: Do you mean that you can't reproduce this bug on Linux/Unix (and thread safe SAPI)? We still a self contained script to reproduce the problem. Previous Comments: [2009-02-25 10:00:33] typo3 at maltejansen dot de It's just a problem on Windows Vista (and properbly on Windows XP): So I have made the backtrace of the apache. The just using the php.exe does not work right now. (There is somewhere a bug in the CLI-version of the FLOW3-controller) So this one will follow, tomorrow. But for now: PHP-Version: Wed Feb 25 09:04:13 2009 apache__PID__4956__Date__02_25_2009__Time_10_26_11AM__627__Second_Chance_Exception_C005.dmp Type of Analysis Performed Crash Analysis Machine Name ~...~ Operating System Windows Vista Service Pack 1 Number Of Processors 2 Process ID 4956 Process Image ~\workspaces\flow3\xampplite\apache\bin\apache.exe System Up-Time 1 day(s) 01:42:07 Process Up-Time 00:06:50 Thread 240 - System ID 5404 Entry point msvcr71!endthreadex+31 Create time 25.02.2009 10:19:23 Time spent in user mode 0 Days 0:0:2.59 Time spent in kernel mode 0 Days 0:0:8.954 Function Arg 1 Arg 2 Arg 3 Source php5ts!zend_hash_apply+37 08702778 01aa0070 03d68fc0 php5ts!zval_mark_grey+8c 08707b78 03d68fc0 769c9d32 php5ts!gc_mark_roots+95 03d68fc0 769c9d32 0792fa54 php5ts!gc_collect_cycles+64 03d68fc0 03d68fc0 0013 php5ts!zend_deactivate+12d PHP5TS!ZEND_HASH_APPLY+37In apache__PID__4956__Date__02_25_2009__Time_10_26_11AM__627__Second_Chance_Exception_C005.dmp the assembly instruction at php5ts!zend_hash_apply+37 in ~\workspaces\flow3\xampplite\apache\bin\php5ts.dll from The PHP Group has caused an access violation exception (0xC005) when trying to read from memory location 0x000d on thread 240 This is my first time with bug-backtrace. So, tell me, if there is something else to adjust, except from the manual. I have include php like this in the apache: LoadModule php5_module "~/workspaces/flow3/xampplite/apache/bin/php5apache2_2.dll" [2009-02-24 10:48:10] j...@php.net You can always try generating a backtrace of that crash yourself, instructions are here: http://bugs.php.net/bugs-generating-backtrace win32.php It's propably easier to accomplish with better tools like valgrind on any *nix system. Unless of course this happens only within win32 env. [2009-02-23 21:59:25] typo3 at maltejansen dot de I'm not so deep in the development of the FLOW3-package. I'm just developing an other package. The main part is developed on linux or mac. The constructor [1] is called twice and second time it seems to crash. But just calling it twice does not crash it. Is there a php-function, which shows the content, which was set via set_error_handler()? I have not found one... [1] http://forge.typo3.org/repositories/entry/package-flow3/trunk/Classes/Error/ErrorHandler.php [2009-02-23 15:41:19] paj...@php.net Please provide a small (or the smallest possible script) script to reproduce your problem. Do not take it too badly but I do not have the time to fetch and install Flow3 (or any dependency). We really need a self contained script to be able to efficiently fix this bug. It is easy to crash an app but not to create a small script, and as you know this app better than us... :) By the way, the SSL certificate for this URL is not valid. [2009-02-23 15:31:00] typo3 at maltejansen dot de Here you can download the source: https://svn.typo3.org/FLOW3/Distribution/trunk/ Just the set your server to the "Public"-Directory. And call e.g. http://localhost/ (you should see the welcome screen) Than call http://localhost/Testing/ (should crash!!!) The origin of the crash is located in in the constructor of Packages/Global/FLOW3/Classes/Error/ErrorHandler.php. http://localhost/Testing/ -> Packages/Global/Testing/Classes/Controller/DefaultController.php 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/47473 -- Edit this bug report at http://bugs.php.net/?id=47473&edit=1
#47473 [Fbk->Opn]: set_error_handler() crashes the
ID: 47473 User updated by: typo3 at maltejansen dot de Reported By: typo3 at maltejansen dot de -Status: Feedback +Status: Open Bug Type: Reproducible crash Operating System: Windows Vista PHP Version: 5.3.0beta1 New Comment: It's just a problem on Windows Vista (and properbly on Windows XP): So I have made the backtrace of the apache. The just using the php.exe does not work right now. (There is somewhere a bug in the CLI-version of the FLOW3-controller) So this one will follow, tomorrow. But for now: PHP-Version: Wed Feb 25 09:04:13 2009 apache__PID__4956__Date__02_25_2009__Time_10_26_11AM__627__Second_Chance_Exception_C005.dmp Type of Analysis Performed Crash Analysis Machine Name ~...~ Operating System Windows Vista Service Pack 1 Number Of Processors 2 Process ID 4956 Process Image ~\workspaces\flow3\xampplite\apache\bin\apache.exe System Up-Time 1 day(s) 01:42:07 Process Up-Time 00:06:50 Thread 240 - System ID 5404 Entry point msvcr71!endthreadex+31 Create time 25.02.2009 10:19:23 Time spent in user mode 0 Days 0:0:2.59 Time spent in kernel mode 0 Days 0:0:8.954 Function Arg 1 Arg 2 Arg 3 Source php5ts!zend_hash_apply+37 08702778 01aa0070 03d68fc0 php5ts!zval_mark_grey+8c 08707b78 03d68fc0 769c9d32 php5ts!gc_mark_roots+95 03d68fc0 769c9d32 0792fa54 php5ts!gc_collect_cycles+64 03d68fc0 03d68fc0 0013 php5ts!zend_deactivate+12d PHP5TS!ZEND_HASH_APPLY+37In apache__PID__4956__Date__02_25_2009__Time_10_26_11AM__627__Second_Chance_Exception_C005.dmp the assembly instruction at php5ts!zend_hash_apply+37 in ~\workspaces\flow3\xampplite\apache\bin\php5ts.dll from The PHP Group has caused an access violation exception (0xC005) when trying to read from memory location 0x000d on thread 240 This is my first time with bug-backtrace. So, tell me, if there is something else to adjust, except from the manual. I have include php like this in the apache: LoadModule php5_module "~/workspaces/flow3/xampplite/apache/bin/php5apache2_2.dll" Previous Comments: [2009-02-24 10:48:10] j...@php.net You can always try generating a backtrace of that crash yourself, instructions are here: http://bugs.php.net/bugs-generating-backtrace win32.php It's propably easier to accomplish with better tools like valgrind on any *nix system. Unless of course this happens only within win32 env. [2009-02-23 21:59:25] typo3 at maltejansen dot de I'm not so deep in the development of the FLOW3-package. I'm just developing an other package. The main part is developed on linux or mac. The constructor [1] is called twice and second time it seems to crash. But just calling it twice does not crash it. Is there a php-function, which shows the content, which was set via set_error_handler()? I have not found one... [1] http://forge.typo3.org/repositories/entry/package-flow3/trunk/Classes/Error/ErrorHandler.php [2009-02-23 15:41:19] paj...@php.net Please provide a small (or the smallest possible script) script to reproduce your problem. Do not take it too badly but I do not have the time to fetch and install Flow3 (or any dependency). We really need a self contained script to be able to efficiently fix this bug. It is easy to crash an app but not to create a small script, and as you know this app better than us... :) By the way, the SSL certificate for this URL is not valid. [2009-02-23 15:31:00] typo3 at maltejansen dot de Here you can download the source: https://svn.typo3.org/FLOW3/Distribution/trunk/ Just the set your server to the "Public"-Directory. And call e.g. http://localhost/ (you should see the welcome screen) Than call http://localhost/Testing/ (should crash!!!) The origin of the crash is located in in the constructor of Packages/Global/FLOW3/Classes/Error/ErrorHandler.php. http://localhost/Testing/ -> Packages/Global/Testing/Classes/Controller/DefaultController.php [2009-02-23 09:30:18] paj...@php.net \php53vc6ts>php ..\php53snapvc9\47473.php Warning: set_error_handler() expects the argument (ErrorHandler::handleError) to be a valid callback in C:\Users\pierre\Documents\test\php53snapvc9\47473.php on line 4 I suppose it happens in typo3 under certain conditions and not simply with the code you gave here. Please provide a full script to reproduce the crash. The remainder of the comments for this report are too long. To view the rest of the
#47491 [Fbk->Bgs]: Crash when executing a PDO/MYSQL query
ID: 47491 Updated by: paj...@php.net Reported By: pascal dot fellerich at ses-engineering dot com -Status: Feedback +Status: Bogus Bug Type: Reproducible crash Operating System: Win XP Pro SP3 PHP Version: 5.2.8 New Comment: Not a php bug, using the right DLL fixed the problem. Previous Comments: [2009-02-24 13:40:42] paj...@php.net Be sure to: - Have the PHP directory first in your PATH (c:\php) so the php's libmysql.dll is used - restart your web server I'm almost 100% sure that it is the reason of the crash (like dozen of other bug reports about the similar problem). [2009-02-24 13:37:56] pascal dot fellerich at ses-engineering dot com One line of code was missing $sql = "SELECT * FROM users"; --- yes, with MySQL 5.1. But the crash also happens when I revert to MySQL 5.0.67 [2009-02-24 13:32:50] paj...@php.net And you use mysql 5.1 right? [2009-02-24 13:30:03] pascal dot fellerich at ses-engineering dot com Description: PHP crashes when executing a query using PDO/Mysql. PHP is running as an Apache 2.0 handler. In the Apache error log, this line appears: [notice] Parent: child process exited with status 3221225477 -- Restarting. Sometimes, even the new PDO() call crashes already, but to reproduce the bug easily, just do a SELECT * FROM mysql.user - voila. Set up: XAMPP 1.7.0 with Apache 2.2.11, PHP 5.2.8, MySQL 5.1.30. The same crash could be reproduced in a 'bastardized' XAMPP setup with MySQL 5.0.67. Conversely, the setup Apache 2.2.11, PHP 5.2.6, MySQL 5.1.30 was OK. No crashes here. Reproduce code: --- $pdo = new PDO("mysql:host=localhost; dbname=mysql", 'root', $mypassword); $pdo->exec("SET NAMES 'utf8'"); $result = $pdo->query($sql, PDO::FETCH_NUM); //...bye bye! Expected result: Obvious. Actual result: -- Apache Error Log: [notice] Parent: child process exited with status 3221225477 -- Restarting. Nothing more available. -- Edit this bug report at http://bugs.php.net/?id=47491&edit=1