天天看点

Laravel踩坑小记

背景: 使用laravel项目的命令行惊现错误 php artisan companycustomerstatisticscommand
排查: 1.浏览器直接访问项目,数据库均能正常访问 2.浏览器查看phpinfo(), 获取到php版本信息 php version 7.2.11-2+ubuntu18.04.1+deb.sury.org+1 3.php -v查看php客户端版本 php 7.3.0rc3 (cli) (built: oct 15 2018 11:37:12) ( nts )
思考: php客户端根php-fpm版本不一致 phpinfo()可以看到php-fpm中已经加载mysql扩展. php命令行php -m | grep mysql无结果,故缺少php客户端版对应的mysql扩展php7.3-mysql
解决过程: sudo apt-get install php7.3-mysql