我正在尝试部署我的离线 Laravel 5 网络应用程序。首先,我在 DigitalOcean 创建了一个新的 droplet。通过 ssh 访问,我安装了一个完全可用的 LAMP 堆栈(我在我的 ip 地址上获得了 apache 测试页面)。
之后,我将我的 git 存储库拉入 /var/www/html
文件夹。使用 composer install 我的所有依赖项都已安装。
当我访问 my-ip-addres/public 时,出现 laravel 错误
PDOException in Connector.php line 55: could not find driver
我想也许我的 PDO 模块没有正确安装,但是当我查看我的 phpinfo()
文件时,一切看起来都是正确的。
有没有人可以帮我解决这个问题?
最佳答案
运行此命令 sudo apt-get install phpX-mysql
X: php version (7.0 or 5.6 or ...) 然后 service apache restart
。
关于php - 使用 DigitalOcean 在 CentOS 7 上安装 laravel 5 时找不到 PDO 驱动程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34481974/