#35834 [Opn-Fbk]: Numeric value out of range: unhandled mode
ID: 35834 Updated by: [EMAIL PROTECTED] Reported By: alapidus1215 at gmail dot com -Status: Open +Status: Feedback Bug Type: PDO related Operating System: Windows XP Pro (with Apache2) PHP Version: 5.1.1 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.1-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.1-win32-latest.zip Previous Comments: [2005-12-29 06:44:03] judas dot iscariote at gmail dot com try this: http://snaps.php.net/win32/php5.1-win32-latest.zip [2005-12-29 03:16:29] alapidus1215 at gmail dot com Description: I get an error on one of my well-formed queries in attempting to convert from MySQLi to PDO (MySQL). (The possible queries are listed in the reproduced code.) Error logged by Apache2: [Wed Dec 28 20:00:24 2005] [error] [client 64.252.4.72] PHP Warning: PDO::query() [a href='function.query'function.query/a]: SQLSTATE[22003]: Numeric value out of range: unhandled mode; this is a PDO bug, please report it in C:\\Program Files\\Apache Group\\Apache2\\htdocs\\new\\classes\\Database2.class.php on line 31 Reproduce code: --- This is my old Database class, which works fine with my queries: http://alapidus.ath.cx/new/classes/Database.class.phps This is my attempt at converting it to PDO: http://alapidus.ath.cx/new/classes/Database2.class.phps I pass these arguments to my new class's constructor: 'mysql', 'localhost', 'alapidus', 'my_password', 'website', '0' The queries which might cause the error: SELECT users.id, level, password, signature, quote, public_email, im_type, im_address, karma, theme, COUNT(messages.id) AS active_messages FROM users JOIN messages ON poster_id = users.id WHERE username = 'alapidus' GROUP BY users.id LIMIT 1 SELECT * FROM user_prefs WHERE user = 1 UPDATE users SET last_page = '/new/index.php?queries', last_time = '1135818962', last_ip = '64.252.4.72', browser = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/2005 Firefox/1.5' WHERE id = 1 SELECT filename FROM stylesheets WHERE id = 2 LIMIT 1 I regret that I cannot confirm which one is actually causing the error. Expected result: A fetchable result-set from my MySQL query. Actual result: -- Error logged by Apache2: [Wed Dec 28 20:00:24 2005] [error] [client 64.252.4.72] PHP Warning: PDO::query() [a href='function.query'function.query/a]: SQLSTATE[22003]: Numeric value out of range: unhandled mode; this is a PDO bug, please report it in C:\\Program Files\\Apache Group\\Apache2\\htdocs\\new\\classes\\Database2.class.php on line 31 -- Edit this bug report at http://bugs.php.net/?id=35834edit=1
#35830 [Opn-Asn]: Type mismatch with bind variables
ID: 35830 Updated by: [EMAIL PROTECTED] Reported By: nate-php at seekio dot com -Status: Open +Status: Assigned Bug Type: PDO related Operating System: Debian 3.1 Sarge -PHP Version: 5.1.1 +PHP Version: 5CVS-2005-12-29 (snap) -Assigned To: +Assigned To: wez New Comment: Assigned to the PDO maintainer. Previous Comments: [2005-12-29 01:32:54] nate-php at seekio dot com Same thing: Exception at line 19 of file testdb.php: SQLSTATE[22005]: Error in assignment: -9 [IBM][CLI Driver] CLI0112E Error in assignment. SQLSTATE=22005 (SQLExecute[-9] at /usr/local/src/php5.1-200512282330/ext/pdo_odbc/odbc_stmt.c:133) [2005-12-29 01:20:26] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.1-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.1-win32-latest.zip [2005-12-29 01:02:59] nate-php at seekio dot com Yes, I'm quite sure. I can install 5.1.0 and it works fine, touch nothing but the version and it stops working. Here is the configure line for php, which I forgot to give earlier: ./configure --with-apache=../apache_1.3.34 --with-mysql --with-pdo-mysql --with-gd --with-zlib --with-gettext --with-pdo-odbc=ibm-db2,/home/db2inst1/sqllib The php.ini is just the php.ini-recommended from the tarball with no changes, and nothing in the apache conf overriding anything other than the include path. Thanks, Nate [2005-12-28 21:06:41] [EMAIL PROTECTED] The same code that worked fine in 5.1.0 Are you sure? The only difference between 5.1.0 and 5.1.1 is that 5.1.1 doesn't have Date class, which obviously doesn't affect PDO in any way. [2005-12-28 20:39:20] nate-php at seekio dot com Oops, that create table statement should read: create table nate.testdb (a int, b varchar(50)) (I had cut and pasted in the wrong schema) 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/35830 -- Edit this bug report at http://bugs.php.net/?id=35830edit=1
#35517 [Asn-Csd]: mysqli_stmt_fetch() incorrectly returning NULL
ID: 35517 Updated by: [EMAIL PROTECTED] Reported By: php at pjberkel dot com -Status: Assigned +Status: Closed Bug Type: MySQLi related Operating System: RHEL 4 PHP Version: 5CVS-2005-12-02 (snap) Assigned To: georg 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: [2005-12-02 11:07:18] [EMAIL PROTECTED] Andrey, take a look at it. It happens because mysql_stmt_fetch() returns MYSQL_DATA_TRUNCATED. Dunno if we should return an error in such case or if it's ok to ignore it. [2005-12-02 10:35:40] php at pjberkel dot com Description: This bug report is a follow-up to a previous bug: http://bugs.php.net/bug.php?id=35103 I tested the original reproduce code using the lastest stable snapshot available (php5.1-200512020130) and there appears to be another bug (or feature) introduced as a result of the fix to bug #35103. It appears as though $stmt-fetch() is returning NULL despite the fact that the result has been correcly bound to the variable (and this only seems to occur when the data is an unsigned int = MAX_SIGNED_INT (as in bug #35103). I notice in the manual page that mysqli_stmt_fetch() returns NULL when No more rows/data exists or data truncation occurred so it would appear this is a bug. Can anybody confirm? (I'm using php5.1-200512020130 + mysql-5.0.16 on RHEL 4). Reproduce code: --- ?php $mysqli = new mysqli(host, user, pass, db); $mysqli-query(CREATE TABLE temp (id INT UNSIGNED NOT NULL)); $mysqli-query(INSERT INTO temp (id) VALUES (300897),(381532),(392281),(3100059612)); /* BEGIN EXAMPLE OF BUG */ $stmt = $mysqli-prepare(SELECT id FROM temp); $stmt-execute(); $stmt-bind_result($id); while ($stmt-fetch()) { var_dump($id); } $stmt-close(); /* END EXAMPLE OF BUG */ $mysqli-query(DROP TABLE temp); $mysqli-close(); ? Expected result: string(10) 300897 string(10) 381532 string(10) 392281 string(10) 3100059612 Actual result: -- [no output, while loop terminates immediately because $stmt-fetch() returns NULL] -- Edit this bug report at http://bugs.php.net/?id=35517edit=1
#35837 [NEW]: Crash when using PDO::FETCH_LAZY
From: [EMAIL PROTECTED] Operating system: Windows PHP version: 5CVS-2005-12-29 (snap) PHP Bug Type: PDO related Bug description: Crash when using PDO::FETCH_LAZY Description: PHP crashes at the end of the script when I use PDO::FETCH_LAZY. I've to say that from my testing (for some clever reason I started to use PDO::FETCH_LAZY right from the start and therefore have gone through many obscure crashes and exceptions) that I also saw the following problems with it: * it seems to consume memory and never releases it. I've got exception thrown from the Microsoft Access Driver about running out of memory. When I stopped using PDO::FETCH_LAZY the exception was never thrown again. * I got exception thrown about invalid table ids for now reasons which also went away when I stopped using PDO::FETCH_LAZY I was working with an Access Database (mdb file) but never fetching big data but it were about 1500 SQL statements sent. I've read report http://bugs.php.net/bug.php?id=35431 but I can confirm this for the current snapshot also. Reproduce code: --- $p = new PDO('odbc:driver={Microsoft Access Driver (*.mdb)};Dbq=beispieldatenbank.mdb'); $s = $p-query(SELECT COUNT(*) FROM ADDRESSES WHERE GUID = '', PDO::FETCH_LAZY); $s-fetch(); Expected result: Script should not crash. Actual result: -- Script crashes and Windows prompts me with a dialog to send a report to M$ -- Edit bug report at http://bugs.php.net/?id=35837edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=35837r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=35837r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=35837r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=35837r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=35837r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=35837r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=35837r=needscript Try newer version:http://bugs.php.net/fix.php?id=35837r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=35837r=support Expected behavior:http://bugs.php.net/fix.php?id=35837r=notwrong Not enough info: http://bugs.php.net/fix.php?id=35837r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=35837r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=35837r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35837r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=35837r=dst IIS Stability:http://bugs.php.net/fix.php?id=35837r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=35837r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=35837r=float No Zend Extensions: http://bugs.php.net/fix.php?id=35837r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=35837r=mysqlcfg
#35837 [Opn-Asn]: Crash when using PDO::FETCH_LAZY
ID: 35837 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Assigned Bug Type: PDO related Operating System: Windows PHP Version: 5CVS-2005-12-29 (snap) -Assigned To: +Assigned To: wez New Comment: Assigned to the maintainer. Previous Comments: [2005-12-29 11:56:36] [EMAIL PROTECTED] Description: PHP crashes at the end of the script when I use PDO::FETCH_LAZY. I've to say that from my testing (for some clever reason I started to use PDO::FETCH_LAZY right from the start and therefore have gone through many obscure crashes and exceptions) that I also saw the following problems with it: * it seems to consume memory and never releases it. I've got exception thrown from the Microsoft Access Driver about running out of memory. When I stopped using PDO::FETCH_LAZY the exception was never thrown again. * I got exception thrown about invalid table ids for now reasons which also went away when I stopped using PDO::FETCH_LAZY I was working with an Access Database (mdb file) but never fetching big data but it were about 1500 SQL statements sent. I've read report http://bugs.php.net/bug.php?id=35431 but I can confirm this for the current snapshot also. Reproduce code: --- $p = new PDO('odbc:driver={Microsoft Access Driver (*.mdb)};Dbq=beispieldatenbank.mdb'); $s = $p-query(SELECT COUNT(*) FROM ADDRESSES WHERE GUID = '', PDO::FETCH_LAZY); $s-fetch(); Expected result: Script should not crash. Actual result: -- Script crashes and Windows prompts me with a dialog to send a report to M$ -- Edit this bug report at http://bugs.php.net/?id=35837edit=1
#35751 [Asn-Csd]: using date with a timestamp makes httpd segfault
ID: 35751 Updated by: [EMAIL PROTECTED] Reported By: lehmann at ans-netz dot de -Status: Assigned +Status: Closed Bug Type: Date/time related Operating System: FreeBSD 6.0/alpha PHP Version: 5.1.1 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: [2005-12-28 17:13:55] [EMAIL PROTECTED] Please send account details to Derick, you got the email. [2005-12-28 16:49:08] lehmann at ans-netz dot de If there are some problems with getting an account on that machine I could give you one on mine as well. [2005-12-28 10:28:23] [EMAIL PROTECTED] An account on your machine would be helpful for debugging and fixing this. Can you provide this? (Use [EMAIL PROTECTED] to send details to) [2005-12-28 08:33:17] pablomh at gmail dot com Here's the backtrace: # php -r echo date('Y',1); Segmentation fault (core dumped) # gdb /usr/local/bin/php -c php.core GNU gdb 6.3 Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type show copying to see the conditions. There is absolutely no warranty for GDB. Type show warranty for details. This GDB was configured as sparc64-unknown-openbsd3.8... Core was generated by `php'. Program terminated with signal 11, Segmentation fault. Reading symbols from /usr/lib/libstdc++.so.40.0...done. Loaded symbols for /usr/lib/libstdc++.so.40.0 Reading symbols from /usr/lib/libm.so.2.1...done. Loaded symbols for /usr/lib/libm.so.2.1 Reading symbols from /usr/local/lib/libintl.so.3.0...done. Loaded symbols for /usr/local/lib/libintl.so.3.0 Reading symbols from /usr/lib/libssl.so.10.0...done. Loaded symbols for /usr/lib/libssl.so.10.0 Reading symbols from /usr/lib/libcrypto.so.12.0...done. Loaded symbols for /usr/lib/libcrypto.so.12.0 Reading symbols from /usr/lib/libz.so.4.1...done. Loaded symbols for /usr/lib/libz.so.4.1 Reading symbols from /usr/local/lib/libxml2.so.9.0...done. Loaded symbols for /usr/local/lib/libxml2.so.9.0 Reading symbols from /usr/local/lib/libiconv.so.4.0...done. Loaded symbols for /usr/local/lib/libiconv.so.4.0 Reading symbols from /usr/lib/libc.so.38.4...done. Loaded symbols for /usr/lib/libc.so.38.4 Reading symbols from /usr/libexec/ld.so...done. Loaded symbols for /usr/libexec/ld.so #0 0x0017b324 in date_format (format=0x4e2046d8 Y, format_len=1, t=0x4909dd00, localtime=1) at /home/ciph3r/OpenBSD/ports/mystuff/php5/core/w-php5-core-5.1.1/php-5.1.1/ext/date/php_date.c:467 467 switch (format[i]) { (gdb) bt #0 0x0017b324 in date_format (format=0x4e2046d8 Y, format_len=1, t=0x4909dd00, localtime=1) at /home/ciph3r/OpenBSD/ports/mystuff/php5/core/w-php5-core-5.1.1/php-5.1.1/ext/date/php_date.c:467 #1 0x0017bdb8 in php_format_date (format=0x4e2046d8 Y, format_len=1, ts=0, localtime=1) at /home/ciph3r/OpenBSD/ports/mystuff/php5/core/w-php5-core-5.1.1/php-5.1.1/ext/date/php_date.c:590 #2 0x0017bd18 in php_date (ht=2, return_value=0x4dd938d8, return_value_ptr=0x0, this_ptr=0x0, return_value_used=1, localtime=1) at /home/ciph3r/OpenBSD/ports/mystuff/php5/core/w-php5-core-5.1.1/php-5.1.1/ext/date/php_date.c:568 #3 0x0031ecdc in zend_do_fcall_common_helper_SPEC (execute_data=0x0b30) at zend_vm_execute.h:188 #4 0x0031e490 in execute (op_array=0x4909d018) at zend_vm_execute.h:88 #5 0x002e8d14 in zend_eval_string (str=0x Address 0x out of bounds, retval_ptr=0x0, string_name=0x4909d018 \004ÐÐÐ) at /home/ciph3r/OpenBSD/ports/mystuff/php5/core/w-php5-core-5.1.1/php-5.1.1/Zend/zend_execute_API.c:1056 #6 0x002e8e80 in zend_eval_string_ex (str=0x Address 0x out of bounds, retval_ptr=0x0, string_name=0x4909d018 \004ÐÐÐ, handle_exceptions=1) at /home/ciph3r/OpenBSD/ports/mystuff/php5/core/w-php5-core-5.1.1/php-5.1.1/Zend/zend_execute_API.c:1090 #7 0x00378d78 in main (argc=3, argv=0x1148) at /home/ciph3r/OpenBSD/ports/mystuff/php5/core/w-php5-core-5.1.1/php-5.1.1/sapi/cli/php_cli.c:1078 (gdb) Hope it helps. [2005-12-27 20:51:09] [EMAIL PROTECTED] Please provide a backtrace with full debugging symbols...
#35820 [Fbk-Opn]: php4ts.dll memory leak
ID: 35820 User updated by: ottawaremovethissixtyseven at hotmail dot com Reported By: ottawaremovethissixtyseven at hotmail dot com -Status: Feedback +Status: Open Bug Type: IIS related Operating System: W2K PHP Version: 4CVS-2005-12-27 (snap) New Comment: As part of troubleshooting we created this simple PHP script and ran an intense performance test: ?php include('Connect.php'); $SQL = 'SELECT COUNT(*) FROM COLORS'; fdbc_fetch_into(fdbc_exec($DB,$SQL),$Count); echo You have {$Count[0]} colors defined in your system; ? Our debugger is showing: a 97% leak probability in php4ts!XmlInitEncoding Please let me know if you need additional information. Previous Comments: [2005-12-27 20:51:55] [EMAIL PROTECTED] Short reproducable scripts are fine. Please leave the status at feedback until you can provide those. [2005-12-27 20:38:56] ottawaremovethissixtyseven at hotmail dot com I'm guessing you're looking for the PHP scripts that are being used in this performance test. I'm working on getting this. If you need anything other than the scripts please let me know. [2005-12-27 20:04:12] [EMAIL PROTECTED] It's possible if you provide some more information about the issue. The patch would be good too. [2005-12-27 20:01:09] ottawaremovethissixtyseven at hotmail dot com We are currently unable to use PHP 5 with our application. Any chance this memory leak will be fixed in an upcoming PHP 4.x snapshot? [2005-12-27 19:41:05] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.1-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.1-win32-latest.zip 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/35820 -- Edit this bug report at http://bugs.php.net/?id=35820edit=1
#35839 [NEW]: mssql_query Possible network error Bad token from SQL Server..
From: muratyaman at gmail dot com Operating system: Win XP Pro SP2 PHP version: 5.1.1 PHP Bug Type: MSSQL related Bug description: mssql_query Possible network error Bad token from SQL Server.. Description: Error message is: mssql_query() [function.mssql-query]: Possible network error: Bad token from SQL Server: Datastream processing out of sync. (severity 9) in file ... line ... I have a WinXP, Apache2, PHP5, MSDE2000 app and many pages inserting, updating, deleting records.. Pages for inserts include code to return on error and not lose entered data. Reproduce code: --- (Every page opens connection, queries database multiple times, closes the connection.) Create a form with a few textboxes and a combobox. I create a combobox with: ? $selected_option = 0; echo db_combo('field1', 'select field1 from tbl1', $selected_option); ? db_combo simply uses mssql_query to select records from a table, fill with options, create HTML code of a combobox with select option/option /select I use a global $dbh to handle database connection, also use mssql_connect, mssql_select_db functions. Expected result: 1. load page: tbl2_new.php combobox FULL with records read from the table 2. post to : tbl2_insert.php may not insert record because of normal reasons 3. return to: tbl2_new.php any entered data is post back combobox FULL with records read from the table 4. post to : tbl2_insert.php insert record Actual result: -- 1. load page: tbl2_new.php with EMPTY combobox and ERROR connection is lost every call afterwards to mssql_query fails 2. post to : tbl2_insert.php may or may not insert record 3. return to: tbl2_new.php any entered data is post back combobox FULL with records read from the table no problem at all Briefly, new and edit pages are very much similar with comboboxes etc. But on new pages, combobox cannot get any records on 1st run. I could not figure out the problem. But I think there is a communication problem when SQL server tries to send the records from a table. Thanks in advance. -- Edit bug report at http://bugs.php.net/?id=35839edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=35839r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=35839r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=35839r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=35839r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=35839r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=35839r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=35839r=needscript Try newer version:http://bugs.php.net/fix.php?id=35839r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=35839r=support Expected behavior:http://bugs.php.net/fix.php?id=35839r=notwrong Not enough info: http://bugs.php.net/fix.php?id=35839r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=35839r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=35839r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35839r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=35839r=dst IIS Stability:http://bugs.php.net/fix.php?id=35839r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=35839r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=35839r=float No Zend Extensions: http://bugs.php.net/fix.php?id=35839r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=35839r=mysqlcfg
#35820 [Opn-Fbk]: php4ts.dll memory leak
ID: 35820 Updated by: [EMAIL PROTECTED] Reported By: ottawaremovethissixtyseven at hotmail dot com -Status: Open +Status: Feedback Bug Type: IIS related Operating System: W2K PHP Version: 4CVS-2005-12-27 (snap) New Comment: Is it necessary to use some DB API to reproduce a leak in XML-related function? And I should note that this script doesn't make any sense, since we don't have the Connect.php and the database used, so we're unable just run it and see the problem. Previous Comments: [2005-12-29 16:29:14] ottawaremovethissixtyseven at hotmail dot com As part of troubleshooting we created this simple PHP script and ran an intense performance test: ?php include('Connect.php'); $SQL = 'SELECT COUNT(*) FROM COLORS'; fdbc_fetch_into(fdbc_exec($DB,$SQL),$Count); echo You have {$Count[0]} colors defined in your system; ? Our debugger is showing: a 97% leak probability in php4ts!XmlInitEncoding Please let me know if you need additional information. [2005-12-27 20:51:55] [EMAIL PROTECTED] Short reproducable scripts are fine. Please leave the status at feedback until you can provide those. [2005-12-27 20:38:56] ottawaremovethissixtyseven at hotmail dot com I'm guessing you're looking for the PHP scripts that are being used in this performance test. I'm working on getting this. If you need anything other than the scripts please let me know. [2005-12-27 20:04:12] [EMAIL PROTECTED] It's possible if you provide some more information about the issue. The patch would be good too. [2005-12-27 20:01:09] ottawaremovethissixtyseven at hotmail dot com We are currently unable to use PHP 5 with our application. Any chance this memory leak will be fixed in an upcoming PHP 4.x snapshot? 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/35820 -- Edit this bug report at http://bugs.php.net/?id=35820edit=1
#35839 [Opn-Fbk]: mssql_query(): Possible network error: Bad token from SQL Server..
ID: 35839 Updated by: [EMAIL PROTECTED] Reported By: muratyaman at gmail dot com -Status: Open +Status: Feedback Bug Type: MSSQL related Operating System: Win XP Pro SP2 PHP Version: 5.1.1 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.1-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.1-win32-latest.zip Previous Comments: [2005-12-29 16:33:49] muratyaman at gmail dot com Description: Error message is: mssql_query() [function.mssql-query]: Possible network error: Bad token from SQL Server: Datastream processing out of sync. (severity 9) in file ... line ... I have a WinXP, Apache2, PHP5, MSDE2000 app and many pages inserting, updating, deleting records.. Pages for inserts include code to return on error and not lose entered data. Reproduce code: --- (Every page opens connection, queries database multiple times, closes the connection.) Create a form with a few textboxes and a combobox. I create a combobox with: ? $selected_option = 0; echo db_combo('field1', 'select field1 from tbl1', $selected_option); ? db_combo simply uses mssql_query to select records from a table, fill with options, create HTML code of a combobox with select option/option /select I use a global $dbh to handle database connection, also use mssql_connect, mssql_select_db functions. Expected result: 1. load page: tbl2_new.php combobox FULL with records read from the table 2. post to : tbl2_insert.php may not insert record because of normal reasons 3. return to: tbl2_new.php any entered data is post back combobox FULL with records read from the table 4. post to : tbl2_insert.php insert record Actual result: -- 1. load page: tbl2_new.php with EMPTY combobox and ERROR connection is lost every call afterwards to mssql_query fails 2. post to : tbl2_insert.php may or may not insert record 3. return to: tbl2_new.php any entered data is post back combobox FULL with records read from the table no problem at all Briefly, new and edit pages are very much similar with comboboxes etc. But on new pages, combobox cannot get any records on 1st run. I could not figure out the problem. But I think there is a communication problem when SQL server tries to send the records from a table. Thanks in advance. -- Edit this bug report at http://bugs.php.net/?id=35839edit=1
#35839 [Fbk]: mssql_query(): Possible network error: Bad token from SQL Server..
ID: 35839 Updated by: [EMAIL PROTECTED] Reported By: muratyaman at gmail dot com Status: Feedback Bug Type: MSSQL related Operating System: Win XP Pro SP2 PHP Version: 5.1.1 New Comment: Can you reproduce the error with out the DB abstraction layer you are using? The data send to the server contains garbage, and this could be an indication that you are getting this error in a multithreaded environment. The standard MSSQL extension is not thread safe du to the msdblib library used to build the extension. You could replace php_mssql.dll with php_dblib.dll. It provides the same functions but uses FreeTDS to create conenctions. Previous Comments: [2005-12-29 16:37:20] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.1-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.1-win32-latest.zip [2005-12-29 16:33:49] muratyaman at gmail dot com Description: Error message is: mssql_query() [function.mssql-query]: Possible network error: Bad token from SQL Server: Datastream processing out of sync. (severity 9) in file ... line ... I have a WinXP, Apache2, PHP5, MSDE2000 app and many pages inserting, updating, deleting records.. Pages for inserts include code to return on error and not lose entered data. Reproduce code: --- (Every page opens connection, queries database multiple times, closes the connection.) Create a form with a few textboxes and a combobox. I create a combobox with: ? $selected_option = 0; echo db_combo('field1', 'select field1 from tbl1', $selected_option); ? db_combo simply uses mssql_query to select records from a table, fill with options, create HTML code of a combobox with select option/option /select I use a global $dbh to handle database connection, also use mssql_connect, mssql_select_db functions. Expected result: 1. load page: tbl2_new.php combobox FULL with records read from the table 2. post to : tbl2_insert.php may not insert record because of normal reasons 3. return to: tbl2_new.php any entered data is post back combobox FULL with records read from the table 4. post to : tbl2_insert.php insert record Actual result: -- 1. load page: tbl2_new.php with EMPTY combobox and ERROR connection is lost every call afterwards to mssql_query fails 2. post to : tbl2_insert.php may or may not insert record 3. return to: tbl2_new.php any entered data is post back combobox FULL with records read from the table no problem at all Briefly, new and edit pages are very much similar with comboboxes etc. But on new pages, combobox cannot get any records on 1st run. I could not figure out the problem. But I think there is a communication problem when SQL server tries to send the records from a table. Thanks in advance. -- Edit this bug report at http://bugs.php.net/?id=35839edit=1
#35839 [Fbk-Opn]: mssql_query(): Possible network error: Bad token from SQL Server..
ID: 35839 User updated by: muratyaman at gmail dot com Reported By: muratyaman at gmail dot com -Status: Feedback +Status: Open Bug Type: MSSQL related Operating System: Win XP Pro SP2 PHP Version: 5.1.1 New Comment: Hi! I installed latest version of PHP (5.1.2rc2) but same :( I found out that even the simplest of my pages have same problem regardless of combobox. My db abstraction layer is really simple: I just replaced mssql_abc functions with db_abc functions. I will try the DLL you recommended. I think I need to find out when/how/why the connection is broken if that's the case.. Unfortunately, there are not many traces, I looked at Apache log, SQL server log.. nothing. I do not have anything apart from PHP errors, because mssql_get_last_message() does not contain anything. Regards.. Previous Comments: [2005-12-29 16:53:51] [EMAIL PROTECTED] Can you reproduce the error with out the DB abstraction layer you are using? The data send to the server contains garbage, and this could be an indication that you are getting this error in a multithreaded environment. The standard MSSQL extension is not thread safe du to the msdblib library used to build the extension. You could replace php_mssql.dll with php_dblib.dll. It provides the same functions but uses FreeTDS to create conenctions. [2005-12-29 16:37:20] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.1-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.1-win32-latest.zip [2005-12-29 16:33:49] muratyaman at gmail dot com Description: Error message is: mssql_query() [function.mssql-query]: Possible network error: Bad token from SQL Server: Datastream processing out of sync. (severity 9) in file ... line ... I have a WinXP, Apache2, PHP5, MSDE2000 app and many pages inserting, updating, deleting records.. Pages for inserts include code to return on error and not lose entered data. Reproduce code: --- (Every page opens connection, queries database multiple times, closes the connection.) Create a form with a few textboxes and a combobox. I create a combobox with: ? $selected_option = 0; echo db_combo('field1', 'select field1 from tbl1', $selected_option); ? db_combo simply uses mssql_query to select records from a table, fill with options, create HTML code of a combobox with select option/option /select I use a global $dbh to handle database connection, also use mssql_connect, mssql_select_db functions. Expected result: 1. load page: tbl2_new.php combobox FULL with records read from the table 2. post to : tbl2_insert.php may not insert record because of normal reasons 3. return to: tbl2_new.php any entered data is post back combobox FULL with records read from the table 4. post to : tbl2_insert.php insert record Actual result: -- 1. load page: tbl2_new.php with EMPTY combobox and ERROR connection is lost every call afterwards to mssql_query fails 2. post to : tbl2_insert.php may or may not insert record 3. return to: tbl2_new.php any entered data is post back combobox FULL with records read from the table no problem at all Briefly, new and edit pages are very much similar with comboboxes etc. But on new pages, combobox cannot get any records on 1st run. I could not figure out the problem. But I think there is a communication problem when SQL server tries to send the records from a table. Thanks in advance. -- Edit this bug report at http://bugs.php.net/?id=35839edit=1
#35841 [NEW]: PHP Does not like underscores?
From: maarten at kleeszone dot be Operating system: Linux2.6.12-1-amd64 Debian PHP version: 5.1.1 PHP Bug Type: Compile Failure Bug description: PHP Does not like underscores? Description: Recently I installed a new server with apache2, PHP5.1 and mysql 5.0.16 Now I noticed that sometimes (0.5% of all requests) I get fatal errors: Fatal error: Unknown function: strtomower() in /var/www/global/init.global.php on line 235 Fatal error: Unknown function: strtlower() in /var/www/global/init.global.php on line 235 Fatal error: Unknown function: arrayslice() in /var/www/global/init.global.php on line 105 Fatal error: Unknown function: classexists() in /var/www/global/init.global.php on line 259 Typo I tought, but there are no typo's at these lines and after refreshing the page, there is no error! (these lines are executed each time the script runs!). I get these errors sooner or later on every page. But everytime the error is gone after a refresh. Maybe some encoding problems? I save my pages as UTF-8. But in that case I would expect to see the error every request and not just 'sometimes'. -- Edit bug report at http://bugs.php.net/?id=35841edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=35841r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=35841r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=35841r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=35841r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=35841r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=35841r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=35841r=needscript Try newer version:http://bugs.php.net/fix.php?id=35841r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=35841r=support Expected behavior:http://bugs.php.net/fix.php?id=35841r=notwrong Not enough info: http://bugs.php.net/fix.php?id=35841r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=35841r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=35841r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35841r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=35841r=dst IIS Stability:http://bugs.php.net/fix.php?id=35841r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=35841r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=35841r=float No Zend Extensions: http://bugs.php.net/fix.php?id=35841r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=35841r=mysqlcfg
#35841 [Opn-Fbk]: PHP Does not like underscores?
ID: 35841 Updated by: [EMAIL PROTECTED] Reported By: maarten at kleeszone dot be -Status: Open +Status: Feedback Bug Type: Compile Failure Operating System: Linux2.6.12-1-amd64 Debian PHP Version: 5.1.1 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.1-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.1-win32-latest.zip Previous Comments: [2005-12-29 18:10:19] maarten at kleeszone dot be Description: Recently I installed a new server with apache2, PHP5.1 and mysql 5.0.16 Now I noticed that sometimes (0.5% of all requests) I get fatal errors: Fatal error: Unknown function: strtomower() in /var/www/global/init.global.php on line 235 Fatal error: Unknown function: strtlower() in /var/www/global/init.global.php on line 235 Fatal error: Unknown function: arrayslice() in /var/www/global/init.global.php on line 105 Fatal error: Unknown function: classexists() in /var/www/global/init.global.php on line 259 Typo I tought, but there are no typo's at these lines and after refreshing the page, there is no error! (these lines are executed each time the script runs!). I get these errors sooner or later on every page. But everytime the error is gone after a refresh. Maybe some encoding problems? I save my pages as UTF-8. But in that case I would expect to see the error every request and not just 'sometimes'. -- Edit this bug report at http://bugs.php.net/?id=35841edit=1
#35841 [Fbk-Bgs]: PHP Does not like underscores?
ID: 35841 Updated by: [EMAIL PROTECTED] Reported By: maarten at kleeszone dot be -Status: Feedback +Status: Bogus Bug Type: Compile Failure Operating System: Linux2.6.12-1-amd64 Debian PHP Version: 5.1.1 New Comment: There are typoes there, I see strange things in your report. For example a weird character instead of an underscore... Previous Comments: [2005-12-29 18:12:22] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.1-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.1-win32-latest.zip [2005-12-29 18:10:19] maarten at kleeszone dot be Description: Recently I installed a new server with apache2, PHP5.1 and mysql 5.0.16 Now I noticed that sometimes (0.5% of all requests) I get fatal errors: Fatal error: Unknown function: strtomower() in /var/www/global/init.global.php on line 235 Fatal error: Unknown function: strtlower() in /var/www/global/init.global.php on line 235 Fatal error: Unknown function: arrayslice() in /var/www/global/init.global.php on line 105 Fatal error: Unknown function: classexists() in /var/www/global/init.global.php on line 259 Typo I tought, but there are no typo's at these lines and after refreshing the page, there is no error! (these lines are executed each time the script runs!). I get these errors sooner or later on every page. But everytime the error is gone after a refresh. Maybe some encoding problems? I save my pages as UTF-8. But in that case I would expect to see the error every request and not just 'sometimes'. -- Edit this bug report at http://bugs.php.net/?id=35841edit=1
#35843 [NEW]: imagettftext don't check open_basedir and safe_mode
From: vmlinuz386 at yahoo dot com dot ar Operating system: GNU/Linux PHP version: 4.4.1 PHP Bug Type: GD related Bug description: imagettftext don't check open_basedir and safe_mode Description: In file ext/gd/gdttf.c this call to freetype without any check open_basedir and safe_mode: if ((err = TT_Open_Face(*b-engine, a-fontname, a-face))) { this is also in 5.1.1 If you need a font in your scripts the font will be in some directory asigned for you. -- Edit bug report at http://bugs.php.net/?id=35843edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=35843r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=35843r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=35843r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=35843r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=35843r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=35843r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=35843r=needscript Try newer version:http://bugs.php.net/fix.php?id=35843r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=35843r=support Expected behavior:http://bugs.php.net/fix.php?id=35843r=notwrong Not enough info: http://bugs.php.net/fix.php?id=35843r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=35843r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=35843r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35843r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=35843r=dst IIS Stability:http://bugs.php.net/fix.php?id=35843r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=35843r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=35843r=float No Zend Extensions: http://bugs.php.net/fix.php?id=35843r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=35843r=mysqlcfg
#35839 [Opn-Fbk]: mssql_query(): Possible network error: Bad token from SQL Server..
ID: 35839 Updated by: [EMAIL PROTECTED] Reported By: muratyaman at gmail dot com -Status: Open +Status: Feedback Bug Type: MSSQL related Operating System: Win XP Pro SP2 PHP Version: 5CVS-2005-12-29 (snap) New Comment: Does using php_dblib.dll work any better or not? Previous Comments: [2005-12-29 17:36:44] muratyaman at gmail dot com Hi! I installed latest version of PHP (5.1.2rc2) but same :( I found out that even the simplest of my pages have same problem regardless of combobox. My db abstraction layer is really simple: I just replaced mssql_abc functions with db_abc functions. I will try the DLL you recommended. I think I need to find out when/how/why the connection is broken if that's the case.. Unfortunately, there are not many traces, I looked at Apache log, SQL server log.. nothing. I do not have anything apart from PHP errors, because mssql_get_last_message() does not contain anything. Regards.. [2005-12-29 16:53:51] [EMAIL PROTECTED] Can you reproduce the error with out the DB abstraction layer you are using? The data send to the server contains garbage, and this could be an indication that you are getting this error in a multithreaded environment. The standard MSSQL extension is not thread safe du to the msdblib library used to build the extension. You could replace php_mssql.dll with php_dblib.dll. It provides the same functions but uses FreeTDS to create conenctions. [2005-12-29 16:33:49] muratyaman at gmail dot com Description: Error message is: mssql_query() [function.mssql-query]: Possible network error: Bad token from SQL Server: Datastream processing out of sync. (severity 9) in file ... line ... I have a WinXP, Apache2, PHP5, MSDE2000 app and many pages inserting, updating, deleting records.. Pages for inserts include code to return on error and not lose entered data. Reproduce code: --- (Every page opens connection, queries database multiple times, closes the connection.) Create a form with a few textboxes and a combobox. I create a combobox with: ? $selected_option = 0; echo db_combo('field1', 'select field1 from tbl1', $selected_option); ? db_combo simply uses mssql_query to select records from a table, fill with options, create HTML code of a combobox with select option/option /select I use a global $dbh to handle database connection, also use mssql_connect, mssql_select_db functions. Expected result: 1. load page: tbl2_new.php combobox FULL with records read from the table 2. post to : tbl2_insert.php may not insert record because of normal reasons 3. return to: tbl2_new.php any entered data is post back combobox FULL with records read from the table 4. post to : tbl2_insert.php insert record Actual result: -- 1. load page: tbl2_new.php with EMPTY combobox and ERROR connection is lost every call afterwards to mssql_query fails 2. post to : tbl2_insert.php may or may not insert record 3. return to: tbl2_new.php any entered data is post back combobox FULL with records read from the table no problem at all Briefly, new and edit pages are very much similar with comboboxes etc. But on new pages, combobox cannot get any records on 1st run. I could not figure out the problem. But I think there is a communication problem when SQL server tries to send the records from a table. Thanks in advance. -- Edit this bug report at http://bugs.php.net/?id=35839edit=1
#35839 [Fbk-Opn]: mssql_query(): Possible network error: Bad token from SQL Server..
ID: 35839 User updated by: muratyaman at gmail dot com Reported By: muratyaman at gmail dot com -Status: Feedback +Status: Open Bug Type: MSSQL related Operating System: Win XP Pro SP2 PHP Version: 5CVS-2005-12-29 (snap) New Comment: Thank you. I could not integrate php_dblib.dll :( I tried to compile FreeTDS using Dev-C++ but could not get it working with PHP.. I am stuck. I was investigating the problem. I have a function as follows: function db_get_next_id($mygenid=''){ $i=0; $sql= DECLARE @MY_ID INT8, @r int8 EXECUTE @r= SPMY_GET_NEXT_ID \$mygenid\, @MY_ID OUTPUT ; if($qry=db_query($sql)){ while($row=db_fetch_row($qry)){ $i=$row[0]; break; } db_free_result($qry); } return $i; }//end fun get next id $new_id=db_get_next_id('keyfield'); This just works fine, I found that after this, calls to the db fails and produces the error. Because when I comment out the line calling this function, I don't get any error message. Any ideas? Regards Previous Comments: [2005-12-29 22:15:50] [EMAIL PROTECTED] Does using php_dblib.dll work any better or not? [2005-12-29 17:36:44] muratyaman at gmail dot com Hi! I installed latest version of PHP (5.1.2rc2) but same :( I found out that even the simplest of my pages have same problem regardless of combobox. My db abstraction layer is really simple: I just replaced mssql_abc functions with db_abc functions. I will try the DLL you recommended. I think I need to find out when/how/why the connection is broken if that's the case.. Unfortunately, there are not many traces, I looked at Apache log, SQL server log.. nothing. I do not have anything apart from PHP errors, because mssql_get_last_message() does not contain anything. Regards.. [2005-12-29 16:53:51] [EMAIL PROTECTED] Can you reproduce the error with out the DB abstraction layer you are using? The data send to the server contains garbage, and this could be an indication that you are getting this error in a multithreaded environment. The standard MSSQL extension is not thread safe du to the msdblib library used to build the extension. You could replace php_mssql.dll with php_dblib.dll. It provides the same functions but uses FreeTDS to create conenctions. [2005-12-29 16:33:49] muratyaman at gmail dot com Description: Error message is: mssql_query() [function.mssql-query]: Possible network error: Bad token from SQL Server: Datastream processing out of sync. (severity 9) in file ... line ... I have a WinXP, Apache2, PHP5, MSDE2000 app and many pages inserting, updating, deleting records.. Pages for inserts include code to return on error and not lose entered data. Reproduce code: --- (Every page opens connection, queries database multiple times, closes the connection.) Create a form with a few textboxes and a combobox. I create a combobox with: ? $selected_option = 0; echo db_combo('field1', 'select field1 from tbl1', $selected_option); ? db_combo simply uses mssql_query to select records from a table, fill with options, create HTML code of a combobox with select option/option /select I use a global $dbh to handle database connection, also use mssql_connect, mssql_select_db functions. Expected result: 1. load page: tbl2_new.php combobox FULL with records read from the table 2. post to : tbl2_insert.php may not insert record because of normal reasons 3. return to: tbl2_new.php any entered data is post back combobox FULL with records read from the table 4. post to : tbl2_insert.php insert record Actual result: -- 1. load page: tbl2_new.php with EMPTY combobox and ERROR connection is lost every call afterwards to mssql_query fails 2. post to : tbl2_insert.php may or may not insert record 3. return to: tbl2_new.php any entered data is post back combobox FULL with records read from the table no problem at all Briefly, new and edit pages are very much similar with comboboxes etc. But on new pages, combobox cannot get any records on 1st run. I could not figure out the problem. But I think there is a communication problem when SQL server tries to send the records from a table. Thanks in advance. -- Edit this bug report at http://bugs.php.net/?id=35839edit=1
#35839 [Opn-Asn]: mssql_query(): Possible network error: Bad token from SQL Server..
ID: 35839 Updated by: [EMAIL PROTECTED] Reported By: muratyaman at gmail dot com -Status: Open +Status: Assigned Bug Type: MSSQL related Operating System: Win XP Pro SP2 PHP Version: 5CVS-2005-12-29 (snap) -Assigned To: +Assigned To: fmk New Comment: Frank, can you make any sense to this? :) Previous Comments: [2005-12-29 22:35:42] muratyaman at gmail dot com Thank you. I could not integrate php_dblib.dll :( I tried to compile FreeTDS using Dev-C++ but could not get it working with PHP.. I am stuck. I was investigating the problem. I have a function as follows: function db_get_next_id($mygenid=''){ $i=0; $sql= DECLARE @MY_ID INT8, @r int8 EXECUTE @r= SPMY_GET_NEXT_ID \$mygenid\, @MY_ID OUTPUT ; if($qry=db_query($sql)){ while($row=db_fetch_row($qry)){ $i=$row[0]; break; } db_free_result($qry); } return $i; }//end fun get next id $new_id=db_get_next_id('keyfield'); This just works fine, I found that after this, calls to the db fails and produces the error. Because when I comment out the line calling this function, I don't get any error message. Any ideas? Regards [2005-12-29 22:15:50] [EMAIL PROTECTED] Does using php_dblib.dll work any better or not? [2005-12-29 17:36:44] muratyaman at gmail dot com Hi! I installed latest version of PHP (5.1.2rc2) but same :( I found out that even the simplest of my pages have same problem regardless of combobox. My db abstraction layer is really simple: I just replaced mssql_abc functions with db_abc functions. I will try the DLL you recommended. I think I need to find out when/how/why the connection is broken if that's the case.. Unfortunately, there are not many traces, I looked at Apache log, SQL server log.. nothing. I do not have anything apart from PHP errors, because mssql_get_last_message() does not contain anything. Regards.. [2005-12-29 16:53:51] [EMAIL PROTECTED] Can you reproduce the error with out the DB abstraction layer you are using? The data send to the server contains garbage, and this could be an indication that you are getting this error in a multithreaded environment. The standard MSSQL extension is not thread safe du to the msdblib library used to build the extension. You could replace php_mssql.dll with php_dblib.dll. It provides the same functions but uses FreeTDS to create conenctions. [2005-12-29 16:33:49] muratyaman at gmail dot com Description: Error message is: mssql_query() [function.mssql-query]: Possible network error: Bad token from SQL Server: Datastream processing out of sync. (severity 9) in file ... line ... I have a WinXP, Apache2, PHP5, MSDE2000 app and many pages inserting, updating, deleting records.. Pages for inserts include code to return on error and not lose entered data. Reproduce code: --- (Every page opens connection, queries database multiple times, closes the connection.) Create a form with a few textboxes and a combobox. I create a combobox with: ? $selected_option = 0; echo db_combo('field1', 'select field1 from tbl1', $selected_option); ? db_combo simply uses mssql_query to select records from a table, fill with options, create HTML code of a combobox with select option/option /select I use a global $dbh to handle database connection, also use mssql_connect, mssql_select_db functions. Expected result: 1. load page: tbl2_new.php combobox FULL with records read from the table 2. post to : tbl2_insert.php may not insert record because of normal reasons 3. return to: tbl2_new.php any entered data is post back combobox FULL with records read from the table 4. post to : tbl2_insert.php insert record Actual result: -- 1. load page: tbl2_new.php with EMPTY combobox and ERROR connection is lost every call afterwards to mssql_query fails 2. post to : tbl2_insert.php may or may not insert record 3. return to: tbl2_new.php any entered data is post back combobox FULL with records read from the table no problem at all Briefly, new and edit pages are very much similar with comboboxes etc. But on new pages, combobox cannot get any records on 1st run. I could not figure out the problem. But I think there is a communication problem when SQL server tries to send the records from a table. Thanks in advance. -- Edit this bug report at http://bugs.php.net/?id=35839edit=1
#35839 [Asn]: mssql_query(): Possible network error: Bad token from SQL Server..
ID: 35839 User updated by: muratyaman at gmail dot com Reported By: muratyaman at gmail dot com Status: Assigned Bug Type: MSSQL related Operating System: Win XP Pro SP2 PHP Version: 5CVS-2005-12-29 (snap) Assigned To: fmk New Comment: Basically, my procedure inserts a dummy record into a special table and gets inserted id. (int8 is a udt for 'bigint', i'm changing it for you below to bigint). I have dummy tables to simulate sequence generators for different tables, here is a pair of them: CREATE TABLE TBL_GEN_ABC_ID ( ID bigint IDENTITY(1, 1) NOT NULL, DUMMY bit, CONSTRAINT PK_TBL_GEN_ABC_ID PRIMARY KEY CLUSTERED (ID) ) GO CREATE TABLE TBL_ABC ( ABC_ID INT NOT NULL, ABC_NAME] VARCHAR(100) NOT NULL, CONSTRAINT PK_TBL_ABC PRIMARY KEY CLUSTERED (ABC_ID) ) GO Procedure is like this: CREATE PROCEDURE spmy_get_next_id( @GEN_ID_NAME VARCHAR(100)='#NO TABLE', @ID bigint OUTPUT ) AS BEGIN SET @ID=NULL; DECLARE @GEN_ID bigint; SET @GEN_ID=0; IF (UPPER(@GEN_ID_NAME)='ABC_ID') BEGIN WHILE (1=1) BEGIN --generate id INSERT INTO TBL_GEN_ABC_ID (DUMMY) VALUES(0); SET @GEN_ID=@@IDENTITY; --get generated id IF(NOT EXISTS( --make sure it was not used SELECT ABC_ID FROM TBL_ABC WHERE [EMAIL PROTECTED]) ) BREAK; END END SET @[EMAIL PROTECTED]; SELECT @ID AS ID;--for PHP to read resultset and value RETURN @ID; --return value, not crucial END GO so in PHP you can use modifed version of my function: function db_get_next_id($mygenid=''){ $i=0; $sql= DECLARE @MY_ID bigint, @r bigint EXECUTE @r=SPMY_GET_NEXT_ID \$mygenid\, @MY_ID OUTPUT ; if($qry=db_query($sql)){ while($row=db_fetch_row($qry)){ $i=$row[0]; break; } db_free_result($qry); } return $i; }//end fun get next id $new_id=db_get_next_id('ABC_ID'); (As I mentioned earlier, e.g. db_fetch_row is just using mssql_fetch_row.. all of my db_xyz functions are like this.) This works fine but subsequent mssql_query functions fail. This may not be the ideal way of doing it, but it should not cause any harm. Everything else is working fine. Maybe I should just change the way I use my procedures.. Thank you. Previous Comments: [2005-12-29 22:37:33] [EMAIL PROTECTED] Frank, can you make any sense to this? :) [2005-12-29 22:35:42] muratyaman at gmail dot com Thank you. I could not integrate php_dblib.dll :( I tried to compile FreeTDS using Dev-C++ but could not get it working with PHP.. I am stuck. I was investigating the problem. I have a function as follows: function db_get_next_id($mygenid=''){ $i=0; $sql= DECLARE @MY_ID INT8, @r int8 EXECUTE @r= SPMY_GET_NEXT_ID \$mygenid\, @MY_ID OUTPUT ; if($qry=db_query($sql)){ while($row=db_fetch_row($qry)){ $i=$row[0]; break; } db_free_result($qry); } return $i; }//end fun get next id $new_id=db_get_next_id('keyfield'); This just works fine, I found that after this, calls to the db fails and produces the error. Because when I comment out the line calling this function, I don't get any error message. Any ideas? Regards [2005-12-29 22:15:50] [EMAIL PROTECTED] Does using php_dblib.dll work any better or not? [2005-12-29 17:36:44] muratyaman at gmail dot com Hi! I installed latest version of PHP (5.1.2rc2) but same :( I found out that even the simplest of my pages have same problem regardless of combobox. My db abstraction layer is really simple: I just replaced mssql_abc functions with db_abc functions. I will try the DLL you recommended. I think I need to find out when/how/why the connection is broken if that's the case.. Unfortunately, there are not many traces, I looked at Apache log, SQL server log.. nothing. I do not have anything apart from PHP errors, because mssql_get_last_message() does not contain anything. Regards.. [2005-12-29 16:53:51] [EMAIL PROTECTED] Can you reproduce the error with out the DB abstraction layer you are using? The data send to the server contains garbage, and this could be an indication that you are getting this error in a multithreaded environment. The standard MSSQL extension is not thread safe du to the msdblib library used to build the extension. You could replace php_mssql.dll with php_dblib.dll. It provides the same functions but uses FreeTDS to create conenctions. The remainder of the comments for this report are
#35839 [Asn]: mssql_query(): Possible network error: Bad token from SQL Server..
ID: 35839 User updated by: muratyaman at gmail dot com Reported By: muratyaman at gmail dot com Status: Assigned Bug Type: MSSQL related Operating System: Win XP Pro SP2 PHP Version: 5CVS-2005-12-29 (snap) Assigned To: fmk New Comment: Hi again :) I changed my function to this: function db_get_next_id($mygenid=''){ $id = 0; $ret_val=0; $stmt = mssql_init(SPMY_GET_NEXT_ID); mssql_bind($stmt, @GEN_ID_NAME, $mygenid, SQLVARCHAR, FALSE,FALSE);//input, not null mssql_bind($stmt, @ID, $id, SQLINT4, TRUE,TRUE);//output,null mssql_bind($stmt,RETVAL,$ret_val,SQLINT4); $result = mssql_execute($stmt); while($row=mssql_fetch_row($result)){ //read id $id=$row[0];//but it should get from the output variable!? } mssql_free_statement($stmt); unset($stmt); // ---VERY important return $id; } Anyway, this solved my problem. But will I not be able to use arbitrary SQL statements with mssql_query, including execution of procedures, etc. ?! Kind regards Previous Comments: [2005-12-29 23:54:16] muratyaman at gmail dot com Basically, my procedure inserts a dummy record into a special table and gets inserted id. (int8 is a udt for 'bigint', i'm changing it for you below to bigint). I have dummy tables to simulate sequence generators for different tables, here is a pair of them: CREATE TABLE TBL_GEN_ABC_ID ( ID bigint IDENTITY(1, 1) NOT NULL, DUMMY bit, CONSTRAINT PK_TBL_GEN_ABC_ID PRIMARY KEY CLUSTERED (ID) ) GO CREATE TABLE TBL_ABC ( ABC_ID INT NOT NULL, ABC_NAME] VARCHAR(100) NOT NULL, CONSTRAINT PK_TBL_ABC PRIMARY KEY CLUSTERED (ABC_ID) ) GO Procedure is like this: CREATE PROCEDURE spmy_get_next_id( @GEN_ID_NAME VARCHAR(100)='#NO TABLE', @ID bigint OUTPUT ) AS BEGIN SET @ID=NULL; DECLARE @GEN_ID bigint; SET @GEN_ID=0; IF (UPPER(@GEN_ID_NAME)='ABC_ID') BEGIN WHILE (1=1) BEGIN --generate id INSERT INTO TBL_GEN_ABC_ID (DUMMY) VALUES(0); SET @GEN_ID=@@IDENTITY; --get generated id IF(NOT EXISTS( --make sure it was not used SELECT ABC_ID FROM TBL_ABC WHERE [EMAIL PROTECTED]) ) BREAK; END END SET @[EMAIL PROTECTED]; SELECT @ID AS ID;--for PHP to read resultset and value RETURN @ID; --return value, not crucial END GO so in PHP you can use modifed version of my function: function db_get_next_id($mygenid=''){ $i=0; $sql= DECLARE @MY_ID bigint, @r bigint EXECUTE @r=SPMY_GET_NEXT_ID \$mygenid\, @MY_ID OUTPUT ; if($qry=db_query($sql)){ while($row=db_fetch_row($qry)){ $i=$row[0]; break; } db_free_result($qry); } return $i; }//end fun get next id $new_id=db_get_next_id('ABC_ID'); (As I mentioned earlier, e.g. db_fetch_row is just using mssql_fetch_row.. all of my db_xyz functions are like this.) This works fine but subsequent mssql_query functions fail. This may not be the ideal way of doing it, but it should not cause any harm. Everything else is working fine. Maybe I should just change the way I use my procedures.. Thank you. [2005-12-29 22:37:33] [EMAIL PROTECTED] Frank, can you make any sense to this? :) [2005-12-29 22:35:42] muratyaman at gmail dot com Thank you. I could not integrate php_dblib.dll :( I tried to compile FreeTDS using Dev-C++ but could not get it working with PHP.. I am stuck. I was investigating the problem. I have a function as follows: function db_get_next_id($mygenid=''){ $i=0; $sql= DECLARE @MY_ID INT8, @r int8 EXECUTE @r= SPMY_GET_NEXT_ID \$mygenid\, @MY_ID OUTPUT ; if($qry=db_query($sql)){ while($row=db_fetch_row($qry)){ $i=$row[0]; break; } db_free_result($qry); } return $i; }//end fun get next id $new_id=db_get_next_id('keyfield'); This just works fine, I found that after this, calls to the db fails and produces the error. Because when I comment out the line calling this function, I don't get any error message. Any ideas? Regards [2005-12-29 22:15:50] [EMAIL PROTECTED] Does using php_dblib.dll work any better or not? [2005-12-29 17:36:44] muratyaman at gmail dot com Hi! I installed latest version of PHP (5.1.2rc2) but same :( I found out that even the simplest of my pages have same problem regardless of combobox. My db abstraction layer is really simple: I just replaced mssql_abc functions with db_abc functions. I will try the DLL you recommended. I think I need to find out when/how/why the connection is broken if that's the case.. Unfortunately, there
#35839 [Asn-Fbk]: mssql_query(): Possible network error: Bad token from SQL Server..
ID: 35839 Updated by: [EMAIL PROTECTED] Reported By: muratyaman at gmail dot com -Status: Assigned +Status: Feedback Bug Type: MSSQL related Operating System: Win XP Pro SP2 PHP Version: 5CVS-2005-12-29 (snap) Assigned To: fmk New Comment: bigint is not known on my mssql server 7 but it works fine on mssql server 2000. I have tested your code on both servers using PHP 5.1.2-dev and I do not get any errors. I don't think there is any errors here. I have also tested with both local and remote server and with php_mssql.dll and php_dblib.dll. Previous Comments: [2005-12-30 00:21:51] muratyaman at gmail dot com Hi again :) I changed my function to this: function db_get_next_id($mygenid=''){ $id = 0; $ret_val=0; $stmt = mssql_init(SPMY_GET_NEXT_ID); mssql_bind($stmt, @GEN_ID_NAME, $mygenid, SQLVARCHAR, FALSE,FALSE);//input, not null mssql_bind($stmt, @ID, $id, SQLINT4, TRUE,TRUE);//output,null mssql_bind($stmt,RETVAL,$ret_val,SQLINT4); $result = mssql_execute($stmt); while($row=mssql_fetch_row($result)){ //read id $id=$row[0];//but it should get from the output variable!? } mssql_free_statement($stmt); unset($stmt); // ---VERY important return $id; } Anyway, this solved my problem. But will I not be able to use arbitrary SQL statements with mssql_query, including execution of procedures, etc. ?! Kind regards [2005-12-29 23:54:16] muratyaman at gmail dot com Basically, my procedure inserts a dummy record into a special table and gets inserted id. (int8 is a udt for 'bigint', i'm changing it for you below to bigint). I have dummy tables to simulate sequence generators for different tables, here is a pair of them: CREATE TABLE TBL_GEN_ABC_ID ( ID bigint IDENTITY(1, 1) NOT NULL, DUMMY bit, CONSTRAINT PK_TBL_GEN_ABC_ID PRIMARY KEY CLUSTERED (ID) ) GO CREATE TABLE TBL_ABC ( ABC_ID INT NOT NULL, ABC_NAME] VARCHAR(100) NOT NULL, CONSTRAINT PK_TBL_ABC PRIMARY KEY CLUSTERED (ABC_ID) ) GO Procedure is like this: CREATE PROCEDURE spmy_get_next_id( @GEN_ID_NAME VARCHAR(100)='#NO TABLE', @ID bigint OUTPUT ) AS BEGIN SET @ID=NULL; DECLARE @GEN_ID bigint; SET @GEN_ID=0; IF (UPPER(@GEN_ID_NAME)='ABC_ID') BEGIN WHILE (1=1) BEGIN --generate id INSERT INTO TBL_GEN_ABC_ID (DUMMY) VALUES(0); SET @GEN_ID=@@IDENTITY; --get generated id IF(NOT EXISTS( --make sure it was not used SELECT ABC_ID FROM TBL_ABC WHERE [EMAIL PROTECTED]) ) BREAK; END END SET @[EMAIL PROTECTED]; SELECT @ID AS ID;--for PHP to read resultset and value RETURN @ID; --return value, not crucial END GO so in PHP you can use modifed version of my function: function db_get_next_id($mygenid=''){ $i=0; $sql= DECLARE @MY_ID bigint, @r bigint EXECUTE @r=SPMY_GET_NEXT_ID \$mygenid\, @MY_ID OUTPUT ; if($qry=db_query($sql)){ while($row=db_fetch_row($qry)){ $i=$row[0]; break; } db_free_result($qry); } return $i; }//end fun get next id $new_id=db_get_next_id('ABC_ID'); (As I mentioned earlier, e.g. db_fetch_row is just using mssql_fetch_row.. all of my db_xyz functions are like this.) This works fine but subsequent mssql_query functions fail. This may not be the ideal way of doing it, but it should not cause any harm. Everything else is working fine. Maybe I should just change the way I use my procedures.. Thank you. [2005-12-29 22:37:33] [EMAIL PROTECTED] Frank, can you make any sense to this? :) [2005-12-29 22:35:42] muratyaman at gmail dot com Thank you. I could not integrate php_dblib.dll :( I tried to compile FreeTDS using Dev-C++ but could not get it working with PHP.. I am stuck. I was investigating the problem. I have a function as follows: function db_get_next_id($mygenid=''){ $i=0; $sql= DECLARE @MY_ID INT8, @r int8 EXECUTE @r= SPMY_GET_NEXT_ID \$mygenid\, @MY_ID OUTPUT ; if($qry=db_query($sql)){ while($row=db_fetch_row($qry)){ $i=$row[0]; break; } db_free_result($qry); } return $i; }//end fun get next id $new_id=db_get_next_id('keyfield'); This just works fine, I found that after this, calls to the db fails and produces the error. Because when I comment out the line calling this function, I don't get any error message. Any ideas? Regards [2005-12-29 22:15:50] [EMAIL PROTECTED] Does using php_dblib.dll work any better or not?
#35773 [Asn-Bgs]: Zend engine loops (works with PHP 5.1)
ID: 35773 Updated by: [EMAIL PROTECTED] Reported By: igmar at palsenberg dot com -Status: Assigned +Status: Bogus Bug Type: Scripting Engine problem Operating System: Linux 2.6.x PHP Version: 4CVS-2005-12-22 (CVS) Assigned To: derick New Comment: . Previous Comments: [2005-12-22 14:18:27] igmar at palsenberg dot com Description: The ZE loops at certain code. I haven't found the actual code that triggers it, but it show up frequently when using phpMyAdmin. Configure line : ./configure' '--with-apache=/home/igmar/OWN/lamp-ssl/apache_1.3.34' '--with-gd' '--with-zlib' '--with-kerberos' '--with-openssl' '--enable-gd-native-ttf' '--with-freetype' '--with-freetype-dir=/usr' '--enable-track-vars' '--with-freetype' '--with-mysql=/usr' '--enable-sockets' '--with-config-file-path=/etc/httpsd' '--enable-memory-limit' '--enable-sysvshm' '--enable-sysvsem' '--with-domxml' '--with-dom' '--enable-ftp' '--with-openssl' '--with-db4' '--with-gettext' '--with-pdflib' '--with-jpeg-dir=/usr' '--with-tiff-dir=/usr' '--with-png-dir=/usr' '--with-ming=/usr' '--with-xmlrpc' '--with-readline' '--enable-xslt' '--with-xslt-sablot' '--enable-mbstring' '--with-imap' '--with-imap-ssl' Apache is 1.3.34 + latest mod_ssl Reproduce code: --- Unknown Actual result: -- 2 backtraces when the process starts looping. If there is a way that I can find out which PHP code it is actually executing, I'll be happy to find out. 4.3.x didn't exhibit this behaviour, I haven't tested 4.4.0. BT #1 #0 0x080f9326 in zend_hash_find (ht=0x84e53cc, arKey=0x87904bc buffer, nKeyLength=7, pData=0xbfcb22c8) at /home/igmar/OWN/lamp-ssl/php-src/Zend/zend_hash.c:896 #1 0x080ff813 in zend_fetch_var_address (opline=0x87c7450, Ts=0xbfcb2310, type=0) at /home/igmar/OWN/lamp-ssl/php-src/Zend/zend_execute.c:594 #2 0x08101c26 in execute (op_array=0x8747e2c) at /home/igmar/OWN/lamp-ssl/php-src/Zend/zend_execute.c:1302 #3 0x08104405 in execute (op_array=0x85b935c) at /home/igmar/OWN/lamp-ssl/php-src/Zend/zend_execute.c:2272 #4 0x080f529f in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/igmar/OWN/lamp-ssl/php-src/Zend/zend.c:934 #5 0x080d370c in php_execute_script (primary_file=0xbfcbc650) at /home/igmar/OWN/lamp-ssl/php-src/main/main.c:1753 #6 0x0810c558 in apache_php_module_main (r=0x858e454, display_source_mode=0) at /home/igmar/OWN/lamp-ssl/php-src/sapi/apache/sapi_apache.c:54 #7 0x080cbc80 in send_php (r=0x858e454, display_source_mode=0, filename=0x0) at /home/igmar/OWN/lamp-ssl/php-src/sapi/apache/mod_php4.c:627 #8 0x080cbf0e in send_parsed_php (r=0x858e454) at /home/igmar/OWN/lamp-ssl/php-src/sapi/apache/mod_php4.c:642 #9 0x0821d7c8 in ap_invoke_handler () #10 0x08232e7e in process_request_internal () #11 0x08232edd in ap_process_request () #12 0x08229ceb in child_main ()#13 0x08229fd4 in make_child () #14 0x0822a30d in perform_idle_server_maintenance () #15 0x0822a91a in standalone_main () #16 0x0822af3d in main () BT #2 : 0x080f8536 in zend_hash_add_or_update (ht=0x864cb2c, arKey=0x85cee4c offset, nKeyLength=7, pData=0xbfcb1314, nDataSize=4, pDest=0xbfcb1318, flag=1) at /home/igmar/OWN/lamp-ssl/php-src/Zend/zend_hash.h:197 197 h += (h 5); #0 0x080f8536 in zend_hash_add_or_update (ht=0x864cb2c, arKey=0x85cee4c offset, nKeyLength=7, pData=0xbfcb1314, nDataSize=4, pDest=0xbfcb1318, flag=1) at /home/igmar/OWN/lamp-ssl/php-src/Zend/zend_hash.h:197 #1 0x080ff9df in zend_fetch_var_address (opline=0x87bd13c, Ts=0xbfcb1360, type=1) at /home/igmar/OWN/lamp-ssl/php-src/Zend/zend_execute.c:609 #2 0x08101c5b in execute (op_array=0x8604e30) at /home/igmar/OWN/lamp-ssl/php-src/Zend/zend_execute.c:1281 #3 0x08103f93 in execute (op_array=0x8747e2c) at /home/igmar/OWN/lamp-ssl/php-src/Zend/zend_execute.c:1719 #4 0x08104405 in execute (op_array=0x85b935c) at /home/igmar/OWN/lamp-ssl/php-src/Zend/zend_execute.c:2272 #5 0x080f529f in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/igmar/OWN/lamp-ssl/php-src/Zend/zend.c:934 #6 0x080d370c in php_execute_script (primary_file=0xbfcbc650) at /home/igmar/OWN/lamp-ssl/php-src/main/main.c:1753 #7 0x0810c558 in apache_php_module_main (r=0x858e454, display_source_mode=0) at /home/igmar/OWN/lamp-ssl/php-src/sapi/apache/sapi_apache.c:54 #8 0x080cbc80 in send_php (r=0x858e454, display_source_mode=0, filename=0x0) at /home/igmar/OWN/lamp-ssl/php-src/sapi/apache/mod_php4.c:627 #9 0x080cbf0e in send_parsed_php (r=0x858e454) at /home/igmar/OWN/lamp-ssl/php-src/sapi/apache/mod_php4.c:642 #10 0x0821d7c8 in ap_invoke_handler () #11 0x08232e7e in process_request_internal () #12 0x08232edd in ap_process_request () #13 0x08229ceb in child_main () #14 0x08229fd4 in make_child () #15 0x0822a30d in
#35839 [Fbk-Bgs]: mssql_query(): Possible network error: Bad token from SQL Server..
ID: 35839 Updated by: [EMAIL PROTECTED] Reported By: muratyaman at gmail dot com -Status: Feedback +Status: Bogus Bug Type: MSSQL related Operating System: Win XP Pro SP2 PHP Version: 5CVS-2005-12-29 (snap) Assigned To: fmk New Comment: using mssql_qyery() to execute storred procedures is usefull, but it can only be used to retreive result sets. output parameters and return values are not handled with this method. In that case you must use the mssql_init(), mssql_bind() and mssql_execute() functions. Previous Comments: [2005-12-30 00:46:25] [EMAIL PROTECTED] bigint is not known on my mssql server 7 but it works fine on mssql server 2000. I have tested your code on both servers using PHP 5.1.2-dev and I do not get any errors. I don't think there is any errors here. I have also tested with both local and remote server and with php_mssql.dll and php_dblib.dll. [2005-12-30 00:21:51] muratyaman at gmail dot com Hi again :) I changed my function to this: function db_get_next_id($mygenid=''){ $id = 0; $ret_val=0; $stmt = mssql_init(SPMY_GET_NEXT_ID); mssql_bind($stmt, @GEN_ID_NAME, $mygenid, SQLVARCHAR, FALSE,FALSE);//input, not null mssql_bind($stmt, @ID, $id, SQLINT4, TRUE,TRUE);//output,null mssql_bind($stmt,RETVAL,$ret_val,SQLINT4); $result = mssql_execute($stmt); while($row=mssql_fetch_row($result)){ //read id $id=$row[0];//but it should get from the output variable!? } mssql_free_statement($stmt); unset($stmt); // ---VERY important return $id; } Anyway, this solved my problem. But will I not be able to use arbitrary SQL statements with mssql_query, including execution of procedures, etc. ?! Kind regards [2005-12-29 23:54:16] muratyaman at gmail dot com Basically, my procedure inserts a dummy record into a special table and gets inserted id. (int8 is a udt for 'bigint', i'm changing it for you below to bigint). I have dummy tables to simulate sequence generators for different tables, here is a pair of them: CREATE TABLE TBL_GEN_ABC_ID ( ID bigint IDENTITY(1, 1) NOT NULL, DUMMY bit, CONSTRAINT PK_TBL_GEN_ABC_ID PRIMARY KEY CLUSTERED (ID) ) GO CREATE TABLE TBL_ABC ( ABC_ID INT NOT NULL, ABC_NAME] VARCHAR(100) NOT NULL, CONSTRAINT PK_TBL_ABC PRIMARY KEY CLUSTERED (ABC_ID) ) GO Procedure is like this: CREATE PROCEDURE spmy_get_next_id( @GEN_ID_NAME VARCHAR(100)='#NO TABLE', @ID bigint OUTPUT ) AS BEGIN SET @ID=NULL; DECLARE @GEN_ID bigint; SET @GEN_ID=0; IF (UPPER(@GEN_ID_NAME)='ABC_ID') BEGIN WHILE (1=1) BEGIN --generate id INSERT INTO TBL_GEN_ABC_ID (DUMMY) VALUES(0); SET @GEN_ID=@@IDENTITY; --get generated id IF(NOT EXISTS( --make sure it was not used SELECT ABC_ID FROM TBL_ABC WHERE [EMAIL PROTECTED]) ) BREAK; END END SET @[EMAIL PROTECTED]; SELECT @ID AS ID;--for PHP to read resultset and value RETURN @ID; --return value, not crucial END GO so in PHP you can use modifed version of my function: function db_get_next_id($mygenid=''){ $i=0; $sql= DECLARE @MY_ID bigint, @r bigint EXECUTE @r=SPMY_GET_NEXT_ID \$mygenid\, @MY_ID OUTPUT ; if($qry=db_query($sql)){ while($row=db_fetch_row($qry)){ $i=$row[0]; break; } db_free_result($qry); } return $i; }//end fun get next id $new_id=db_get_next_id('ABC_ID'); (As I mentioned earlier, e.g. db_fetch_row is just using mssql_fetch_row.. all of my db_xyz functions are like this.) This works fine but subsequent mssql_query functions fail. This may not be the ideal way of doing it, but it should not cause any harm. Everything else is working fine. Maybe I should just change the way I use my procedures.. Thank you. [2005-12-29 22:37:33] [EMAIL PROTECTED] Frank, can you make any sense to this? :) [2005-12-29 22:35:42] muratyaman at gmail dot com Thank you. I could not integrate php_dblib.dll :( I tried to compile FreeTDS using Dev-C++ but could not get it working with PHP.. I am stuck. I was investigating the problem. I have a function as follows: function db_get_next_id($mygenid=''){ $i=0; $sql= DECLARE @MY_ID INT8, @r int8 EXECUTE @r= SPMY_GET_NEXT_ID \$mygenid\, @MY_ID OUTPUT ; if($qry=db_query($sql)){ while($row=db_fetch_row($qry)){ $i=$row[0]; break; } db_free_result($qry); } return $i; }//end fun get next id $new_id=db_get_next_id('keyfield'); This just works fine, I found that after this, calls
#34089 [Opn]: Configure fails build test for libxml2
ID: 34089 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Compile Failure Operating System: Mac OS X 10.4.2 PHP Version: 6CVS-2005-10-07 New Comment: Do you actually have libicui18n.dylib.34 in /usr/local/...? Previous Comments: [2005-11-30 17:30:28] [EMAIL PROTECTED] Tried that CVS snapshot with the following config line: ./configure --with-layout=PHP --prefix=/usr/local/php/6.0.0 --disable-all --with-icu-dir=/usr/local/icu It configures, makes, and make installs just fine. But it still says the library isn't loaded: ramsey:~ ramsey$ /usr/local/php/6.0.0/bin/php -v dyld: Library not loaded: libicui18n.dylib.34 Referenced from: /usr/local/php/6.0.0/bin/php Reason: image not found Trace/BPT trap [2005-11-30 00:52:49] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php6.0-latest.tar.gz For Windows: http://snaps.php.net/win32/php6.0-win32-latest.zip [2005-10-07 21:38:20] [EMAIL PROTECTED] I've just updated my checkout and tried to rebuild it. I'm still getting the Library not loaded errors, though. I don't have access to another MacOSX machine. Is there someone else who can try to build this on their Mac to verify whether this issue can be reproduced? [2005-09-16 12:31:41] [EMAIL PROTECTED] Can you reproduce this on some other Macosx machine? Can someone else reproduce this? [2005-09-15 23:20:58] [EMAIL PROTECTED] I grabbed the latest HEAD and I'm using the latest ICU (v3.4). With the following config line, everything configures, makes, and make installs just fine: ./configure --with-layout=PHP --prefix=/usr/local/php/6.0.0 --disable-all --with-icu-dir=/usr/local/icu However, I still receive an error: ramsey:~ ramsey$ /usr/local/php/6.0.0/bin/php -i dyld: Library not loaded: libicui18n.dylib.34 Referenced from: /usr/local/php/6.0.0/bin/php Reason: image not found Trace/BPT trap 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/34089 -- Edit this bug report at http://bugs.php.net/?id=34089edit=1
#35737 [Com]: undefined symbol: sqlite3SelectDelete
ID: 35737 Comment by: admin at thetrashcan dot org Reported By: jphml at videotron dot ca Status: Feedback Bug Type: SQLite related Operating System: Linux PHP Version: 5.1.1 New Comment: I experience the same error when using Php v.5.1.11 on Apache 1.3.34 I don't have mysql enabled in php. Previous Comments: [2005-12-24 14:35:24] [EMAIL PROTECTED] Are you able to reproduce it without Apache? Does it work with PHP CLI? [2005-12-24 07:41:01] jphml at videotron dot ca I was not successful using CVS of 21-12-2005. I am using CentOS 4.1 latest patch. [2005-12-22 17:22:22] jsuzuki at spamcop dot net I had the same problem. The suggestion by [EMAIL PROTECTED] worked out. Just as an FYI this was on a horribly out of Red Hat 7 with Apache 1.3. -jack [2005-12-20 09:14:08] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.1-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.1-win32-latest.zip And what OS is that exactly? [2005-12-20 04:26:09] jphml at videotron dot ca Description: When tring to use Apache 2.0.55 with PHP 5.1.1 module (libphp5.so) you get the following error on Apache startup Syntax error on line 232 of /opt/fruity/conf/httpd.conf: Cannot load /opt/fruity/modules/libphp5.so into server: /opt/fruity/modules/libphp5.so: undefined symbol: sqlite3SelectDelete Your are then unable to start apache. Here is my configure line for Apache: ./configure --prefix=/opt/fruity --enable-so Here is my configure line for PHP 5.1.1: ./configure --prefix=/opt/fruity --with-apxs2=/opt/fruity/bin/apxs --with-mysql Here is my line about PHP in httpd.conf LoadModule php5_modulemodules/libphp5.so I tried the following: - Apache 1.3.34 with PHP 5.1.1: same error - Compile PHP 5.1.1 with --without-sqlite: Same error - Compile PHP without --with-mysql: Same error The following configuration works: Apache 2.0.55 and PHP 5.0.5 with the configure lines above. (In Apache 1.x use --enable-module=so instead of --enable-so). Note that both software were always compiled with --prefix=/opt/fruity, I didn't tried without. Expected result: You expect that Apache will start without errors Actual result: -- When you start apache you get: [EMAIL PROTECTED] bin]# ./apachectl start Syntax error on line 232 of /opt/fruity/conf/httpd.conf: Cannot load /opt/fruity/modules/libphp5.so into server: /opt/fruity/modules/libphp5.so: undefined symbol: sqlite3SelectDelete and Apache doesn't start -- Edit this bug report at http://bugs.php.net/?id=35737edit=1
#35841 [Bgs]: PHP Does not like underscores?
ID: 35841 User updated by: maarten at kleeszone dot be Reported By: maarten at kleeszone dot be Status: Bogus Bug Type: Compile Failure Operating System: Linux2.6.12-1-amd64 Debian PHP Version: 5.1.1 New Comment: Yes I noticed the weird characters too. But then again: Why don't I see these errors every request? It just happens random. I'll try the latest snapshot tomorrow, it's too late now. Previous Comments: [2005-12-29 19:44:37] [EMAIL PROTECTED] There are typoes there, I see strange things in your report. For example a weird character instead of an underscore... [2005-12-29 18:12:22] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.1-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.1-win32-latest.zip [2005-12-29 18:10:19] maarten at kleeszone dot be Description: Recently I installed a new server with apache2, PHP5.1 and mysql 5.0.16 Now I noticed that sometimes (0.5% of all requests) I get fatal errors: Fatal error: Unknown function: strtomower() in /var/www/global/init.global.php on line 235 Fatal error: Unknown function: strtlower() in /var/www/global/init.global.php on line 235 Fatal error: Unknown function: arrayslice() in /var/www/global/init.global.php on line 105 Fatal error: Unknown function: classexists() in /var/www/global/init.global.php on line 259 Typo I tought, but there are no typo's at these lines and after refreshing the page, there is no error! (these lines are executed each time the script runs!). I get these errors sooner or later on every page. But everytime the error is gone after a refresh. Maybe some encoding problems? I save my pages as UTF-8. But in that case I would expect to see the error every request and not just 'sometimes'. -- Edit this bug report at http://bugs.php.net/?id=35841edit=1
#35845 [NEW]: deserialization problem
From: xing at mac dot com Operating system: centos 4.2 PHP version: 5.1.2RC1 PHP Bug Type: Scripting Engine problem Bug description: deserialization problem Description: cannot deserialize an serialized output... the serialized object is an array of query_result objects which contain an result element which is an array of simple objects. Reproduce code: --- ? class query_result { public $affected_rows = 0; public $num_rows = 0; public $insert_id = 0; public $result = array(); //pdo result public $pointer = 0; } $dump = unserialize(file_get_contents(dump.txt)); if($dump == NULL) { echo error; } else if(is_array($dump)) { echo not error; } else { echo huh? {$dump}; } ? Expected result: not error Actual result: -- error -- Edit bug report at http://bugs.php.net/?id=35845edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=35845r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=35845r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=35845r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=35845r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=35845r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=35845r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=35845r=needscript Try newer version:http://bugs.php.net/fix.php?id=35845r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=35845r=support Expected behavior:http://bugs.php.net/fix.php?id=35845r=notwrong Not enough info: http://bugs.php.net/fix.php?id=35845r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=35845r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=35845r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35845r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=35845r=dst IIS Stability:http://bugs.php.net/fix.php?id=35845r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=35845r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=35845r=float No Zend Extensions: http://bugs.php.net/fix.php?id=35845r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=35845r=mysqlcfg
#35839 [Bgs]: mssql_query(): Possible network error: Bad token from SQL Server..
ID: 35839 User updated by: muratyaman at gmail dot com Reported By: muratyaman at gmail dot com Status: Bogus Bug Type: MSSQL related Operating System: Win XP Pro SP2 PHP Version: 5CVS-2005-12-29 (snap) Assigned To: fmk New Comment: Thank you very much indeed, at least you directed me to a solution.. Previous version of my function was already using mssql_query and fetch functions to get the row returned from my procedure (since inside procedure I have: select @id as ID it returns a resultset), not the output or return code: DECLARE @MY_ID INT8, @r int8 EXECUTE @r= SPMY_GET_NEXT_ID \$mygenid\, @MY_ID OUTPUT and it was doing it all right, but subsequent calls to the db was causing the error I mentioned, because the connection is somehow lost after running this sql. If you think this is not a bug you can close it. Your prompt replies are much appreciated. Kind regards Previous Comments: [2005-12-30 00:49:20] [EMAIL PROTECTED] using mssql_qyery() to execute storred procedures is usefull, but it can only be used to retreive result sets. output parameters and return values are not handled with this method. In that case you must use the mssql_init(), mssql_bind() and mssql_execute() functions. [2005-12-30 00:46:25] [EMAIL PROTECTED] bigint is not known on my mssql server 7 but it works fine on mssql server 2000. I have tested your code on both servers using PHP 5.1.2-dev and I do not get any errors. I don't think there is any errors here. I have also tested with both local and remote server and with php_mssql.dll and php_dblib.dll. [2005-12-30 00:21:51] muratyaman at gmail dot com Hi again :) I changed my function to this: function db_get_next_id($mygenid=''){ $id = 0; $ret_val=0; $stmt = mssql_init(SPMY_GET_NEXT_ID); mssql_bind($stmt, @GEN_ID_NAME, $mygenid, SQLVARCHAR, FALSE,FALSE);//input, not null mssql_bind($stmt, @ID, $id, SQLINT4, TRUE,TRUE);//output,null mssql_bind($stmt,RETVAL,$ret_val,SQLINT4); $result = mssql_execute($stmt); while($row=mssql_fetch_row($result)){ //read id $id=$row[0];//but it should get from the output variable!? } mssql_free_statement($stmt); unset($stmt); // ---VERY important return $id; } Anyway, this solved my problem. But will I not be able to use arbitrary SQL statements with mssql_query, including execution of procedures, etc. ?! Kind regards [2005-12-29 23:54:16] muratyaman at gmail dot com Basically, my procedure inserts a dummy record into a special table and gets inserted id. (int8 is a udt for 'bigint', i'm changing it for you below to bigint). I have dummy tables to simulate sequence generators for different tables, here is a pair of them: CREATE TABLE TBL_GEN_ABC_ID ( ID bigint IDENTITY(1, 1) NOT NULL, DUMMY bit, CONSTRAINT PK_TBL_GEN_ABC_ID PRIMARY KEY CLUSTERED (ID) ) GO CREATE TABLE TBL_ABC ( ABC_ID INT NOT NULL, ABC_NAME] VARCHAR(100) NOT NULL, CONSTRAINT PK_TBL_ABC PRIMARY KEY CLUSTERED (ABC_ID) ) GO Procedure is like this: CREATE PROCEDURE spmy_get_next_id( @GEN_ID_NAME VARCHAR(100)='#NO TABLE', @ID bigint OUTPUT ) AS BEGIN SET @ID=NULL; DECLARE @GEN_ID bigint; SET @GEN_ID=0; IF (UPPER(@GEN_ID_NAME)='ABC_ID') BEGIN WHILE (1=1) BEGIN --generate id INSERT INTO TBL_GEN_ABC_ID (DUMMY) VALUES(0); SET @GEN_ID=@@IDENTITY; --get generated id IF(NOT EXISTS( --make sure it was not used SELECT ABC_ID FROM TBL_ABC WHERE [EMAIL PROTECTED]) ) BREAK; END END SET @[EMAIL PROTECTED]; SELECT @ID AS ID;--for PHP to read resultset and value RETURN @ID; --return value, not crucial END GO so in PHP you can use modifed version of my function: function db_get_next_id($mygenid=''){ $i=0; $sql= DECLARE @MY_ID bigint, @r bigint EXECUTE @r=SPMY_GET_NEXT_ID \$mygenid\, @MY_ID OUTPUT ; if($qry=db_query($sql)){ while($row=db_fetch_row($qry)){ $i=$row[0]; break; } db_free_result($qry); } return $i; }//end fun get next id $new_id=db_get_next_id('ABC_ID'); (As I mentioned earlier, e.g. db_fetch_row is just using mssql_fetch_row.. all of my db_xyz functions are like this.) This works fine but subsequent mssql_query functions fail. This may not be the ideal way of doing it, but it should not cause any harm. Everything else is working fine. Maybe I should just change the way I use my procedures.. Thank you. [2005-12-29 22:37:33] [EMAIL PROTECTED] Frank, can you make any sense to this? :)
#35839 [Bgs]: mssql_query(): Possible network error: Bad token from SQL Server..
ID: 35839 Updated by: [EMAIL PROTECTED] Reported By: muratyaman at gmail dot com Status: Bogus Bug Type: MSSQL related Operating System: Win XP Pro SP2 PHP Version: 5CVS-2005-12-29 (snap) Assigned To: fmk New Comment: I already closed it, but I do not get any errors with your original code using mssql_query(). I think this is caused by something else. Perhaps your version of ntwdblib.dll is different than mine. Previous Comments: [2005-12-30 01:54:39] muratyaman at gmail dot com Thank you very much indeed, at least you directed me to a solution.. Previous version of my function was already using mssql_query and fetch functions to get the row returned from my procedure (since inside procedure I have: select @id as ID it returns a resultset), not the output or return code: DECLARE @MY_ID INT8, @r int8 EXECUTE @r= SPMY_GET_NEXT_ID \$mygenid\, @MY_ID OUTPUT and it was doing it all right, but subsequent calls to the db was causing the error I mentioned, because the connection is somehow lost after running this sql. If you think this is not a bug you can close it. Your prompt replies are much appreciated. Kind regards [2005-12-30 00:49:20] [EMAIL PROTECTED] using mssql_qyery() to execute storred procedures is usefull, but it can only be used to retreive result sets. output parameters and return values are not handled with this method. In that case you must use the mssql_init(), mssql_bind() and mssql_execute() functions. [2005-12-30 00:46:25] [EMAIL PROTECTED] bigint is not known on my mssql server 7 but it works fine on mssql server 2000. I have tested your code on both servers using PHP 5.1.2-dev and I do not get any errors. I don't think there is any errors here. I have also tested with both local and remote server and with php_mssql.dll and php_dblib.dll. [2005-12-30 00:21:51] muratyaman at gmail dot com Hi again :) I changed my function to this: function db_get_next_id($mygenid=''){ $id = 0; $ret_val=0; $stmt = mssql_init(SPMY_GET_NEXT_ID); mssql_bind($stmt, @GEN_ID_NAME, $mygenid, SQLVARCHAR, FALSE,FALSE);//input, not null mssql_bind($stmt, @ID, $id, SQLINT4, TRUE,TRUE);//output,null mssql_bind($stmt,RETVAL,$ret_val,SQLINT4); $result = mssql_execute($stmt); while($row=mssql_fetch_row($result)){ //read id $id=$row[0];//but it should get from the output variable!? } mssql_free_statement($stmt); unset($stmt); // ---VERY important return $id; } Anyway, this solved my problem. But will I not be able to use arbitrary SQL statements with mssql_query, including execution of procedures, etc. ?! Kind regards [2005-12-29 23:54:16] muratyaman at gmail dot com Basically, my procedure inserts a dummy record into a special table and gets inserted id. (int8 is a udt for 'bigint', i'm changing it for you below to bigint). I have dummy tables to simulate sequence generators for different tables, here is a pair of them: CREATE TABLE TBL_GEN_ABC_ID ( ID bigint IDENTITY(1, 1) NOT NULL, DUMMY bit, CONSTRAINT PK_TBL_GEN_ABC_ID PRIMARY KEY CLUSTERED (ID) ) GO CREATE TABLE TBL_ABC ( ABC_ID INT NOT NULL, ABC_NAME] VARCHAR(100) NOT NULL, CONSTRAINT PK_TBL_ABC PRIMARY KEY CLUSTERED (ABC_ID) ) GO Procedure is like this: CREATE PROCEDURE spmy_get_next_id( @GEN_ID_NAME VARCHAR(100)='#NO TABLE', @ID bigint OUTPUT ) AS BEGIN SET @ID=NULL; DECLARE @GEN_ID bigint; SET @GEN_ID=0; IF (UPPER(@GEN_ID_NAME)='ABC_ID') BEGIN WHILE (1=1) BEGIN --generate id INSERT INTO TBL_GEN_ABC_ID (DUMMY) VALUES(0); SET @GEN_ID=@@IDENTITY; --get generated id IF(NOT EXISTS( --make sure it was not used SELECT ABC_ID FROM TBL_ABC WHERE [EMAIL PROTECTED]) ) BREAK; END END SET @[EMAIL PROTECTED]; SELECT @ID AS ID;--for PHP to read resultset and value RETURN @ID; --return value, not crucial END GO so in PHP you can use modifed version of my function: function db_get_next_id($mygenid=''){ $i=0; $sql= DECLARE @MY_ID bigint, @r bigint EXECUTE @r=SPMY_GET_NEXT_ID \$mygenid\, @MY_ID OUTPUT ; if($qry=db_query($sql)){ while($row=db_fetch_row($qry)){ $i=$row[0]; break; } db_free_result($qry); } return $i; }//end fun get next id $new_id=db_get_next_id('ABC_ID'); (As I mentioned earlier, e.g. db_fetch_row is just using mssql_fetch_row.. all of my db_xyz functions are like this.) This works fine but subsequent mssql_query functions fail. This may not be the ideal way of doing
#35846 [NEW]: var_export() generate invalid code
From: xing at mac dot com Operating system: centos 4.2 PHP version: 5.1.2RC1 PHP Bug Type: Variables related Bug description: var_export() generate invalid code Description: invalid php code from var_export contrary to documentation claims. Reproduce code: --- ? class query_result { public $affected_rows = 0; public $num_rows = 0; public $insert_id = 0; public $result = array(); //pdo result public $pointer = 0; } $test = array( test = new query_result() ); $dump = var_export($test, TRUE); file_put_contents(test.txt,? . $dump . ?); include(test.txt); die(); ? Expected result: no php error Actual result: -- PHP Fatal error: Call to undefinied query_result::__set_state() in test.txt line 3 -- Edit bug report at http://bugs.php.net/?id=35846edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=35846r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=35846r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=35846r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=35846r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=35846r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=35846r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=35846r=needscript Try newer version:http://bugs.php.net/fix.php?id=35846r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=35846r=support Expected behavior:http://bugs.php.net/fix.php?id=35846r=notwrong Not enough info: http://bugs.php.net/fix.php?id=35846r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=35846r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=35846r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35846r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=35846r=dst IIS Stability:http://bugs.php.net/fix.php?id=35846r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=35846r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=35846r=float No Zend Extensions: http://bugs.php.net/fix.php?id=35846r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=35846r=mysqlcfg
#35845 [Opn]: deserialization problem
ID: 35845 User updated by: xing at mac dot com Reported By: xing at mac dot com Status: Open Bug Type: Scripting Engine problem Operating System: centos 4.2 PHP Version: 5.1.2RC1 New Comment: dump.txt, captured serialized output, is at: http://mirror.fictionpress.com/beans/dump.txt Previous Comments: [2005-12-30 01:38:31] xing at mac dot com Description: cannot deserialize an serialized output... the serialized object is an array of query_result objects which contain an result element which is an array of simple objects. Reproduce code: --- ? class query_result { public $affected_rows = 0; public $num_rows = 0; public $insert_id = 0; public $result = array(); //pdo result public $pointer = 0; } $dump = unserialize(file_get_contents(dump.txt)); if($dump == NULL) { echo error; } else if(is_array($dump)) { echo not error; } else { echo huh? {$dump}; } ? Expected result: not error Actual result: -- error -- Edit this bug report at http://bugs.php.net/?id=35845edit=1
#35847 [NEW]: Incorrect Error message in header function
From: judas dot iscariote at gmail dot com Operating system: Irrelevant PHP version: 5CVS-2005-12-30 (CVS) PHP Bug Type: HTTP related Bug description: Incorrect Error message in header function Description: typo in error message of the header() function. Reproduce code: --- pass more than one line to the to the function. Expected result: Warning: Header may not contain more **than** a single header, new line detected Actual result: -- Warning: Header may not contain more **then** a single header, new line detected -- Edit bug report at http://bugs.php.net/?id=35847edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=35847r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=35847r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=35847r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=35847r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=35847r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=35847r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=35847r=needscript Try newer version:http://bugs.php.net/fix.php?id=35847r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=35847r=support Expected behavior:http://bugs.php.net/fix.php?id=35847r=notwrong Not enough info: http://bugs.php.net/fix.php?id=35847r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=35847r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=35847r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35847r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=35847r=dst IIS Stability:http://bugs.php.net/fix.php?id=35847r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=35847r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=35847r=float No Zend Extensions: http://bugs.php.net/fix.php?id=35847r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=35847r=mysqlcfg
#35848 [NEW]: Failing when including --with-mysql
From: shawn dot richards at ink dot ltd dot uk Operating system: Mac OS X Tiger. PHP version: 5.1.1 PHP Bug Type: Compile Failure Bug description: Failing when including --with-mysql Description: Mac OS X patched up to date. Apache 2. PHP 5 (latest snap) Compilation with --with-mysql option fails. Have tried compiling with MySQL 4.x Standard, 5.x Standard (preferred) and 5.x Debug. Same error every compilation even though MySQL works every time. Reproduce code: --- ./configure --with-apxs2=/usr/local/apache/bin/apxs --enable-bcmath --enable-debug --with-mysql=/usr/local/mysql --with-zlib-dir=/usr/local/lib Expected result: Successful compile. Actual result: -- Configure script fails with... checking for MSSQL support via FreeTDS... no checking for MySQL support... yes checking for specified location of the MySQL UNIX socket... no checking for MySQL UNIX socket location... no checking for mysql_close in -lmysqlclient... no checking for mysql_error in -lmysqlclient... no configure: error: mysql configure failed. Please check config.log for more information. Config Log says. configure:58617: checking for MSSQL support via FreeTDS configure:59267: checking for MySQL support configure:59313: checking for specified location of the MySQL UNIX socket configure:59370: checking for MySQL UNIX socket location configure:59556: checking for mysql_close in -lmysqlclient configure:59575: gcc -o conftest -g -O2 -no-cpp-precomp -L/ usr/local/mysql/lib -L/usr/local/mysql/lib conftest.c - lmysqlclient -lz -lm -lxml2 -lz -liconv -lm -lxml2 -lz - liconv -lm 15 /usr/bin/ld: truncated or malformed archive: /usr/local/ mysql/lib/libmysqlclient.a (ranlib structures in table of contents extends past the end of the table of contents, can't load from it) collect2: ld returned 1 exit status configure: failed program was: #line 59564 configure #include confdefs.h /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char mysql_close(); int main() { mysql_close() ; return 0; } configure:59796: checking for mysql_error in -lmysqlclient configure:59815: gcc -o conftest -g -O2 -no-cpp-precomp -L/ usr/local/mysql/lib -L/usr/local/mysql/lib -L/usr -L/usr conftest.c -lmysqlclient -lz -lz -lm -lxml2 -lz -liconv - lm -lxml2 -lz -liconv -lm 15 /usr/bin/ld: truncated or malformed archive: /usr/local/ mysql/lib/libmysqlclient.a (ranlib structures in table of contents extends past the end of the table of contents, can't load from it) collect2: ld returned 1 exit status configure: failed program was: #line 59804 configure #include confdefs.h /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char mysql_error(); int main() { mysql_error() ; return 0; } -- Edit bug report at http://bugs.php.net/?id=35848edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=35848r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=35848r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=35848r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=35848r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=35848r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=35848r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=35848r=needscript Try newer version:http://bugs.php.net/fix.php?id=35848r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=35848r=support Expected behavior:http://bugs.php.net/fix.php?id=35848r=notwrong Not enough info: http://bugs.php.net/fix.php?id=35848r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=35848r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=35848r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35848r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=35848r=dst IIS Stability:http://bugs.php.net/fix.php?id=35848r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=35848r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=35848r=float No Zend Extensions: http://bugs.php.net/fix.php?id=35848r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=35848r=mysqlcfg
#35847 [Opn-Csd]: Incorrect Error message in header function
ID: 35847 Updated by: [EMAIL PROTECTED] Reported By: judas dot iscariote at gmail dot com -Status: Open +Status: Closed Bug Type: HTTP related Operating System: * PHP Version: 5CVS-2005-12-30 (CVS) 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: [2005-12-30 04:59:48] judas dot iscariote at gmail dot com Description: typo in error message of the header() function. Reproduce code: --- pass more than one line to the to the function. Expected result: Warning: Header may not contain more **than** a single header, new line detected Actual result: -- Warning: Header may not contain more **then** a single header, new line detected -- Edit this bug report at http://bugs.php.net/?id=35847edit=1
#35848 [Opn-Fbk]: Failing when including --with-mysql
ID: 35848 Updated by: [EMAIL PROTECTED] Reported By: shawn dot richards at ink dot ltd dot uk -Status: Open +Status: Feedback Bug Type: Compile Failure Operating System: Mac OS X Tiger. PHP Version: 5.1.1 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.1-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.1-win32-latest.zip Previous Comments: [2005-12-30 06:38:50] shawn dot richards at ink dot ltd dot uk Description: Mac OS X patched up to date. Apache 2. PHP 5 (latest snap) Compilation with --with-mysql option fails. Have tried compiling with MySQL 4.x Standard, 5.x Standard (preferred) and 5.x Debug. Same error every compilation even though MySQL works every time. Reproduce code: --- ./configure --with-apxs2=/usr/local/apache/bin/apxs --enable-bcmath --enable-debug --with-mysql=/usr/local/mysql --with-zlib-dir=/usr/local/lib Expected result: Successful compile. Actual result: -- Configure script fails with... checking for MSSQL support via FreeTDS... no checking for MySQL support... yes checking for specified location of the MySQL UNIX socket... no checking for MySQL UNIX socket location... no checking for mysql_close in -lmysqlclient... no checking for mysql_error in -lmysqlclient... no configure: error: mysql configure failed. Please check config.log for more information. Config Log says. configure:58617: checking for MSSQL support via FreeTDS configure:59267: checking for MySQL support configure:59313: checking for specified location of the MySQL UNIX socket configure:59370: checking for MySQL UNIX socket location configure:59556: checking for mysql_close in -lmysqlclient configure:59575: gcc -o conftest -g -O2 -no-cpp-precomp -L/ usr/local/mysql/lib -L/usr/local/mysql/lib conftest.c - lmysqlclient -lz -lm -lxml2 -lz -liconv -lm -lxml2 -lz - liconv -lm 15 /usr/bin/ld: truncated or malformed archive: /usr/local/ mysql/lib/libmysqlclient.a (ranlib structures in table of contents extends past the end of the table of contents, can't load from it) collect2: ld returned 1 exit status configure: failed program was: #line 59564 configure #include confdefs.h /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char mysql_close(); int main() { mysql_close() ; return 0; } configure:59796: checking for mysql_error in -lmysqlclient configure:59815: gcc -o conftest -g -O2 -no-cpp-precomp -L/ usr/local/mysql/lib -L/usr/local/mysql/lib -L/usr -L/usr conftest.c -lmysqlclient -lz -lz -lm -lxml2 -lz -liconv - lm -lxml2 -lz -liconv -lm 15 /usr/bin/ld: truncated or malformed archive: /usr/local/ mysql/lib/libmysqlclient.a (ranlib structures in table of contents extends past the end of the table of contents, can't load from it) collect2: ld returned 1 exit status configure: failed program was: #line 59804 configure #include confdefs.h /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char mysql_error(); int main() { mysql_error() ; return 0; } -- Edit this bug report at http://bugs.php.net/?id=35848edit=1
#35848 [Fbk-Bgs]: Failing when including --with-mysql
ID: 35848 Updated by: [EMAIL PROTECTED] Reported By: shawn dot richards at ink dot ltd dot uk -Status: Feedback +Status: Bogus Bug Type: Compile Failure Operating System: Mac OS X Tiger. PHP Version: 5.1.1 New Comment: Your system is somewhat broken. Works fine for me. (hint: Install mysql shared libs too) Previous Comments: [2005-12-30 06:43:13] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.1-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.1-win32-latest.zip [2005-12-30 06:38:50] shawn dot richards at ink dot ltd dot uk Description: Mac OS X patched up to date. Apache 2. PHP 5 (latest snap) Compilation with --with-mysql option fails. Have tried compiling with MySQL 4.x Standard, 5.x Standard (preferred) and 5.x Debug. Same error every compilation even though MySQL works every time. Reproduce code: --- ./configure --with-apxs2=/usr/local/apache/bin/apxs --enable-bcmath --enable-debug --with-mysql=/usr/local/mysql --with-zlib-dir=/usr/local/lib Expected result: Successful compile. Actual result: -- Configure script fails with... checking for MSSQL support via FreeTDS... no checking for MySQL support... yes checking for specified location of the MySQL UNIX socket... no checking for MySQL UNIX socket location... no checking for mysql_close in -lmysqlclient... no checking for mysql_error in -lmysqlclient... no configure: error: mysql configure failed. Please check config.log for more information. Config Log says. configure:58617: checking for MSSQL support via FreeTDS configure:59267: checking for MySQL support configure:59313: checking for specified location of the MySQL UNIX socket configure:59370: checking for MySQL UNIX socket location configure:59556: checking for mysql_close in -lmysqlclient configure:59575: gcc -o conftest -g -O2 -no-cpp-precomp -L/ usr/local/mysql/lib -L/usr/local/mysql/lib conftest.c - lmysqlclient -lz -lm -lxml2 -lz -liconv -lm -lxml2 -lz - liconv -lm 15 /usr/bin/ld: truncated or malformed archive: /usr/local/ mysql/lib/libmysqlclient.a (ranlib structures in table of contents extends past the end of the table of contents, can't load from it) collect2: ld returned 1 exit status configure: failed program was: #line 59564 configure #include confdefs.h /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char mysql_close(); int main() { mysql_close() ; return 0; } configure:59796: checking for mysql_error in -lmysqlclient configure:59815: gcc -o conftest -g -O2 -no-cpp-precomp -L/ usr/local/mysql/lib -L/usr/local/mysql/lib -L/usr -L/usr conftest.c -lmysqlclient -lz -lz -lm -lxml2 -lz -liconv - lm -lxml2 -lz -liconv -lm 15 /usr/bin/ld: truncated or malformed archive: /usr/local/ mysql/lib/libmysqlclient.a (ranlib structures in table of contents extends past the end of the table of contents, can't load from it) collect2: ld returned 1 exit status configure: failed program was: #line 59804 configure #include confdefs.h /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char mysql_error(); int main() { mysql_error() ; return 0; } -- Edit this bug report at http://bugs.php.net/?id=35848edit=1
#35846 [Opn-Bgs]: var_export() generate invalid code
ID: 35846 Updated by: [EMAIL PROTECTED] Reported By: xing at mac dot com -Status: Open +Status: Bogus Bug Type: Variables related Operating System: centos 4.2 PHP Version: 5.1.2RC1 New Comment: There is no such function in PHP that can handle fatal errors any other way than as a fatal error. Previous Comments: [2005-12-30 02:00:57] xing at mac dot com Description: invalid php code from var_export contrary to documentation claims. Reproduce code: --- ? class query_result { public $affected_rows = 0; public $num_rows = 0; public $insert_id = 0; public $result = array(); //pdo result public $pointer = 0; } $test = array( test = new query_result() ); $dump = var_export($test, TRUE); file_put_contents(test.txt,? . $dump . ?); include(test.txt); die(); ? Expected result: no php error Actual result: -- PHP Fatal error: Call to undefinied query_result::__set_state() in test.txt line 3 -- Edit this bug report at http://bugs.php.net/?id=35846edit=1
#35845 [Opn-Fbk]: deserialization problem
ID: 35845 Updated by: [EMAIL PROTECTED] Reported By: xing at mac dot com -Status: Open +Status: Feedback Bug Type: Scripting Engine problem Operating System: centos 4.2 PHP Version: 5.1.2RC1 New Comment: Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with ?php and ends with ?, is max. 10-20 lines long and does not require any external resources such as databases, etc. If possible, make the script source available online and provide an URL to it here. Try to avoid embedding huge scripts into the report. Previous Comments: [2005-12-30 01:43:36] xing at mac dot com dump.txt, captured serialized output, is at: http://mirror.fictionpress.com/beans/dump.txt [2005-12-30 01:38:31] xing at mac dot com Description: cannot deserialize an serialized output... the serialized object is an array of query_result objects which contain an result element which is an array of simple objects. Reproduce code: --- ? class query_result { public $affected_rows = 0; public $num_rows = 0; public $insert_id = 0; public $result = array(); //pdo result public $pointer = 0; } $dump = unserialize(file_get_contents(dump.txt)); if($dump == NULL) { echo error; } else if(is_array($dump)) { echo not error; } else { echo huh? {$dump}; } ? Expected result: not error Actual result: -- error -- Edit this bug report at http://bugs.php.net/?id=35845edit=1
#35848 [Bgs]: Failing when including --with-mysql
ID: 35848 User updated by: shawn dot richards at ink dot ltd dot uk Reported By: shawn dot richards at ink dot ltd dot uk Status: Bogus Bug Type: Compile Failure Operating System: Mac OS X Tiger. PHP Version: 5CVS-2005-12-30 (snap) New Comment: What 'shared libs' are you referring to? Looking on the download page at http://dev.mysql.com/downloads/mysql/ 5.0.html, i can only see shared libs for Linux. Please give me some more exact help because I do not know what to do to fix this. It is a brand new Apple box and I have no idea what could have 'broken' it. This is very strange since I am doing a standard install from a dmg and a compile with the options I have shown. Are you saying that because you cannot see anything wrong on your system that there is nothing wrong with the compile process? Other people are complaining about this crash albeit on Solaris. Previous Comments: [2005-12-30 06:43:50] [EMAIL PROTECTED] Your system is somewhat broken. Works fine for me. (hint: Install mysql shared libs too) [2005-12-30 06:38:50] shawn dot richards at ink dot ltd dot uk Description: Mac OS X patched up to date. Apache 2. PHP 5 (latest snap) Compilation with --with-mysql option fails. Have tried compiling with MySQL 4.x Standard, 5.x Standard (preferred) and 5.x Debug. Same error every compilation even though MySQL works every time. Reproduce code: --- ./configure --with-apxs2=/usr/local/apache/bin/apxs --enable-bcmath --enable-debug --with-mysql=/usr/local/mysql --with-zlib-dir=/usr/local/lib Expected result: Successful compile. Actual result: -- Configure script fails with... checking for MSSQL support via FreeTDS... no checking for MySQL support... yes checking for specified location of the MySQL UNIX socket... no checking for MySQL UNIX socket location... no checking for mysql_close in -lmysqlclient... no checking for mysql_error in -lmysqlclient... no configure: error: mysql configure failed. Please check config.log for more information. Config Log says. configure:58617: checking for MSSQL support via FreeTDS configure:59267: checking for MySQL support configure:59313: checking for specified location of the MySQL UNIX socket configure:59370: checking for MySQL UNIX socket location configure:59556: checking for mysql_close in -lmysqlclient configure:59575: gcc -o conftest -g -O2 -no-cpp-precomp -L/ usr/local/mysql/lib -L/usr/local/mysql/lib conftest.c - lmysqlclient -lz -lm -lxml2 -lz -liconv -lm -lxml2 -lz - liconv -lm 15 /usr/bin/ld: truncated or malformed archive: /usr/local/ mysql/lib/libmysqlclient.a (ranlib structures in table of contents extends past the end of the table of contents, can't load from it) collect2: ld returned 1 exit status configure: failed program was: #line 59564 configure #include confdefs.h /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char mysql_close(); int main() { mysql_close() ; return 0; } configure:59796: checking for mysql_error in -lmysqlclient configure:59815: gcc -o conftest -g -O2 -no-cpp-precomp -L/ usr/local/mysql/lib -L/usr/local/mysql/lib -L/usr -L/usr conftest.c -lmysqlclient -lz -lz -lm -lxml2 -lz -liconv - lm -lxml2 -lz -liconv -lm 15 /usr/bin/ld: truncated or malformed archive: /usr/local/ mysql/lib/libmysqlclient.a (ranlib structures in table of contents extends past the end of the table of contents, can't load from it) collect2: ld returned 1 exit status configure: failed program was: #line 59804 configure #include confdefs.h /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char mysql_error(); int main() { mysql_error() ; return 0; } -- Edit this bug report at http://bugs.php.net/?id=35848edit=1
#35845 [Fbk-Opn]: deserialization problem
ID: 35845 User updated by: xing at mac dot com Reported By: xing at mac dot com -Status: Feedback +Status: Open Bug Type: Scripting Engine problem Operating System: centos 4.2 PHP Version: 5.1.2RC1 New Comment: Just put the dump.txt file within the same folder as the included code and run. Previous Comments: [2005-12-30 06:46:25] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with ?php and ends with ?, is max. 10-20 lines long and does not require any external resources such as databases, etc. If possible, make the script source available online and provide an URL to it here. Try to avoid embedding huge scripts into the report. [2005-12-30 01:43:36] xing at mac dot com dump.txt, captured serialized output, is at: http://mirror.fictionpress.com/beans/dump.txt [2005-12-30 01:38:31] xing at mac dot com Description: cannot deserialize an serialized output... the serialized object is an array of query_result objects which contain an result element which is an array of simple objects. Reproduce code: --- ? class query_result { public $affected_rows = 0; public $num_rows = 0; public $insert_id = 0; public $result = array(); //pdo result public $pointer = 0; } $dump = unserialize(file_get_contents(dump.txt)); if($dump == NULL) { echo error; } else if(is_array($dump)) { echo not error; } else { echo huh? {$dump}; } ? Expected result: not error Actual result: -- error -- Edit this bug report at http://bugs.php.net/?id=35845edit=1
#35849 [NEW]: stream_copy_to_stream() do strange behavior
From: sqchen at citiz dot net Operating system: redhat 7.3 PHP version: 5.1.1 PHP Bug Type: Unknown/Other Function Bug description: stream_copy_to_stream() do strange behavior Description: stream_copy_to_stream() do strange behavior when the maxlength parameter is negative, see the following codes: Reproduce code: --- ?php $src = fopen(1.txt, r); //hell, world in 1.txt $dest1 = fopen(des1.txt, w); $dest2 = fopen(des2.txt, w); /*seg1--*/ stream_copy_to_stream($src, $des1, -2); readfile(des1.txt); //hello, world stream_copy_to_stream($src, $des1); readfile(des2.txt); //nothing? why? /* please compare it with seg2*/ /*seg2---*/ stream_copy_to_stream($src, $des1, 2); readfile(des1.txt); //he stream_copy_to_stream($src, $des1); readfile(des2.txt); //hello, world ? -- Edit bug report at http://bugs.php.net/?id=35849edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=35849r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=35849r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=35849r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=35849r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=35849r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=35849r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=35849r=needscript Try newer version:http://bugs.php.net/fix.php?id=35849r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=35849r=support Expected behavior:http://bugs.php.net/fix.php?id=35849r=notwrong Not enough info: http://bugs.php.net/fix.php?id=35849r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=35849r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=35849r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35849r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=35849r=dst IIS Stability:http://bugs.php.net/fix.php?id=35849r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=35849r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=35849r=float No Zend Extensions: http://bugs.php.net/fix.php?id=35849r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=35849r=mysqlcfg
#35849 [Opn]: stream_copy_to_stream() do strange behavior
ID: 35849 User updated by: sqchen at citiz dot net Reported By: sqchen at citiz dot net Status: Open Bug Type: Unknown/Other Function Operating System: redhat 7.3 PHP Version: 5.1.1 New Comment: SORRY, I have make a mistake on the code above, Below is the right code Description: stream_copy_to_stream() do strange behavior when the maxlength parameter is negative, see the following codes: Reproduce code: --- ?php $src = fopen(1.txt, r); //hell, world in 1.txt $dest1 = fopen(des1.txt, w); $dest2 = fopen(des2.txt, w); /*seg1--*/ stream_copy_to_stream($src, $des1, -2); readfile(des1.txt); //hello, world stream_copy_to_stream($src, $des2); readfile(des2.txt); //nothing? why? /* please compare it with seg2*/ /*seg2---*/ stream_copy_to_stream($src, $des1, 2); readfile(des1.txt); //he stream_copy_to_stream($src, $des2); readfile(des2.txt); //hello, world ? Previous Comments: [2005-12-30 07:43:17] sqchen at citiz dot net Description: stream_copy_to_stream() do strange behavior when the maxlength parameter is negative, see the following codes: Reproduce code: --- ?php $src = fopen(1.txt, r); //hell, world in 1.txt $dest1 = fopen(des1.txt, w); $dest2 = fopen(des2.txt, w); /*seg1--*/ stream_copy_to_stream($src, $des1, -2); readfile(des1.txt); //hello, world stream_copy_to_stream($src, $des1); readfile(des2.txt); //nothing? why? /* please compare it with seg2*/ /*seg2---*/ stream_copy_to_stream($src, $des1, 2); readfile(des1.txt); //he stream_copy_to_stream($src, $des1); readfile(des2.txt); //hello, world ? -- Edit this bug report at http://bugs.php.net/?id=35849edit=1