Laravel: PDOException: could not find driver

前端 未结 21 2360
野趣味
野趣味 2020-11-27 05:06

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

相关标签:
21条回答
  • 2020-11-27 05:56

    Finally I fixed this. There was a typo in the server configuration and all paths to php extecutables were fine except the path to php-cli, which caused the error. When I fixed the path, everything worked fine.

    0 讨论(0)
  • 2020-11-27 06:00

    I faced the same problem while using sqlite 3:

    1. Make sure the changes made on .env.example and the same on the .env file.
    2. Then run $ sudo apt-get install php-sqlite3 on terminal.
    3. Finally $ php artisan migrate.
    0 讨论(0)
  • 2020-11-27 06:00

    You need to enable these extensions in the php.ini file

    Before:

    ;extension=pdo_mysql
    ;extension=mysqli
    ;extension=pdo_sqlite
    ;extension=sqlite3
    

    After:

    extension=pdo_mysql
    extension=mysqli
    extension=pdo_sqlite
    extension=sqlite3
    

    It is advisable that you also activate the fileinfo extension, many packages require this.

    0 讨论(0)
提交回复
热议问题