#45066 [Fbk-Opn]: Cannot compile a working php with mysql and mysqli
ID: 45066 User updated by: dirk at bean-it dot nl Reported By: dirk at bean-it dot nl -Status: Feedback +Status: Open Bug Type: MySQL related Operating System: Debian 4.0 / x86_64 PHP Version: 5.2.6 New Comment: OK, here is the full valgrind output, minus the php output, to shorten things a little. Cheers, Dirk ==29926== Memcheck, a memory error detector. ==29926== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et al. ==29926== Using LibVEX rev 1658, a library for dynamic binary translation. ==29926== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP. ==29926== Using valgrind-3.2.1-Debian, a dynamic binary instrumentation framework. ==29926== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al. ==29926== For more details, rerun with: -v ==29926== ==29926== Conditional jump or move depends on uninitialised value(s) ==29926==at 0x4010AB3: (within /lib/ld-2.3.6.so) ==29926==by 0x4006CB6: (within /lib/ld-2.3.6.so) ==29926==by 0x572D230: (within /lib/libc-2.3.6.so) ==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so) ==29926==by 0x572CCC7: _dl_open (in /lib/libc-2.3.6.so) ==29926==by 0x572F467: (within /lib/libc-2.3.6.so) ==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so) ==29926==by 0x572F4B1: __libc_dlopen_mode (in /lib/libc-2.3.6.so) ==29926==by 0x570A426: __nss_lookup_function (in /lib/libc-2.3.6.so) ==29926==by 0x570A4D4: (within /lib/libc-2.3.6.so) ==29926==by 0x5710E82: getservbyname_r (in /lib/libc-2.3.6.so) ==29926==by 0x5710C43: getservbyname (in /lib/libc-2.3.6.so) ==29926== ==29926== Conditional jump or move depends on uninitialised value(s) ==29926==at 0x4010AC2: (within /lib/ld-2.3.6.so) ==29926==by 0x4006CB6: (within /lib/ld-2.3.6.so) ==29926==by 0x572D230: (within /lib/libc-2.3.6.so) ==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so) ==29926==by 0x572CCC7: _dl_open (in /lib/libc-2.3.6.so) ==29926==by 0x572F467: (within /lib/libc-2.3.6.so) ==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so) ==29926==by 0x572F4B1: __libc_dlopen_mode (in /lib/libc-2.3.6.so) ==29926==by 0x570A426: __nss_lookup_function (in /lib/libc-2.3.6.so) ==29926==by 0x570A4D4: (within /lib/libc-2.3.6.so) ==29926==by 0x5710E82: getservbyname_r (in /lib/libc-2.3.6.so) ==29926==by 0x5710C43: getservbyname (in /lib/libc-2.3.6.so) ==29926== ==29926== Conditional jump or move depends on uninitialised value(s) ==29926==at 0x4010AD1: (within /lib/ld-2.3.6.so) ==29926==by 0x4006CB6: (within /lib/ld-2.3.6.so) ==29926==by 0x572D230: (within /lib/libc-2.3.6.so) ==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so) ==29926==by 0x572CCC7: _dl_open (in /lib/libc-2.3.6.so) ==29926==by 0x572F467: (within /lib/libc-2.3.6.so) ==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so) ==29926==by 0x572F4B1: __libc_dlopen_mode (in /lib/libc-2.3.6.so) ==29926==by 0x570A426: __nss_lookup_function (in /lib/libc-2.3.6.so) ==29926==by 0x570A4D4: (within /lib/libc-2.3.6.so) ==29926==by 0x5710E82: getservbyname_r (in /lib/libc-2.3.6.so) ==29926==by 0x5710C43: getservbyname (in /lib/libc-2.3.6.so) ==29926== ==29926== Conditional jump or move depends on uninitialised value(s) ==29926==at 0x4010C47: (within /lib/ld-2.3.6.so) ==29926==by 0x4006E47: (within /lib/ld-2.3.6.so) ==29926==by 0x572D230: (within /lib/libc-2.3.6.so) ==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so) ==29926==by 0x572CCC7: _dl_open (in /lib/libc-2.3.6.so) ==29926==by 0x572F467: (within /lib/libc-2.3.6.so) ==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so) ==29926==by 0x572F4B1: __libc_dlopen_mode (in /lib/libc-2.3.6.so) ==29926==by 0x570A426: __nss_lookup_function (in /lib/libc-2.3.6.so) ==29926==by 0x570A4D4: (within /lib/libc-2.3.6.so) ==29926==by 0x5710E82: getservbyname_r (in /lib/libc-2.3.6.so) ==29926==by 0x5710C43: getservbyname (in /lib/libc-2.3.6.so) ==29926== ==29926== Conditional jump or move depends on uninitialised value(s) ==29926==at 0x4010C47: (within /lib/ld-2.3.6.so) ==29926==by 0x400B8A2: (within /lib/ld-2.3.6.so) ==29926==by 0x400733A: (within /lib/ld-2.3.6.so) ==29926==by 0x572D230: (within /lib/libc-2.3.6.so) ==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so) ==29926==by 0x572CCC7: _dl_open (in /lib/libc-2.3.6.so) ==29926==by 0x572F467: (within /lib/libc-2.3.6.so) ==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so) ==29926==by 0x572F4B1: __libc_dlopen_mode (in /lib/libc-2.3.6.so) ==29926==by 0x570A426: __nss_lookup_function (in /lib/libc-2.3.6.so) ==29926==by 0x570A4D4: (within /lib/libc-2.3.6.so) ==29926==by 0x5710E82: getservbyname_r (in /lib/libc-2.3.6.so) ==29926== ==29926== Conditional jump or move depends on uninitialised value(s) ==29926==at 0x4010C47: (within /lib/ld-2.3.6.so) ==29926==by 0x400B8A2: (within /lib/ld-2.3.6.so) ==29926==by 0x572CF2B:
#45526 [NEW]: in_array returns wrong position if an int 0 is in the array
From: clemens dot schwaighofer at tequila dot jp Operating system: Linux PHP version: 5.2.6 PHP Bug Type: Arrays related Bug description: in_array returns wrong position if an int 0 is in the array Description: if the haystack array has an int 0 in the array and the needle does not exists, true is returned. This is only the case in none strict setting, but it is still a bug. Please do not close this as bogus and refer to the documentation and the strict flag. The flag works as can be seen with the string 0 in the search part. But it is wrong to return true if complete different character (char f) is searched and it returns true for int 0 Reproduce code: --- $char = array('a', 'f', '0'); $array_search_data = array ('a', 'b', 'c', 0, '0'); print Valid: .print_r($array_search_data, 1).br; print br; foreach ($char as $_char) { print I[$_char] (false): in array: .in_array($_char, $array_search_data). | array search: .array_search($_char, $array_search_data).br; print I[$_char] (true): in array: .in_array($_char, $array_search_data, true). | array search: .array_search($_char, $array_search_data, true).br; print br; } Expected result: in_array should return false for the search of 'f' and not true or the position of int 0 in the array. Actual result: -- in_array (and also array_search) return true (or the position of int 0 if a needle cannot be found in the array. -- Edit bug report at http://bugs.php.net/?id=45526edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45526r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45526r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45526r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45526r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45526r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45526r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=45526r=needscript Try newer version:http://bugs.php.net/fix.php?id=45526r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45526r=support Expected behavior:http://bugs.php.net/fix.php?id=45526r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45526r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45526r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45526r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45526r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45526r=dst IIS Stability:http://bugs.php.net/fix.php?id=45526r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45526r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45526r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45526r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=45526r=mysqlcfg
#45525 [Opn-Asn]: Object Closure as
ID: 45525 Updated by: [EMAIL PROTECTED] Reported By: david at grudl dot com -Status: Open +Status: Assigned -Bug Type: Feature/Change Request +Bug Type: Scripting Engine problem Operating System: windows xp PHP Version: 5.3CVS-2008-07-16 (snap) -Assigned To: +Assigned To: dmitry New Comment: Dmitry, could you have a look please? Previous Comments: [2008-07-16 05:25:38] david at grudl dot com Description: Lambda functions and closures are AWESOME! But they are not still supported as ob_start() argument. Reproduce code: --- function redirect($file) { $handle = fopen($file, 'w'); ob_start(function($buffer) use ($handle) { fwrite($handle, $buffer); }); } redirect('output.html'); echo 'Hello World!'; Expected result: Should work Actual result: -- Fatal error: ob_start(): No method name given: use ob_start(array($object,'method')) to specify instance $object and the name of a method of class Closure to use as output buffer. -- Edit this bug report at http://bugs.php.net/?id=45525edit=1
#44991 [Com]: Compile Failure With freetds0.82
ID: 44991 Comment by: matthias at dsx dot at Reported By: scourgen at gmail dot com Status: Open Bug Type: MSSQL related Operating System: Centos5.1(k2.6.18) PHP Version: 5.2.6 New Comment: same on gentoo linux... http://bugs.gentoo.org/show_bug.cgi?id=223891 (freetds bug) Previous Comments: [2008-06-12 00:19:27] jklowden at freetds dot org This diff is what you want. --jkl --- config.m4-new 2008-06-11 20:13:47.0 -0400 +++ config.m4 2007-07-03 13:25:34.0 -0400 @@ -10,11 +10,11 @@ if test $PHP_MSSQL = yes; then for i in /usr/local /usr; do - if test -f $i/include/sybdb.h; then + if test -f $i/include/tds.h; then FREETDS_INSTALLATION_DIR=$i FREETDS_INCLUDE_DIR=$i/include break - elif test -f $i/include/freetds/sybdb.h; then + elif test -f $i/include/freetds/tds.h; then FREETDS_INSTALLATION_DIR=$i FREETDS_INCLUDE_DIR=$i/include/freetds break @@ -27,10 +27,10 @@ elif test $PHP_MSSQL != no; then -if test -f $PHP_MSSQL/include/sybdb.h; then +if test -f $PHP_MSSQL/include/tds.h; then FREETDS_INSTALLATION_DIR=$PHP_MSSQL FREETDS_INCLUDE_DIR=$PHP_MSSQL/include -elif test -f $PHP_MSSQL/include/freetds/sybdb.h; then +elif test -f $PHP_MSSQL/include/freetds/tds.h; then FREETDS_INSTALLATION_DIR=$PHP_MSSQL FREETDS_INCLUDE_DIR=$PHP_MSSQL/include/freetds else @@ -38,8 +38,8 @@ fi fi - if test ! -r $FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libsybdb.a test ! -r $FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libsybdb.so; then - AC_MSG_ERROR(Could not find $FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libsybdb.[a|so]) + if test ! -r $FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libtds.a test ! -r $FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libtds.so; then + AC_MSG_ERROR(Could not find $FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libtds.[a|so]) fi PHP_ADD_INCLUDE($FREETDS_INCLUDE_DIR) [2008-05-29 20:09:21] brodie at mcw dot edu I have the same issue-- note, this problem is due to that the freetds environment NO LONGER PROVIDES tds.h, or libtds.so. This is a total re-design of freetds, and as such, completely breaks the ability of php to use the -with-mssql option. The re-design of FreeTDS as outlined above was as of version 0.82. As documented, the --with-mssql=[freetds dir] will fail, and will complain that the directory is not a freeTDS directory. [2008-05-14 05:08:27] scourgen at gmail dot com Description: compile failure with freetds version 0.82(no tds.h,libtds.so) Reproduce code: --- configure: ./configure --with-mssql=/usr/local/freetds Expected result: configure: error: Directory /usr/local/freetds is not a FreeTDS installation directory Actual result: -- there is no tds.h,libtds.so in freetds install directory(just in freetds version 0.82) -- Edit this bug report at http://bugs.php.net/?id=44991edit=1
#45527 [NEW]: whitespaces in resultset of empty varchars/text
From: technischersupport at googlemail dot de Operating system: Windows XP PHP version: 5.2.6 PHP Bug Type: MSSQL related Bug description: whitespaces in resultset of empty varchars/text Description: It's the same bug as in: http://bugs.php.net/bug.php?id=26012 http://bugs.php.net/bug.php?id=26315 http://bugs.php.net/bug.php?id=28124 http://bugs.php.net/bug.php?id=31641 http://bugs.php.net/bug.php?id=36968 http://bugs.php.net/bug.php?id=39204 described. I'm using MSSQL 2005: Microsoft SQL Server Standard Edition Microsoft Windows NT 5.2 (3790) 9.00.3068.00 with php_mssql.dll Version 5.2.6.6 ntwdblib.dll Version 2000.02.08 (as supplied with php) The Table: [COLA] [varchar](5) NULL [COLB] [varchar](25) NULL [COLC] [varchar](5) NULL [COLD] [varchar](25) NULL [COLE] [varchar](40) NULL [COLF] [text] NULL I've written empty strings to the cells and read it out with the appended code. The bug isn't bogus! Reproduce code: --- $connection = mssql_connect($server, $username, $password, true); $qry = SELECT * FROM TABLE; $result_id = mssql_query($qry, $connection); $row = mssql_fetch_assoc($result_id) print_r($row); Expected result: [COLA] = foo [COLB] = bar [COLC] = [COLD] = [COLE] = [COLF] = Actual result: -- [COLA] = foo [COLB] = bar [COLC] = [COLD] = [COLE] = [COLF] = -- Edit bug report at http://bugs.php.net/?id=45527edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45527r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45527r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45527r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45527r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45527r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45527r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=45527r=needscript Try newer version:http://bugs.php.net/fix.php?id=45527r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45527r=support Expected behavior:http://bugs.php.net/fix.php?id=45527r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45527r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45527r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45527r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45527r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45527r=dst IIS Stability:http://bugs.php.net/fix.php?id=45527r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45527r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45527r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45527r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=45527r=mysqlcfg
#42060 [NoF-Asn]: [PATCH] Add pagedResults support and more (PAT18 and PAT19 updated for 5.2.3)
ID: 42060 Updated by: [EMAIL PROTECTED] Reported By: iarenuno at eteo dot mondragon dot edu -Status: No Feedback +Status: Assigned Bug Type: LDAP related Operating System: * PHP Version: 5.2.5 Assigned To: pajoye Previous Comments: [2008-06-13 01:00:01] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to Open. [2008-06-05 19:10:08] [EMAIL PROTECTED] After a little discussions about windows with Howard, he pointed me to this bug report. It is now the right time to apply such patch (or any other new features) to ext/ldap as we are getting closer to the PHP 5.3 features freeze. Ando, do you have the time to work on it for php5.3? [2008-05-06 19:43:04] liveoutloud2day at gmail dot com This would be really helpful. Of course you could do the same thing with perl or python, and then interface to it with that, but that is really a pain. But I would think php could do anything python and maybe perl could do I have been following this patch for almost 3 years now, would be really nice to get it committed as the added functions just add to the functions use and don't change any of the existing code, except adding an additional optional parameter. [2008-04-17 10:59:03] [EMAIL PROTECTED] I'm too busy at work right now, and since I don't use LDAP stuff for anything anymore (or at least right now :), I'm not really keen on just applying the patch. I hope someone else with more time could look into this. [2008-04-17 08:33:51] dan dot marsden at gmail dot com ..ignore that last comment - I can see in the php mailing lists that Jani is in fact still around! - cool! - Jani? - any possibility you might be able to re-look at this? - or at least tell us what you need to allow it to be fixed? thanks! :-) Dan 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/42060 -- Edit this bug report at http://bugs.php.net/?id=42060edit=1
#45526 [Opn-Bgs]: in_array returns wrong position if an int 0 is in the array
ID: 45526 Updated by: [EMAIL PROTECTED] Reported By: clemens dot schwaighofer at tequila dot jp -Status: Open +Status: Bogus Bug Type: Arrays related Operating System: Linux PHP Version: 5.2.6 New Comment: This is the actual result with proper code: # php -r '$arr = array (a, b, c, 0, 0); var_dump(in_array(f, $arr, true));' bool(false) Without checkin the type you get interesting results. This is the same as: # php -r 'var_dump(f == 0);' bool(true) vs. # php -r 'var_dump(f === 0);' bool(false) RTFM: http://www.php.net/manual/en/types.comparisons.php Previous Comments: [2008-07-16 07:17:41] clemens dot schwaighofer at tequila dot jp Description: if the haystack array has an int 0 in the array and the needle does not exists, true is returned. This is only the case in none strict setting, but it is still a bug. Please do not close this as bogus and refer to the documentation and the strict flag. The flag works as can be seen with the string 0 in the search part. But it is wrong to return true if complete different character (char f) is searched and it returns true for int 0 Reproduce code: --- $char = array('a', 'f', '0'); $array_search_data = array ('a', 'b', 'c', 0, '0'); print Valid: .print_r($array_search_data, 1).br; print br; foreach ($char as $_char) { print I[$_char] (false): in array: .in_array($_char, $array_search_data). | array search: .array_search($_char, $array_search_data).br; print I[$_char] (true): in array: .in_array($_char, $array_search_data, true). | array search: .array_search($_char, $array_search_data, true).br; print br; } Expected result: in_array should return false for the search of 'f' and not true or the position of int 0 in the array. Actual result: -- in_array (and also array_search) return true (or the position of int 0 if a needle cannot be found in the array. -- Edit this bug report at http://bugs.php.net/?id=45526edit=1
#45523 [Opn-Bgs]: max_execution_time not working as documented
ID: 45523 Updated by: [EMAIL PROTECTED] Reported By: webmaster at asylum-et dot com -Status: Open +Status: Bogus Bug Type: *General Issues Operating System: * PHP Version: 5.2.6 New Comment: See bug #28572 Previous Comments: [2008-07-16 00:04:31] webmaster at asylum-et dot com Description: I have found an old bug that I have found twice and has been closed twice claiming it is fixed. Bugs #37306 and #37408. This has not been fixed. I have found this issue in bug threads dating back as far as 2006. I have PHP 5.2.5.5 / WinXP SP2 / Apache 2.2.4.0 and PHP is NOT in safe mode. I get the error message Fatal error: Maximum execution time of 0 seconds exceeded ... Reproduce code: --- The max_execution_time was set to 0 to allow infinite time since 120 was not enough and had been the previous setting. Come to find out 120 was ample but this bug showed its face. According to the PHP.net documentation, The maximum execution time, in seconds. If set to zero, no time limit is imposed. Previous note in the other report was closed due to no one being able to recreate this error. I have installed this version of PHP 4 times with the exact same result so it should be rather simple to recreate since I have 4 times already. Hopefully this receives an honest attempt at resolving the bug. I would give more info but there is nothing else except that I see the error when trying to upload files of only 6 MB. Expected result: max_execution_time = 0 to work as documented Actual result: -- Scripts fail unless setting max_input_time = 0 as well -- Edit this bug report at http://bugs.php.net/?id=45523edit=1
#45528 [NEW]: You cannot initialize a DateTimeZone object by offset only.
From: tj at systisoft dot com Operating system: All PHP version: 5.3CVS-2008-07-16 (CVS) PHP Bug Type: Feature/Change Request Bug description: You cannot initialize a DateTimeZone object by offset only. Description: Sometimes you get timezones from other sources in offset only format. This is often the case when dealing with databases. So yo have sometimes the situation where you have to set a time zone to a DateTime that is only defined by the offset. While an offset alone is not a time zone the DateTimeZone object can handle them by treating them as a time zone without daylight saving and offset, the name of that time zone is the offset itself. This seems to be the way if such time zones are obtained from a DateTime object. It would be nice behavior if new DateTimeZone($d-getName()) will always succeed if $d is a DateTimeZone. Reproduce code: --- $d = new DateTimeZone(date_create('+01:00')-getTimeZone()-getName()); echo $d-getName(); Expected result: +01:00 Actual result: -- PHP Fatal error: Uncaught exception 'Exception' with message 'DateTimeZone::__construct(): Unknown or bad timezone (+01:00)' in Command line code:1 -- Edit bug report at http://bugs.php.net/?id=45528edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45528r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45528r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45528r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45528r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45528r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45528r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=45528r=needscript Try newer version:http://bugs.php.net/fix.php?id=45528r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45528r=support Expected behavior:http://bugs.php.net/fix.php?id=45528r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45528r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45528r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45528r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45528r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45528r=dst IIS Stability:http://bugs.php.net/fix.php?id=45528r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45528r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45528r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45528r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=45528r=mysqlcfg
#45526 [Bgs]: in_array returns wrong position if an int 0 is in the array
ID: 45526 User updated by: clemens dot schwaighofer at tequila dot jp Reported By: clemens dot schwaighofer at tequila dot jp Status: Bogus Bug Type: Arrays related Operating System: Linux PHP Version: 5.2.6 New Comment: still, without true in_array can return so bogus unusable results that the strict check should be on by default. if I search a string in an array and it finds int 0 and returns true, thats really bogus. Previous Comments: [2008-07-16 09:50:41] [EMAIL PROTECTED] This is the actual result with proper code: # php -r '$arr = array (a, b, c, 0, 0); var_dump(in_array(f, $arr, true));' bool(false) Without checkin the type you get interesting results. This is the same as: # php -r 'var_dump(f == 0);' bool(true) vs. # php -r 'var_dump(f === 0);' bool(false) RTFM: http://www.php.net/manual/en/types.comparisons.php [2008-07-16 07:17:41] clemens dot schwaighofer at tequila dot jp Description: if the haystack array has an int 0 in the array and the needle does not exists, true is returned. This is only the case in none strict setting, but it is still a bug. Please do not close this as bogus and refer to the documentation and the strict flag. The flag works as can be seen with the string 0 in the search part. But it is wrong to return true if complete different character (char f) is searched and it returns true for int 0 Reproduce code: --- $char = array('a', 'f', '0'); $array_search_data = array ('a', 'b', 'c', 0, '0'); print Valid: .print_r($array_search_data, 1).br; print br; foreach ($char as $_char) { print I[$_char] (false): in array: .in_array($_char, $array_search_data). | array search: .array_search($_char, $array_search_data).br; print I[$_char] (true): in array: .in_array($_char, $array_search_data, true). | array search: .array_search($_char, $array_search_data, true).br; print br; } Expected result: in_array should return false for the search of 'f' and not true or the position of int 0 in the array. Actual result: -- in_array (and also array_search) return true (or the position of int 0 if a needle cannot be found in the array. -- Edit this bug report at http://bugs.php.net/?id=45526edit=1
#45117 [Opn-Fbk]: strval gives :.0E-7 for 1e-6
ID: 45117 Updated by: [EMAIL PROTECTED] Reported By: rudolphi at chemie dot uni-kl dot de -Status: Open +Status: Feedback Bug Type: Scripting Engine problem Operating System: Ubuntu 8.04 (32bit) PHP Version: 5.2.6 New Comment: I tried with non-debug build too and still can't reproduce. What GCC version do you use..? Glibc? Previous Comments: [2008-07-16 10:00:39] [EMAIL PROTECTED] I can't reproduce in 32bit linux either: $ uname -a Linux localhost.localdomain 2.6.25.9-76.fc9.i686 #1 SMP Fri Jun 27 16:14:35 EDT 2008 i686 i686 i386 GNU/Linux [EMAIL PROTECTED] ~]$ src/build/php_5_2/sapi/cli/php -n -r '$float=1e-6; var_dump($float, strval($float));' float(1.0E-6) string(6) 1.0E-6 [2008-07-15 22:17:40] rudolphi at chemie dot uni-kl dot de $ uname -a Linux rudolphi 2.6.24-19-generic #1 SMP Wed Jun 18 14:43:41 UTC 2008 i686 GNU/Linux $ php -n -r '$float=1e-6; var_dump($float, strval($float));' float(:.0E-7) string(6) :.0E-7 $ php -v PHP 5.2.6 (cli) (built: May 29 2008 10:18:45) Copyright (c) 1997-2008 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies [2008-07-15 21:11:20] [EMAIL PROTECTED] I can not reproduce this, check this out: # uname -a Linux linux5 2.6.20-1.2944.fc6 #1 SMP Tue Apr 10 17:46:00 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux # php -n -r '$float=1e-6; var_dump($float, strval($float));' float(1.0E-6) string(6) 1.0E-6 # php -v $ php -v PHP 5.2.7-dev (cli) (built: Jul 15 2008 04:32:33) .. Can you post the same here? [2008-05-28 13:24:21] rudolphi at chemie dot uni-kl dot de Description: When converting a number in exponential format with negative exponent of n=6,7,... strval (or implicit conversion to string) gives :.0E-(n+1) if there is no fractional part present. The error can be found both in the precompiled PHP 5.2.4 and self-compiled 5.2.6, but it cannot be reproduced under Windows or under PHP 5.2.3 Ubuntu 7.10 (64bit). Seems to be closely related to OS (?). Reproduce code: --- $float=1e-6; echo strval($float); Expected result: 1e-6 or 1.0e-6 Actual result: -- :.0E-7 -- Edit this bug report at http://bugs.php.net/?id=45117edit=1
#45117 [Opn]: strval gives :.0E-7 for 1e-6
ID: 45117 Updated by: [EMAIL PROTECTED] Reported By: rudolphi at chemie dot uni-kl dot de Status: Open Bug Type: Scripting Engine problem Operating System: Ubuntu 8.04 (32bit) PHP Version: 5.2.6 New Comment: I can't reproduce in 32bit linux either: $ uname -a Linux localhost.localdomain 2.6.25.9-76.fc9.i686 #1 SMP Fri Jun 27 16:14:35 EDT 2008 i686 i686 i386 GNU/Linux [EMAIL PROTECTED] ~]$ src/build/php_5_2/sapi/cli/php -n -r '$float=1e-6; var_dump($float, strval($float));' float(1.0E-6) string(6) 1.0E-6 Previous Comments: [2008-07-15 22:17:40] rudolphi at chemie dot uni-kl dot de $ uname -a Linux rudolphi 2.6.24-19-generic #1 SMP Wed Jun 18 14:43:41 UTC 2008 i686 GNU/Linux $ php -n -r '$float=1e-6; var_dump($float, strval($float));' float(:.0E-7) string(6) :.0E-7 $ php -v PHP 5.2.6 (cli) (built: May 29 2008 10:18:45) Copyright (c) 1997-2008 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies [2008-07-15 21:11:20] [EMAIL PROTECTED] I can not reproduce this, check this out: # uname -a Linux linux5 2.6.20-1.2944.fc6 #1 SMP Tue Apr 10 17:46:00 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux # php -n -r '$float=1e-6; var_dump($float, strval($float));' float(1.0E-6) string(6) 1.0E-6 # php -v $ php -v PHP 5.2.7-dev (cli) (built: Jul 15 2008 04:32:33) .. Can you post the same here? [2008-05-28 13:24:21] rudolphi at chemie dot uni-kl dot de Description: When converting a number in exponential format with negative exponent of n=6,7,... strval (or implicit conversion to string) gives :.0E-(n+1) if there is no fractional part present. The error can be found both in the precompiled PHP 5.2.4 and self-compiled 5.2.6, but it cannot be reproduced under Windows or under PHP 5.2.3 Ubuntu 7.10 (64bit). Seems to be closely related to OS (?). Reproduce code: --- $float=1e-6; echo strval($float); Expected result: 1e-6 or 1.0e-6 Actual result: -- :.0E-7 -- Edit this bug report at http://bugs.php.net/?id=45117edit=1
#43731 [Opn-Bgs]: socket_getpeername: cannot use on stdin with inetd
ID: 43731 Updated by: [EMAIL PROTECTED] Reported By: uth3r_p3ndrag0n at yahoo dot com -Status: Open +Status: Bogus Bug Type: Sockets related Operating System: Linux, Debian Etch 4.0r1 PHP Version: 5.2.5 New Comment: php://stdin is not a socket. Previous Comments: [2008-01-02 19:58:17] uth3r_p3ndrag0n at yahoo dot com Description: When running a php script via inetd, I cannot get the remote address due to socket_getpeername's parameter type. There seems no way to treat the stdin as a socket for this function. The C system call, getpeerbyname (in sys/socket.h) takes a file descriptor. When called by inetd, passing 0 (or stdin) returns the peer information of the socket which is mapped to the stdin of the running process. There may not be anyway to work around this considering the way sockets were designed in php. I tried opening php://stdin and using the resource returned, but that isn't a Socket resource. I would have expected to be able get a socket resource of stdin via 'fsockopen(php://stdin)', as specified in http://www.php.net/manual/en/wrappers.php.php, but despite it's url style naming, fsockopen returns 'Unable to find the socket transport php' Reproduce code: --- $stdin = fopen('php://stdin'); socket_getpeername($stdin, $addr, $port); OR $stdin = fsockopen('php://stdin'); socket_getpeername($stdin, $addr, $port); Expected result: $addr and $port should have been populated with the ip address and port #. Actual result: -- Warning: socket_getpeername(): supplied resource is not a valid Socket resource in [script name] on line X OR Warning: fsockopen(): unable to connect to php://stdin:-1 (Unable to find the socket transport php - did you forget to enable it when you configured PHP?) in [script_name] on line X -- Edit this bug report at http://bugs.php.net/?id=43731edit=1
#38001 [Com]: In PDO mysql running multiple queries with one exec, subsequent query fails
ID: 38001 Comment by: andrea at bhweb dot it Reported By: mark-phpbugs at vectrex dot org dot uk Status: No Feedback Bug Type: PDO related Operating System: Linux PHP Version: 5.1.4 New Comment: Although nasty, I found a workaround, like the one used in mysqli to consume the resultsets: $stmt=$ppdb-prepare($query); $stmt-execute(); do { $stmt-fetch(); $stmt-closeCursor(); ++$line; } while($stmt- nextRowset()); I found this only works using prepare and execute this way, not if you directly execute the query with query(). HTH Previous Comments: [2006-07-12 01:00:01] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to Open. [2006-07-04 22:11:48] mark-phpbugs at vetrex dot org dot uk I've tried this with the latest snapshot, php5.2-200607042030, and the problem remains. [2006-07-04 19:40:37] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.2-win32-latest.zip Works for me using MySQ 5.0.22 [2006-07-04 09:12:06] mark-phpbugs at vectrex dot org dot uk Description: When running multiple queries with one exec, the queries succeed (or appear to succeed, with no exception), but a subsequent query fails with 2013 Lost connection to MySQL server during query I'm using MySQL 5.0.20a-Debian_2-log on Debian Linux. Client library version is PDO Driver for MySQL, client library version = 5.0.22 This is similar to bogus bug #37732 which affects mysqli - But in PDO there is no way to manually consume the empty result sets from an exec() - PDO should really do it automatically. Reproduce code: --- ?php error_reporting(E_ALL); function DbInit() { global $db; $options = array(); $connstr = mysql:host=localhost;dbname=test; $db = new PDO($connstr, root, , $options); $db-setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION); // Make sure our connections use utf8. $db-exec(SET NAMES utf8); } function TestBatch() { global $db; $sql = CREATE TEMPORARY table b (t varchar(20)); $sql2 = INSERT INTO b VALUES ('hello'); /* This works $db-exec($sql); $db-exec($sql2); */ /* This fails because the subsequent query gives 2013 Lost connection to MySQL server during query */ $db-exec($sql . ; . $sql2); $sth = $db-query(SELECT * FROM b); var_dump($sth-fetchAll(PDO::FETCH_ASSOC)); } DbInit(); TestBatch(); ? Expected result: array(1) { [0]= array(1) { [t]= string(5) hello } } Actual result: -- Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 2013 Lost connection to MySQL server during query' in /home/mark/progs/phptest/pdobatch.php:30 Stack trace: #0 /home/mark/progs/phptest/pdobatch.php(30): PDO-query('SELECT * FROM b') #1 /home/mark/progs/phptest/pdobatch.php(35): TestBatch() #2 {main} thrown in /home/mark/progs/phptest/pdobatch.php on line 30 -- Edit this bug report at http://bugs.php.net/?id=38001edit=1
#43538 [Opn-Bgs]: count on non-array should return false, not 1
ID: 43538 Updated by: [EMAIL PROTECTED] Reported By: warren at transfusionmedia dot com -Status: Open +Status: Bogus Bug Type: Feature/Change Request -Operating System: Win XP SP2 +Operating System: * -PHP Version: 5.2.5 +PHP Version: * New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php It returns 1 as that means you have one element. Anyway this is the expected behavior and used by all our users for about 10 years now. Changing this will break most PHP applications out there. Further more the scenarios shown should use is_array() and family of funtions. Previous Comments: [2008-07-16 00:32:21] [EMAIL PROTECTED] Seems odd why its coded to return 1 imo, heres a patch against latest PHP_5_3 cvs that changes this to return false: http://www.phpfi.com/332583 [2007-12-08 20:30:47] warren at transfusionmedia dot com Description: When doing count($var) where $var is not an array, the return = 1. The problem is when you're doing a check in your code: if (count($var) 0){ //do something } This will evaluate as true if $var is not an array. This is a problem if you are doing this: if (count($var) 0){ sort($var); // anything that requires $var to be an array } If there is anything in that if statement that requires $var to be an array, there will be a fatal error. I know you can also add an is_array check in there, but that is non-obvious and shouldn't be necessary. Really, if $var is not an array, count($var) should return false or null, or at least a -1 Reproduce code: --- $var = foo; if (count($var) 0){ sort($var); } else { echo The value of var is not greater than zero; } Expected result: The value of var is not greater than zero Actual result: -- Warning: sort() expects parameter 1 to be array, string given -- Edit this bug report at http://bugs.php.net/?id=43538edit=1
#45349 [NoF-Opn]: ArrayObject::ksort() terminates script
ID: 45349 User updated by: david at grudl dot com Reported By: david at grudl dot com -Status: No Feedback +Status: Open Bug Type: SPL related Operating System: Windows XP PHP Version: 5.3CVS-2008-06-24 (snap) Assigned To: colder New Comment: This bug still exists in snapshot from Tue, 15 Jul 2008 20:25:38. Previous Comments: [2008-07-14 01:00:02] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to Open. [2008-07-07 00:04:31] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.3-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.3-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.3-win32-installer-latest.msi Can't reproduce: [EMAIL PROTECTED] /var/cvs/php.net/php5.3-dev $ sapi/cli/php -r '$a = new ArrayObject(); $a-ksort(); echo end\n;' end But I also fixed something related to methods like ksort(), so please try again. [2008-06-24 18:09:15] david at grudl dot com Description: Method ksort() terminates script. Reproduce code: --- $obj = new ArrayObject(); $obj-ksort(); -- Edit this bug report at http://bugs.php.net/?id=45349edit=1
#45178 [Asn]: garbage collector and cyclic references
ID: 45178 User updated by: thomas dot jarosch at intra2net dot com Reported By: thomas dot jarosch at intra2net dot com Status: Assigned Bug Type: Reproducible crash Operating System: Linux PHP Version: 5.3CVS-2008-06-04 (snap) Assigned To: dmitry New Comment: Thanks for looking into this, Dmitry! So there are actually two problems, one memory corruption reported here and one memory leak report in #33595 or are they both memory corruptions? Previous Comments: [2008-07-15 11:42:00] [EMAIL PROTECTED] The simplest case for this memory corruption. ?php class Foo { function Foo() { $this-error = array($this,$this); } } $a = new Foo(); [2008-07-15 07:37:50] [EMAIL PROTECTED] At first, you have a serious issue in your code. static variables MUST NOT be asigned by reference, because they are already references. As result the singleton pattern just doesn't work. BTW the bug is really exists. The simplified test case follows(changing = new into = new fixes memory corruption). ?php class Horde_History { function raiseError() { return debug_backtrace(); } function Horde_History() { $this-error = $this-raiseError(); echo Memory usage: . memory_get_usage() . \n; } } for ($i=0;$i10;$i++) { $a = new Horde_History(); } ? [2008-06-05 09:13:20] thomas dot jarosch at intra2net dot com Actually, the reproduce code from #33595 also leaks memory. The statement about Horde is not 100% correct as only some singleton functions are affected. I mixed it up with another reference problem I fixed a while ago. Nontheless memory is leaked :-) [2008-06-04 16:57:45] thomas dot jarosch at intra2net dot com Description: Hello together, I'm currently trying to find a heap corruption while using Horde and noticed a rather odd behavior. The supplied code is the standard way Horde does it singletons. We always used the syntax of $object = new class to make it work with PHP4 and PHP5. If I change that to $object = new class, everything works as expected. I've found bug #32845 and noticed what we are doing seems wrong, so Horde needs fixing. The problem gets worse if the class object contains a variable of the type PEAR_Error, which contains cyclic references. Not only does the constructor get called every time, the object leaks memory like hell, even with PHP 5.3. I've searched through the bugtracker and thought the garbage collector now handles cyclic references, but maybe this is a side-effect of something else going wrong. Is the memory consumption by design? Thanks in advance for any comment, Thomas Reproduce code: --- ?php require_once PEAR.php; class Horde_History { var $error; function singleton() { static $history; if (!isset($history)) { $history = new Horde_History(); } return $history; } function Horde_History() { $this-error = PEAR::raiseError(error); echo Memory usage: . memory_get_usage() . \n; } } for (;;) { $a = Horde_History::singleton(); } Expected result: Constant memory usage. Actual result: -- Increasing memory usage. -- Edit this bug report at http://bugs.php.net/?id=45178edit=1
#45117 [Fbk-Opn]: strval gives :.0E-7 for 1e-6
ID: 45117 User updated by: rudolphi at chemie dot uni-kl dot de Reported By: rudolphi at chemie dot uni-kl dot de -Status: Feedback +Status: Open Bug Type: Scripting Engine problem Operating System: Ubuntu 8.04 (32bit) PHP Version: 5.2.6 New Comment: My GCC-Version is 4.2.3-1ubuntu6, libgcc1 is 4.2.3-2ubuntu7 and my libc6 is 2.7-10ubuntu3 (the up-to-date-versions of Hardy Heron). Thanks a lot for your efforts in this topic. I have just recompiled PHP 5.2.6 (and restarted apache) to reproduce the error with the very versions mentioned above. The error is still there. Previous Comments: [2008-07-16 10:10:38] [EMAIL PROTECTED] I tried with non-debug build too and still can't reproduce. What GCC version do you use..? Glibc? [2008-07-16 10:00:39] [EMAIL PROTECTED] I can't reproduce in 32bit linux either: $ uname -a Linux localhost.localdomain 2.6.25.9-76.fc9.i686 #1 SMP Fri Jun 27 16:14:35 EDT 2008 i686 i686 i386 GNU/Linux [EMAIL PROTECTED] ~]$ src/build/php_5_2/sapi/cli/php -n -r '$float=1e-6; var_dump($float, strval($float));' float(1.0E-6) string(6) 1.0E-6 [2008-07-15 22:17:40] rudolphi at chemie dot uni-kl dot de $ uname -a Linux rudolphi 2.6.24-19-generic #1 SMP Wed Jun 18 14:43:41 UTC 2008 i686 GNU/Linux $ php -n -r '$float=1e-6; var_dump($float, strval($float));' float(:.0E-7) string(6) :.0E-7 $ php -v PHP 5.2.6 (cli) (built: May 29 2008 10:18:45) Copyright (c) 1997-2008 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies [2008-07-15 21:11:20] [EMAIL PROTECTED] I can not reproduce this, check this out: # uname -a Linux linux5 2.6.20-1.2944.fc6 #1 SMP Tue Apr 10 17:46:00 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux # php -n -r '$float=1e-6; var_dump($float, strval($float));' float(1.0E-6) string(6) 1.0E-6 # php -v $ php -v PHP 5.2.7-dev (cli) (built: Jul 15 2008 04:32:33) .. Can you post the same here? [2008-05-28 13:24:21] rudolphi at chemie dot uni-kl dot de Description: When converting a number in exponential format with negative exponent of n=6,7,... strval (or implicit conversion to string) gives :.0E-(n+1) if there is no fractional part present. The error can be found both in the precompiled PHP 5.2.4 and self-compiled 5.2.6, but it cannot be reproduced under Windows or under PHP 5.2.3 Ubuntu 7.10 (64bit). Seems to be closely related to OS (?). Reproduce code: --- $float=1e-6; echo strval($float); Expected result: 1e-6 or 1.0e-6 Actual result: -- :.0E-7 -- Edit this bug report at http://bugs.php.net/?id=45117edit=1
#45528 [Opn-Asn]: You cannot initialize a DateTimeZone object by offset only.
ID: 45528 Updated by: [EMAIL PROTECTED] Reported By: tj at systisoft dot com -Status: Open +Status: Assigned Bug Type: Feature/Change Request Operating System: All PHP Version: 5.3CVS-2008-07-16 (CVS) -Assigned To: +Assigned To: derick Previous Comments: [2008-07-16 09:58:17] tj at systisoft dot com Description: Sometimes you get timezones from other sources in offset only format. This is often the case when dealing with databases. So yo have sometimes the situation where you have to set a time zone to a DateTime that is only defined by the offset. While an offset alone is not a time zone the DateTimeZone object can handle them by treating them as a time zone without daylight saving and offset, the name of that time zone is the offset itself. This seems to be the way if such time zones are obtained from a DateTime object. It would be nice behavior if new DateTimeZone($d-getName()) will always succeed if $d is a DateTimeZone. Reproduce code: --- $d = new DateTimeZone(date_create('+01:00')-getTimeZone()-getName()); echo $d-getName(); Expected result: +01:00 Actual result: -- PHP Fatal error: Uncaught exception 'Exception' with message 'DateTimeZone::__construct(): Unknown or bad timezone (+01:00)' in Command line code:1 -- Edit this bug report at http://bugs.php.net/?id=45528edit=1
#44945 [Bgs]: escapeshellarg removes UTF-8 multi-byte characters
ID: 44945 User updated by: thomas dot jarosch at intra2net dot com Reported By: thomas dot jarosch at intra2net dot com Status: Bogus Bug Type: Strings related Operating System: Linux PHP Version: 5.2.6 New Comment: Thanks for looking into this, Jani. So, why does it work via CLI and not via apache if the same LANG environment variable is specified? I've even seen an AddDefaultCharset UTF8 entry in the apache config. Thomas Previous Comments: [2008-07-13 17:01:20] [EMAIL PROTECTED] There's no automatic way. If you need to have it work with utf-8 of course you have to set the locales properly too. Or just not use UTF-8.. [2008-05-08 12:59:36] thomas dot jarosch at intra2net dot com Thanks, that seems to work. I've inspected the environment on the server and it contains a LANG=en_US.UTF-8 variable. Is there a way I can fix this/PHP autodetects it without touching every code using escapeshellarg()? [2008-05-08 11:28:25] [EMAIL PROTECTED] Try with the code below (mandatory in the test): if (false == setlocale(LC_CTYPE, UTF8, en_US.UTF-8)) { die(skip setlocale() failed\n); } [2008-05-08 11:08:27] thomas dot jarosch at intra2net dot com Description: Hello together, I'm seeing almost the same issue as #44564 after upgrading from PHP 5.2.5 to 5.2.6. If I execute the provided test code via php CLI, everything works as expected. Running the same code via mod_php inside Apache skips the UTF-8 multi-byte characters. I've looked at the ext/standard/exec.c code a bit and checked that my config.log in both PHP build directories contains #define HAVE_MBLEN 1 so the call to php_mblen() should work. Any idea what that could be? One thing I noticed is that php_mblen() is a wrapper macro for mblen() or mbrlen() which features a slight difference in the return code (see -2 rc for details). Thanks, Thomas Reproduce code: --- var_dump(escapeshellarg('ä')); Expected result: string(2) 'ä' Actual result: -- string(2) '' -- Edit this bug report at http://bugs.php.net/?id=44945edit=1
#45529 [NEW]: new DateTimeZone() and date_create()-getTimezone() behave diffent
From: tj at systisoft dot com Operating system: Mac OS X PHP version: 5.3CVS-2008-07-16 (CVS) PHP Bug Type: Date/time related Bug description: new DateTimeZone() and date_create()-getTimezone() behave diffent Description: If you generate a DateTimeZone with new and one with date_create()-getTimeZone, the resulting DateTimeZone objects behave different even if the are of the same time zone. Reproduce code: --- $tz1 = new DateTimeZone('UTC'); $tz2 = date_create('UTC')-getTimeZone(); echo $tz1-getName(), PHP_EOL; echo $tz2-getName(), PHP_EOL; $d = new DateTime('2008-01-01 12:00:00+0200'); $d-setTimeZone($tz1); echo $d-format(DATE_ISO8601), PHP_EOL; $d = new DateTime('2008-01-01 12:00:00+0200'); $d-setTimeZone($tz2); echo $d-format(DATE_ISO8601), PHP_EOL; Expected result: UTC UTC 2008-1-1T10:00:00+ 2008-1-1T10:00:00+ Actual result: -- UTC UTC 2008-01-01T10:00:00+ PHP Warning: DateTime::setTimezone(): Can only do this for zones with ID for now in /Users/tobias/test.php on line 9 Warning: DateTime::setTimezone(): Can only do this for zones with ID for now in /Users/tobias/test.php on line 9 2008-01-01T12:00:00+0200 -- Edit bug report at http://bugs.php.net/?id=45529edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45529r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45529r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45529r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45529r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45529r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45529r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=45529r=needscript Try newer version:http://bugs.php.net/fix.php?id=45529r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45529r=support Expected behavior:http://bugs.php.net/fix.php?id=45529r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45529r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45529r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45529r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45529r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45529r=dst IIS Stability:http://bugs.php.net/fix.php?id=45529r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45529r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45529r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45529r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=45529r=mysqlcfg
#45529 [Opn-Asn]: new DateTimeZone() and date_create()-getTimezone() behave diffent
ID: 45529 Updated by: [EMAIL PROTECTED] Reported By: tj at systisoft dot com -Status: Open +Status: Assigned Bug Type: Date/time related Operating System: Mac OS X PHP Version: 5.3CVS-2008-07-16 (CVS) -Assigned To: +Assigned To: derick Previous Comments: [2008-07-16 13:40:18] tj at systisoft dot com Description: If you generate a DateTimeZone with new and one with date_create()-getTimeZone, the resulting DateTimeZone objects behave different even if the are of the same time zone. Reproduce code: --- $tz1 = new DateTimeZone('UTC'); $tz2 = date_create('UTC')-getTimeZone(); echo $tz1-getName(), PHP_EOL; echo $tz2-getName(), PHP_EOL; $d = new DateTime('2008-01-01 12:00:00+0200'); $d-setTimeZone($tz1); echo $d-format(DATE_ISO8601), PHP_EOL; $d = new DateTime('2008-01-01 12:00:00+0200'); $d-setTimeZone($tz2); echo $d-format(DATE_ISO8601), PHP_EOL; Expected result: UTC UTC 2008-1-1T10:00:00+ 2008-1-1T10:00:00+ Actual result: -- UTC UTC 2008-01-01T10:00:00+ PHP Warning: DateTime::setTimezone(): Can only do this for zones with ID for now in /Users/tobias/test.php on line 9 Warning: DateTime::setTimezone(): Can only do this for zones with ID for now in /Users/tobias/test.php on line 9 2008-01-01T12:00:00+0200 -- Edit this bug report at http://bugs.php.net/?id=45529edit=1
#44127 [Opn-Csd]: UNIX abstract namespace socket connects does not work
ID: 44127 Updated by: [EMAIL PROTECTED] Reported By: pz4u at vplace dot de -Status: Open +Status: Closed Bug Type: Streams related Operating System: Linux PHP Version: 5.2.5 New Comment: This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Both ext/sockets/ and streams implementations are fixed now. Previous Comments: [2008-02-19 23:25:43] apenwarr at gmail dot com The problem here is definitely the sockaddr length being passed by php. Here's what php does according to strace: connect(3, {sa_family=AF_FILE, path=@/tmp/dbus-8qswtYDtSn}, 110) = -1 ECONNREFUSED (Connection refused) And here's what a working C++ program does: connect(3, {sa_family=AF_FILE, path=@/tmp/dbus-8qswtYDtSn}, 23) = 0 Notice the only difference is 110 vs 23. The @ sign is displayed by strace to mean an abstract socket (first character of the path is null); when connecting to an abstract socket, the path= variable is not displayed in quotes like it normally would be. 23 = sizeof(sa_family) + length(path) [2008-02-15 08:33:55] pz4u at vplace dot de Description: I'm currently developing a binding for D-BUS based on native PHP. For that reason I need to talk to abstract namespace sockets. It seems like PHP is handling these socket type differently than D-BUS. I can't connect to the abstract socket. I asked for help on the php-general mailing list and got some helpful responses for further investigation: http://marc.info/?t=12029132085r=1w=2 After that I asked on the D-BUS mailing list for clarification how D-BUS implements abstract namespace support: http://lists.freedesktop.org/archives/dbus/2008-February/009303.html As pointed out by Havoc on the dbus mailing list I think the problem is here: http://cvs.php.net/viewvc.cgi/php-src/ext/sockets/sockets.c?revision=1.197view=markup or in the stream version of this API (not sure if it uses the same functions). - I'm wondering why 108 is hardcoded here (in the connect function). A constant might be better? - If the connect() or listen() just does sizeof(struct sockaddr_un) then it will always get a bunch of trailing garbage bytes in the abstract name. (quoted Havoc here) - Even if their is no NUL byte to mark the end of the string PHP should only use non-nul byte characters for the path (or better: the string that has been given by the programmer.) If a programmer want's to fill up sun_path with NUL bytes, it should be added to the PHP code and not assumed. I'm not a C programmer - so the code in sockets.c might just do what I wrote - I'm sorry for any inconveniences in this case. This seems to be a regression of bug #16121 Reproduce code: --- ?php // use env to find a current abstract D-BUS socket $fp = fsockopen (unix://\x00/tmp/dbus-whatever,0); if ($fp) { fclose ($fp); } ? Expected result: A connect with \x00/tmp/dbus-whatever (without added NUL bytes until the maximum sun path length is reached). Actual result: -- fsockopen: fsockopen(): unable to connect to unix://:0 (Connection refused) for unix://\x00/tmp/dbus-whatever which is a bit strange because I expected at least the error message fsockopen() [function.fsockopen]: unable to connect to unix://[NUL byte]/tmp/dbus-whatever:0 (Connection refused) stream_socket_client: stream_socket_client: unable to connect to unix://\0/tmp/hald-local/dbus-ZniNmvr5O0 (Connection refused) in ... socket_connect: Warning: socket_connect(): unable to connect [22]: Invalid argument in ... I can garantuee that the arguments are right - removing the NUL byte from socket_connect allows me to connect to a non-abstract socket. -- Edit this bug report at http://bugs.php.net/?id=44127edit=1
#45529 [Asn-Csd]: new DateTimeZone() and date_create()-getTimezone() behave diffent
ID: 45529 Updated by: [EMAIL PROTECTED] Reported By: tj at systisoft dot com -Status: Assigned +Status: Closed Bug Type: Date/time related Operating System: Mac OS X PHP Version: 5.3CVS-2008-07-16 (CVS) Assigned To: derick New Comment: This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: [2008-07-16 13:40:18] tj at systisoft dot com Description: If you generate a DateTimeZone with new and one with date_create()-getTimeZone, the resulting DateTimeZone objects behave different even if the are of the same time zone. Reproduce code: --- $tz1 = new DateTimeZone('UTC'); $tz2 = date_create('UTC')-getTimeZone(); echo $tz1-getName(), PHP_EOL; echo $tz2-getName(), PHP_EOL; $d = new DateTime('2008-01-01 12:00:00+0200'); $d-setTimeZone($tz1); echo $d-format(DATE_ISO8601), PHP_EOL; $d = new DateTime('2008-01-01 12:00:00+0200'); $d-setTimeZone($tz2); echo $d-format(DATE_ISO8601), PHP_EOL; Expected result: UTC UTC 2008-1-1T10:00:00+ 2008-1-1T10:00:00+ Actual result: -- UTC UTC 2008-01-01T10:00:00+ PHP Warning: DateTime::setTimezone(): Can only do this for zones with ID for now in /Users/tobias/test.php on line 9 Warning: DateTime::setTimezone(): Can only do this for zones with ID for now in /Users/tobias/test.php on line 9 2008-01-01T12:00:00+0200 -- Edit this bug report at http://bugs.php.net/?id=45529edit=1
#40479 [Com]: zend_mm_heap corrupted
ID: 40479 Comment by: john dot glazebrook at guava 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: I found this 'zend_mm_heap corrupted' in my apache log files. I am using 5.2.5 with almost everything enabled. Mysqli and I am using Zend Frame work. As far as I can tell my scripts case this (and a seg fault) when they are looping through a Zend_DB_Table_Rowset object adding rows to a table. When the $row **goes out of scope** the script seg faults. So I get this error when the function (well method) returns a value. I stripped all code from the function apart from echos and the $row-save() and the seg faults still happen. Ho hum... john Previous Comments: [2008-06-23 01:00:00] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to Open. [2008-06-15 11:29:29] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi [2008-06-15 09:43:22] akdeiva at qxsystems dot com Hi, i too got the same issue and this is how the code works, I am having some scripts to parse the HTML data and wherein i am having part of the code as , $replaced_key = strtolower(str_replace(%, percent, $key)); $replaced_key = str_replace(., , $replaced_key); $key = str_replace( , _, $replaced_key); When i have the above code with the same variable name, $key = strtolower(str_ireplace(%, percent, $key)); $key = str_ireplace(., , $key); $key = str_ireplace( , _, $key); I get the zend_mm_heap corrupted error wherein when changed the code to the above way, it works fine. [2008-05-20 01:00:01] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to Open. [2008-05-12 19:16:48] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php for *NIX and http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32 Once you have generated a backtrace, please submit it to this bug report and change the status back to Open. Thank you for helping us make PHP better. 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/40479 -- Edit this bug report at http://bugs.php.net/?id=40479edit=1
#40479 [Com]: zend_mm_heap corrupted
ID: 40479 Comment by: john dot glazebrook at guava 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: Sorry, I forgot to say my server runs Red Hat Linux. Um, I'm not sure if this is helpful, but I found the error when moving from PEAR:DB over to ZF DB objects. So I only changed DB code. OK, some psedudoish code: class x { function db() { $rpt = new Report(); $row = $rpt-createRow(); $row-text = 'xyz'; $row-save(); echo 'OK 2'; } } $x = new x(); echo 'OK'; $x-db(); echo 'OK 3'; And I see: OK OK 2 seg fault Also changing the function to: class x { function db() { $rpt = new Report(); $row = $rpt-createRow(); $row-text = 'xyz'; $row-save(); echo 'OK 2'; $row = null; echo 'M'; } } this time it seg faults at $row = null; Hope this is of some help. It really sucks :-( John Previous Comments: [2008-07-16 16:31:08] john dot glazebrook at guava dot com I found this 'zend_mm_heap corrupted' in my apache log files. I am using 5.2.5 with almost everything enabled. Mysqli and I am using Zend Frame work. As far as I can tell my scripts case this (and a seg fault) when they are looping through a Zend_DB_Table_Rowset object adding rows to a table. When the $row **goes out of scope** the script seg faults. So I get this error when the function (well method) returns a value. I stripped all code from the function apart from echos and the $row-save() and the seg faults still happen. Ho hum... john [2008-06-23 01:00:00] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to Open. [2008-06-15 11:29:29] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi [2008-06-15 09:43:22] akdeiva at qxsystems dot com Hi, i too got the same issue and this is how the code works, I am having some scripts to parse the HTML data and wherein i am having part of the code as , $replaced_key = strtolower(str_replace(%, percent, $key)); $replaced_key = str_replace(., , $replaced_key); $key = str_replace( , _, $replaced_key); When i have the above code with the same variable name, $key = strtolower(str_ireplace(%, percent, $key)); $key = str_ireplace(., , $key); $key = str_ireplace( , _, $key); I get the zend_mm_heap corrupted error wherein when changed the code to the above way, it works fine. [2008-05-20 01:00:01] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to Open. 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/40479 -- Edit this bug report at http://bugs.php.net/?id=40479edit=1
#45530 [NEW]: config-create problem
From: leonardo dot saracini at tiscali dot it Operating system: ubuntu 7.10 PHP version: 5.2.6 PHP Bug Type: Scripting Engine problem Bug description: config-create problem Description: if type at prompt pear config-create all the path are in lower case. if you have a path /var/www/user/pear/PEAR/... config-create write /var/www/user/pear/pear/... -- Edit bug report at http://bugs.php.net/?id=45530edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45530r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45530r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45530r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45530r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45530r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45530r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=45530r=needscript Try newer version:http://bugs.php.net/fix.php?id=45530r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45530r=support Expected behavior:http://bugs.php.net/fix.php?id=45530r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45530r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45530r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45530r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45530r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45530r=dst IIS Stability:http://bugs.php.net/fix.php?id=45530r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45530r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45530r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45530r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=45530r=mysqlcfg
#44991 [Com]: Compile Failure With freetds0.82
ID: 44991 Comment by: hoffie at gentoo dot org Reported By: scourgen at gmail dot com Status: Open Bug Type: MSSQL related Operating System: Centos5.1(k2.6.18) PHP Version: 5.2.6 New Comment: I can confirm that above patch makes it possible to compile php-5.2.6 against both freetds-0.64 (i.e. it does not break backward compatibility) and freetds-0.82 (i.e. it works with recent versions). You can find a whitespace-fixed (bug tracker screwed it up) and direction-fixed (patch had to be applied using -R) version of the patch here: http://overlays.gentoo.org/proj/php/browser/patches/php-patches/5.2.6/php5/mssql-freetds-compat.patch?rev=3485 Credits should still go to jklowden at freetds dot org. Any way to get this patch in, especially since it does not seem to break backwards compatibility? Previous Comments: [2008-07-16 07:56:25] matthias at dsx dot at same on gentoo linux... http://bugs.gentoo.org/show_bug.cgi?id=223891 (freetds bug) [2008-06-12 00:19:27] jklowden at freetds dot org This diff is what you want. --jkl --- config.m4-new 2008-06-11 20:13:47.0 -0400 +++ config.m4 2007-07-03 13:25:34.0 -0400 @@ -10,11 +10,11 @@ if test $PHP_MSSQL = yes; then for i in /usr/local /usr; do - if test -f $i/include/sybdb.h; then + if test -f $i/include/tds.h; then FREETDS_INSTALLATION_DIR=$i FREETDS_INCLUDE_DIR=$i/include break - elif test -f $i/include/freetds/sybdb.h; then + elif test -f $i/include/freetds/tds.h; then FREETDS_INSTALLATION_DIR=$i FREETDS_INCLUDE_DIR=$i/include/freetds break @@ -27,10 +27,10 @@ elif test $PHP_MSSQL != no; then -if test -f $PHP_MSSQL/include/sybdb.h; then +if test -f $PHP_MSSQL/include/tds.h; then FREETDS_INSTALLATION_DIR=$PHP_MSSQL FREETDS_INCLUDE_DIR=$PHP_MSSQL/include -elif test -f $PHP_MSSQL/include/freetds/sybdb.h; then +elif test -f $PHP_MSSQL/include/freetds/tds.h; then FREETDS_INSTALLATION_DIR=$PHP_MSSQL FREETDS_INCLUDE_DIR=$PHP_MSSQL/include/freetds else @@ -38,8 +38,8 @@ fi fi - if test ! -r $FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libsybdb.a test ! -r $FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libsybdb.so; then - AC_MSG_ERROR(Could not find $FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libsybdb.[a|so]) + if test ! -r $FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libtds.a test ! -r $FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libtds.so; then + AC_MSG_ERROR(Could not find $FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libtds.[a|so]) fi PHP_ADD_INCLUDE($FREETDS_INCLUDE_DIR) [2008-05-29 20:09:21] brodie at mcw dot edu I have the same issue-- note, this problem is due to that the freetds environment NO LONGER PROVIDES tds.h, or libtds.so. This is a total re-design of freetds, and as such, completely breaks the ability of php to use the -with-mssql option. The re-design of FreeTDS as outlined above was as of version 0.82. As documented, the --with-mssql=[freetds dir] will fail, and will complain that the directory is not a freeTDS directory. [2008-05-14 05:08:27] scourgen at gmail dot com Description: compile failure with freetds version 0.82(no tds.h,libtds.so) Reproduce code: --- configure: ./configure --with-mssql=/usr/local/freetds Expected result: configure: error: Directory /usr/local/freetds is not a FreeTDS installation directory Actual result: -- there is no tds.h,libtds.so in freetds install directory(just in freetds version 0.82) -- Edit this bug report at http://bugs.php.net/?id=44991edit=1
#45117 [Opn-Fbk]: strval gives :.0E-7 for 1e-6
ID: 45117 Updated by: [EMAIL PROTECTED] Reported By: rudolphi at chemie dot uni-kl dot de -Status: Open +Status: Feedback Bug Type: Scripting Engine problem Operating System: Ubuntu 8.04 (32bit) PHP Version: 5.2.6 New Comment: Are you able to reproduce this on some other machine? Or some other *nix / linux distro? Or does it only happen with on one single machine and OS? Previous Comments: [2008-07-16 13:23:32] rudolphi at chemie dot uni-kl dot de My GCC-Version is 4.2.3-1ubuntu6, libgcc1 is 4.2.3-2ubuntu7 and my libc6 is 2.7-10ubuntu3 (the up-to-date-versions of Hardy Heron). Thanks a lot for your efforts in this topic. I have just recompiled PHP 5.2.6 (and restarted apache) to reproduce the error with the very versions mentioned above. The error is still there. [2008-07-16 10:10:38] [EMAIL PROTECTED] I tried with non-debug build too and still can't reproduce. What GCC version do you use..? Glibc? [2008-07-16 10:00:39] [EMAIL PROTECTED] I can't reproduce in 32bit linux either: $ uname -a Linux localhost.localdomain 2.6.25.9-76.fc9.i686 #1 SMP Fri Jun 27 16:14:35 EDT 2008 i686 i686 i386 GNU/Linux [EMAIL PROTECTED] ~]$ src/build/php_5_2/sapi/cli/php -n -r '$float=1e-6; var_dump($float, strval($float));' float(1.0E-6) string(6) 1.0E-6 [2008-07-15 22:17:40] rudolphi at chemie dot uni-kl dot de $ uname -a Linux rudolphi 2.6.24-19-generic #1 SMP Wed Jun 18 14:43:41 UTC 2008 i686 GNU/Linux $ php -n -r '$float=1e-6; var_dump($float, strval($float));' float(:.0E-7) string(6) :.0E-7 $ php -v PHP 5.2.6 (cli) (built: May 29 2008 10:18:45) Copyright (c) 1997-2008 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies [2008-07-15 21:11:20] [EMAIL PROTECTED] I can not reproduce this, check this out: # uname -a Linux linux5 2.6.20-1.2944.fc6 #1 SMP Tue Apr 10 17:46:00 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux # php -n -r '$float=1e-6; var_dump($float, strval($float));' float(1.0E-6) string(6) 1.0E-6 # php -v $ php -v PHP 5.2.7-dev (cli) (built: Jul 15 2008 04:32:33) .. Can you post the same here? 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/45117 -- Edit this bug report at http://bugs.php.net/?id=45117edit=1
#45420 [Bgs]: array_search() finds non-existent element after array_slice()
ID: 45420 User updated by: tomas at matfyz dot cz Reported By: tomas at matfyz dot cz Status: Bogus Bug Type: *General Issues Operating System: Linux PHP Version: 5.2.6 New Comment: I See. What I dislike on PHP is that it is ABSOLUTELY CONTRA-INTUITIVE. I know many computer languages but none of them finds zero when I look for search string. Previous Comments: [2008-07-11 18:43:31] [EMAIL PROTECTED] Do use the third parameter. http://docs.php.net/array-search [2008-07-03 16:35:34] tomas at matfyz dot cz 0 == 'any non-numeric string' Yeees, but how is this related to array_search()? In no way, I believe. Or at least, shouldn't be. [2008-07-03 12:50:16] florian dot ember at gmail dot com array(1) { [0]= int(0) } 0 == 'any non-numeric string' [2008-07-02 18:34:54] tomas at matfyz dot cz Description: array_search() function finds non-existent element after array_slice() is used to slice the array. tested on 5.2.0 and 5.2.5, don't have access to newer system. Reproduce code: --- $a[nazdar] = pozdrav; $a[write] = 1; $a[2] = ahoj; $a = array_slice($a, 2); $keys = array_keys($a); echo keys:\n; var_dump($keys); check_array_search(wrqwdite2, $keys); function check_array_search($val, $keys) { $i = array_search($val, $keys); if ($i === false) { echo OK\n; return; } echo BUG!!! Non-existent value \$val\ found in keys at position $i!!!\n; } Expected result: keys: array(1) { [0]= int(0) } OK Actual result: -- keys: array(1) { [0]= int(0) } BUG!!! Non-existent value wrqwdite2 found in keys at position 0!!! -- Edit this bug report at http://bugs.php.net/?id=45420edit=1
#45497 [Opn-Fbk]: memory leak in select statement for varchar2 above 2000 characters
ID: 45497 Updated by: [EMAIL PROTECTED] Reported By: teju_baba at hotmail dot com -Status: Open +Status: Feedback Bug Type: OCI8 related Operating System: Solaris 10 PHP Version: 5.2.6 Assigned To: sixd Previous Comments: [2008-07-15 06:10:50] teju_baba at hotmail dot com This is the create statement for the 2 tables. CREATE TABLE NAS.AGENCY ( AGENCY_ID NUMBER(9), AGENCY_NAME VARCHAR2(60) NOT NULL , AGENCY_TYPE VARCHAR2(1) NOT NULL , AGENCY_ABBR VARCHAR2(10), ADMIN_HIST VARCHAR2(2000) NOT NULL , DATE_UPDATED DATE NOT NULL , PRIMARY KEY (AGENCY_ID) VALIDATE ) TABLESPACE USERS PCTFREE 10 INITRANS 1 MAXTRANS 255 STORAGE ( INITIAL 128K BUFFER_POOL DEFAULT) LOGGING; CREATE TABLE PIC.PC_CATALOGUE ( CATALOGUE_ID CHAR(10), ACCESSION_NO VARCHAR2(30), NEGATIVE_NO VARCHAR2(30), COLLECTION_TITLE VARCHAR2(1024), SUBJECT VARCHAR2(1024), CAPTION VARCHAR2(1024), MEDIUM VARCHAR2(3), SOURCE VARCHAR2(255), SOURCE_ADDRESS VARCHAR2(255), SOURCE_CONTACT_PERSON VARCHAR2(30), LOCATION VARCHAR2(10), SHELF_NO VARCHAR2(10), IMAGE_NO VARCHAR2(10), ACQUIRED_DATE DATE, ACCESSION_DATE DATE, RECORDING_DATE DATE, ACCESS_CODE VARCHAR2(3), PHOTOCD_ID VARCHAR2(50), PHOTOCD_NO VARCHAR2(50), ACCESSION_CONDITION VARCHAR2(50), REMARK VARCHAR2(255), OWNER VARCHAR2(30), STATUS CHAR(1), CHANGED_BY VARCHAR2(30), CHANGE_DATE DATE, SEARCH_FIELD VARCHAR2(4000), ACCESS_ID VARCHAR2(20), CREATE_DATE DATE, OLD_ACCESSION_NO NUMBER(10), IMAGE_LINK VARCHAR2(1024), EXTERNAL_SOURCE VARCHAR2(255), CAT_REMARKS VARCHAR2(4000), CONSTRAINT PC_CATALOGUE_PK PRIMARY KEY (CATALOGUE_ID) VALIDATE ) TABLESPACE USERS PCTFREE 10 INITRANS 1 MAXTRANS 255 STORAGE ( INITIAL 409600K BUFFER_POOL DEFAULT) LOGGING; Environment Variables: MANPATH=:/usr/man:/usr/share/man:/opt/SUNWvts/man:/opt/SUNWexplo/man:/opt/SUNWsneep/man:/opt/CTEact/man TOMCAT_HOME=/otej/sunSparcSol10/tomcat/apache-tomcat-5.5.26 TERM=xterm SHELL=/bin/bash NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1 TMPDIR=/var/tmp SSH_CLIENT=10.203.2.27 3622 22 OLDPWD=/ SSH_TTY=/dev/pts/2 USER=root LD_LIBRARY_PATH=:/otej/instantclient:/usr/openwin/lib OPENWINHOME=/usr/openwin WEBLOGIC_HOME=/usr/local/bea/weblogic81/server/bin MAIL=/var/mail//root PATH=/usr/sbin:/usr/bin:/usr/local/bin:/otej/j2sdk1.4.2_16/bin:/bin:/usr/ccs/bin:/usr/openwin/bin:/usr/dt/bin:/usr/platform/SUNW,Sun-Fire-V245/sbin:/opt/sun/bin:/opt/SUNWvts/bin:/opt/SUNWexplo/bin:/opt/SUNWsneep/bin:/opt/CTEact/bin PWD=/otej/project/a2osync JAVA_HOME=/otej/j2sdk1.4.2_16 EDITOR=vi TZ=Singapore [EMAIL PROTECTED] # [EMAIL PROTECTED] SHLVL=1 HOME=/ LOGNAME=root SSH_CONNECTION=10.203.2.27 3622 10.203.2.72 22 _=/usr/bin/env * TNS_ADMIN is not set as i do not use tnsnames.ora setting it to /otej/instantclient does not help either Versions: Machine 1: (Web server with Oracle Instant Client) OS: Solaris 10 PHP: 5.2.6 OCI: 1.3.3 Oracle Instant Client: 10.1.0.3 Machine 2: (Oracle DB) OS: Linux (Redhat Enterprise 3) Oracle: 10g Enterprise Edition: 10.1.0.3 I'll try to send you the sample data soon. [2008-07-13 17:24:00] [EMAIL PROTECTED] Can you email me CREATE TABLE and example (not real data) INSERT statements so I have the same values as you? Also let me know your NLS_LANG or other globalization settings, and exact DB version. [2008-07-13 07:54:27] teju_baba at hotmail dot com Here is another example: $query=select catalogue_id, accession_no, negative_no, collection_title, subject, caption, medium, source, source_address, source_contact_person, location, shelf_no, image_no, access_code, photocd_id, photocd_no, accession_condition, remark, owner, status, changed_by, search_field, access_id, old_accession_no, image_link, external_source, cat_remarks from PC_CATALOGUE where CATALOGUE_ID='289713'; Actual Result overflows on search_field and results in garbage for the following fields: Array ( [CATALOGUE_ID] = 289713 [ACCESSION_NO] = 0 [NEGATIVE_NO] = S128961 [COLLECTION_TITLE] = [SUBJECT] = CONSTITUENCIES (VISIT, MEET PEOPLE SESSION, ETC) [CAPTION] = COMMUNICATIONS AND LABOUR MINISTER ONG TENG CHEONG TOURING AYER RAJAH CONSTITUENCY [GROUP DESCRIPTION BY EVENT FROM TRANSFERRING AGENCY] [MEDIUM] = PCD [SOURCE] = MINISTRY OF INFORMATION AND THE ARTS (MITA) [SOURCE_ADDRESS] = [SOURCE_CONTACT_PERSON] = [LOCATION] = [SHELF_NO] = [IMAGE_NO] = 0044 [ACCESS_CODE] = B [PHOTOCD_ID] = 8262-3202-1062 [PHOTOCD_NO] = 19980006698 [ACCESSION_CONDITION] = [REMARK] = [OWNER] = CD IMAGING [STATUS] = 0 [CHANGED_BY] = CD IMAGING [SEARCH_FIELD] = C [ACCESS_ID] = MMUNICATIONS AND LAB [OLD_ACCESSION_NO] = -103019221621693332183419282117282223693512 [IMAGE_LINK] = EVENT FROM TRANSFERRING AGENCY] CONSTITUENCIES (VISIT, MEET PEOPLE
#45471 [Fbk-Csd]: PHP segfaults running the SimplePie test suite
ID: 45471 User updated by: geoffers+phpbugs at gmail dot com Reported By: geoffers+phpbugs at gmail dot com -Status: Feedback +Status: Closed Bug Type: Reproducible crash Operating System: Debian Etch/Mac OS 10.5 PHP Version: 5.3CVS-2008-07-09 (CVS) New Comment: It seems to have been fixed between when I reported this and now. Previous Comments: [2008-07-09 22:06:16] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php for *NIX and http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32 Once you have generated a backtrace, please submit it to this bug report and change the status back to Open. Thank you for helping us make PHP better. Please also try to reduce the size of the testcase. [2008-07-09 21:19:07] geoffers+phpbugs at gmail dot com Description: Whatever OS I attempt to run the SimplePie (trunk the latest release obviously relied upon some bug in PHP and now causes a E_FATAL (which is really a backwards compatibility break, but I digress)) test suite on it results in PHP crashing. I've been unable to create a minimal test case, but it is entirely reproducible. Reproduce code: --- http://svn.simplepie.org/simplepie/trunk/test/test.php Expected result: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01//EN /html Actual result: -- Segfault occurs, after some output. -- Edit this bug report at http://bugs.php.net/?id=45471edit=1
#39078 [Com]: Plus sign in URL arg received as space
ID: 39078 Comment by: edA-qa at disemia dot com Reported By: main at springtimesoftware dot com Status: Open Bug Type: Feature/Change Request Operating System: Windows XP PHP Version: 5.1.6 New Comment: I would also like to add that decoding '+' to a space is just plain wrong. I got burnt again by this when using base64_encode, which should produce URL safe strings, but for PHP it doesn't, since it may include the '+'. A global option to use the proper rawurldecode would be great. Otherwise I'm stuck, like many developers, in reparsing the query string/url manually and unable to use _POST and _GET. Previous Comments: [2008-06-12 00:25:52] jerm at live dot com I'm with David on this. On the client-side, I'm using the JavaScript escape() function to encode data for sending to the server using a POST ajax request. (Original bug report refers to $_GET, but this is also affecting $_POST) The server sees both plus signs + and %20 as spaces. And yes, PHP is seeing the plus, untouched by Apache, as I can prove using: echo file_get_contents(php://input); // Display raw POST This is very frustrating. I'm currently getting around this by parsing the raw POST data manually (above), and not using the pre-parsed $_POST data. [2006-10-10 13:30:10] main at springtimesoftware dot com So, that's it? Just a few ignorant attempts to classify this feature request as Bogus, with no assignment to a developer to make this feature request happen? I'm disappointed. An option to process incoming URL args using rawurldecode instead of urldecode would benefit so many users! David Spector [2006-10-07 22:53:52] main at springtimesoftware dot com I'm not sure I'm following you. Section Reserved: in RFC 1738 (at http://www.freesoft.org/CIE/RFC/1738/4.htm) states: Thus, only alphanumerics, the special characters $-_.+!*'(),, and reserved characters used for their reserved purposes may be used unencoded within a URL. Since + is listed, I would expect that any agent that obeyed this RFC would transmit + unchanged. That means that Apache should transmit + unchanged to PHP. This is why I would be surprised to find that Apache is the cause of this problem. Indeed, if I browse (using IE 6.0) to a Web page that contains a call to phpinfo(), browsing using a URL that contains the argument Arg=+%20, then phpinfo() reports that _SERVER[QUERY_STRING] has the value Arg=+%20. (I just did this, I'm not making this up.) This confirms that the plus sign is getting to PHP okay. So wouldn't you agree with me that Apache cannot be causing this problem? PHP must be using urldecode() when it parses the arguments into the $_GET array, yes? Otherwise, how would the plus sign in the argument become a space? David [2006-10-07 22:15:37] [EMAIL PROTECTED] It's not hard to believe... it's what the RFC states: http://www.freesoft.org/CIE/RFC/1738/4.htm, read the section unsafe. [2006-10-07 21:44:08] main at springtimesoftware dot com So you are saying that this problem is definitely in Apache, not in PHP? You are saying that Apache converts plus signs into spaces? Please confirm this, it is hard to believe. David 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/39078 -- Edit this bug report at http://bugs.php.net/?id=39078edit=1
#45533 [NEW]: cURL output includes content from redirects when CURLOPT_FOLLOWLOCATION set
From: signe at cothlamadh dot net Operating system: FreeBSD 7.0 PHP version: 5.2.6 PHP Bug Type: cURL related Bug description: cURL output includes content from redirects when CURLOPT_FOLLOWLOCATION set Description: When retrieving a url that utilizes a 302 redirect, along with viewable error-document content, the error-document is prepended to any REAL content that is retrieved after following the redirect. This issue is compounded when CURLOPT_HEADER is enabled, because the error-document content is not counted in any of the getinfo data. Reproduce code: --- http://www.cothlamadh.net/~signe/.outgoing/curl_location.phps Tested with curl 7.18.0 on FreeBSD 7 and 7.16.4-2ubuntu1 on Ubuntu Gutsy. Expected result: Non-header data from redirects should not be included in the returned content. Actual result: -- Without headers enabled, the content returned looks like this: RedirectErrorDocumentContent ActualDocument There is no whitespace between the two documents. With headers enabled, it's much much worse. RedirectHeader RedirectErrorDocumentContent ActualDocumentHeader ActualDocument There is whitespace between each set of headers and its respective content, but not between the first content and the second batch of headers. To make matters worse, curl_getinfo($cUrl, CURLINFO_HEADER_SIZE) returns the combined length of both header sections, as is expected, and curl_getinfo($cUrl, CURLINFO_CONTENT_LENGTH_DOWNLOAD) returns the length of the ActualDocument, also as expected. The result of this is that RedirectErrorDocumentContent gets tossed in the middle invisibly. This makes it impossible to cleanly split the document into header and content sections. -- Edit bug report at http://bugs.php.net/?id=45533edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45533r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45533r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45533r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45533r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45533r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45533r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=45533r=needscript Try newer version:http://bugs.php.net/fix.php?id=45533r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45533r=support Expected behavior:http://bugs.php.net/fix.php?id=45533r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45533r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45533r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45533r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45533r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45533r=dst IIS Stability:http://bugs.php.net/fix.php?id=45533r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45533r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45533r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45533r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=45533r=mysqlcfg
#45534 [NEW]: Wrong date returned for function jewishtojd
From: georgew at rationalcomputing dot ca Operating system: Windows Vista PHP version: 5.2.6 PHP Bug Type: Date/time related Bug description: Wrong date returned for function jewishtojd Description: The Jewish date for Yom Kippur and Rosh Hashanah are consistently 1 day off. I attempted to reproduce these days for the next 10 years and converting them to Gregorian dates and below are my results. Please note I am using 1,1,5769 to 1,1,5778 for Rosh Hashanah (the 2nd day) and 1,10,5769 to 1,10,5778 for Yom Kippur as shown in the reproduce code section below. Also, I have done it for the other Jewish holidays and although I have not thoroughly tested there it seems correct for those. Reproduce code: --- function heb_greg($hebmon,$hebday,$hebyear) { return jdtogregorian(jewishtojd($hebmon,$hebday,$hebyear)); } echo (heb_greg(1,1,5769)),br ; echo (heb_greg(1,10,5769)),br ; echo (heb_greg(1,1,5770)),br ; echo (heb_greg(1,10,5770)),br ; echo (heb_greg(1,1,5771)),br ; echo (heb_greg(1,10,5771)),br ; echo (heb_greg(1,1,5772)),br ; echo (heb_greg(1,10,5772)),br ; echo (heb_greg(1,1,5773)),br ; echo (heb_greg(1,10,5773)),br ; echo (heb_greg(1,1,5774)),br ; echo (heb_greg(1,10,5774)),br ; echo (heb_greg(1,1,5775)),br ; echo (heb_greg(1,10,5775)),br ; echo (heb_greg(1,1,5776)),br ; echo (heb_greg(1,10,5776)),br ; echo (heb_greg(1,1,5777)),br ; echo (heb_greg(1,10,5777)),br ; echo (heb_greg(1,1,5778)),br ; echo (heb_greg(1,10,5778)),br ; Expected result: The expected result is: 9/30/2008 10/8/2008 9/19/2009 9/27/2009 9/9/2010 9/17/2010 9/29/2011 10/7/2011 9/17/2012 9/25/2012 9/5/2013 9/13/2013 9/25/2014 10/3/2014 9/14/2015 9/22/2015 10/3/2016 10/11/2016 9/21/2017 9/29/2017 Actual result: -- The actual result is 9/30/2008 10/9/2008 9/19/2009 9/28/2009 9/9/2010 9/18/2010 9/29/2011 10/8/2011 9/17/2012 9/26/2012 9/5/2013 9/14/2013 9/25/2014 10/4/2014 9/14/2015 9/23/2015 10/3/2016 10/12/2016 9/21/2017 9/30/2017 -- Edit bug report at http://bugs.php.net/?id=45534edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45534r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45534r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45534r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45534r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45534r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45534r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=45534r=needscript Try newer version:http://bugs.php.net/fix.php?id=45534r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45534r=support Expected behavior:http://bugs.php.net/fix.php?id=45534r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45534r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45534r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45534r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45534r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45534r=dst IIS Stability:http://bugs.php.net/fix.php?id=45534r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45534r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45534r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45534r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=45534r=mysqlcfg
#45273 [Fbk]: Unable to make SSL connection to MySQL DB using mysqli::real_connect
ID: 45273 Updated by: [EMAIL PROTECTED] Reported By: luciandipeso at yahoo dot com Status: Feedback Bug Type: MySQLi related Operating System: OS X, FreeBSD PHP Version: 5.2.6 Assigned To: uw New Comment: Yes, I'm asking if you can reproduce is using a CLI script. The idea is to break the problem down into smaller pieces. Your current setup consists of web server plus PHP. Would be cool if you could provide an example where no web server is involved. Code 500 sounds like internal server error and a crash or something similar. Ideally we would skip debugging the web server. If not, :-(, what does the web server log say... anything helpful? Ulf Previous Comments: [2008-07-14 20:57:41] [EMAIL PROTECTED] Kick out webserver == use PHP CLI.. [2008-07-14 20:15:14] luciandipeso at yahoo dot com I'm not sure what you mean by kick out the web server and try a command line script. I am able to connect to MySQL using SSL from the command line, but I haven't tried PHP CLI if that's what you mean. I'm not sure if this is a duplicate bug -- in #41778, the person actually gets an error returned. For me, the script just hangs until it times out and I get a 500 status code. I've also tried specifying the SSL certs in a my.cnf file, and skipping the $db-ssl_set call, but that doesn't work either. [2008-07-14 19:39:53] [EMAIL PROTECTED] Please check if your report is a duplicate of http://bugs.php.net/bug.php?id=41778 . Kick out the web server and try a command line script. If its a duplicate, which I guess, we can close this one. [2008-06-19 18:51:47] luciandipeso at yahoo dot com I'm starting to think that the problem is that mysqli_ssl_set() is not working -- no certs are being specified, and so when PHP tries to connect over SSL to MySQL, it just hangs. [2008-06-14 23:22:39] luciandipeso at yahoo dot com -- Should say When I supply the MYSQLI_CLIENT_SSL flag to mysqli::real_connect, the script hangs until it either not I either :) 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/45273 -- Edit this bug report at http://bugs.php.net/?id=45273edit=1
#45533 [Opn]: cURL output includes content from redirects when CURLOPT_FOLLOWLOCATION set
ID: 45533 User updated by: signe at cothlamadh dot net Reported By: signe at cothlamadh dot net Status: Open Bug Type: cURL related Operating System: FreeBSD 7.0 PHP Version: 5.2.6 New Comment: Of course, after posting the reproduction, the server that was causing the issue modified something and it's no longer reproducing against them. This was the original output from a request to their server: telnet www.crn.com 80 Trying 66.77.24.10... Connected to crn.com. Escape character is '^]'. GET /rss/cisco/index.xml HTTP/1.1 Host: www.crn.com HTTP/1.1 302 Found Date: Wed, 16 Jul 2008 21:52:30 GMT Server: Apache Location: http://feeds.pheedo.com/rss/cisco Transfer-Encoding: chunked Content-Type: text/html; charset=iso-8859-1 Vary: Accept-Encoding, User-Agent 119 !DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN HTMLHEAD TITLE302 Found/TITLE /HEADBODY H1Found/H1 The document has moved A HREF=http://feeds.pheedo.com/rss/cisco;here/A.P HR ADDRESSApache/1.3.29 Server at www.crn.com Port 80/ADDRESS /BODY/HTML 0 Connection closed by foreign host. Previous Comments: [2008-07-16 21:30:14] signe at cothlamadh dot net Description: When retrieving a url that utilizes a 302 redirect, along with viewable error-document content, the error-document is prepended to any REAL content that is retrieved after following the redirect. This issue is compounded when CURLOPT_HEADER is enabled, because the error-document content is not counted in any of the getinfo data. Reproduce code: --- http://www.cothlamadh.net/~signe/.outgoing/curl_location.phps Tested with curl 7.18.0 on FreeBSD 7 and 7.16.4-2ubuntu1 on Ubuntu Gutsy. Expected result: Non-header data from redirects should not be included in the returned content. Actual result: -- Without headers enabled, the content returned looks like this: RedirectErrorDocumentContent ActualDocument There is no whitespace between the two documents. With headers enabled, it's much much worse. RedirectHeader RedirectErrorDocumentContent ActualDocumentHeader ActualDocument There is whitespace between each set of headers and its respective content, but not between the first content and the second batch of headers. To make matters worse, curl_getinfo($cUrl, CURLINFO_HEADER_SIZE) returns the combined length of both header sections, as is expected, and curl_getinfo($cUrl, CURLINFO_CONTENT_LENGTH_DOWNLOAD) returns the length of the ActualDocument, also as expected. The result of this is that RedirectErrorDocumentContent gets tossed in the middle invisibly. This makes it impossible to cleanly split the document into header and content sections. -- Edit this bug report at http://bugs.php.net/?id=45533edit=1
#38001 [NoF]: In PDO mysql running multiple queries with one exec, subsequent query fails
ID: 38001 Updated by: [EMAIL PROTECTED] Reported By: mark-phpbugs at vectrex dot org dot uk Status: No Feedback Bug Type: PDO related Operating System: Linux PHP Version: 5.1.4 New Comment: Multi-query is a MySQL specific feature and the PDO API does not support it properly. Multi-query are a potential security risk as they make SQL injections easier. This is against the idea of PDO to be secure. Check this article http://blog.ulf-wendel.de/?p=192 for details . PDO_MYSQLND will fix the bug: [EMAIL PROTECTED]:~/php53 sapi/cli/php -r '$db = new PDO(mysql:host=localhost;dbname=test, root, root); $db-exec(DROP TABLE IF EXISTS test; CREATE TABLE test(id INT); INSERT INTO test(id) VALUES(1)); $stmt = $db-query(SELECT * FROM test); var_dump($stmt-fetchAll(PDO::FETCH_ASSOC)); var_dump($db-errorInfo());' array(1) { [0]= array(1) { [id]= string(1) 1 } } array(1) { [0]= string(5) 0 } Previous Comments: [2008-07-16 10:47:19] andrea at bhweb dot it Although nasty, I found a workaround, like the one used in mysqli to consume the resultsets: $stmt=$ppdb-prepare($query); $stmt-execute(); do { $stmt-fetch(); $stmt-closeCursor(); ++$line; } while($stmt- nextRowset()); I found this only works using prepare and execute this way, not if you directly execute the query with query(). HTH [2006-07-12 01:00:01] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to Open. [2006-07-04 22:11:48] mark-phpbugs at vetrex dot org dot uk I've tried this with the latest snapshot, php5.2-200607042030, and the problem remains. [2006-07-04 19:40:37] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.2-win32-latest.zip Works for me using MySQ 5.0.22 [2006-07-04 09:12:06] mark-phpbugs at vectrex dot org dot uk Description: When running multiple queries with one exec, the queries succeed (or appear to succeed, with no exception), but a subsequent query fails with 2013 Lost connection to MySQL server during query I'm using MySQL 5.0.20a-Debian_2-log on Debian Linux. Client library version is PDO Driver for MySQL, client library version = 5.0.22 This is similar to bogus bug #37732 which affects mysqli - But in PDO there is no way to manually consume the empty result sets from an exec() - PDO should really do it automatically. Reproduce code: --- ?php error_reporting(E_ALL); function DbInit() { global $db; $options = array(); $connstr = mysql:host=localhost;dbname=test; $db = new PDO($connstr, root, , $options); $db-setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION); // Make sure our connections use utf8. $db-exec(SET NAMES utf8); } function TestBatch() { global $db; $sql = CREATE TEMPORARY table b (t varchar(20)); $sql2 = INSERT INTO b VALUES ('hello'); /* This works $db-exec($sql); $db-exec($sql2); */ /* This fails because the subsequent query gives 2013 Lost connection to MySQL server during query */ $db-exec($sql . ; . $sql2); $sth = $db-query(SELECT * FROM b); var_dump($sth-fetchAll(PDO::FETCH_ASSOC)); } DbInit(); TestBatch(); ? Expected result: array(1) { [0]= array(1) { [t]= string(5) hello } } Actual result: -- Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 2013 Lost connection to MySQL server during query' in /home/mark/progs/phptest/pdobatch.php:30 Stack trace: #0 /home/mark/progs/phptest/pdobatch.php(30): PDO-query('SELECT * FROM b') #1 /home/mark/progs/phptest/pdobatch.php(35): TestBatch() #2 {main} thrown in /home/mark/progs/phptest/pdobatch.php on line 30 -- Edit this bug report at http://bugs.php.net/?id=38001edit=1
#45273 [Fbk-Opn]: Unable to make SSL connection to MySQL DB using mysqli::real_connect
ID: 45273 User updated by: luciandipeso at yahoo dot com Reported By: luciandipeso at yahoo dot com -Status: Feedback +Status: Open Bug Type: MySQLi related Operating System: OS X, FreeBSD PHP Version: 5.2.6 Assigned To: uw New Comment: I checked my MySQL and Apache logs, and neither had anything. :-( I'll try CLI in a little bit. I don't always get a 500 -- it depends on the server. On my MacBook Pro (running Apache 1.x), I just get a message saying the server unexpectadly dropped the connection. On a FreeBSD server running Apache (not sure which version), I get a 500. I believe the FreeBSD is running PHP under FCGI, while my Mac is using mod_, so that might explain the difference. Previous Comments: [2008-07-16 21:57:34] [EMAIL PROTECTED] Yes, I'm asking if you can reproduce is using a CLI script. The idea is to break the problem down into smaller pieces. Your current setup consists of web server plus PHP. Would be cool if you could provide an example where no web server is involved. Code 500 sounds like internal server error and a crash or something similar. Ideally we would skip debugging the web server. If not, :-(, what does the web server log say... anything helpful? Ulf [2008-07-14 20:57:41] [EMAIL PROTECTED] Kick out webserver == use PHP CLI.. [2008-07-14 20:15:14] luciandipeso at yahoo dot com I'm not sure what you mean by kick out the web server and try a command line script. I am able to connect to MySQL using SSL from the command line, but I haven't tried PHP CLI if that's what you mean. I'm not sure if this is a duplicate bug -- in #41778, the person actually gets an error returned. For me, the script just hangs until it times out and I get a 500 status code. I've also tried specifying the SSL certs in a my.cnf file, and skipping the $db-ssl_set call, but that doesn't work either. [2008-07-14 19:39:53] [EMAIL PROTECTED] Please check if your report is a duplicate of http://bugs.php.net/bug.php?id=41778 . Kick out the web server and try a command line script. If its a duplicate, which I guess, we can close this one. [2008-06-19 18:51:47] luciandipeso at yahoo dot com I'm starting to think that the problem is that mysqli_ssl_set() is not working -- no certs are being specified, and so when PHP tries to connect over SSL to MySQL, it just hangs. 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/45273 -- Edit this bug report at http://bugs.php.net/?id=45273edit=1
#45533 [Opn-Fbk]: cURL output includes content from redirects when CURLOPT_FOLLOWLOCATION set
ID: 45533 Updated by: [EMAIL PROTECTED] Reported By: signe at cothlamadh dot net -Status: Open +Status: Feedback Bug Type: cURL related Operating System: FreeBSD 7.0 PHP Version: 5.2.6 New Comment: Can you reproduce this using curl on command line? ie. without PHP? Previous Comments: [2008-07-16 22:03:49] signe at cothlamadh dot net Of course, after posting the reproduction, the server that was causing the issue modified something and it's no longer reproducing against them. This was the original output from a request to their server: telnet www.crn.com 80 Trying 66.77.24.10... Connected to crn.com. Escape character is '^]'. GET /rss/cisco/index.xml HTTP/1.1 Host: www.crn.com HTTP/1.1 302 Found Date: Wed, 16 Jul 2008 21:52:30 GMT Server: Apache Location: http://feeds.pheedo.com/rss/cisco Transfer-Encoding: chunked Content-Type: text/html; charset=iso-8859-1 Vary: Accept-Encoding, User-Agent 119 !DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN HTMLHEAD TITLE302 Found/TITLE /HEADBODY H1Found/H1 The document has moved A HREF=http://feeds.pheedo.com/rss/cisco;here/A.P HR ADDRESSApache/1.3.29 Server at www.crn.com Port 80/ADDRESS /BODY/HTML 0 Connection closed by foreign host. [2008-07-16 21:30:14] signe at cothlamadh dot net Description: When retrieving a url that utilizes a 302 redirect, along with viewable error-document content, the error-document is prepended to any REAL content that is retrieved after following the redirect. This issue is compounded when CURLOPT_HEADER is enabled, because the error-document content is not counted in any of the getinfo data. Reproduce code: --- http://www.cothlamadh.net/~signe/.outgoing/curl_location.phps Tested with curl 7.18.0 on FreeBSD 7 and 7.16.4-2ubuntu1 on Ubuntu Gutsy. Expected result: Non-header data from redirects should not be included in the returned content. Actual result: -- Without headers enabled, the content returned looks like this: RedirectErrorDocumentContent ActualDocument There is no whitespace between the two documents. With headers enabled, it's much much worse. RedirectHeader RedirectErrorDocumentContent ActualDocumentHeader ActualDocument There is whitespace between each set of headers and its respective content, but not between the first content and the second batch of headers. To make matters worse, curl_getinfo($cUrl, CURLINFO_HEADER_SIZE) returns the combined length of both header sections, as is expected, and curl_getinfo($cUrl, CURLINFO_CONTENT_LENGTH_DOWNLOAD) returns the length of the ActualDocument, also as expected. The result of this is that RedirectErrorDocumentContent gets tossed in the middle invisibly. This makes it impossible to cleanly split the document into header and content sections. -- Edit this bug report at http://bugs.php.net/?id=45533edit=1
#45419 [Opn-Fbk]: curl_exec returns output when called from command line, FALSE from apache
ID: 45419 Updated by: [EMAIL PROTECTED] Reported By: circular at pctechnology dot gr -Status: Open +Status: Feedback Bug Type: cURL related Operating System: Debian sarge PHP Version: 5.2.6 New Comment: Did you compile everything yourself? Including Apache? This is very unlikely to be any bug, just some misconfiguration. Try recompiling PHP without any extra stuff. Just using --with-apxs2 and --with-curl options. Previous Comments: [2008-07-02 16:14:09] circular at pctechnology dot gr Description: When the CURLOPT_RETURNTRANSFER option is set curl_exec returns the correct output when called from the command line, but FALSE when called through apache. Configuration: curl version: 7.18.2, apache 2.0.54 './configure' '--prefix=/usr/local' '--with-apxs2=/usr/bin/apxs2' '--with-config-file-path=/etc/php5/apache2' '--disable-debug' '--with-regex=php' '--disable-rpath' '--disable-static' '--with-pic' '--with-layout=GNU' '--with-pear=/usr/share/php' '--enable-calendar' --enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-bcmath' '--with-bz2' '--enable-ctype' '--with-db4' '--with-iconv' '--enable-exif' '--enable-ftp' '--with-gettext' '--enable-mbstring' '--with-pcre-regex=/usr/local' '--enable-shmop' '--enable-sockets' '--enable-wddx' '--enable-xml' '--with-xmlrpc' '--with-zlib' '--without-pgsql' '--with-kerberos=/usr' '--with-openssl=/usr' '--enable-zip' '--with-mime-magic=/usr/share/misc/file/magic.mime' '--with-exec-dir=/usr/lib/php5/libexec' '--without-mm' '--with-mysql' '--without-sybase-ct' '--with-gd=/usr/local' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/usr' '--with-freetype-dir=/usr/local' '--enable-gd-native-ttf' '--with-curl=/usr/local' Reproduce code: --- $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, http://some.url;); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $converted = curl_exec($ch); curl_close($ch); var_dump($converted); Expected result: curl_exec returning the same output when the code runs either from the console or apache. Actual result: -- the expected output when the code runs from the command line, FALSE when run from within apache. The error code returned is 28 (connection time-out), and curl_getinfo returns a negative value for CURLINFO_NAMELOOKUP_TIME. No errors are logged in apache or system logs. -- Edit this bug report at http://bugs.php.net/?id=45419edit=1
#44555 [Opn]: mysql.connect_timeout ignored
ID: 44555 Updated by: [EMAIL PROTECTED] Reported By: tstarling at wikimedia dot org Status: Open Bug Type: MySQL related Operating System: Windows XP PHP Version: 5.2.5 Assigned To: uw New Comment: As I see it the upper wait time is set to 100s. Your Windows gives a DNS timeout after 20s. PHP bails at you after 20s. 20s 100s, all fine. Previous Comments: [2008-07-15 16:21:05] tstarling at wikimedia dot org s/ARIN/IANA [2008-07-15 15:27:20] tstarling at wikimedia dot org No of course the host 1.2.3.4 doesn't exist, it's an IP address in the unused 1.0.0.0/8 block reserved by ARIN, that's the point. If I instead use a hostname for a host which responds to DNS rapidly, but drops ignores SYN packets on the port in question (such as www.google.com), the result is the same. Are you asking me this question because you've tried it and can't reproduce it? If so, maybe I can help to isolate the configuration. [2008-07-14 16:57:08] [EMAIL PROTECTED] Does the host 1.2.3.4 exist? If not, you're probably running into the default DNS lookup timeout of your system - bogus, not a bug. Try changing your system settings, http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/regentry/96406.mspx?mfr=true [2008-03-28 09:03:03] tstarling at wikimedia dot org Description: mysql.connect_timeout is ignored, a fixed timeout of 20s is used. Observed on PHP 5.2.5 WinXP, not observed on PHP 5.1.4 Linux. Reproduce code: --- print mysql_get_client_info() .\n; ini_set('mysql.connect_timeout',1); $t = -microtime(true); mysql_connect('1.2.3.4'); $t += microtime(true); print $t\n; ini_set('mysql.connect_timeout',100); $t = -microtime(true); mysql_connect('1.2.3.4'); $t += microtime(true); print $t\n; Expected result: 5.0.45 1.00128006935 99.9788169861 Actual result: -- 5.0.45 20.999632 21.0206007957 -- Edit this bug report at http://bugs.php.net/?id=44555edit=1
#45533 [Fbk-Opn]: cURL output includes content from redirects when CURLOPT_FOLLOWLOCATION set
ID: 45533 User updated by: signe at cothlamadh dot net Reported By: signe at cothlamadh dot net -Status: Feedback +Status: Open Bug Type: cURL related Operating System: FreeBSD 7.0 PHP Version: 5.2.6 New Comment: I didn't try before reporting, and since they've made a modification, my one known verification site is lost. I saw this bug in a previous version of php (5.1.2, I believe) and at that point in time, I couldn't replicate it with curl commandline. I upgraded to 5.2.3 (along with a newer libcurl) on that particular server and wasn't able to reproduce it after the upgrade so I didn't report it at the time. I need to try to create a redirect script that can cause the behavior - until I do, no, I can't reproduce it in either PHP or curl. Previous Comments: [2008-07-16 22:29:29] [EMAIL PROTECTED] Can you reproduce this using curl on command line? ie. without PHP? [2008-07-16 22:03:49] signe at cothlamadh dot net Of course, after posting the reproduction, the server that was causing the issue modified something and it's no longer reproducing against them. This was the original output from a request to their server: telnet www.crn.com 80 Trying 66.77.24.10... Connected to crn.com. Escape character is '^]'. GET /rss/cisco/index.xml HTTP/1.1 Host: www.crn.com HTTP/1.1 302 Found Date: Wed, 16 Jul 2008 21:52:30 GMT Server: Apache Location: http://feeds.pheedo.com/rss/cisco Transfer-Encoding: chunked Content-Type: text/html; charset=iso-8859-1 Vary: Accept-Encoding, User-Agent 119 !DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN HTMLHEAD TITLE302 Found/TITLE /HEADBODY H1Found/H1 The document has moved A HREF=http://feeds.pheedo.com/rss/cisco;here/A.P HR ADDRESSApache/1.3.29 Server at www.crn.com Port 80/ADDRESS /BODY/HTML 0 Connection closed by foreign host. [2008-07-16 21:30:14] signe at cothlamadh dot net Description: When retrieving a url that utilizes a 302 redirect, along with viewable error-document content, the error-document is prepended to any REAL content that is retrieved after following the redirect. This issue is compounded when CURLOPT_HEADER is enabled, because the error-document content is not counted in any of the getinfo data. Reproduce code: --- http://www.cothlamadh.net/~signe/.outgoing/curl_location.phps Tested with curl 7.18.0 on FreeBSD 7 and 7.16.4-2ubuntu1 on Ubuntu Gutsy. Expected result: Non-header data from redirects should not be included in the returned content. Actual result: -- Without headers enabled, the content returned looks like this: RedirectErrorDocumentContent ActualDocument There is no whitespace between the two documents. With headers enabled, it's much much worse. RedirectHeader RedirectErrorDocumentContent ActualDocumentHeader ActualDocument There is whitespace between each set of headers and its respective content, but not between the first content and the second batch of headers. To make matters worse, curl_getinfo($cUrl, CURLINFO_HEADER_SIZE) returns the combined length of both header sections, as is expected, and curl_getinfo($cUrl, CURLINFO_CONTENT_LENGTH_DOWNLOAD) returns the length of the ActualDocument, also as expected. The result of this is that RedirectErrorDocumentContent gets tossed in the middle invisibly. This makes it impossible to cleanly split the document into header and content sections. -- Edit this bug report at http://bugs.php.net/?id=45533edit=1
#45066 [Opn-Fbk]: Cannot compile a working php with mysql and mysqli
ID: 45066 Updated by: [EMAIL PROTECTED] Reported By: dirk at bean-it dot nl -Status: Open +Status: Feedback Bug Type: MySQL related Operating System: Debian 4.0 / x86_64 PHP Version: 5.2.6 New Comment: One last question: Are you able to reproduce this problem on any other machine? Previous Comments: [2008-07-16 06:33:56] dirk at bean-it dot nl OK, here is the full valgrind output, minus the php output, to shorten things a little. Cheers, Dirk ==29926== Memcheck, a memory error detector. ==29926== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et al. ==29926== Using LibVEX rev 1658, a library for dynamic binary translation. ==29926== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP. ==29926== Using valgrind-3.2.1-Debian, a dynamic binary instrumentation framework. ==29926== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al. ==29926== For more details, rerun with: -v ==29926== ==29926== Conditional jump or move depends on uninitialised value(s) ==29926==at 0x4010AB3: (within /lib/ld-2.3.6.so) ==29926==by 0x4006CB6: (within /lib/ld-2.3.6.so) ==29926==by 0x572D230: (within /lib/libc-2.3.6.so) ==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so) ==29926==by 0x572CCC7: _dl_open (in /lib/libc-2.3.6.so) ==29926==by 0x572F467: (within /lib/libc-2.3.6.so) ==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so) ==29926==by 0x572F4B1: __libc_dlopen_mode (in /lib/libc-2.3.6.so) ==29926==by 0x570A426: __nss_lookup_function (in /lib/libc-2.3.6.so) ==29926==by 0x570A4D4: (within /lib/libc-2.3.6.so) ==29926==by 0x5710E82: getservbyname_r (in /lib/libc-2.3.6.so) ==29926==by 0x5710C43: getservbyname (in /lib/libc-2.3.6.so) ==29926== ==29926== Conditional jump or move depends on uninitialised value(s) ==29926==at 0x4010AC2: (within /lib/ld-2.3.6.so) ==29926==by 0x4006CB6: (within /lib/ld-2.3.6.so) ==29926==by 0x572D230: (within /lib/libc-2.3.6.so) ==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so) ==29926==by 0x572CCC7: _dl_open (in /lib/libc-2.3.6.so) ==29926==by 0x572F467: (within /lib/libc-2.3.6.so) ==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so) ==29926==by 0x572F4B1: __libc_dlopen_mode (in /lib/libc-2.3.6.so) ==29926==by 0x570A426: __nss_lookup_function (in /lib/libc-2.3.6.so) ==29926==by 0x570A4D4: (within /lib/libc-2.3.6.so) ==29926==by 0x5710E82: getservbyname_r (in /lib/libc-2.3.6.so) ==29926==by 0x5710C43: getservbyname (in /lib/libc-2.3.6.so) ==29926== ==29926== Conditional jump or move depends on uninitialised value(s) ==29926==at 0x4010AD1: (within /lib/ld-2.3.6.so) ==29926==by 0x4006CB6: (within /lib/ld-2.3.6.so) ==29926==by 0x572D230: (within /lib/libc-2.3.6.so) ==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so) ==29926==by 0x572CCC7: _dl_open (in /lib/libc-2.3.6.so) ==29926==by 0x572F467: (within /lib/libc-2.3.6.so) ==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so) ==29926==by 0x572F4B1: __libc_dlopen_mode (in /lib/libc-2.3.6.so) ==29926==by 0x570A426: __nss_lookup_function (in /lib/libc-2.3.6.so) ==29926==by 0x570A4D4: (within /lib/libc-2.3.6.so) ==29926==by 0x5710E82: getservbyname_r (in /lib/libc-2.3.6.so) ==29926==by 0x5710C43: getservbyname (in /lib/libc-2.3.6.so) ==29926== ==29926== Conditional jump or move depends on uninitialised value(s) ==29926==at 0x4010C47: (within /lib/ld-2.3.6.so) ==29926==by 0x4006E47: (within /lib/ld-2.3.6.so) ==29926==by 0x572D230: (within /lib/libc-2.3.6.so) ==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so) ==29926==by 0x572CCC7: _dl_open (in /lib/libc-2.3.6.so) ==29926==by 0x572F467: (within /lib/libc-2.3.6.so) ==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so) ==29926==by 0x572F4B1: __libc_dlopen_mode (in /lib/libc-2.3.6.so) ==29926==by 0x570A426: __nss_lookup_function (in /lib/libc-2.3.6.so) ==29926==by 0x570A4D4: (within /lib/libc-2.3.6.so) ==29926==by 0x5710E82: getservbyname_r (in /lib/libc-2.3.6.so) ==29926==by 0x5710C43: getservbyname (in /lib/libc-2.3.6.so) ==29926== ==29926== Conditional jump or move depends on uninitialised value(s) ==29926==at 0x4010C47: (within /lib/ld-2.3.6.so) ==29926==by 0x400B8A2: (within /lib/ld-2.3.6.so) ==29926==by 0x400733A: (within /lib/ld-2.3.6.so) ==29926==by 0x572D230: (within /lib/libc-2.3.6.so) ==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so) ==29926==by 0x572CCC7: _dl_open (in /lib/libc-2.3.6.so) ==29926==by 0x572F467: (within /lib/libc-2.3.6.so) ==29926==by 0x400B7D0: (within /lib/ld-2.3.6.so) ==29926==by 0x572F4B1: __libc_dlopen_mode (in /lib/libc-2.3.6.so) ==29926==by 0x570A426: __nss_lookup_function (in /lib/libc-2.3.6.so) ==29926==by 0x570A4D4: (within /lib/libc-2.3.6.so) ==29926==by 0x5710E82: getservbyname_r (in /lib/libc-2.3.6.so)
#40080 [Opn-Fbk]: wddx_deserialize has unicode bug
ID: 40080 Updated by: [EMAIL PROTECTED] Reported By: tim at whiteinteractive dot com -Status: Open +Status: Feedback Bug Type: WDDX related Operating System: Redhat OS X PHP Version: 4.4.4 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi Previous Comments: [2007-07-11 13:08:16] [EMAIL PROTECTED] See also bug #38900 [2007-01-09 19:44:57] tim at whiteinteractive dot com It looks like wddx_deserialize converts any single char node with code point above decimal 192 wrongly! See: http://www.whiteinteractive.com/utf8bug/test3.php and source: http://www.whiteinteractive.com/utf8bug/test3.phps [2007-01-09 18:38:43] tim at whiteinteractive dot com Description: wddx_deseralize seems to convert utf8 character sequences wrongly from char nodes. Just the leading byte seems to be off, the subsequent one[s] are correct. Tested on both 4.3.11 (Redhat) and 4.4.5RC1 (OS X) Please see my test page below. P.S. Sorry for duplicate post (#40052) I decided the category was wrong. Reproduce code: --- Interactive example: http://whiteinteractive.com/utf8bug/test2.php and source: http://whiteinteractive.com/utf8bug/test2.phps -- Edit this bug report at http://bugs.php.net/?id=40080edit=1
#38900 [Asn-Fbk]: wddx mangles utf8 characters in serialized strings
ID: 38900 Updated by: [EMAIL PROTECTED] Reported By: grzegorz dot nosek at netart dot pl -Status: Assigned +Status: Feedback Bug Type: WDDX related Operating System: Linux PHP Version: 4.4.4 Assigned To: andrei New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi Previous Comments: [2007-07-16 08:40:33] grzegorz dot nosek at netart dot pl Yes, it's apparently a duplicate, or at least related. The symptoms are certainly similar. [2007-07-11 13:08:30] [EMAIL PROTECTED] See also bug #40080 [2006-09-20 13:40:18] grzegorz dot nosek at netart dot pl Description: wddx gets confused if you try to serialize a string with utf8 characters (like the one below, it contains 'z with dot above', 'o acute', 'l stroke' and 'w' - in case it gets messed up somehow). serialized string will contain char code='C5'/char code='BC'/ ... etc, which will get fed into xml_utf8_decode byte by byte (after decoding the hex value), totally wrecking the output. Hackish patch which fixes this (whitespace mangled mercilessly, adjust to taste): --- a/ext/wddx/wddx.c +++ b/ext/wddx/wddx.c @@ -1038,8 +1038,13 @@ static void php_wddx_process_data(void * if (!wddx_stack_is_empty(stack) !stack-done) { wddx_stack_top(stack, (void**)ent); switch (Z_TYPE_P(ent)) { - case ST_STRING: - decoded = xml_utf8_decode(s, len, decoded_len, ISO-8859-1); + case ST_STRING: + if (len 1) { + decoded = xml_utf8_decode(s, len, decoded_len, ISO-8859-1); + } else { + decoded = estrndup(s, len); + decoded_len = len; + } if (Z_STRLEN_P(ent-data) == 0) { Z_STRVAL_P(ent-data) = estrndup(decoded, decoded_len); Reproduce code: --- --TEST-- wddx_deserialize mangles utf8 characters --SKIPIF-- ?php if (!extension_loaded(wddx)) print skip; ? --FILE-- ?php $zolw = iconv(ISO-8859-2, UTF-8, #380;ó#322;w); $in = array ( $zolw = $zolw ); var_dump(array_diff($in, wddx_deserialize(wddx_serialize_value($in; ? --EXPECT-- array(0) { } -- Edit this bug report at http://bugs.php.net/?id=38900edit=1
#41393 [Asn-WFx]: affected can't return
ID: 41393 Updated by: [EMAIL PROTECTED] Reported By: hack988 at gmail dot com -Status: Assigned +Status: Wont fix Bug Type: MSSQL related Operating System: windows 2003 PHP Version: 4.4.7 Assigned To: fmk New Comment: We are sorry, but we can not support PHP 4 related problems anymore. Momentum is gathering for PHP 6, and we think supporting PHP 4 will lead to a waste of resources which we want to put into getting PHP 6 ready. Previous Comments: [2007-07-03 16:52:30] [EMAIL PROTECTED] The MSSQL server returns two result sets. The first one for the status of the IF statement and the second for the insert. The current implementation will not allow you to access the second result set (the first one must contain columns for the system to establish multiple result sets). Workaround: Use transactions and two querie. One to check if the row exists and one to insert the row. [2007-05-15 04:13:50] hack988 at gmail dot com Description: after executed sql query like that IF NOT EXISTS (SELECT * FROM NumberGroup WHERE (GroupName = 'rrgrrg')) INSERT INTO NumberGroup(GroupName, AddTime) VALUES ('rrgrrg', 1); an executed mssql_rows_affected alway return 0 either GroupName= 'rrgrrg' not in database Reproduce code: --- i have no idea to deal with this problem by myself Expected result: mssql_query(IF NOT EXISTS (SELECT * FROM NumberGroup WHERE (GroupName = 'rrgrrg')) INSERT INTO NumberGroup(GroupName, AddTime) VALUES ('rrgrrg', 1);); var_dump(mssql_affected_rows($dblink); -- Edit this bug report at http://bugs.php.net/?id=41393edit=1
#44299 [Asn]: PCRE security issue
ID: 44299 Updated by: [EMAIL PROTECTED] Reported By: test_junk at hotmail dot it Status: Assigned Bug Type: PCRE related Operating System: * PHP Version: 4.4.8 -Assigned To: derick +Assigned To: nlopess New Comment: Nuno, didn't you already upgrade PCRE in PHP_4_4 branch..? (for the last release..) Previous Comments: [2008-03-04 19:35:42] test_junk at hotmail dot it There are several script using eval() statement in an unsafe manner (i.e. http://www.securityfocus.com/bid/14086), this makes the vulnerability remotely exploitable and potentially dangerous. [2008-03-03 10:50:03] [EMAIL PROTECTED] Yes, that's true. This is only a problem if the program uses user-supplied regexes. I think that the most problematic thing was the pcre 7.0 BC break, that was later fixed in 7.2 (we still bundle 7.0). Anyway, Derick please reassign the bug report to me again if you want me to upgrade pcre or close it otherwise. I can always upgrade PCRE later if you decide to make a new release for some other reason. [2008-03-03 08:17:02] [EMAIL PROTECTED] From what I can see from their ChangeLog: 1. A character class containing a very large number of characters with codepoints greater than 255 (in UTF-8 mode, of course) caused a buffer overflow. Which is only an issue for the expression, and not input - so this should only be an issue if you use user-supplied input. Otherwise it's just a local-developer issue only. Which IMO doesn't warrant a new release. [2008-03-01 22:52:54] [EMAIL PROTECTED] I can upgrade it in CVS, but I'm not sure there will be any further PHP 4 release. Derick can you comment on this? [2008-02-29 23:58:05] test_junk at hotmail dot it Description: Hello, PCRE versions prior to 7.6 are affected by a vulnerability: http://www.securityfocus.com/bid/27786 Unfortunately php 4.4.8 compiled against version 7.6 is unstable, are you going to fix this issue? Thanks -- Edit this bug report at http://bugs.php.net/?id=44299edit=1
#42217 [Opn-Fbk]: gzcompress/gzcompress fails with size 65535 (6mb)
ID: 42217 Updated by: [EMAIL PROTECTED] Reported By: vodkaproof at gmail dot com -Status: Open +Status: Feedback Bug Type: Zlib Related Operating System: debian PHP Version: 4.4.7 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi Previous Comments: [2007-08-06 06:23:27] vodkaproof at gmail dot com Description: $big_string = string larger than 65535(6MB) in size $big_string = gzcompress ($big_string, 1); $big_string = gzuncompress ($big_string); print $big_string; The resulting $big_string is cut off after 65535 bytes. Bug report was created but ignored. http://bugs.php.net/bug.php?id=32306 I didn't know of this bug, now I have 200gb of corrupted mysql records. It will take weeks to recover. -- Edit this bug report at http://bugs.php.net/?id=42217edit=1
#45527 [Opn-Bgs]: whitespaces in resultset of empty varchars/text
ID: 45527 Updated by: [EMAIL PROTECTED] Reported By: technischersupport at googlemail dot de -Status: Open +Status: Bogus Bug Type: MSSQL related Operating System: Windows XP PHP Version: 5.2.6 New Comment: [4 Apr 2006 7:03pm UTC] [EMAIL PROTECTED] [delete] This is a bug in the DB library used in the extension. The only workarround is to trim the value and that would be wrong if the data storred actually was a space. Previous Comments: [2008-07-16 09:21:35] technischersupport at googlemail dot de Description: It's the same bug as in: http://bugs.php.net/bug.php?id=26012 http://bugs.php.net/bug.php?id=26315 http://bugs.php.net/bug.php?id=28124 http://bugs.php.net/bug.php?id=31641 http://bugs.php.net/bug.php?id=36968 http://bugs.php.net/bug.php?id=39204 described. I'm using MSSQL 2005: Microsoft SQL Server Standard Edition Microsoft Windows NT 5.2 (3790) 9.00.3068.00 with php_mssql.dll Version 5.2.6.6 ntwdblib.dll Version 2000.02.08 (as supplied with php) The Table: [COLA] [varchar](5) NULL [COLB] [varchar](25) NULL [COLC] [varchar](5) NULL [COLD] [varchar](25) NULL [COLE] [varchar](40) NULL [COLF] [text] NULL I've written empty strings to the cells and read it out with the appended code. The bug isn't bogus! Reproduce code: --- $connection = mssql_connect($server, $username, $password, true); $qry = SELECT * FROM TABLE; $result_id = mssql_query($qry, $connection); $row = mssql_fetch_assoc($result_id) print_r($row); Expected result: [COLA] = foo [COLB] = bar [COLC] = [COLD] = [COLE] = [COLF] = Actual result: -- [COLA] = foo [COLB] = bar [COLC] = [COLD] = [COLE] = [COLF] = -- Edit this bug report at http://bugs.php.net/?id=45527edit=1
#44664 [Opn-Fbk]: array_slice() behaves differently on 64bit systems
ID: 44664 Updated by: [EMAIL PROTECTED] Reported By: hoffie at gentoo dot org -Status: Open +Status: Feedback Bug Type: Arrays related Operating System: Linux 64bit PHP Version: 5.2.6RC4 New Comment: Does this still happen? With both PHP_5_2 and PHP_5_3 branches? Previous Comments: [2008-04-07 15:17:10] hoffie at gentoo dot org Description: array_slice() behaves differently on 32bit and 64bit systems. These three tests revealed that (i.e. fail on 64bit): ext/standard/tests/array/array_slice_variation6.phpt, ext/standard/tests/array/array_slice_variation2.phpt, ext/standard/tests/array/array_slice_variation3.phpt. See http://news.php.net/php.internals/36825 and http://news.php.net/php.internals/36825 Reproduce code: --- $ ./configure --disable-all --enable-pcre-regex --enable-cli $ TEST_PHP_EXECUTABLE=./sapi/cli/php ./sapi/cli/php run-tests.php ext/standard/tests/array/array_slice_variation6.phpt ext/standard/tests/array/array_slice_variation2.phpt ext/standard/tests/array/array_slice_variation3.phpt Expected result: All three tests should pass. Actual result: -- All three tests fail. Diffs: http://home.hoffie.info/static/array_slice_variation6.diff http://home.hoffie.info/static/array_slice_variation2.diff http://home.hoffie.info/static/array_slice_variation3.diff -- Edit this bug report at http://bugs.php.net/?id=44664edit=1
#45376 [Opn-Bgs]: popen causes HTTP Error 502.2
ID: 45376 Updated by: [EMAIL PROTECTED] Reported By: louis at steelbytes dot com -Status: Open +Status: Bogus Bug Type: CGI related Operating System: Vista SP1 x64 PHP Version: 5.2.6 New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php Previous Comments: [2008-06-27 09:48:58] louis at steelbytes dot com Description: 1. proc_open('I_dont_exist.exe') returns true. I feel it shouldn't (I'm guessing this is because php launches cmd.exe and asks it to run I_dont_exist.exe) 2. popen('I_dont_exist.exe') returns true if I execute the script from the commandline using php.exe -n -f test.php (see above for what I would expect), but if I execute it via php-cgi.exe in IIS, I get HTTP Error 502.2 - Bad Gateway (see below). Reproduce code: --- $proc = @proc_open( 'c:\\I_dont_exist1.exe' ,array( 0=array('file','nul','r'), 1=array('file','nul','w'), 2=array('file','nul','w') ) ,$pipes ); if ($proc===false) die('failed proc_open'); proc_close($proc); echo 'proc_open ok'.br\r\n; $proc = @popen('c:\\I_dont_exist2.exe','r'); if ($proc===false) die('failed popen'); pclose($proc); echo 'popen ok'.br\r\n; Expected result: ideally both should fail, as the target .exe doesn't exist, but not cause the script to die Actual result: -- HTTP Error 502.2 - Bad Gateway The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are 'c:\I_dont_exist2.exe' is not recognized as an internal or external command, operable program or batch file. X-Powered-By: PHP/5.2.6 Content-type: text/html startbr proc_open okbr popen okbr endbr . -- Edit this bug report at http://bugs.php.net/?id=45376edit=1
#42318 [Asn-Opn]: problem with nm not finding object files
ID: 42318 Updated by: [EMAIL PROTECTED] Reported By: rainer dot tammer at schulergroup dot com -Status: Assigned +Status: Open Bug Type: Compile Failure Operating System: AIX 5.2/5.3 PHP Version: 5.2CVS-2007-08-17 Assigned To: dmitry Previous Comments: [2007-11-29 10:29:18] rainer dot tammer at schulergroup dot com Hello, with my suggested patch to the two configure files the errors will be gone. I have checked this on all 5.2.x releases. In sapi/cgi/config9.m4 and sapi/cli/config.m4 ... case $host_alias in *aix*) change ... sed 's/\([A-Za-z0-9_]*\)\.lo/\1.o/g'\` ... to ... sed 's/\([A-Za-z0-9_]*\)\.lo/.libs\/\1.o/g'\` ... Do not forget to call utoconf to regenerate the configure script after the change. It looks like you only need this patch if you user the --with-apxs configure switch. Bye Rainer [2007-11-28 22:59:46] bduncan8 at yahoo dot com Using gcc 4 on AIX 5.3 and trying to compile PHP 5.2.5 When running make there are many messages about nm not finding files. If make install is attempted it completely fails. If I skip make install I can copy over the libphp5.so and get apache to return phpinfo() output but I have my doubts about being able to install pecl extensions I need like ibm-db2 and informix. It doesn't seem like there has been any official resolution proposed ... is this being looked at still? Thanks. [2007-09-26 15:45:54] ppryor at pobox dot com I have the same problem on AIX 5.2 with gcc when I compiled with --apxs and --enable-cli. However it does not cause any problems and it is just an annoyance. However, I will find out when I use phpize and build PECL extension to dynamically load into php under Apache 1.3. I believe (not yet proven) that I will have to insert the following line in config.m4 for PECL extensions: EXTRA_LDFLAGS=$EXTRA_LDFLAGS -Wl,-bI:/usr/HTTPServer/libexec/libphp5.exp And the first line of the libphp5.exp contains: #!/usr/HTTPServer/libexec/libphp5.so followed by external symbols generated with nm In order to have PECL extension loaded without causing Apache to core dump. I don't see libphp5.exp created and this is what we may need under AIX 5.2. Generally under AIX 4.x (not sure if its true of AIX 5.x) the dynamically loaded libraries need to reference other dynamically loaded libraries where they can resolve symbols (forward linking) by adding a header that you can inspect with dump -H. Example follows for oci8: $ dump -H oci8.so oci8.so: ***Loader Section*** Loader Header Information VERSION# #SYMtableENT #RELOCentLENidSTR 0x0001 0x00b0 0x01a5 0x0079 #IMPfilIDOFFidSTR LENstrTBLOFFstrTBL 0x0004 0x245c 0x0ba6 0x24d5 ***Import File Strings*** INDEX PATH BASEMEMBER 0 /ora01/app/oracle/product/8.1.7/lib:/usr/lib:/lib 1libc.a shr.o 2 /usr/HTTPServer/libexec libphp4.so 3libclntsh.a shr.o You see index number 2, the absolute path for libphp4.so is in /usr/HTTPServer/libexec. I hope this clears up somewhat. And I hope this issue will be fixed for AIX releases definitely (I feel that my config.m4 hack is not quite the right way to do it, through, but it works). Paul. [2007-09-06 06:15:31] rainer dot tammer at schulergroup dot com Hello, first of all AIX 5.1 is no longer supported. I tested the build on AIX 5.2 and 5.3 with IBM xlC/C++ 8.0 and with gcc 3.3.2. It looks like the .libs directory only appears if you build for apache (--with-apxs) and sapi/cgi; sapi/cli. If you need another test I can try almost every combination with the following OS versions / compilers: * AIX 5.2 and AIX 5.3 * xlC/C++ 6.0; 8.0; and 9.0 * gcc 3.3.2; gcc 4.0.0 Bye Rainer [2007-09-05 15:48:51] [EMAIL PROTECTED] I've just recompiled PHP-5.2.4 on AIX 5.1 with gcc without problems. I don't have any .libs directories, however in boundled libtool I have objdir=.libs. I have no idea what is wrong on your (or my) AIX system and how to support both. Try to build CLI and CGI without --with-apxs. The remainder of the comments for this report are too long. To view the rest of the comments,
#42318 [Opn-Asn]: problem with nm not finding object files
ID: 42318 Updated by: [EMAIL PROTECTED] Reported By: rainer dot tammer at schulergroup dot com -Status: Open +Status: Assigned Bug Type: Compile Failure Operating System: AIX 5.2/5.3 PHP Version: 5.2CVS-2007-08-17 Assigned To: dmitry New Comment: Dmitry, you never answered my question why you reverted your fix? [16 Aug 2007 10:32pm UTC] [EMAIL PROTECTED] And on second check: Assigning to Dmitry who broke this with his commit to fix (!) AIX build. Dmitry: cvs diff -r1.17.2.1 -r1.17.2.2 sapi/cgi/config9.m4 cvs diff -r1.22 -r1.22.2.1 sapi/cli/config.m4 [16 Aug 2007 10:34pm UTC] [EMAIL PROTECTED] Or not really broke but tried to fix. First fix was ok but for some reason Dmitry removed the .libs part of it, perhaps he knows why.. Previous Comments: [2007-11-29 10:29:18] rainer dot tammer at schulergroup dot com Hello, with my suggested patch to the two configure files the errors will be gone. I have checked this on all 5.2.x releases. In sapi/cgi/config9.m4 and sapi/cli/config.m4 ... case $host_alias in *aix*) change ... sed 's/\([A-Za-z0-9_]*\)\.lo/\1.o/g'\` ... to ... sed 's/\([A-Za-z0-9_]*\)\.lo/.libs\/\1.o/g'\` ... Do not forget to call utoconf to regenerate the configure script after the change. It looks like you only need this patch if you user the --with-apxs configure switch. Bye Rainer [2007-11-28 22:59:46] bduncan8 at yahoo dot com Using gcc 4 on AIX 5.3 and trying to compile PHP 5.2.5 When running make there are many messages about nm not finding files. If make install is attempted it completely fails. If I skip make install I can copy over the libphp5.so and get apache to return phpinfo() output but I have my doubts about being able to install pecl extensions I need like ibm-db2 and informix. It doesn't seem like there has been any official resolution proposed ... is this being looked at still? Thanks. [2007-09-26 15:45:54] ppryor at pobox dot com I have the same problem on AIX 5.2 with gcc when I compiled with --apxs and --enable-cli. However it does not cause any problems and it is just an annoyance. However, I will find out when I use phpize and build PECL extension to dynamically load into php under Apache 1.3. I believe (not yet proven) that I will have to insert the following line in config.m4 for PECL extensions: EXTRA_LDFLAGS=$EXTRA_LDFLAGS -Wl,-bI:/usr/HTTPServer/libexec/libphp5.exp And the first line of the libphp5.exp contains: #!/usr/HTTPServer/libexec/libphp5.so followed by external symbols generated with nm In order to have PECL extension loaded without causing Apache to core dump. I don't see libphp5.exp created and this is what we may need under AIX 5.2. Generally under AIX 4.x (not sure if its true of AIX 5.x) the dynamically loaded libraries need to reference other dynamically loaded libraries where they can resolve symbols (forward linking) by adding a header that you can inspect with dump -H. Example follows for oci8: $ dump -H oci8.so oci8.so: ***Loader Section*** Loader Header Information VERSION# #SYMtableENT #RELOCentLENidSTR 0x0001 0x00b0 0x01a5 0x0079 #IMPfilIDOFFidSTR LENstrTBLOFFstrTBL 0x0004 0x245c 0x0ba6 0x24d5 ***Import File Strings*** INDEX PATH BASEMEMBER 0 /ora01/app/oracle/product/8.1.7/lib:/usr/lib:/lib 1libc.a shr.o 2 /usr/HTTPServer/libexec libphp4.so 3libclntsh.a shr.o You see index number 2, the absolute path for libphp4.so is in /usr/HTTPServer/libexec. I hope this clears up somewhat. And I hope this issue will be fixed for AIX releases definitely (I feel that my config.m4 hack is not quite the right way to do it, through, but it works). Paul. [2007-09-06 06:15:31] rainer dot tammer at schulergroup dot com Hello, first of all AIX 5.1 is no longer supported. I tested the build on AIX 5.2 and 5.3 with IBM xlC/C++ 8.0 and with gcc 3.3.2. It looks like the .libs directory only appears if you build for apache (--with-apxs) and sapi/cgi; sapi/cli. If you need another test I can try almost every combination with the following OS versions / compilers: * AIX 5.2 and AIX 5.3 * xlC/C++ 6.0; 8.0; and 9.0 * gcc 3.3.2; gcc 4.0.0 Bye Rainer
#38702 [Asn-WFx]: Getting odbc warnings during compilations
ID: 38702 Updated by: [EMAIL PROTECTED] Reported By: prashant dot bhandare at nbcuni dot com -Status: Assigned +Status: Wont fix Bug Type: Compile Warning Operating System: RedHat EL release 4 (Nahant 3) PHP Version: 5.1.6 Assigned To: kalowsky New Comment: Warnings are not errors - wont fix. Previous Comments: [2006-09-04 22:48:20] Grant dot Walters at walters dot co dot nz Same thing on RedHat ES2.1 using datadirect drivers provided with Progress OpenEdge 101A (patch A01). using: DLC=/usr/dlc101a LD_LIBRARY_PATH=$DLC/lib:$DLC/odbc/lib CUSTOM_ODBC_LIBS=-L$DLC/odbc/lib -lodbc CFLAGS=-I$DLC/odbc/include -L$DLC/odbc/lib configure \ --prefix=/opt \ --disable-ipv6 \ --disable-libxml \ --disable-dom \ --disable-simplexml \ --disable-xml \ --disable-xmlreader \ --disable-xmlwriter \ --enable-versioning \ --enable-sockets \ --enable-ftp \ --without-pear \ --without-ldap-sasl \ --with-custom-odbc=/usr/dlc101a/odbc \ --with-kerberos \ --with-openssl \ --with-zlib \ --with-db4 \ --with-inifile \ --with-flatfile \ --with-gd \ --with-gettext \ --with-imap \ --with-imap-ssl \ --with-ldap \ --with-mime-magic \ --with-mysql=/usr \ --with-readline \ --with-mm \ --with-snmp [2006-09-03 21:15:11] prashant dot bhandare at nbcuni dot com Description: Hi , We are using Data Direct ODBC evaluation copy and getting multiple errors with data warning: passing arg 1 of `' makes integer from pointer without a cast during php compilation with odbc. Below some errors from top : /opt/install_soft_jboss4.0/php/php-5.1.6/ext/odbc/php_odbc.c: In function `_free_odbc_result': /opt/install_soft_jboss4.0/php/php-5.1.6/ext/odbc/php_odbc.c:184: warning: passing arg 1 of `SQLFreeStmt' makes integer from pointer without a cast /opt/install_soft_jboss4.0/php/php-5.1.6/ext/odbc/php_odbc.c: In function `safe_odbc_disconnect': /opt/install_soft_jboss4.0/php/php-5.1.6/ext/odbc/php_odbc.c:202: warning: passing arg 1 of `SQLDisconnect' makes integer fro m pointer without a cast Please help. Reproduce code: --- ./configure --with-apxs2=/opt/shared/ws/2.0.54/wsphp01_01/bin/apxs --with-zlib=/usr --with-png=/usr/include --without-sqlite --prefix=/usr --with-config-file-path=/etc --enable-sigchild --with-custom-odbc=/opt/odbc32v52 Expected result: No warnings Actual result: -- With ODBC warnings - /opt/install_soft_jboss4.0/php/php-5.1.6/ext/odbc/php_odbc.c: In function `_free_odbc_result': /opt/install_soft_jboss4.0/php/php-5.1.6/ext/odbc/php_odbc.c:184: warning: passing arg 1 of `SQLFreeStmt' makes integer from pointer without a cast /opt/install_soft_jboss4.0/php/php-5.1.6/ext/odbc/php_odbc.c: In function `safe_odbc_disconnect': /opt/install_soft_jboss4.0/php/php-5.1.6/ext/odbc/php_odbc.c:202: warning: passing arg 1 of `SQLDisconnect' makes integer fro m pointer without a cast /opt/install_soft_jboss4.0/php/php-5.1.6/ext/odbc/php_odbc.c:205: warning: passing arg 1 of `SQLTransact' makes integer from pointer without a cast /opt/install_soft_jboss4.0/php/php-5.1.6/ext/odbc/php_odbc.c:205: warning: passing arg 2 of `SQLTransact' makes integer from pointer without a cast /opt/install_soft_jboss4.0/php/php-5.1.6/ext/odbc/php_odbc.c:206: warning: passing arg 1 of `SQLDisconnect' makes integer fro m pointer without a cast /opt/install_soft_jboss4.0/php/php-5.1.6/ext/odbc/php_odbc.c: In function `_close_odbc_conn': /opt/install_soft_jboss4.0/php/php-5.1.6/ext/odbc/php_odbc.c:233: warning: passing arg 1 of `SQLFreeConnect' makes integer fr om pointer without a cast /opt/install_soft_jboss4.0/php/php-5.1.6/ext/odbc/php_odbc.c:234: warning: passing arg 1 of `SQLFreeEnv' makes integer from p ointer without a cast /opt/install_soft_jboss4.0/php/php-5.1.6/ext/odbc/php_odbc.c: In function `_close_odbc_pconn': /opt/install_soft_jboss4.0/php/php-5.1.6/ext/odbc/php_odbc.c:261: warning: passing arg 1 of `SQLFreeConnect' makes integer fr om pointer without a cast /opt/install_soft_jboss4.0/php/php-5.1.6/ext/odbc/php_odbc.c:262: warning: passing arg 1 of `SQLFreeEnv' makes integer from p ointer without a cast -- Edit this bug report at http://bugs.php.net/?id=38702edit=1
#45535 [NEW]: Can not access Network Map Drive
From: trikhoi at yahoo dot com Operating system: WindowXP SP2 PHP version: 5.2.6 PHP Bug Type: Directory function related Bug description: Can not access Network Map Drive Description: I can not access network drive by opendir() function. I've adjusted pemission D:\share for everyone can access it. I've also tried to opendir(k:\\), but the result is false. With K: is network drive I've created and map to D:\share folder in my computer. Please give me some instruction to solve this problem Thanks in advance! My code look like: Reproduce code: --- $fh = opendir(k:\); if($fh == false) { print(can not open directory!); } else { print(Openning directory successful!); } Expected result: Openning directory successful! Actual result: -- can not open directory! -- Edit bug report at http://bugs.php.net/?id=45535edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45535r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45535r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45535r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45535r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45535r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45535r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=45535r=needscript Try newer version:http://bugs.php.net/fix.php?id=45535r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45535r=support Expected behavior:http://bugs.php.net/fix.php?id=45535r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45535r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45535r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45535r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45535r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45535r=dst IIS Stability:http://bugs.php.net/fix.php?id=45535r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45535r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45535r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45535r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=45535r=mysqlcfg
#44582 [Opn-Fbk]: Problems to open big DBF
ID: 44582 Updated by: [EMAIL PROTECTED] Reported By: eriveltoms at gmail dot com -Status: Open +Status: Feedback Bug Type: dBase related Operating System: Windows XP PHP Version: 5.2.5 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi Previous Comments: [2008-03-31 14:51:43] eriveltoms at gmail dot com Description: I have a big DBF file (version 3) to open, with 152Mb and 611224 lines. When I use dbase_open command, I receive a Warning, and don´t have access to file. I have 7 cols: PROCESSO - STRING R - STRING DATA - DATE HORA - STRING ORIGEM - STRING DESTINO - STRING OBS - STRING Reproduce code: --- $db = dbase_open('temp/anda.dbf', 0); if ($db) { $column_info = dbase_get_header_info($db); foreach($column_info as $cols){ echo $cols[name].br; } } Expected result: name_col1 name_col2 name_col3 name_coln Actual result: -- warning dbase_open() [function.dbase-open]: unable to open database temp/anda.dbf in E:\Inetpub\wwwroot\areaspublicas\importdbf.php on line 24 -- Edit this bug report at http://bugs.php.net/?id=44582edit=1
#44850 [Opn-Fbk]: dbase_open exits with error
ID: 44850 Updated by: [EMAIL PROTECTED] Reported By: kindaian at gmail dot com -Status: Open +Status: Feedback Bug Type: dBase related Operating System: Windows XP Pro PHP Version: 5.2.5 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi Previous Comments: [2008-04-28 01:00:07] kindaian at gmail dot com This is the begin (the 256 first characters) of the file (changed the record number to 1 and the terminator character to 0D, but it didn't sorted it out): 03 6C 04 02 01 00 00 00 81 00 5B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 43 4F 44 49 47 4F 00 00 00 00 00 43 00 00 00 00 0A 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 44 45 53 43 52 49 43 41 4F 00 00 43 00 00 00 00 28 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 44 45 53 43 5F 41 55 58 00 00 00 43 00 00 00 00 28 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0D 20 36 30 30 2F 30 2C 39 30 20 20 41 55 54 4F 20 41 44 45 53 49 56 41 2C 20 32 20 54 45 4C 41 53 2C 20 30 2C 39 30 20 4D 4D 20 20 20 20 20 20 20 20 20 20 53 54 49 43 4B 59 20 42 41 43 4B 2C 20 30 2C 39 30 20 6D 6D 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 36 30 30 2F 30 2C 39 35 20 20 41 55 54 4F 20 41 44 45 53 49 56 41 2C 20 32 20 54 45 4C 41 53 2C 20 30 [2008-04-28 00:26:01] kindaian at gmail dot com Description: I've a dbf with a problem in the array that holds the field definitions, so when i try to open it it crashes. I've tryed to open it in DBU and when i try to access the fields, it exits with BASE/1132 bound error: array access. In PHP, it just exits with an error that it can't open the file and stops execution (Error reading DBF's number of fields). The problem is that I've the code enclosed by a try/catch and the program instead of gracefully execute the catch... just breaks. Maybe related with the way error handling is handled inside the dbase functions as pointed out also in the bug #37589 dbase_open doesnt act like it should for another issue. Reproduce code: --- try { $dbf = @dbase_open($file_name, 0); } catch (Exception $e) { echo (Error opening $file_name); } Expected result: I was expecting that the program would print the error message and carry on. Actual result: -- The execution just stops where the error happens, and no more code is processed. The error Error reading DBF's number of fields is shown in the browser. -- Edit this bug report at http://bugs.php.net/?id=44850edit=1
#33285 [Ver-Fbk]: dbase functions return garbage on certain file
ID: 33285 Updated by: [EMAIL PROTECTED] Reported By: andrewz at springsrescuemission dot org -Status: Verified +Status: Feedback Bug Type: dBase related Operating System: * PHP Version: 5CVS-2005-06-20 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi Previous Comments: [2005-06-20 17:43:52] andrewz at springsrescuemission dot org Take for example the first entry in the header: [0] = Array ( [name] = AREA [type] = unknown [length] = 1300 [precision] = 0 [format] = ´ @ [offset] = 1 ) The type should be a double, the length 20, and the precision 5. Instead I get unknown, 1300, and 0. [2005-06-19 00:47:19] [EMAIL PROTECTED] Can you please provide the expected result too? Using the latest CVS the header info seems ok to me. (no garbage in format) [2005-06-13 19:53:17] andrewz at springsrescuemission dot org Tested with cvs-latest: problem persists. [2005-06-11 19:47:34] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip [2005-06-09 19:02:47] andrewz at springsrescuemission dot org Description: Using PHP's dbase system cannot understand some columns and yields garbage on a certain .dbf file (http://65.108.181.103/zip.dbf). The .dbf was tested successfully with several other programs (OpenOffice.org 1.1.4 and Shapefile Library C). According to file, .dbf is dbase 3 format: $ file zip.dbf zip.dbf: DBase 3 data file (586 records) To enable dbase support, I used the standard Trustix 2.2 source RPM and included --enable-dbase. On a different system with PHP 4.3.10 and Linux 2.4.27 (Redhat 7.3), I verified the problem with dbase_get_record_with_names(). (The function dbase_get_header_info() was not available on this platform.) Reproduce code: --- $db = dbase_open(zip.dbf,0); print_r(dbase_get_header_info($db)); if ($db) { $record_numbers = dbase_numrecords($db); for ($i = 1; $i = $record_numbers; $i++) { $row = dbase_get_record_with_names($db, $i); print_r($row); } } Expected result: The dbase_header_info() does not understand some columns and includes garbage (e.g. length field). Then the dbase_get_record_with_names() has incorrect data. Here is output of Shapefile Library C's dbfdump -h on the same zip.dbf. This output is good. Field 0: Type=Double, Title=`AREA', Width=20, Decimals=5 Field 1: Type=Double, Title=`PERIMETER', Width=20, Decimals=5 Field 2: Type=Integer, Title=`ZT08_D00_', Width=11, Decimals=0 Field 3: Type=Integer, Title=`ZT08_D00_I', Width=11, Decimals=0 Field 4: Type=String, Title=`ZCTA', Width=5, Decimals=0 Field 5: Type=String, Title=`NAME', Width=90, Decimals=0 Field 6: Type=String, Title=`LSAD', Width=2, Decimals=0 Field 7: Type=String, Title=`LSAD_TRANS', Width=50, Decimals=0 AREAPERIMETER ZT08_D00_ ZT08_D00_I ZCTA NAME LSAD LSAD_TRANS 0.05115 1.30727 2 1 80428 80428 Z5 5-Digit ZCTA Actual result: -- SCRIPT OUTPUT Array ( [0] = Array ( [name] = AREA [type] = unknown [length] = 1300 [precision] = 0 [format] = ´ @ [offset] = 1 ) [1] = Array ( [name] = PERIMETER [type] = unknown [length] = 1300 [precision] = 0 [format] = ´ @ [offset] = 1301 ) [truncated] -- Edit this bug report at http://bugs.php.net/?id=33285edit=1
#44272 [Opn-Fbk]: Unknown notice from dba_exists()
ID: 44272 Updated by: [EMAIL PROTECTED] Reported By: b at eiesoft dot ru -Status: Open +Status: Feedback Bug Type: DBM/DBA related Operating System: Debian Linux PHP Version: 5.2.5 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi Previous Comments: [2008-02-27 20:39:27] b at eiesoft dot ru Description: PHP warns me with strange NOTICE message when using dba_exists() Berkeley DB version - 4.6.21 Reproducable: always Reproduce code: --- ?php error_reporting(E_ALL); $dbm = dba_popen(cachefile, n, db4); dba_exists(eie, $dbm); ? Expected result: Nothing Actual result: -- Notice: dba_exists() [function.dba-exists]: #65533;#65533;2#65533;(null) in /var/www/test.php on line 4 -- Edit this bug report at http://bugs.php.net/?id=44272edit=1
#45535 [Opn-Fbk]: Can not access Network Map Drive
ID: 45535 Updated by: [EMAIL PROTECTED] Reported By: trikhoi at yahoo dot com -Status: Open +Status: Feedback Bug Type: Directory function related Operating System: WindowXP SP2 PHP Version: 5.2.6 New Comment: Turn on error display and level to E_ALL to see what the actual error is.. Previous Comments: [2008-07-17 01:24:09] trikhoi at yahoo dot com Description: I can not access network drive by opendir() function. I've adjusted pemission D:\share for everyone can access it. I've also tried to opendir(k:\\), but the result is false. With K: is network drive I've created and map to D:\share folder in my computer. Please give me some instruction to solve this problem Thanks in advance! My code look like: Reproduce code: --- $fh = opendir(k:\); if($fh == false) { print(can not open directory!); } else { print(Openning directory successful!); } Expected result: Openning directory successful! Actual result: -- can not open directory! -- Edit this bug report at http://bugs.php.net/?id=45535edit=1