php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18491 Oracle/ODBC connection under PHP 4.2.1
Submitted: 2002-07-23 09:32 UTC Modified: 2002-07-23 11:23 UTC
From: frederic dot puteaux at chello dot fr Assigned:
Status: Closed Package: ODBC related
PHP Version: 4.2.1 OS: Windows 2000
Private report: No CVE-ID: None
 [2002-07-23 09:32 UTC] frederic dot puteaux at chello dot fr
This is test page works with PHP and MySQL, but doesn't work with Oracle 8 and PHP4.

The Oracle configuration is OK. The ODBC configuration is OK.

<?

   $myConn = odbc_connect("MyDSN","MyUser","MyPassword",SQL_CUR_DEFAULT);
?>

Warning: SQL error: [Oracle][ODBC][Ora]ORA-12154: TNS:could not resolve service name, SQL state
08001 in SQLConnect in c:\web\cgi\gias\testoracle.php on line 3

I have the same message if i use ADO or if i use a Direct Oracle connection with ora_logon.

All programs of Oracle, same as SQL*Plus run without problem.

Oracle Version                 : 8.0.5
Oracle Client Software Version : 8.0.5
PHP version                    : 4.2.1
Windows version                : 5.0.2195 SP2
Oracle ODBC Driver             : 8.0.5

I can't use the oci. I have this message :

Unable to load dynamic library : c:/php/extensions/php_oci8.dll - La proc?dure sp?cifi?e est introuvable. (don't find the specified procedure)

All others libraries can be loaded without problem.

Sorry for my english.

Fred.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-07-23 09:33 UTC] frederic dot puteaux at chello dot fr
PHP is running under Microsoft IIS.
 [2002-07-23 09:38 UTC] edink@php.net
For your information: you'll need oracle client version 8.1.x to run php_oci8.dll.
 [2002-07-23 11:23 UTC] kalowsky@php.net
Please remove the \m's from your Oracle TNSNAME file.  That will clear this up (aka edit it without using a Windows editor).  Not sure why this happens, but I have no way to test/debug this... but that is the reason why TNS could not resolve.


 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Tue Jun 16 19:00:01 2026 UTC