Hi We are trying config our environment ( Linux websrv01 3.16.0-4-amd64 #1 SMP Debian 3.16.43-2+deb8u5 (2017-09-19) x86_64 PHP Version 7.0.26-1~dotdeb+8.2) to connect to SyBase 16 With $connection = new PDO("dblib:version=8;charset=UTF-8;host=".$host.":".$port.";dbname=".$dbname, $username, $password) we get this error: « SQLSTATE[] (null) (severity 0) » and with this: $connection = new PDO("sybase:host=".$host.":".$port.";dbname=".$dbname, $username, $password); result in « could not find driver » but we get the driver from debian packages php7.0 Any tips? Thanks William asked 20 Dec '17, 10:17 wjat777 |
Can you please give a detailed description, what exactly you are trying to do and what error message you get (if any)?
I think the problem is that the "Sybase" driver that you are trying to use is for Adaptive Server ENTERPRISE and not SQL Anywhere - Sybase had several different database technologies. While SQL Anywhere does support TDS based connections, third party vendors often neglect that there is a difference between the database offerings and might code for ASE specific database objects. It might be that you simply need open client to establish the connection (you will need to configure the interfaces file). Alternatively, you should be able to use the ODBC PDO with SQL Anywhere. Or you can use the SQL Anywhere PHP driver.