Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

Edit

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:

[PRODUCT] => NLSRTL 
[VERSION] => 10.2.0.4.0
[STATUS] => Production

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

[PRODUCT] => PL/SQL 
[VERSION] => 10.2.0.4.0
[STATUS] => Production

[PRODUCT] => TNS for Solaris: 
[VERSION] => 10.2.0.4.0
[STATUS] => Production
share|improve this question
    
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 Mar 30 '11 at 20:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.