I am developing a website on a server I only have access to MySQL and FTP, so all commands I run are through the b374k php shell . I am experiencing a Laravel problem with S
Your database driver is missing. To solve the probelm
First install the driver
For ubuntu: For mysql database.
sudo apt-get install php5.6-mysql/php7.2-mysql
You also can search for other database systems.
You also can search for the driver:
sudo apt-cache search drivername
Then Run the cmd php artisan migrate
In window OS. I have uncomment extension=pdo_mysql for php.ini file that locate at same directory of php.exe. after that it work fine.
You are probably missing sqlite or the specific DB driver you are trying to migrate.
Install the DB driver and you'd be fine. You don't necessarily need to edit your php.ini file (it's one way to fix it too though).
For sqlite do --> sudo apt-get install php-sqlite3
Then php artisan migrate
NB: I assume you have PHP and MySql already installed
ERROR:
could not find driver (SQL: select * from tests
where slug
= a limit 1)
I was getting the above error in my laravel project, i am using nginx server on ubuntu 16.04
This error is because, php-mysql
driver is missing. To install it type following command.
sudo apt-get install php7.2-mysql
Please specify your current php version
in above command.
Open php.ini
file and uncomment the followling line of code(Remove Semicolon).
;extension=pdo_mysql
Then Restart the nginx and php service
sudo systemctl restart php7.2-fpm
sudo systemctl restart nginx
It worked for me.
In my case I'm using Ubuntu so I found that my system is not installed php-sqlite3, after installation its got fixed.
sudo apt-get install php7.2-sqlite3
I got the same error when running my test suite. It was working before but it stopped working after I upgraded php. So I did
sudo apt-get install php-sqlite3
and it worked.