Issues Connecting to Oracle on Windows 2003 Server-RESOLVED

Talk about working with different database types

Moderator: alexandrleonenko

dynsight
Expert
Expert
Posts: 99
Joined: Mar 3rd, '11, 03:05

Issues Connecting to Oracle on Windows 2003 Server-RESOLVED

Postby dynsight » Jun 1st, '11, 16:57

Hi,

I hope someone can help

I am trying to connect to Oracle 10g on Windows 2003 server running php 5.3.0

Here is my connection info for Datagrid


$DB_USER='username';
$DB_PASS='password';
$DB_HOST='170.115.111.84';
$DB_NAME='170.115.111.84:1521/dbname';

ob_start();


$db_conn = DB::factory('oci8'); /* don't forget to change on appropriate db type */
$result_conn = $db_conn->connect(DB::parseDSN('oci8://'.$DB_USER.':'.$DB_PASS.'@'.$DB_HOST.'/'.$DB_NAME));
if(DB::isError($result_conn)) {die($result_conn->getDebugInfo() ); }
## *** put a primary key on the first place
$sql=" SELECT GID, SURNAME,GIVEN_NAME,LANID from NTWRK_USERS";

## *** set needed options
$debug_mode = true;
$messaging = true;


However I get the following error message:
[DB Error: extension not found]

However, it appears to be configured properly:

Configure Command: cscript /nologo configure.js "--enable-snapshot-build" "--enable-debug-pack" "--disable-zts" "--disable-isapi" "--disable-nsapi" "--with-pdo-oci=D:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8=D:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8-11g=D:\php-sdk\oracle\instantclient11\sdk,shared" "--with-enchant=shared"

Path C:\oracle\product\10.2.0\client_1\bin;D:\oracle\product\10.2.0\client_1\bin;C:\PHP\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;D:\Program Files\Windows Imaging\;D:\Program Files\Microsoft SQL Server\100\Tools\Binn\;D:\Program Files\Microsoft SQL Server\100\DTS\Binn\;D:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN;D:\Program Files\MySQL\MySQL Server 5.1\bin;D:\Program Files\System Center Operations Manager 2007\
Pear is also installed:

include_path .;C:\php5\pear .;C:\php5\pear
I was wondering if there was a conflict between Pear from installation and the PEAR in the local directory... BUT the local call should supercede

I greatly appreciate any assistance... even information that I can take the PEAR website. Thanks.
Last edited by dynsight on Jun 4th, '11, 11:39, edited 2 times in total.

administrator
Site Admin
Site Admin
Posts: 6010
Joined: Jan 7th, '09, 23:18
Contact:

Re: Issues Connecting to Oracle on Windows 2003 Server

Postby administrator » Jun 2nd, '11, 10:24

First of all, it uses an embedded PEAR, so simply check your driver in datagrid/pear/db folder to check what happens.
It seems it returns error because of 10 version

dynsight
Expert
Expert
Posts: 99
Joined: Mar 3rd, '11, 03:05

Re: Issues Connecting to Oracle on Windows 2003 Server

Postby dynsight » Jun 4th, '11, 11:33

I think it was a problem with the PHP Oracle driver.

I Upgraded to PHP 5.3.6, and this problem went away...

Another one came up regarding :
ORA-12154: TNS:could not resolve the connect identifier specified

Which is most likely a problem with sqlnet.ora. Our DBA will look at it. I think TNSNAMES.ora is fine, since we have been using the same basic file on multiple machines for years.

Thanks for your feedback, though.


Return to “Databases: different types implementation”