I've got the Oracle Instant Client installed on a SuSE webserver and I'm attempting to connect to an Oracle Database with PHP via unixODBC.

The connection seems to be working properly, after issuing an odbc_connect, I get a response of type "odbc link". After issuing an odbc_prepare, I get a response of type "odbc result". The problem is when I attempt to issue the odbc_execute command I get one of two errors:

Warning: odbc_execute(): SQL error: [unixODBC][Oracle][ODBC][Ora]Driver not capable., SQL state S1C00 in SQLExecute

or else a browser error:

Error 324 (net::ERR_EMPTY_RESPONSE): Unknown error.

I also tried specifying SQL_CUR_USE_ODBC on the odbc_connect method, but when I do that, the script just hangs indefinitely.

What I'm wondering is, is there some options I have to specify in the odbc.ini or odbcinst.ini files for the DSN? There doesn't seem to be much in the way of documentation about what options are available or what those options do.


I did get the connection working via PDO object methods (didn't really change anything, just tried using the PDO prepare / execute methods). I still can't get any results using odbc_prepare / odbc_execute however. Here's the server info I get from a "SELECT * FROM product_component_version" query:

[STATUS] => Production

[PRODUCT] => Oracle Database 10g Enterprise Edition 
[STATUS] => 64bi

[STATUS] => Production

[PRODUCT] => TNS for Solaris: 
[STATUS] => Production
  • What Oracle driver are you using, or does your server allow you to connect directly with ODBC? – Satanicpuppy Mar 29 '11 at 22:10
  • What's the version of Oracle you're trying to connect to? – paulmorriss Mar 30 '11 at 9:04
  • I updated the question with the Oracle version. I did get the connection working via PDO objects, but I still can't get any results via the odbc_prepare and odbc_execute methods. – Brad Westness Mar 30 '11 at 20:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.