[unixODBC-support] Sybase ASA 9 unixODBC driver

Даниил Меграбян danil.megrabjan at gmail.com
Mon Jun 18 13:37:32 BST 2007


Hello2All!

OS: SLED10
PHP 5.2.1 + PDO_ODBC
unixODBC 2.2.11

> cat /etc/unixODBC/odbcinst.ini
[ODBC Drivers]
Adaptive Server Anywhere 9.0=Installed
Trace           = Yes
TraceFile       = /tmp/unixODBC.trace
LogFile         = /tmp/unixODBC.log
ForceTrace      = Yes
Pooling         = No

[Adaptive Server Anywhere 9.0]
Description=Sybase SQL Anywhere 9.0.2
Driver=/opt/sybase/SYBSsa9/lib/libdbodbc9.so
Setup=/opt/sybase/SYBSsa9/lib32/libdbodbc9.so
UsageCount=1
TraceFile=/tmp/asa90.unixODBC.trace

I have some troubles with persistent connection on Sybase ASA 9 unixODBC driver.

[php code]
$dbc = new PDO('odbc:Driver=Adaptive Server Anywhere
9.0;ServerName=web9;DatabaseName=web_db;CharSet=utf8;ConnectionName=MyWebApp;CommLinks=tcpip(Host=dbsrv;Port=49153)',
'bagroff', '777777', array(PDO::ATTR_PERSISTENT => true));
[/php code]

If i use connection attribute ( PDO::ATTR_PERSISTENT => true ) from
php_debug i receive error message like this:

[php debug]
Debug Warning: PHPDocument1 line 2 - PDO::__construct():
SQLSTATE[IM001]: Driver does not support this function: driver does
not support setting attributes.
[/php debug]

But, despite everything in Sybase Central I'll see, that my connection
exists (even when php script ending execution).

If i try to connect in the next time with such script. PHP do not
initialize new connection, it use early created.

When my trouble?



More information about the unixODBC-support mailing list