Skip to Content
0
Former Member
Apr 25, 2014 at 03:55 PM

SQL Anywhere 11 on Ubuntu / PHP

185 Views

Hi there,

I have been trying (with no success) to connnect our PHP app to Sybase database.

Our actual scenario is:

Windows2003/ ODBC {SQL Anywhere 11 Driver} / PHP ------> Windows2008 / Sybase

We are to migrate our PHP:

Linux Ubuntu Server / UnixOBC {SQL Anywhere 11 ODBC Driver} / PHP -------> Windows2008 / Sybase

In the migration process I configured FreeTDS trying somethink like:

/etc/fretds/freetds.conf

----------

[global]
tds version = 4.2

dump file = /tmp/freetds.log
; debug flags = 0xffff

; timeout = 10
; connect timeout = 10

text size = 64512


[sybase]
host = 172.19.2.252
port = 2640
; instance = ek_cadu_0103040607
tds version = 5.0
ASA database = ek_adm01_11

---------

php-script

---------

<?php
error_reporting(E_ALL);
ini_set('display_errors', '1');

$cnn = sybase_connect('sybase', 'dba', '_._ENKONTROL_._');

?>

---------

This script shows the following errors:

Warning: sybase_connect(): message: SQL Anywhere Error -83: Specified database not found (severity 16) in /var/www/testodbc.php on line 4

Warning: sybase_connect(): General SQL Server error: Check messages from the SQL Server (severity 16) in /var/www/testodbc.php on line 4 Warning: sybase_connect(): Unable to connect to server: sybase in /var/www/testodbc.php on line 4

Can anyone help?. Thank you in advance.

Marinho.