[freetds] Connect to Sybase ASA 8 with pear:DB

Florian Kornhoffer f.kornhoffer at laufwerk.de
Thu Jun 10 06:14:14 EDT 2004


Hi,

I'm not very successfull in connecting to our Sybase DB from our 
Webserver.

Here is my try:

******************
<?php
require_once "DB.php";

$dsn = array(
    'phptype'  => 'sybase',
    'username' => 'dba',
    'password' => 'xx',
    'hostspec' => '62.153.x.x',
    'port'     => '2638',
    'database' => 'testdb',
);

$db =& DB::connect($dsn);
if (DB::isError($db)) {
    die($db->getMessage());
}

?>
******************

I get this answer:
******************
Warning: sybase_connect(): Sybase: Client message: Server is unavailable
or does not exist. (severity 78) in /usr/local/lib/php/DB/sybase.php on
line 55

Warning: sybase_connect(): Sybase: Unable to connect in
/usr/local/lib/php/DB/sybase.php on line 55
DB Error: unknown error
******************

Both servers are localy seperated, Webserver is a RedHat, DB server is 
on a Win2000Server.

Is they way I try already not correct, or could it be a physikal 
connection (ex. firewall) issue?

Thanks
Florian





More information about the FreeTDS mailing list