There are several configurations that must be set so that PHP can connect with SQL Server. Next step configuration of PHP and SQL Server in order to connect.
1. We need an injection of .dll file to SQL Server. Download via the Internet, a file named php_mssql.dll, you can search on google with the keyword "Free Download php_mssql.dll", will be shown many sites that provide the .dll file.
2. After you download, put php_mssql.dll files into the folder C:\xampp\php\ext.
3. Open php.ini file located in the folder C:\xampp\php, then do the following configuration:
- Find scripts in php_ini (you can use the search tools -> find or press CTRL + F) and then enter the keyword "php_mssql.dll", then you will find the following line.
;extension=php_mssql.dll
Activate the extension in a way to remove the semicolon into the following script:
extension=php_mssql.dll
- Do a search back to the script "php_pdo_mssql.dll", then you will get the following script:
;extension=php_pdo_mssql.dll
Perform the activation of the extension in a way to remove the semicolon into the following script:
extension=php_pdo_mssql.dll
- Restart the server xampp with double click on the application file C:\xampp\xampp_restart.
4. Open a web browser by typing the url http://localhost/xampp, will show a page from the server xampp. Click the link to phpinfo(), as shown below.
2. After you download, put php_mssql.dll files into the folder C:\xampp\php\ext.
3. Open php.ini file located in the folder C:\xampp\php, then do the following configuration:
- Find scripts in php_ini (you can use the search tools -> find or press CTRL + F) and then enter the keyword "php_mssql.dll", then you will find the following line.
;extension=php_mssql.dll
Activate the extension in a way to remove the semicolon into the following script:
extension=php_mssql.dll
- Do a search back to the script "php_pdo_mssql.dll", then you will get the following script:
;extension=php_pdo_mssql.dll
Perform the activation of the extension in a way to remove the semicolon into the following script:
extension=php_pdo_mssql.dll
- Restart the server xampp with double click on the application file C:\xampp\xampp_restart.
4. Open a web browser by typing the url http://localhost/xampp, will show a page from the server xampp. Click the link to phpinfo(), as shown below.
5. Upon click the link phpinfo(), the work performed some info about the server. Make sure the information PDO, MSSQL already listed. If true then the SQL Server is ready to use php.
That's How To Configure PHP and SQL Server that I can share with friends may be useful. Learn also articles about: How to Install SQL Server 2005.
Comments
Post a Comment