I must connect my Zend Framework 1.11 application with sybase 12.5.4.
I need to know how to do that from Windows 7 AND from debian 6.
I had installed sybase client on my Windows and enabled the php_sybase_ct extension (sybase_ct appears on my phpinfo), but I even could connect with sybase_connect.
The following code:
$cnn = sybase_connect('server.com.br,port', 'user', 'psw', "iso_1", 'app');
sybase_select_db('db', $cnn);
returns an error:
sybase_connect() [function.sybase-connect]: Sybase: Unable to connect in C:\wamp\www\testesybase.php on line 3
Someone can, please, help me?
I’ve been looking for it for a looong time!
Thank you!
Update:
Since I got sybase_connect() connect working, now my issue is: How to make Zend Framework 1.11 connect on Sybase 12.5.4?
I read that PHP uses pdo_dblib – PDO(sybase: …) – to do that, but PHP5.3.10 on Windows doesn’t have this driver anymore!
I got it working with Zend Framework by using PDO Driver for FreeTDS!
FreeTDS installation
You need to install php5-sybase (the Sybase connector provides the required libraries for connecting to the MSSQL Server and Sybase) and the freeTDS software and unixODBC.
To install and configure FreeTDS, see this link.
Also, this link provides a good read about FreeTDS installation.
Configuring a connection string and conecting with Zend Framework 1.11
Configure your connection on
/etc/freetds/freetds.conf, like this:Then, on Zend Framework 1.11, configure your connection like this: