[unixODBC-support] Error: undefined symbol SQLAllocEnv at PHP access

jreinartz jreinartz at snackpointplus.de
Thu Apr 21 13:38:47 BST 2005


Hello,

I am not able to connect to a sybase database via unixODBC in PHP.

Our system ist an 2.6 Linux server based on the SuSE distribution. 
Apache2 (2.0.49) , php4 (4.3.4),  php-unixODBC (4.3.4), unixODBC (2.2.8) 
and unixODBC-devel (2.2.8) were installed with the admin software yast2.

The ODBC data ist stored in /root/.odbc.ini:
[ODBC Data Sources]
ts_dsn=Adaptive Server Anywhere 9.0

[ts_dsn]
Userid=xxx
Password=yyy
Databasename=ts
ServerName=hsab_sbs2003
CommLinks=tcpip(host=192.168.0.12;port=2936)
Driver=lbdbodbc9.so

It is possible to connect via isql to the database server!

For testing the connection I used this file: /srv/www/project/test.php
<?
    echo "Begin";
    $conn=odbc_connect("ts_dsn","xxx","yyy")
    or die ("Failure");
   
    echo "End";
?>

When calling this file, there ist only the text "Begin" displayed in the 
browser window. No error. But an error is logged in 
/var/log/apache2/error_log:
"/usr/sbin/httpd2-prefork: error while loading shared libraries: 
/usr/lib/php/extensions/unixODBC.so: undefined symbol: SQLAllocEnv"

Do you have got an idea what went wrong? I reinstalled the php and 
unixODBC modules but the problem was not solved.

Thanks
Jens



More information about the unixODBC-support mailing list