質問

Puttyを使用して、コマンドラインを使用してコンパイラモードを管理したいのですが、受け取った回答は常にコンパイラヘルプです。

myuser@serv01 [~]# php public_html/shell/compiler.php state
Content-type: text/html

Usage:  php -f compiler.php -- [options]

state         Show Compilation State
compile       Run Compilation Process
clear         Disable Compiler include path and Remove compiled files
enable        Enable Compiler include path
disable       Disable Compiler include path
help          This help

私は何が間違っているのですか?

役に立ちましたか?

解決

この問題は、PHP構成に関連しています。 Magento Shell Scriptが使用します $_SERVER['argv'] 特定のシェルスクリプトを実行する変数(Shell/Abstract.phpを参照)。有効にする必要があります register_argc_argv 設定 php.ini PHPがCLIモードで実行されていない場合。

register_argc_argv = On

追加作成 test.php デバッグのためにこれらの行をファイルして追加します。

echo php_sapi_name();//this should be printed as "cli"
print_r($_SERVER['argv']);// this should print out arguments

スクリプトを実行します php -f test.php some extra args

結果がない場合は、スクリプトを実行しようとします。

ライセンス: CC-BY-SA帰属
所属していません magento.stackexchange
scroll top