1

I've found other question like this but none seems to solve my problem. In my case it occurs on any artisan command, even if I just type "php artisan" the output is [PDOException] could not find driver.

I'm running Laravel 5 on Ubuntu 14.04 LTS, with a LEMP stack (PHP 5.6 fpm, Mysql, Nginx). In the config/database.php the default driver is set to mysql.

I've checked the output of php --ini, it seems to load all configuration files:

Configuration File (php.ini) Path: /etc/php5/cli
Loaded Configuration File:         /etc/php5/cli/php.ini
Scan for additional .ini files in: /etc/php5/cli/conf.d
Additional .ini files parsed:      /etc/php5/cli/conf.d/05-opcache.ini,
/etc/php5/cli/conf.d/10-pdo.ini,
/etc/php5/cli/conf.d/20-gd.ini,
/etc/php5/cli/conf.d/20-json.ini,
/etc/php5/cli/conf.d/20-mcrypt.ini,
/etc/php5/cli/conf.d/20-mysql.ini,
/etc/php5/cli/conf.d/20-mysqli.ini,
/etc/php5/cli/conf.d/20-pdo_mysql.ini,
/etc/php5/cli/conf.d/20-readline.ini

If i open /etc/php5/cli/conf.d/20-pdo_mysql.ini i see:

; configuration for php MySQL module
; priority=20
extension=pdo_mysql.so

And this the content of /etc/php5/cli/conf.d/10-pdo.ini is:

; configuration for php PDO module
; priority=10
extension=pdo.so

Inside /etc/php5/cli/conf.d i see pdo ini files symlinked like this:

10-pdo.ini -> ../../mods-available/pdo.ini
20-mysql.ini -> ../../mods-available/mysql.ini
20-pdo_mysql.ini -> ../../mods-available/pdo_mysql.ini

The symlink match the base directory /etc/php5/mods-available that contains all the ini files:

pdo.ini
pdo_mysql.ini

That's all. If someone already experienced this, some help would be really appreciated. Thanks!

Luciano
  • 1,455
  • 8
  • 22
  • 52

1 Answers1

0

So, after many attempts i finally find out how to fix it: just needed to install php5-sybase package. After that Artisan works perfectly!

I guess on homestead it's already installed, unluckily I needed to configure a bare-bone ISO on a VMWare Workstation.

Luciano
  • 1,455
  • 8
  • 22
  • 52