I have installed the CONNX Unix client on a Linux machine. The license server runs on the same machine and I am using unixODBC as the driver manager.
I have created the ODBC.INI and ODBCINST.INI files, started the license server, and successfully run isql using the DSN defined in ODBC.INI. I can retrieve data through the Adabas SQL Gateway using the cdd files I have moved to the Linux box, using the isql command.
However, when I try to access the file from a php page using odbc_connect, I get the following message:
Warning: odbc_connect() [function.odbc-connect]: SQL error: [unixODBC]You are not licensed for any databases., SQL state 08001 in SQLConnect in /usr/apache/htdocs/test2.php on line 15
php page is very simple:ODBC Test <?php // connect to a DSN "TAMIS-ADA-DEV" with a user and password "TAMIS-DEV" $connect = odbc_connect("TAMIS-ADA-DEV", "TAMIS-DEV", "TAMIS-DEV") or die ("couldn't connect"); // query the users table for name and surname $query = "SELECT * FROM [dbo].[TLC_TAM_ENTITY] WHERE ISN_TLC_TAM_ENTITY < 10";
// perform the query
$result = odbc_exec($connect, $query);
// fetch the data from the database
$suid = odbc_result($result, 1);
$uid = odbc_result($result, 2);
$gid = odbc_result($result, 3);
$name = odbc_result($result, 4);
// close the connection