Hi everyone,
I am having some problems connecting to a Sybase Server.
I have the following php file:
<?php
// Set the database access information
define('DB_USER', 'user');
define('DB_PASSWORD', 'pass');
define('DB_HOST', 'FREETDSDS');
define('DB_NAME', 'DATABASE');
$dbc = sybase_connect(DB_HOST, DB_USER, DB_PASSWORD)or die("Could not connect!");
echo "Connected successfully";
sybase_close($dbc);
?>
Then I have the following in my Freetds.conf
[FREETDSDS]
host = 1.1.1.1
port = 1433
I believe that the connection is getting the value from the freetds.conf file because when I change the port to something like 5000 it will hang the browser (because its trying to connect to a port that isnt being used.
The message i get is this:
Warning: sybase_connect(): Sybase: Server message: Login failed for user 'user'. (severity 14, procedure N/A) in /var/www/index.php on line 19
Warning: sybase_connect(): Sybase: Client message: Read from SQL server failed. (severity 78) in var/www/index.php on line 19
Warning: sybase_connect(): Sybase: Client message: Login incorrect. (severity 78) in var/www/index.php on line 19
Warning: sybase_connect(): Sybase: Unable to connect in var/www/index.php on line 19
Could not connect!
I also think I have compiled PHP correctly etc because otherwise I wouldnt be able to run the function. The user/pass is definately correct!!
Any ideas?? 😕