on 04-25-2014 4:55 PM
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.
Hi Marinho,
SQL Anywhere does not support FreeTDS. SQL Anywhere does support Open Client and jConnect connections over TDS.
The sybase_* functions pre-built with PHP are for (Sybase) Adaptive Server Enterprise (ASE), not SQL Anywhere - they are separate products.
---
Is there a particular reason you're not using the SQL Anywhere PHP module ( http://scn.sap.com/docs/DOC-40537 ), with the sasql_* functions that are intended for use with SQL Anywhere?
Regards,
Jeff Albion
SAP Active Global Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.