atomicturtle,
Hi,
Thank you very much for your reply.
I have managed to get the db connection test to work using tsql command, using the dsn from /etc/freetds.conf.
However when I try to access it using a php script, it yells an error related to module php_ioncube_loader_lin_5.1_x86_64.so
Here are the details of my freetds settings, the php script I try to run and the error. I am researching for the cause of that error but haven't been able to find anything yet.
Is the below configuration of tds coming from your repo?
================================================
# rpm -qa | grep tds
docbook-dtds-1.0-30.1
xhtml1-dtds-1.0-7.1.1
freetds-0.64-1.el5.art
================================================
# tsql -C
Compile-time settings (established with the "configure" script):
Version: freetds v0.64
MS db-lib source compatibility: yes
Sybase binary compatibility: unknown
Thread safety: yes
iconv library: yes
TDS version: 4.2
iODBC: no
unixodbc: yes
================================================
The php script I am running to test
# more /var/www/vhosts/mydomain.com/httpdocs/dbsetsu.php
<?php
$user="sa";
$dsn="DBTEST";
$password="mypassword";
$dbh = odbc_connect($dsn, $user, $password);
$result = odbc_tables($dbh);
$tables = array();
while (odbc_fetch_row($result)){
if (odbc_result($result,"TABLE_TYPE")=="TABLE")
echo"
".odbc_result($result,"TABLE_NAME");
}
?>
================================================
And here the error message
# php /var/www/vhosts/mydomain.com/httpdocs/dbsetsu.php
Failed loading /usr/lib64/php/modules//php_ioncube_loader_lin_5.1_x86_64.so: /usr/lib64/php/modules//php_ioncube_loader_lin_5.1_x86_64.so: undefined symbol: zend_unmangle_property_name_ex
PHP Warning: odbc_connect(): SQL error: [unixODBC][FreeTDS][SQL Server]Unable to connect to data source, SQL state S1000 in SQLConnect in /var/www/vhosts/mydomain.com/httpdocs/dbsetsu.php on line 5
PHP Warning: odbc_tables(): supplied argument is not a valid ODBC-Link resource in /var/www/vhosts/mydomain.com/httpdocs/dbsetsu.php on line 7
PHP Warning: odbc_fetch_row(): supplied argument is not a valid ODBC result resource in /var/www/vhosts/mydomain.com/httpdocs/dbsetsu.php on line 10
================================================
It's it strange, could it be that some php dependencies are failing?
Thank you,