We have had great success using the new set of drivers for 11.7. But we have run up against a problem. We cannot get a connection from a PHP program to a database. We always get this error:
PHP Warning: odbc_connect(): SQL error: [Gupta][ODBC Driver][SQLBase]00401 DBA COD Cannot open database, SQL state 08001 in SQLConnect in C:\Inetpub\vhosts\habwork.com\habclient\index.php on line 51
With Line 51 being the call to ODBC.
$handle=odbc_connect ("$DSN", "$uid", "$passwd");
The program is the Gupta Test ODBC program given in the 'Connecting Guide'. Here are some interesting facts:
1) If we do a 'Test Connect' from the ODBC Administrator (odbcad32) we DO get a successful test.
-> This works for both 32-bit and 64-bit System DSN's.
2) The PHP program is running under 'Google Chrome 64'. It seems to me that it prefers the 32-bit driver - I'm not sure why. (if anyone wants to tell me why - it would be most appreciated.)
3) The actual Database server and test database is on a different server, one that is NOT part of our network.
-> This server/database are perfectly connectable from a TD Mobile application on this same server. (using a .NET Connection String) The firewall is modified to accept the connection from the testing server hosting the PHP program. This is a reliable connection!
4) The Client portion of the SQL.INI looks like this:
5) The server is a Windows Server 2008 R2 64-bit.
Any ideas of what is going on?
I've seen that an 8001 error is normally caused by there not being a 'clientruntimedir=' in the client sql.ini file pointing to the SQLBase runtime client directory.
Can you please check that?
Can you also check the DLLs that are being loaded from that directory when you try to run the PHP app? Use something like Process Explorer to do this.
odbc_connect("Driver=Gupta SQLBase 11.7;Server=XX.82.31.XX;Database=hbtest;port=2155;isolation=RL;ClientName=mobile;SSL=negotiate", "sysadm", "xxxxxxx");
Note that the name "Gupta SQLBase 11.7" comes from the 32-bit ODBC driver name as seen in C:\Windows\Syswow64\odbcad32.exe.
So with that done we can now write PHP programs that pull data from our individual clients' databases and display them on Mobile devices. Clients love it!
Who is online
Users browsing this forum: [Ccbot] and 0 guests