I did all the changes given here but I still not connect SQL server on my php 5.6 version.
I tried with mssql_connect()
and sqlsrv_connect()
both.
I changed
; On windows: extension_dir = "ext"
to:
; On windows: extension_dir = "D:\xampp\php\ext"
I have installed .dll
s too. But result is still:
Fatal error: Call to undefined function sqlsrv_connect()
or
Fatal error: Call to undefined function mssql_connect()
can anyone help me??
mssql_connect() is no longer supported by PHP since PHP 7.0 and was depreciated in 5.3.
Create a phpinfo.php file:
Open the page, and on the first page that's opened, third from the bottom, check if the registered streams contains 'sqlsrv':
If it doesn't then you have to enable the module. Try uncomment this code that you changed: From:
To:
And let us know the outcome.