| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             [1999-02-16 07:39 UTC] kara
  | 
    |||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 02:00:01 2025 UTC | 
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