culter
culter

Reputation: 5697

SQL Server data to php

I have this php script:

<?php
$server = 'PCCSAF\SQLEXPRESS';

$link = mssql_connect($server, 'username', 'password');
if (!$link) {
die('wrong');
}
?>

I need to connect to local SQL Server express server, but I always get

Fatal error: Call to undefined function mssql_connect() in C:\wamp\www\dbgrab\index.php on line 4

I've tried to install ntwdblib.dll, uncomment extension=php_ming.dll and extension=php_mssql.dll in php.ini, but it still not works.

I'm using PHP 5.4.3 and WAMP server 2.2 on 64bit windows7

Thank you.

Upvotes: 1

Views: 372

Answers (1)

Jamesking56
Jamesking56

Reputation: 3901

WAMP Server x64 is not compatible with PHP SQL Server Driver. Try using 32 bit WAMP.

Upvotes: 2

Related Questions