【问题标题】:PDOException could not find driver using XAMPP laravel project and postgresql on Mac OS X El CapitanPDOException 在 Mac OS X El Capitan 上找不到使用 XAMPP laravel 项目和 postgresql 的驱动程序
【发布时间】:2016-04-15 15:46:19
【问题描述】:

得到"[PDOException] could not find driver" 错误。我正在尝试使用$php artisan migrate 进行迁移

我已尝试将此作为修复 http://www.shaneperera.com/blog/postgres-app-fix-could-not-find-driver-issue/http://coolestguidesontheplanet.com/what-is-sip-in-osx-10-11-el-capitan/ 修复"/usr/lib/php/extensions/no-debug-non-zts-20121212/#INST@17000#: Operation not allowed”错误。仍然得到相同的错误消息。

【问题讨论】:

  • 请添加您的代码以便我们查看问题
  • 您到底需要什么代码?我正在尝试建立一个 laravel 项目来拥有一个 postgresql 数据库。

标签: php macos postgresql laravel xampp


【解决方案1】:

使用postgresql driver set-up 说明解决了这个问题

请注意,用于添加扩展的 php.ini 是 Mac OS X El Capitan 的“/etc/php.ini”位置中的那个。如果它不存在,请将现有的 'php.ini.default' cp 到 'php.ini' 并根据链接上的说明添加新的扩展名。使用 sudo nano 避免权限错误。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-04-24
    • 2016-02-20
    • 1970-01-01
    • 2016-02-02
    • 2015-12-29
    • 2016-07-23
    • 2017-02-20
    • 2015-05-14
    相关资源
    最近更新 更多