douji2520 2018-10-22 21:13
浏览 189

PHP Artisan Command在CentOS 7上没有使用php-fpm在Nginx中工作

Just finished setting up a LEMP (Linux, Nginx, MySQL and PHP) environment in a CentOS server. And after uploading a Laravel app everything seemd to be working correctly.

I needed to execute a php artisan command via SSH, and when i did i noticed that the command wasn't being executed correctly. When i execute an artisan command in the application's folder i get the following message:

> php artisan
Usage: php [-n] [-e] [-h] [-i] [-m] [-v] [-t] [-p <prefix>] [-g <pid>] [-c <file>] [-d foo[=bar]] [-y <file>] [-D] [-F [-O]] 
(...)

I have php installed correctly and the app is running normally:

> php -v
PHP 7.1.8 (fpm-fcgi) (built: Aug  9 2017 13:21:53)
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies

What can be the issue?

UPDATE: As @Devon suggested, i was not using the php-cli. So in order to solve my issue i installed php-cli in the server and everything is working as expected.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 求解 yolo算法问题
    • ¥15 虚拟机打包apk出现错误
    • ¥30 最小化遗憾贪心算法上界
    • ¥15 用visual studi code完成html页面
    • ¥15 聚类分析或者python进行数据分析
    • ¥15 三菱伺服电机按启动按钮有使能但不动作
    • ¥15 js,页面2返回页面1时定位进入的设备
    • ¥50 导入文件到网吧的电脑并且在重启之后不会被恢复
    • ¥15 (希望可以解决问题)ma和mb文件无法正常打开,打开后是空白,但是有正常内存占用,但可以在打开Maya应用程序后打开场景ma和mb格式。
    • ¥20 ML307A在使用AT命令连接EMQX平台的MQTT时被拒绝