Could not find driver while migrating on Laravel 4 using XAMPP Server Linux (Ubuntu)

两盒软妹~` 提交于 2019-12-04 11:40:52

If you are looking for simple solution, I had same issue & this worked for me..

When you run php artisan from terminal, you invoke php5-cli package.

To run artisan with XAMPP's php you need to use:

/opt/lampp/bin/php artisan migrate

But make sure your /opt/lampp/etc/php.ini is properly configured to enable pdo_mysql

The problem is solved!

Steps:

  1. Uninstall XAMPP

  2. apt-get update && apt-get install lamp-server^

  3. apt-get autoremove apache2

  4. apt-get remove --purge mysql-server mysql-client mysql-common

  5. apt-get autoremove && apt-get update && apt-get install php5-mysql && apt-get install pdo-mysql

  6. Install XAMPP

However, I had a new problem with running php artisan then I discovered that I had to run /opt/lampp/bin/php artisan instead of php artisan

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!