Bug #968: iODBC Support Will not Connect to a non-local Database

From: Date: Thu, 03 Dec 1998 18:45:20 +0000
Subject: Bug #968: iODBC Support Will not Connect to a non-local Database
Groups: php.dev 
Request: Send a blank email to php-dev+get-2646@lists.php.net to get a copy of this message
From: mark@intrepid.net Operating system: Linux 2.035 alpha unknown PHP version: 3.0.5 PHP Bug Type: ODBC related Bug description: iODBC Support Will not Connect to a non-local Database I have PHP 3.0.5 compiled as a loadable Apache module, and have compiled it with mysql and iODB support (iODBC 2.12). The problem is that the ODBC drivers connect to local data srouces, but will not connect to non-local data sources. I have verified that the iODBC drivers are working correctly. For example, I have the following datasource defined: [world-remote] Trace = Off TraceFile= stderr Driver = /usr/lib/iodbc/lib/libmyodbc_mysql.so SERVER = wchsys DSN = world UID = phpuser PWD = php PORT = 3306 and can query it with the bundled ODBC tools: [root@alpha lib]# odbctool -d world-remote "select * from county" <table border=1> <th>county</th> <th>view</th> <th>enable</th> <tr> etc.... However, when I try to connect via the PHP interface: $odbc_result = \ odbc_prepare(odbc_connect("world-remote","phpuser","php"),\ "select * from county"); I get a: Warning: SQL error: [TCX][MyODBC]Unknown database 'world', SQL state 08004 in SQLConnect in mytest2.php3 on line 2 error. Now, this is the interesting part. If I have a database "world" on the local machine, I get a sucessful return. In other words, the SERVER field is being ignored in the ODBC initialization file. I've posed the question severl times on the php mailing list, but have recieved no response. Thanks! --Mark -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#2646) next »