0

I am using the following line of code to connect to a SQL Server 2008 version from PHP:

$dbh = new PDO('dblib:host=xx.xx.xx.xx;port=xxxx;dbname=xxxxxx', 'username', 'password');

From this I get:

Error!: SQLSTATE[HY000] Unable to connect: 
Adaptive Server is unavailable or does not exist (severity 9)

The above database settings work fine with pdo_mssql on by dev machine, but Bluehost does not support pdo_mssql.

I am on a shared hosting (Bluehost) so cannot administer the server/host.

If this is not possible then can anyone please suggest an alternative hosting provider that supports pdo_mssql?

Jonas G. Drange
  • 8,749
  • 2
  • 27
  • 38
Anurag Ashok
  • 113
  • 2
  • 8
  • Are there any error logs you can enable like suggested in this answer?: http://stackoverflow.com/questions/7101719/php-error-connecting-to-ms-sql-database-using-pdo-dblib – jeremy Aug 04 '12 at 04:32
  • I read that befre,, but No i cannot enable the logs. – Anurag Ashok Aug 04 '12 at 04:44

0 Answers0