commands exec?




[root@vagrant-centos65 advanced]# ./yii


This is Yii version 2.0.6.


The following commands are available:


- asset                        PHP Warning 'yii\base\ErrorException' with message 'exec() has been disabled for security reasons'


in /home/wwwroot/advanced/vendor/yiisoft/yii2/helpers/BaseConsole.php:620


Stack trace:

#0 [internal function]: yii\base\ErrorHandler->handleError(2, 'exec() has been...', '/home/wwwroot/a...', 620, Array)

#1 /home/wwwroot/advanced/vendor/yiisoft/yii2/helpers/BaseConsole.php(620): exec('stty -a 2>&1', Array)

#2 /home/wwwroot/advanced/vendor/yiisoft/yii2/helpers/BaseConsole.php(661): yii\helpers\BaseConsole::getScreenSize(false)

#3 /home/wwwroot/advanced/vendor/yiisoft/yii2/console/controllers/HelpController.php(214): yii\helpers\BaseConsole::wrapText('Allows you to c...', 31)

#4 /home/wwwroot/advanced/vendor/yiisoft/yii2/console/controllers/HelpController.php(67): yii\console\controllers\HelpController->getDefaultHelp()

#5 [internal function]: yii\console\controllers\HelpController->actionIndex(NULL)



If you did your homework and searched for the error, then you would have discovered what is wrong.

Is PHP safe mode turned on?

If it is, turn it off.

It’s not about safe mode. Its about the exec() function that is disabled in php.ini (listed in disable_functions block)

I think that we can agree that it is all about searching for the error on Google/Bing/Duck…

You are wrong, my friend:

http://php.net/manua...e.functions.php

‘exec()’ is indeed one of the things that safe mode disables.

But since it has been removed in 5.4, it could be something else.

My recommendation was simply to get started solving the problem.

And the main tool that I recommend is the great Google.