ID: 39494 Updated by: [EMAIL PROTECTED] Reported By: taylor dot ren at gmail dot com -Status: Open +Status: Bogus Bug Type: InterBase related Operating System: XP PHP Version: 5.2.0 New Comment:
. Previous Comments: ------------------------------------------------------------------------ [2006-11-15 09:28:40] taylor dot ren at gmail dot com Hi all, The problem in this case is identified. In the sample code segment, I found the problem is caused by the fact that "tr" has no "select" right in table "t1". It is very strange that ibase_errmsg did not prompt out any errors! Now I have changed my code to select from another more complex table and got some other error msg. I will try to fix them by myself and then seek help. Please close this topic. ------------------------------------------------------------------------ [2006-11-14 00:10:01] taylor dot ren at gmail dot com Code segment: <body> <?php error_reporting(E_ALL); echo "Connection started. \n"; $connection = ibase_connect('localhost:f:/data/test.ib', 'tr', 'enigma', 'gb_2312'); echo "Dumping connection: ", var_dump($connection); echo "Dumping ibase_errmsg: ",ibase_errmsg(); $sql='select * from t1'; $result=ibase_query($connection, $sql); echo "Dumping result: ", var_dump($result); echo "Dumping fetch_row: ", var_dump(ibase_fetch_row($result)); echo "Dumping ibase_errmsg: ", ibase_errmsg(); ?> End of statement. </body> Output: Connection started. Dumping connection: resource(1) of type (Firebird/InterBase link) Dumping ibase_errmsg: Dumping result: bool(false) Dumping fetch_row: bool(false) Dumping ibase_errmsg: End of statement. ------------------------------------------------------------------------ [2006-11-13 23:48:38] [EMAIL PROTECTED] Please enable error_reporting(E_ALL) at the top of the script and use _function_ ibase_errmsg(), not variable $ibase_errmsg. ------------------------------------------------------------------------ [2006-11-13 23:38:54] taylor dot ren at gmail dot com Hi Tony, Thanks again. Code segment now looks like this: ================================ <body> <?php $connection = ibase_connect('localhost:f:/data/test.ib', 'tr', 'enigma', 'gb_2312'); var_dump($connection); var_dump($ibase_errmsg); $sql='select * from t1'; $result=ibase_query($connection, $sql); var_dump($result); var_dump(ibase_fetch_row($result)); var_dump($ibase_errmsg); ?> End of statement. =========================== Output now is: resource(1) of type (Firebird/InterBase link) NULL bool(false) bool(false) NULL End of statement. Any further comments? </body> ------------------------------------------------------------------------ [2006-11-13 12:59:33] [EMAIL PROTECTED] >resource(1) of type (Firebird/InterBase link) bool(false) bool(false) Are you sure? There are 4 (four) var_dump() calls, but you showed 3. What if you put ibase_errmsg() right after the ibase_query() call? ------------------------------------------------------------------------ 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/39494 -- Edit this bug report at http://bugs.php.net/?id=39494&edit=1