PHP4.2.3 and Oracle 9.2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am using PHP 4.2.3 and Oracle 9.2. I have a test file that runs successfully in command line. But when I use a browser to open the file, it gives SQL error. Could anyone give me any insight what could be wrong?

 

Testora.php:

<?php

$conn_ptr = odbc_connect(“ORACLEDB”,”USERID”,”USERPASSWORD”);

print $conn_ptr.”\r\n”;

ob_flush();

$SQLReturn = odbc_exec($conn_ptr,”SELECT company_name FROM company”);

$ReturnRows = odbc_fetch_into($SQLReturn,$line,1);

 

while ($ReturnRows){

          print $line[0].”\r\n”;

          ob_flush();

          $ReturnRows = odbc_fetch_into($SQLReturn,$line);

}

 

odbc_close($conn_ptr);

?>

 

Command line output:

Resource id #1

Company name list…

 

Error display on browser:

Warning: SQL error: Specified driver could not be loaded due to system error 5 (Oracle in OraHome92)., SQL state IM003 in SQL Connect in c:\inetpub\wwwroot\PHP\testora.php on line 2.

Warning: odbc_exec(): Supplied argument is not a valid ODBC-Link resource in c:\inetpub\wwwroot\PHP\testora.php on line 5

Warning: odbc_fetch_into(): Supplied argument is not a valid ODBC result resource in c:\inetpub\wwwroot\PHP\testora.php on line 6

Warning: odbc_close(): Supplied argument is not a valid ODBC-Link resource in c:\inetpub\wwwroot\PHP\testora.php on line 14

 

William Cheung B.Sc, MCSE, MCDBA

Databyte Corp. 

 


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.560 / Virus Database: 352 - Release Date: 1/08/2004


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux