0

I am developing a Laravel application that is talking to a Microsoft SQL server. Everything works, but when I run composer update to update packages I receive the following error:

[PDOException]
could not find driver

Script php artisan clear-compiled handling the pre-update-cmd event returned with an error

[RuntimeException]
Error Output:

update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--] [<packages>]...

The strange thing is that the sqlserv driver set up in my database.php file works fine; my vagrant box has the correct driver installed and configured and, as far as I can tell, everything regarding the database connection is working as expected.

What steps can I take to try to narrow down the source of this error?

Update:

I did mention that my SQL connection is, as far as I know, configured correctly on the server: it works for querying, updating, etc. But just in case I missed something here are the full steps I took to install the SQL driver:

  • sudo apt-get install php5-mssql php5-sybase
  • sudo php5enmod mssql
  • sudo nano /etc/freetds/freetds.conf:

    [global]
        tds version = 8.0
        client charset = UTF-8
    
  • sudo service apache2 restart

benjivm
  • 172
  • 4
  • 16
  • couple of posts about the same issue, it may be an issue with your `sqlserv` installation on your server: https://github.com/taviroquai/mapigniter2/issues/16 http://stackoverflow.com/questions/18213907/how-to-use-sql-server-connection-in-laravel – Jeff Feb 19 '16 at 21:31

1 Answers1

0

I was finally able to solve this by doing the following:

  • Revert PHP 5.6 to PHP 5.5
  • Run composer update on the actual vagrant vm via ssh
benjivm
  • 172
  • 4
  • 16