#43711 [Opn->Bgs]: Can't load php_mssql.dll
ID: 43711 Updated by: [EMAIL PROTECTED] Reported By: vlad275 at ya dot ru -Status: Open +Status: Bogus Bug Type: MSSQL related Operating System: Windows 2003 PHP Version: 5.3CVS-2007-12-30 (snap) New Comment: Step 2 indicates your are loading msql instead of mssql. Those are two different extensions. If that's just a typo in your submission you are most likely missing the ntwdblib.dll in \windows\system32. This file is required for the mssql extension to load. You can copy this file from the server or you can install the client tools on your PHP server box. Previous Comments: [2007-12-30 04:13:03] vlad275 at ya dot ru Description: Windows2003+IIS+PHP5.3.0+MS SQL Server 2005 Can't load php_mssql.dll 1. Installed under IIS php-5.2.5-win32-installer.msi as ISAPI for .php 2. Uncommented at php.ini extension=msql.dll 3. Added at php.ini extension=php_mssql.dll 4. Copied all extentions into C:\WINDOWS\system32\ 5. Copied ntwdblib.dll version 8.x into c:\php and c:\windows\system32. 6. Reooted Fatal error: Call to undefined function mssql_connect() What do I have to do?!!! Reproduce code: --- if (function_exists('mssql_connect')) echo "Okay, fn is there"; else echo "Not found\n"; echo phpinfo(); print_r (get_loaded_extensions()); $mssql_server='195.42.181.173'; $mssql_user=''; $mssql_pass=''; mssql_connect($mssql_server,$mssql_user,$mssql_pass); Expected result: 'Okay, fn is there' I wanna use 'mssql_connect'!!! I cannot! Help me!!! Actual result: -- Not found 1Array ( [0] => bcmath [1] => calendar [2] => com_dotnet [3] => ctype [4] => session [5] => ereg [6] => filter [7] => ftp [8] => hash [9] => iconv [10] => json [11] => mysqlnd [12] => odbc [13] => pcre [14] => Reflection [15] => date [16] => libxml [17] => standard [18] => tokenizer [19] => zlib [20] => SimpleXML [21] => dom [22] => SPL [23] => wddx [24] => xml [25] => xmlreader [26] => xmlwriter [27] => ISAPI ) Fatal error: Call to undefined function mssql_connect() in C:\Inetpub\wwwroot\administrator\vt_example.php on line 52 -- Edit this bug report at http://bugs.php.net/?id=43711&edit=1
#43711 [NEW]: Can't load php_mssql.dll
From: vlad275 at ya dot ru Operating system: Windows 2003 PHP version: 5.3CVS-2007-12-30 (snap) PHP Bug Type: MSSQL related Bug description: Can't load php_mssql.dll Description: Windows2003+IIS+PHP5.3.0+MS SQL Server 2005 Can't load php_mssql.dll 1. Installed under IIS php-5.2.5-win32-installer.msi as ISAPI for .php 2. Uncommented at php.ini extension=msql.dll 3. Added at php.ini extension=php_mssql.dll 4. Copied all extentions into C:\WINDOWS\system32\ 5. Copied ntwdblib.dll version 8.x into c:\php and c:\windows\system32. 6. Reooted Fatal error: Call to undefined function mssql_connect() What do I have to do?!!! Reproduce code: --- if (function_exists('mssql_connect')) echo "Okay, fn is there"; else echo "Not found\n"; echo phpinfo(); print_r (get_loaded_extensions()); $mssql_server='195.42.181.173'; $mssql_user=''; $mssql_pass=''; mssql_connect($mssql_server,$mssql_user,$mssql_pass); Expected result: 'Okay, fn is there' I wanna use 'mssql_connect'!!! I cannot! Help me!!! Actual result: -- Not found 1Array ( [0] => bcmath [1] => calendar [2] => com_dotnet [3] => ctype [4] => session [5] => ereg [6] => filter [7] => ftp [8] => hash [9] => iconv [10] => json [11] => mysqlnd [12] => odbc [13] => pcre [14] => Reflection [15] => date [16] => libxml [17] => standard [18] => tokenizer [19] => zlib [20] => SimpleXML [21] => dom [22] => SPL [23] => wddx [24] => xml [25] => xmlreader [26] => xmlwriter [27] => ISAPI ) Fatal error: Call to undefined function mssql_connect() in C:\Inetpub\wwwroot\administrator\vt_example.php on line 52 -- Edit bug report at http://bugs.php.net/?id=43711&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=43711&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=43711&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=43711&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=43711&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=43711&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=43711&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=43711&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=43711&r=needscript Try newer version:http://bugs.php.net/fix.php?id=43711&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=43711&r=support Expected behavior:http://bugs.php.net/fix.php?id=43711&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=43711&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=43711&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=43711&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43711&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=43711&r=dst IIS Stability:http://bugs.php.net/fix.php?id=43711&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=43711&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=43711&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=43711&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=43711&r=mysqlcfg
#43497 [Opn]: OCI8 XML/getClobVal leaks UGA memory
ID: 43497 User updated by: ghosh at q-one dot com Reported By: ghosh at q-one dot com Status: Open Bug Type: OCI8 related Operating System: Linux 2.6.22-14-server PHP Version: 5.2.5 New Comment: Really great! Thanks a lot!! This patch works. What I don't understand: I thought OCI_RETURN_LOBS is just a short-cut for those who don't want to write: $s=$result[0]->load(); $result[0]->free(); $result[0]=$s; If you use OCI_RETURN_LOBS you dont want to care about lobs but get the result as a string and forget about lobs altogether. So IMHO this should work as well. My specific problem is solved though. Previous Comments: [2007-12-27 21:44:07] [EMAIL PROTECTED] This is really an issue with temporary LOBS since getClobVal() returns a temporary LOB. There are two parts to the fix: changing the script and patching the OCI8 extension. Also don't forget to apply the patch for http://bugs.php.net/bug.php?id=42496 Please test this suggestion and report any issues. Thanks to Krishna & Shankar for the solution. 1. Change the test to get the results as LOBs, not as strings. This allows the script to free temporary LOBs. In the supplied testcase change: $query = "select extract(xml, '/').getclobval() from ugatest"; $stmt = oci_parse($conn, $query); if (oci_execute($stmt)) while ($result = oci_fetch_array($stmt, OCI_NUM+OCI_RETURN_LOBS)) ; to: $query = "select extract(xml, '/').getclobval() from ugatest"; $stmt = oci_parse($conn, $query); if (oci_execute($stmt)) while ($result = oci_fetch_array($stmt, OCI_NUM)) { // echo $result[0]->load(), "\n"; // do something with the XML $result[0]->free(); // free the temporary LOB } The connection must be open when LOB->free() is called, as the underlying OCILobFreeTemporary() call does a roundtrip to the database. 2. Patch oci8_lob.c. The change copies some LOB freeing code from php_oci_lob_close() into php_oci_lob_free(): --- oci8_lob.c.orig2007-07-31 12:21:08.0 -0700 +++ oci8_lob.c2007-12-27 12:33:19.0 -0800 @@ -647,6 +647,9 @@ Close LOB descriptor and free associated resources */ void php_oci_lob_free (php_oci_descriptor *descriptor TSRMLS_DC) { +#ifdef HAVE_OCI8_TEMP_LOB +int is_temporary; +#endif if (!descriptor || !descriptor->connection) { return; @@ -662,6 +665,40 @@ php_oci_lob_flush(descriptor, OCI_LOB_BUFFER_FREE TSRMLS_CC); } +#ifdef HAVE_OCI8_TEMP_LOB +if (descriptor->type == OCI_DTYPE_LOB) { +PHP_OCI_CALL_RETURN(descriptor->connection->errcode, +OCILobIsTemporary, +( +descriptor->connection->env, +descriptor->connection->err, +descriptor->descriptor, +&is_temporary + ) +); +if (descriptor->connection->errcode != OCI_SUCCESS) { +php_oci_error(descriptor->connection->err, descriptor->connection->errcode TSRMLS_CC); +PHP_OCI_HANDLE_ERROR(descriptor->connection, descriptor->connection->errcode); +return 1; +} +if (is_temporary) { +PHP_OCI_CALL_RETURN(descriptor->connection->errcode, +OCILobFreeTemporary, +( +descriptor->connection->svc, +descriptor->connection->err, +descriptor->descriptor + ) +); +if (descriptor->connection->errcode != OCI_SUCCESS) { +php_oci_error(descriptor->connection->err, descriptor->connection->errcode TSRMLS_CC); +PHP_OCI_HANDLE_ERROR(descriptor->connection, descriptor->connection->errcode); +return 1; +} +} +} +#endif + PHP_OCI_CALL(OCIDescriptorFree, (descriptor->descriptor, descriptor->type)); zend_list_delete(descriptor->connection->rsrc_id); [2007-12-20 18:04:32] ghosh at q-one dot com Would pay someone who resolves this bug. Feel free to contact me if you are interested. [2007-12-05 23:18:05] [EMAIL PROTECTED] Confirmed. [2007-12-04 13:09:49] ghosh at q-one dot com Description: There is a memory leaking when using the OCI8 interface and querying XML columns. Demo code available via the url below. This creates a table with an XML column and queries this column. UGA memory is leaking. This does not happen when doing the same directly via SQLPlus. Reproduce code: --- http://oberon.q-one-hosting.com/6648051.txt Expected result: No UGA me
#43708 [NEW]: mysqli_stmt_affected_rows return values don't match documentation
From: mo at modejong dot com Operating system: WinXP PHP version: 5.2.5 PHP Bug Type: MySQLi related Bug description: mysqli_stmt_affected_rows return values don't match documentation Description: The mysqli_stmt_affected_rows implementation does not match the documentation for this function WRT return values when no rows are matched or when a SQL error is found. If you run the source code below, it should output: 1 (a) 2 (b) mysqli_stmt_affected_rows(): int(1) 1 (b) 2 (b) mysqli_stmt_affected_rows(): int(2) 1 (c) 2 (c) mysqli_stmt_affected_rows(): int(0) mysqli_stmt_affected_rows(): int(-1) When run in PHP 5.2.4, the final two lines are: mysqli_stmt_affected_rows(): int(-1) mysqli_stmt_affected_rows(): NULL The docs explicitly state that 0 will be returned when no rows match and -1 will be returned when an SQL error is found. The PHP impl should match the documentation. Reproduce code: --- Expected result: See description Actual result: -- See description -- Edit bug report at http://bugs.php.net/?id=43708&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=43708&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=43708&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=43708&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=43708&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=43708&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=43708&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=43708&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=43708&r=needscript Try newer version:http://bugs.php.net/fix.php?id=43708&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=43708&r=support Expected behavior:http://bugs.php.net/fix.php?id=43708&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=43708&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=43708&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=43708&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43708&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=43708&r=dst IIS Stability:http://bugs.php.net/fix.php?id=43708&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=43708&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=43708&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=43708&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=43708&r=mysqlcfg
#43707 [NEW]: PDOStatement->nextRowset() doesn't work
From: lunter at interia dot pl Operating system: WinXP PHP version: 5.3CVS-2007-12-29 (CVS) PHP Bug Type: PDO related Bug description: PDOStatement->nextRowset() doesn't work Description: PDOStatement->nextRowset() doesn't work Reproduce code: --- query('CALL some_proc()'); $q=$h->query('SELECT 1 AS col;SELECT 2 AS col;'); $r=$q->fetchAll(PDO::FETCH_ASSOC); print_r($r); $q->nextRowset(); $r=$q->fetchAll(PDO::FETCH_ASSOC); print_r($r); ?> Expected result: Array ( [0] => Array ( [col] => 1 ) ) Array ( [0] => Array ( [col] => 2 ) ) Actual result: -- Array ( [0] => Array ( [col] => 1 ) ) Array ( ) -- Edit bug report at http://bugs.php.net/?id=43707&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=43707&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=43707&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=43707&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=43707&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=43707&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=43707&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=43707&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=43707&r=needscript Try newer version:http://bugs.php.net/fix.php?id=43707&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=43707&r=support Expected behavior:http://bugs.php.net/fix.php?id=43707&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=43707&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=43707&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=43707&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43707&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=43707&r=dst IIS Stability:http://bugs.php.net/fix.php?id=43707&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=43707&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=43707&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=43707&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=43707&r=mysqlcfg
#43706 [NEW]: MSI installer should set the registry value for IniFilePath on IIS ISAPI instal
From: zippy1981 at gmail dot com Operating system: Windows XP PHP version: 5.2.5 PHP Bug Type: Feature/Change Request Bug description: MSI installer should set the registry value for IniFilePath on IIS ISAPI instal Description: When installing on windows with the MSI, and selecting IIS ISAPI as the web server config the registry key "HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath" should be set to the install directory. -- Edit bug report at http://bugs.php.net/?id=43706&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=43706&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=43706&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=43706&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=43706&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=43706&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=43706&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=43706&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=43706&r=needscript Try newer version:http://bugs.php.net/fix.php?id=43706&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=43706&r=support Expected behavior:http://bugs.php.net/fix.php?id=43706&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=43706&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=43706&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=43706&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43706&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=43706&r=dst IIS Stability:http://bugs.php.net/fix.php?id=43706&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=43706&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=43706&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=43706&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=43706&r=mysqlcfg
#43705 [NEW]: when interpreting programs with certain faults, php molests apache 2.2.6
From: scratch65535 at att dot net Operating system: w2ksp4 PHP version: 5.2.5 PHP Bug Type: Reproducible crash Bug description: when interpreting programs with certain faults, php molests apache 2.2.6 Description: In a php 5.2.5, apache 2.2.6, mysql 5.0.45 setup under w2ksp4, a slightly sloppy program that v5 doesn't like but that ran fine under v4 -mostly unacceptable mysql default declarations during table creates- causes php to molest apache. My guess would be a loose pointer somewhere. The symptoms (and these are "reproduceable" only in the sense that the pattern has recurred *dozens* of times over the past 2 weeks) are: - I start execution of the program being debugged. - The browser (latest FF) tells me 'waiting for localhost', but sysmon shows no cpu activity by anything but the twiddle process and the monitor itself. - I send apache a kill via the services applet, watch the progress bar get halfway across and then drag its feet until finally the system complains that apache refuses to shut down. - a minute or three later, the system BSODs me for an instant, saying something about 'locked' (it comes and goes too fast for me to read), and reboots. The syslog is uninformative. -- Edit bug report at http://bugs.php.net/?id=43705&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=43705&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=43705&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=43705&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=43705&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=43705&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=43705&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=43705&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=43705&r=needscript Try newer version:http://bugs.php.net/fix.php?id=43705&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=43705&r=support Expected behavior:http://bugs.php.net/fix.php?id=43705&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=43705&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=43705&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=43705&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43705&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=43705&r=dst IIS Stability:http://bugs.php.net/fix.php?id=43705&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=43705&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=43705&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=43705&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=43705&r=mysqlcfg
#43704 [NEW]: php.ini still wants to be in sys dir
From: scratch65535 at att dot net Operating system: w2ksp4 PHP version: 5.2.5 PHP Bug Type: *Configuration Issues Bug description: php.ini still wants to be in sys dir Description: The php install dir is in the path, but php won't read its ini file from there. When i put the ini back in the sysdir (winnt), everything's okay. -- Edit bug report at http://bugs.php.net/?id=43704&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=43704&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=43704&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=43704&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=43704&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=43704&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=43704&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=43704&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=43704&r=needscript Try newer version:http://bugs.php.net/fix.php?id=43704&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=43704&r=support Expected behavior:http://bugs.php.net/fix.php?id=43704&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=43704&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=43704&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=43704&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43704&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=43704&r=dst IIS Stability:http://bugs.php.net/fix.php?id=43704&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=43704&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=43704&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=43704&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=43704&r=mysqlcfg
#43703 [Opn->Asn]: Signature compatibility check broken for namespaces
ID: 43703 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Assigned Bug Type: Scripting Engine problem Operating System: Irrelevant PHP Version: 5.3CVS-2007-12-29 (CVS) -Assigned To: +Assigned To: dmitry Previous Comments: [2007-12-29 10:52:59] [EMAIL PROTECTED] Description: When a namespaced class extends an namespaced abstract class, the signature compatiblity check breaks. Reproduce code: --- test.php http://bugs.php.net/?id=43703&edit=1
#43690 [Opn->Bgs]: sprintf returning unexpected number
ID: 43690 Updated by: [EMAIL PROTECTED] Reported By: yardgnomeray at gmail dot com -Status: Open +Status: Bogus Bug Type: Strings related Operating System: Windows XP SP2 PHP Version: 5.2.5 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 Nothing is wrong here: $ip = "213.10.212.144"; var_dump(ip2long( $ip ) ); returns: int(-720710512) $ip = "213.10.212.144"; $ipaddr = sprintf("%u",ip2long($ip)); var_dump( $ipaddr ); returns: string(10) "3574256784" Using a string that does not fit in the integer range as a number (with %d or %u) does not work, as the string itself is first converted to an integer - which won't work as it doesn't fit. You shouldn't simply use %u for the returned variable from sprintf() - as it's not a n integer, but a string (so use %s). Previous Comments: [2007-12-29 12:15:50] [EMAIL PROTECTED] I'm using PHP 5.3.0-dev (cli) (built: Dec 25 2007 10:07:55), and the convertion was necessary. [2007-12-29 10:22:44] [EMAIL PROTECTED] @felipe... you're wrong here - this works just fine without having to cast to float: [EMAIL PROTECTED]:~$ php-5.2.5RC2 IP ADDR = 3574256784d [2007-12-28 14:46:42] [EMAIL PROTECTED] Ops, ignore the part "ip2long() returns a string." [2007-12-28 14:45:19] [EMAIL PROTECTED] ip2long() returns a string. Converting this value to float for obtain large precision, you will have the expected result. $ip = "213.10.212.144"; $ipaddr = sprintf("%u", ip2long($ip)); $address = sprintf("IP ADDR = %u", (float) $ipaddr); var_dump(PHP_INT_MAX, ip2long($ip), $ipaddr, $address); -- int(2147483647) int(-720710512) string(10) "3574256784" string(20) "IP ADDR = 3574256784" [2007-12-27 16:24:54] yardgnomeray at gmail dot com Description: Using integer >= 2147483647 for a %u or %d will return 2147483647 Reproduce code: --- $ip = "213.10.212.144"; $ipaddr = sprintf("%u",ip2long($ip)); $address = sprintf("IP ADDR = %u", $ipaddr); echo $address; Expected result: IP ADDR = 3574256784 Actual result: -- IP ADDR = 2147483647 -- Edit this bug report at http://bugs.php.net/?id=43690&edit=1
#43690 [Opn]: sprintf returning unexpected number
ID: 43690 Updated by: [EMAIL PROTECTED] Reported By: yardgnomeray at gmail dot com Status: Open Bug Type: Strings related Operating System: Windows XP SP2 PHP Version: 5.2.5 New Comment: I'm using PHP 5.3.0-dev (cli) (built: Dec 25 2007 10:07:55), and the convertion was necessary. Previous Comments: [2007-12-29 10:22:44] [EMAIL PROTECTED] @felipe... you're wrong here - this works just fine without having to cast to float: [EMAIL PROTECTED]:~$ php-5.2.5RC2 IP ADDR = 3574256784d [2007-12-28 14:46:42] [EMAIL PROTECTED] Ops, ignore the part "ip2long() returns a string." [2007-12-28 14:45:19] [EMAIL PROTECTED] ip2long() returns a string. Converting this value to float for obtain large precision, you will have the expected result. $ip = "213.10.212.144"; $ipaddr = sprintf("%u", ip2long($ip)); $address = sprintf("IP ADDR = %u", (float) $ipaddr); var_dump(PHP_INT_MAX, ip2long($ip), $ipaddr, $address); -- int(2147483647) int(-720710512) string(10) "3574256784" string(20) "IP ADDR = 3574256784" [2007-12-27 16:24:54] yardgnomeray at gmail dot com Description: Using integer >= 2147483647 for a %u or %d will return 2147483647 Reproduce code: --- $ip = "213.10.212.144"; $ipaddr = sprintf("%u",ip2long($ip)); $address = sprintf("IP ADDR = %u", $ipaddr); echo $address; Expected result: IP ADDR = 3574256784 Actual result: -- IP ADDR = 2147483647 -- Edit this bug report at http://bugs.php.net/?id=43690&edit=1
#43703 [NEW]: Signature compatibility check broken for namespaces
From: [EMAIL PROTECTED] Operating system: Irrelevant PHP version: 5.3CVS-2007-12-29 (CVS) PHP Bug Type: Scripting Engine problem Bug description: Signature compatibility check broken for namespaces Description: When a namespaced class extends an namespaced abstract class, the signature compatiblity check breaks. Reproduce code: --- test.php http://bugs.php.net/?id=43703&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=43703&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=43703&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=43703&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=43703&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=43703&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=43703&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=43703&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=43703&r=needscript Try newer version:http://bugs.php.net/fix.php?id=43703&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=43703&r=support Expected behavior:http://bugs.php.net/fix.php?id=43703&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=43703&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=43703&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=43703&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43703&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=43703&r=dst IIS Stability:http://bugs.php.net/fix.php?id=43703&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=43703&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=43703&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=43703&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=43703&r=mysqlcfg
#43701 [Opn->WFx]: New PHP File Type
ID: 43701 Updated by: [EMAIL PROTECTED] Reported By: dagdamor at simps dot ru -Status: Open +Status: Wont fix Bug Type:Feature/Change Request PHP Version: 6CVS-2007-12-29 (CVS) New Comment: I don't see why this is useful at all, just add the tags. Previous Comments: [2007-12-29 05:39:47] dagdamor at simps dot ru Description: What about new file type (extension) for PHP? :) Say, .psc (PHP Source Code). The only difference from .php is that it wouldn't recognize tags at all, and would only work as pure PHP code. Would be very useful for serious projects, like PHP frameworks, that don't need HTML embedding, and use template systems instead. Cheers, Dagdamor -- Edit this bug report at http://bugs.php.net/?id=43701&edit=1
#43690 [Opn]: sprintf returning unexpected number
ID: 43690 Updated by: [EMAIL PROTECTED] Reported By: yardgnomeray at gmail dot com Status: Open Bug Type: Strings related Operating System: Windows XP SP2 PHP Version: 5.2.5 New Comment: @felipe... you're wrong here - this works just fine without having to cast to float: [EMAIL PROTECTED]:~$ php-5.2.5RC2 IP ADDR = 3574256784d Previous Comments: [2007-12-28 14:46:42] [EMAIL PROTECTED] Ops, ignore the part "ip2long() returns a string." [2007-12-28 14:45:19] [EMAIL PROTECTED] ip2long() returns a string. Converting this value to float for obtain large precision, you will have the expected result. $ip = "213.10.212.144"; $ipaddr = sprintf("%u", ip2long($ip)); $address = sprintf("IP ADDR = %u", (float) $ipaddr); var_dump(PHP_INT_MAX, ip2long($ip), $ipaddr, $address); -- int(2147483647) int(-720710512) string(10) "3574256784" string(20) "IP ADDR = 3574256784" [2007-12-27 16:24:54] yardgnomeray at gmail dot com Description: Using integer >= 2147483647 for a %u or %d will return 2147483647 Reproduce code: --- $ip = "213.10.212.144"; $ipaddr = sprintf("%u",ip2long($ip)); $address = sprintf("IP ADDR = %u", $ipaddr); echo $address; Expected result: IP ADDR = 3574256784 Actual result: -- IP ADDR = 2147483647 -- Edit this bug report at http://bugs.php.net/?id=43690&edit=1
#43683 [Opn->Bgs]: Can not find oci.dll and uninstall
ID: 43683 Updated by: [EMAIL PROTECTED] Reported By: ranlicmu at gmail dot com -Status: Open +Status: Bogus Bug Type: *Configuration Issues Operating System: windows xp PHP Version: 5.2.5 New Comment: Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. . Previous Comments: [2007-12-27 02:07:17] ranlicmu at gmail dot com Description: Can not open any php file. The following dll fills are missing: oci.dll sqlite3.dll aspell-15.dll libcs.dll db2cli.dll isqlt09a.dll libsqldbc_c.dll libmonetra.dll lcrzo.dll ociw32.dll db2cli.dll iclit09b.dll intl3_svn.dll. Can not change and uninstall in the original installer. -- Edit this bug report at http://bugs.php.net/?id=43683&edit=1
#43702 [NEW]: Operator precedence problem
From: gdiego at gmail dot com Operating system: Irrelevant PHP version: 5.2.5 PHP Bug Type: Arrays related Bug description: Operator precedence problem Description: So, this is not really a bug itself but it's a problem. Let's say we have: class a { var $a = array('a'=>1); [...] some functions [...] }; Lets say a function inside the class does: var_dump($this->a); //this will dump $a array of class a. If we do var_dump($this->a['a']) it will dump integer 1. If we do: $z="a"; var_dump($this->$z); it will dump $a array of class a. Since here all is working fine because $z is used as a pointer. What happens with? $z="a"; var_dump($this->$z['a']); So, this will again dump the $a array in the class. The problem here is the following, because of the operator precedence, the index ['a'] is considered an index of $z which is a string. Then 'a' is casted to integer and interpreted as 0. $this->$z['a'] becomes the same as $this->$z[0] and, as $z[0] is 'a', this becomes $this->a (the array). This is not really a problem (even its not clear this precedence in the documentation as posted in other bug). My problem is that I couldn't find any way of telling the php interpreter that ['a'] should be considered as an index for the whole expression. ($this->$a)['a'] gives syntax error and I have been trying to find a way to do this without intermediate variables and couldn't figure out a solution. I know this example has no sense (who would really do this?) but still think there should be a way to specify the precedence (and if there is, it should be documentated in the operator precedence page, which lacks of the -> operator by the way). Thanks, Diego -- Edit bug report at http://bugs.php.net/?id=43702&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=43702&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=43702&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=43702&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=43702&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=43702&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=43702&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=43702&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=43702&r=needscript Try newer version:http://bugs.php.net/fix.php?id=43702&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=43702&r=support Expected behavior:http://bugs.php.net/fix.php?id=43702&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=43702&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=43702&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=43702&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43702&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=43702&r=dst IIS Stability:http://bugs.php.net/fix.php?id=43702&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=43702&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=43702&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=43702&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=43702&r=mysqlcfg