PEAR on LInux to Oracle

From: Date: Thu, 12 May 2005 18:22:39 +0000
Subject: PEAR on LInux to Oracle
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-19175@lists.php.net to get a copy of this message
I apologize if this is considere long, but I wanted to be as complete as I could be with what I have done so far. I have succeeded in getting PEAR to talk to Oracle & MYSQL from a Windoze box. I can get PEAR to successfully get data from MYSQL from Linux. I am having a problem getting PEAR to get data from Oracle on Linux. It appears I am connecting to the Oracle DB without error, but get an error when doing SELECT. The same code which works on Windoze, fails on Linux. I'm not sure this matters, but I am connecting to V9.2 & V8.1.7 Oracle. I'm a real newbie when it comes to PHP & PEAR. When I invoke my PHP code I get the following error Fatal error: Call to undefined method DB_Error::fetchRow() in /b/lampp/htdocs/admin/pear-test.php on line 69 My code contains the following: ============================== $res =& $dbh->query($stmt); while ($row =& $res->fetchRow()) { ============================== where line 69 is the while statement immediately above AFAIK, I have successfully opened the connection & have a valid database handle ($dbh). I am kind of at a loss about how to eliminate the error. Again a copy of this PHP file executes fat, dumb & happy on Windoze. I've done <?php phpinfo(); ?> The output says that OCI8 exists OK. I know it is my problem; either error of comission or error of omission, but which is it? [root@cdb1 bin]# ./pear list Installed packages: =================== Package Version State Archive_Tar 1.1 stable Auth 1.2.2 stable Auth_HTTP 2.0 stable Auth_PrefManager 1.0.3 stable Auth_RADIUS 1.0.1 stable Auth_SASL 1.0.1 stable Benchmark 1.2.1 stable Cache 1.5.3 stable Cache_Lite 1.2 stable Config 1.9 stable Console_Getopt 1.2 stable Console_Table 1.0.1 stable Contact_Vcard_Build 1.0 stable Contact_Vcard_Parse 1.21 stable Crypt_CBC 0.4 stable Crypt_RC4 1.0.2 stable Crypt_Xtea 1.0 stable DB 1.6.2 stable DBA 1.0 stable DB_DataObject 1.2 stable DB_NestedSet 1.3 beta DB_Pager 0.7 stable DB_QueryTool 0.9.8 stable DB_ldap 1.0 stable Date 1.3 stable The "include_path" is/was different between Windoze & Linux. I modified it in etc/php.ini & restarted the s/w without changing the symptoms include_path .:/b/lampp/lib/php:/b/lampp/lib/php/PEAR ========================================== Rhetorical question? What "must" be OK in order to NOT get an error from the following code? $dbh = DB::connect($dsn); if (PEAR::isError($dbh)) { echo "An error occurred while trying to connect to the database server.<br>\n"; echo "Error message: " . $dbh->getMessage() . "<br>\n"; echo "A more detailed error description: " . $dbh->getDebugInfo() . "<br>\n"; } ========================================================== FWIW - I am getting nothing logged to Apache's error_log file when PHP errors out. ============================================================ Below is what appears in Oracle listener.log when PHP code is invoked. 12-MAY-2005 10:57:03 * (CONNECT_DATA=(SID=*)(SERVICE_NAME=cdb1.hitbox.com)(CID=(PROGRAM=)(HOST=cdb1.hitbox.com)(USER=nobody))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.120.167)(PORT=52586)) * establish * cdb1.hitbox.com * 0 My understanding of all of the above is that a GOOD connection is being made to the DB, but something incorrect is causing an error to be thrown on SELECT Any advice, ideas, suggestions or other input would be most welcomed.

« previous php.pear.general (#19175) next »