dqczgtem06898
2019-08-03 03:10
浏览 66
已采纳

无法连接到mysql - 在InMotion托管上使用PHP 7.1设置Laravel 5.8时出错。 多个PHP版本

I can't seem to get laravel to connect to MySQL using PHP 7.1 and laravel 5.8

Error:

Illuminate \ Database \ QueryException could not find driver (SQL: select * from users

I didn't have this issue using php 5.6 and laravel 5.4 but I'd rather use the new versions!

I did:

composer update

composer require doctrine/dbal

and included extension=pdo_mysql.so in php.ini as well as restart apache

图片转代码服务由CSDN问答提供 功能建议

我似乎无法使用 PHP 7.1 连接到MySQL strong> laravel 5.8

错误:

Illuminate \ Database \ QueryException可以 找不到驱动程序(SQL: select * from users

我没有使用 php 5.6 < / strong>和 laravel 5.4 但我宁愿使用新版本!

我做了:

  composer update 
 
composer需要doctrine / dbal 
   
 
 

并在 php.ini <中包含 extension = pdo_mysql.so / strong> as以及重启apache

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • duanqiao0153 2019-08-03 23:23
    已采纳

    ok this is fixed:

    The server's PHP configuration has been switched to the Apache MPM to "Event" rather than "Prefork" as Prefork is typically only needed on non-FPM servers running Opcache.

    also enabled FPM on my site running php 7.1 as it is typically required when running Opcache on separate PHP versions.

    评论
    解决 无用
    打赏 举报

相关推荐 更多相似问题