Link to home
Start Free TrialLog in
Avatar of djguvnor
djguvnor

asked on

PHP to Oracle via ODBC

Hi all,
I'm running PHP and IIS on a Win XP machine trying to connect to an Oracle database on another Windows machine.

I have the Oracle client installed and an ODBC DSN setup which connects succesfully. I have a test PHP script with the following line:

$conn = odbc_connect("DSNNAME", "USERNAME", "PASSWORD");

and I get the following error:

Warning: odbc_connect(): SQL error: Specified driver could not be loaded due to system error 5 (Oracle in OraHome92)., SQL state IM003 in SQLConnect in c:\inetpub\wwwroot\blahblah\oracletest.php on line 6

I use that code to connect to SQL server on other machines using a similar DSN connection. I can't work out why this is not working.

Any ideas?
Avatar of djguvnor
djguvnor

ASKER

Sorted it.  I gave IUSR_{MACHINENAME} read / execute permissions to the whole c:\oracle folder.
ASKER CERTIFIED SOLUTION
Avatar of modulo
modulo

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial