cancel
Showing results for 
Search instead for 
Did you mean: 

How config PHP7 to connect with SyBase 16?

Former Member
0 Kudos
3,458

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

reimer_pods
Participant

Can you please give a detailed description, what exactly you are trying to do and what error message you get (if any)?

chris_keating
Product and Topic Expert
Product and Topic Expert

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.

Accepted Solutions (0)

Answers (0)