1
I am running a PHP script on a RedHat server using Teradatas ODBC drivers.
<?php
$conn = odbc_connect("Teradata", "username", "password");
$result = odbc_exec($conn, 'SELECT count(*) FROM table');
while (odbc_fetch_row($result)) {
for ($i = 1; $i <= odbc_num_fields($result); $i++) {
echo "Result is ".odbc_result($result,$i);
}
}
?>
I have run strace
on the script and found that it's looking for the .ini
files which hold the DNS information in the wrong location as well as putting a .
before the file name.
open("/home/a-taslam/.odbcinst.ini", O_RDONLY) = -1 ENOENT (No such file or directory)
It should be looking for the file at /opt/teradata/client/ODBC_64/odbcinst.ini
Does anyone know how to correct this?