I am quite new to setting php with ms sql server.
I downloaded the php version php-5.6.31-nts-Win32-VC11-x86 and downloaded the drivers for ms sql db to the ext folder in the php path.
I can see the files php_sqlsrv_56_nts.dll and php_sqlsrv_56_ts.dll
I have also modified the php.ini file to extention=php_sqlsrv_56_nts.dll and extension_dir ="ext"
I have some php files in path1
I opened the command prompt in the php folder and executed the following command: php -S localhost:8085 -t path1
The server is setup succesfully. However, I get an error Fatal error:
Call to undefined function sqlsrv_connect() in the line
$conn = sqlsrv_connect($servername, $connectionInfo);
Did I miss anything here?
phpinfo()and make sure it's in there - delboy1978ukphpinfo(), also check near the top to see the actual path of the php.ini it used. There may be multiple ini files used in different contexts, such as CLI vs web. I'm not sure on Windows if there's an .ini that might take precedence when using thephp -Sserver. - Michael Berkowski