php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6936 Can not resolve TNS NAMES with ORALCE connection
Submitted: 2000-09-29 05:49 UTC Modified: 2001-05-28 00:18 UTC
From: michael_d_gaudette at groton dot pfizer dot com Assigned:
Status: Closed Package: ODBC related
PHP Version: 4.0.2 OS: NT 4 (SP4)
Private report: No CVE-ID: None
 [2000-09-29 05:49 UTC] michael_d_gaudette at groton dot pfizer dot com
error:
Warning: SQL error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified, SQL state IM002 in SQLConnect in
c:\program files\apache group\apache\htdocs\bdm\timedist\checkusername.phtml on line 3

I have seen this earlier in the bug list and Kara made a comment that the ODBC driver was not setup correctly. However, I know this to be not true in my case. I can get it to connect through ODBC to other databases but not oracle 8i with either microsoft ODBC for oracle or an oracle driver 8.00.0400. I works PERFECT if I change httpd.conf to point to PHP306. I have not touched the DSN configuration and it works perfect with php306. I change it to 402 restart apache and error! There is a real problem here and not a configuration issue. I have run against this with many many users on phpbuilder.com. Please help! Thank you very very much.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-03-27 11:11 UTC] kalowsky@php.net
this really REALLY sounds likea configuration bug on your end with oracle8i, and not a PHP issue at all.

but regardless, is this A) still happening?  B) if so can you provide any more information (config files, sample script, etc etc)?
 [2001-04-16 23:08 UTC] kalowsky@php.net
no user feedback, considered fixed in current cvs.  if this is untrue, please re-open the bug.
 [2001-04-17 07:51 UTC] michael_d_gaudette at groton dot pfizer dot com
Yes it is still happening. And I do not believe it is a configuration issue. Windows NT 4.0 service pack 4 / Apache 1.3 / PHP 4.0.4PL1 and PHP 3.0.6

I have two directories one call php306 with php.exe and associated files and one called php404pl1 with php.exe and associated files. When I point the ScriptAlias to php306 all my php applications and ODBC calls work perfect. If I go in and point it to php404pl1 (I copied the appropriate dll's to the proper directory and make sure to use the php.ini not php3.ini) all my code works fine except ODBC functions?? If I change it right back to php3 they work fine. I checked for compatibility issues of the functions and there appears to be none the error is "Can not resolve host name in tnsnames.ora" Well I did not move it and it works perfect for PHP3, Visual Basic, Visual C++, SAS and all other development platforms I work with. Any ideas because I have tried just about everything I can think of. Also I have encountered a lot of people who are having this exact problem and in talking with them sounds like they have tried every possible work around I have tried to no avail.

Thanks,
Mike
 [2001-04-17 07:57 UTC] michael_d_gaudette at groton dot pfizer dot com
not fixed
 [2001-05-07 21:46 UTC] kalowsky@php.net
please provide a simple sample script and a copy of your tnsnames.ora

while i don't have access to any oracle db's i can try to get some...
 [2001-05-28 00:18 UTC] kalowsky@php.net
bug in the tnsnames.ora file.  please remove all windows 
<cr>'s and insert ONLY unix style... this will fix your 
problem.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 10:01:31 2024 UTC