|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-11-13 12:24 UTC] taylor dot ren at gmail dot com
Description:
------------
I installed PHP with IIS and opened InterBase ext.
1. IB is OK. I can run separately developed Win32 programs.
2. PHP is OK. I can load a PHP test file with as simple as phpinfo();
3. ibase_XXXX functions seems OK because there is no error message prompted.
4. Database/table name OK.
PHP Interbase script:
Tried in Firefox & IE6.
Reproduce code:
---------------
<body>
<?php
$connection = ibase_connect('localhost:f:/data/test.ib', 'tr', 'enigma', 'gb_2312');
$sql='select * from t1';
$result=ibase_query($connection, $sql);
while($row=ibase_fetch_object($result))
{
echo (int)$row->id1, "\n";
}
ibase_free_result($result);
ibase_close($connection);
?>
End of statement.
</body>
Expected result:
----------------
I am expecting something like:
1
2
Actual result:
--------------
but only the last HTML statement:
"End of statement" was displayed.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 03:00:02 2025 UTC |
What do you get with this script? <?php $connection = ibase_connect('localhost:f:/data/test.ib', 'tr', 'enigma', 'gb_2312'); var_dump($connection); $sql='select * from t1'; $result=ibase_query($connection, $sql); var_dump($result); var_dump(ibase_fetch_row($result)); var_dump(ibase_errmsg()); ?>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>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.