Notes to install PHP 7.2 and Laravel on windows server 2008 (SQL Server)

cd inetpub/laravel

comment “;extension=php_mysql.dll” in php.ini

Install url-rewrite module for IIS

Import rewrite rules:


install failed request tracing (Optional)


Change laravel structure:

Change path in public/index.php
require __DIR__.’/../../../../laravel/vendor/autoload.php’;
$app = require_once __DIR__.’/../../../../laravel/bootstrap/app.php’;

Add mofify permission for user “IUSR” to “D:\Inetpub\laravel\storage\framework\sessions”

Install Visual C++ 2017

SQL Server related:

Add this line in php.ini:


Change database configs in .env:

  • Change DB port to 1433

Upload Related Issue

If upload fails all the time (file not found exception), try create a folder for PHP to upload temp files. e.g. C:\phptmp

Revise php.ini as well:

extension_dir = "C:\php7\ext\"
error_log = "C:\Windows\Temp\php-7.2.5_errors.log"
upload_tmp_dir = "C:\phptmp\"