Google Cloud Compute Engine上的Laravel-找不到驱动程式

时间:2019-03-20 13:53:43

标签: laravel-5 google-compute-engine

在laravel上,我试图建立一个sqlite连接,但是出现了could not find driver错误

.env

DB_CONNECTION=sqlite

我已经创建了文件database/database.sqlite

/etc/php/apache2/php.ini

;extension=php_bz2.dll
extension=php_curl.dll
extension=php_fileinfo.dll
;extension=php_ftp.dll
;extension=php_gd2.dll
;extension=php_gettext.dll
;extension=php_gmp.dll
extension=php_intl.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_ldap.dll
extension=php_mbstring.dll
;extension=php_exif.dll      ; Must be after mbstring as it depends on it
extension=php_mysqli.dll
;extension=php_oci8_12c.dll  ; Use with Oracle Database 12c Instant Client
;extension=php_openssl.dll
;extension=php_pdo_firebird.dll
extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_odbc.dll
;extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
;extension=php_pgsql.dll
;extension=php_shmop.dll

; The MIBS data available in the PHP distribution must be installed.
; See http://www.php.net/manual/en/snmp.installation.php
;extension=php_snmp.dll

;extension=php_soap.dll
;extension=php_sockets.dll
extension=php_sqlite3.dll
;extension=php_tidy.dll
;extension=php_xmlrpc.dll
;extension=php_xsl.dll

我在服务器上安装了php7.0php7.0-mysql

1 个答案:

答案 0 :(得分:0)

我发现我需要使用apt-get安装sqlite

#Params = 3 * dim(W) + 3 * dim(U) + 3 * dim(b) = 3 * 20*13 + 3 * 20*20 + 3 * 20 = 2040