#35386 [Com]: firebird: first row is null
ID: 35386 Comment by: dong_peng at 163 dot com Reported By: slapaf at hotmail dot com Status: Suspended Bug Type: PDO related Operating System: winxp sp2 PHP Version: 5CVS-2006-12-02 (snap) Assigned To: jacques New Comment: I have met the same problem. OS : Windows XP SP2 PHP: 5.2.3 Firebird : WI-V6.3.1.12855 Firebird 2.0 I have a simple table named school in my database, the CREATE TABLE statement is as below : CREATE TABLE school ( school_code SMALLINT PRIMARY KEY, school_name VARCHAR(40) NOT NULL, short_name VARCHAR(20) ); And there were total 14 rows in the table, the school_code was from 1 to 14. When I submitted such a simple query "SELECT * FROM school order by school_code ASC " to the Firebird Server using PDO, the first row it returned is NULL,NULL,NULL, while the rest rows can be returned correctly. In other words only the first row in which the field 'school_code' should be 1 was not right. Then I tested another query "SELECT * FROM school order by school_code DESC ", this time the field 'school_code' in the first row should be 14, however, the result of the first row was still NULL,NULL,NULL, while other rows was returned correctly, even the row in which the field 'school_code' was 1. I have tested the following PDO functions : 1.foreach ( $conn->query($query) as $row ) print_r( $row ); 2.$rs=$conn->query($query); while( $row=$rs->fetch( ) ) print_r( $row ); 3.$rs=$conn->query($query); $data=$rs->fetchall( ); foreach( $data as $row ) print_r( $row ); I met the same problem in every test. So, I tried to access Firebird directly. I used the ibase_* functions to query the same SQL statement, every row was returned correctly. And, I have to use PDO to maintain my code in the future, so I tried to access firebird database via ODBC. This time, I also submitted the same query using PDO, fortunately, there was no error. Therefore, I can continue my work with PDO/ODBC/Firebird. I think I can change the PDO DSN if this bug was corrected in the future. So, I think there must be something wrong in the Firebird PDO driver. I hope this problem will be solved as soon as possible. Brook Dong Peng from China 2007-8-20 Previous Comments: [2007-04-23 08:47:28] no at reply dot cz Hack didn't work without WHERE at all, with where only first column. Absolutely useless extension, going to try ibase_*() [2007-01-22 20:00:45] tomp at tomaspenc dot com Crazy solution, but it works: $stmt = $db->prepare('SELECT * FROM table WHERE 2>?'); $stmt->execute(array(1)); while($radek = $stmt->fetch()) print_r($radek); All rows will be printed on the screen including the first. When you use "prepare statement" with one or more parameters, you get all rows. P.S: Srry for my bad english. [2006-08-10 08:15:14] [EMAIL PROTECTED] I'll tinker with this. No promises though. [2006-07-07 10:06:19] mark at verndalesystems dot co dot uk We have the same problem on Linux running FB 2.0 with PHP 5.1.1 [2006-05-27 12:54:46] stefan at horochovec dot com dot br Hi, i´m using PHP 5.1.4, Windows XP SP2 and Firebird 1.x and have the same problem. 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/35386 -- Edit this bug report at http://bugs.php.net/?id=35386&edit=1
Bug #17002 Updated: Unable to load php_oci8.dll ONLY in command line mode
ID: 17002 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Bogus Bug Type: OCI8 related Operating System: Win98 PHP Version: 4.2.0 New Comment: Of course, it is NOT a bug of php. Previous Comments: [2002-05-05 12:01:11] [EMAIL PROTECTED] After failed many times, I happened to find the cause. I think it maybe helpful for many people who reported or asked the same question that I have seen on www.php.net . It is the PATH has not been correctly set. When loading php_oci8.dll, this DLL file search for the other DLL file "oci.dll" in current directory, PATH environment and %SYSTEM%(on Windows). If oci.dll can not be found, the OS will tell you "Unable to load dynamic library : php_oci8.dll". If you installed Oracle RDBMS on your system, then the file "oci.dll" is in Oralce Home directory. So you must include "Oracle Home Directory " in PATH environment, on my computer it is "D:\Oracle\ora81\Bin". Perhaps, the same problem on different platform can be solved in same way, try it. I am lucky to find the cause in almost ten days, I hope people will not be worried about this problem any longer. Dong Peng Lanzhou Railway Universiy China 2002-5-6 00:06 [2002-05-04 05:15:29] [EMAIL PROTECTED] The bug system is not the appropriate forum for asking support questions. For a list of a range of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php [2002-05-04 05:00:24] [EMAIL PROTECTED] Unable to load php_oci8.dll ONLY in command line mode I have just installed php 4.2.0 for win32 on my computer. I found the same bug as php (4.1.2). There is nothing wrong when I use php in ISAPI mode, and I can connect to Oracle 8i(8.1.7 Personal Edition) successfully and manipulate data too. but when I use php in command line mode to process some task which can only run once, the system show a message box with the text below : 'Unable to load dynamic library "c:\php420\extensions\php_oci8.dll". ' The extension file "php_oci8.dll" does exist in the above directory, and can work correctly in ISAPI mode. So I considered that there is a bug in "php.exe" on loading dynamic library. Is it? Please help me. Dong Peng 2002-5-4 -- Edit this bug report at http://bugs.php.net/?id=17002&edit=1
Bug #17002 Updated: Unable to load php_oci8.dll ONLY in command line mode
ID: 17002 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Bogus Bug Type: OCI8 related Operating System: Win98 PHP Version: 4.2.0 New Comment: After failed many times, I happened to find the cause. I think it maybe helpful for many people who reported or asked the same question that I have seen on www.php.net . It is the PATH has not been correctly set. When loading php_oci8.dll, this DLL file search for the other DLL file "oci.dll" in current directory, PATH environment and %SYSTEM%(on Windows). If oci.dll can not be found, the OS will tell you "Unable to load dynamic library : php_oci8.dll". If you installed Oracle RDBMS on your system, then the file "oci.dll" is in Oralce Home directory. So you must include "Oracle Home Directory " in PATH environment, on my computer it is "D:\Oracle\ora81\Bin". Perhaps, the same problem on different platform can be solved in same way, try it. I am lucky to find the cause in almost ten days, I hope people will not be worried about this problem any longer. Dong Peng Lanzhou Railway Universiy China 2002-5-6 00:06 Previous Comments: [2002-05-04 05:15:29] [EMAIL PROTECTED] The bug system is not the appropriate forum for asking support questions. For a list of a range of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php [2002-05-04 05:00:24] [EMAIL PROTECTED] Unable to load php_oci8.dll ONLY in command line mode I have just installed php 4.2.0 for win32 on my computer. I found the same bug as php (4.1.2). There is nothing wrong when I use php in ISAPI mode, and I can connect to Oracle 8i(8.1.7 Personal Edition) successfully and manipulate data too. but when I use php in command line mode to process some task which can only run once, the system show a message box with the text below : 'Unable to load dynamic library "c:\php420\extensions\php_oci8.dll". ' The extension file "php_oci8.dll" does exist in the above directory, and can work correctly in ISAPI mode. So I considered that there is a bug in "php.exe" on loading dynamic library. Is it? Please help me. Dong Peng 2002-5-4 -- Edit this bug report at http://bugs.php.net/?id=17002&edit=1
Bug #17002: Unable to load php_oci8.dll ONLY in command line mode
From: [EMAIL PROTECTED] Operating system: Win98 PHP version: 4.2.0 PHP Bug Type: OCI8 related Bug description: Unable to load php_oci8.dll ONLY in command line mode Unable to load php_oci8.dll ONLY in command line mode I have just installed php 4.2.0 for win32 on my computer. I found the same bug as php (4.1.2). There is nothing wrong when I use php in ISAPI mode, and I can connect to Oracle 8i(8.1.7 Personal Edition) successfully and manipulate data too. but when I use php in command line mode to process some task which can only run once, the system show a message box with the text below : 'Unable to load dynamic library "c:\php420\extensions\php_oci8.dll". ' The extension file "php_oci8.dll" does exist in the above directory, and can work correctly in ISAPI mode. So I considered that there is a bug in "php.exe" on loading dynamic library. Is it? Please help me. Dong Peng 2002-5-4 -- Edit bug report at http://bugs.php.net/?id=17002&edit=1 -- Fixed in CVS:http://bugs.php.net/fix.php?id=17002&r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=17002&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=17002&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=17002&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=17002&r=support Expected behavior: http://bugs.php.net/fix.php?id=17002&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=17002&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=17002&r=submittedtwice