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条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥20 模型在y分布之外的数据上预测能力不好如何解决
    • ¥15 processing提取音乐节奏
    • ¥15 gg加速器加速游戏时,提示不是x86架构
    • ¥15 python按要求编写程序
    • ¥15 Python输入字符串转化为列表排序具体见图,严格按照输入
    • ¥20 XP系统在重新启动后进不去桌面,一直黑屏。
    • ¥15 opencv图像处理,需要四个处理结果图
    • ¥15 无线移动边缘计算系统中的系统模型
    • ¥15 深度学习中的画图问题
    • ¥15 java报错:使用mybatis plus查询一个只返回一条数据的sql,却报错返回了1000多条