title: Laravel connection MSSqL server works with cli, but not in browser
body: <p>After installing the <code>dll's</code> to use with MSSqL server, the command <code>php artisan migrate</code> ran correctly and the tables were made in the <code>db</code>. So I thought the connection would work for this application.</p>
  <p>I then used the command <code>php artisan make:auth</code> (which doesn't use the db connection) to scaffold the authentication files.</p>
  <p>Now when I try to register anyone I get errors:</p>
  <blockquote>
  <p><strong>PDOExeption (1/2)</strong></p>
  <p>Could not find driver</p>
  </blockquote>
  <p>and</p>
  <blockquote>
  <p><strong>PDOExeption (2/2)</strong></p>
  <p>Could not find driver (select count(*) from .....</p>
  </blockquote>
  <p>Now I tried to see if using the <code>cli</code> commands still work and both <code>php artisan migrate:rollback</code> and <code>php artisan migrate</code> still work.</p>
  <p>Environment:
  Windows 7 with xampp installed.
  Versions: Laravel 5.4, php 7.1</p>
  <p>Not that it matters but here are parts of my <code>.env</code> and <code>database.php</code> files:</p>
  <pre><code>`database.php`
          'sqlsrv' =&gt; [
          'driver' =&gt; 'sqlsrv',
          'host' =&gt; env('DB_HOST', '10.0.0.40'),
          'port' =&gt; env('DB_PORT', '1433'),
          'database' =&gt; env('DB_DATABASE', 'sqlcon'),
          'username' =&gt; env('DB_USERNAME', 'sa'),
          'password' =&gt; env('DB_PASSWORD', 'test'),
          'charset' =&gt; 'utf8',
          'prefix' =&gt; '',
      ],
  
  `.env`
  DB_CONNECTION=sqlsrv
  DB_HOST=10.0.0.40
  DB_PORT=1433
  DB_DATABASE=sqlcon
  DB_USERNAME=sa
  DB_PASSWORD=test
  </code></pre>
  <p>So how come the <code>cli</code> commands work and the browser don't?</p>
  <p>Doesn't laravel use the same config for both <code>cli</code> and browser connections?</p>
  <hr />
  <p>Update: added some extra info</p>
  <blockquote>
  <p>C:\xampp\htdocs\sqlcon&gt;php --ini</p>
  <p>Configuration File (php.ini) Path: C:\Windows</p>
  <p>Loaded Configuration File:         C:\xampp\php\php.ini</p>
  <p>Scan for additional .ini files in: (none)</p>
  <p>Additional .ini files parsed:      (none)</p>
  </blockquote>
  <p>Used <a href="https://laracasts.com/discuss/channels/laravel/edit-laravels-out-of-the-box-phpini" rel="nofollow noreferrer">this</a> to show my php configuration and it shows:</p>
  <blockquote>
  <p>Loaded Configuration File C:\xampp\php\php.ini</p>
  </blockquote>
  <p>The php -m command shows:</p>
  <blockquote>
  <p>C:\xampp\htdocs\sqlcon&gt;php -m</p>
  <p>[PHP Modules]</p>
  <p>bcmath</p>
  <p>...(some others)</p>
  <p>pdo_mysql</p>
  <p>pdo_sqlite</p>
  <p>pdo_sqlsrv (this one is enabled)</p>
  <p>Phar</p>
  <p>...</p>
  <p>[Zend Modules]</p>
  </blockquote>
  <p>According to <code>php -m</code> the <code>pdo_sqlsrv</code> is enabled, but I can't find any reference to it in the <code>phpinfo</code> page.</p>