Undefined variable $output in Symfony Component Co

2019-09-02 08:35发布

问题:

I tried to run symfony console command, but I've got an error:

Notice: Undefined variable: output in /var/www/.../vendor/symfony/symfony/src/Symfony/Component/Console/Helper/DialogHelper.php line 411

I have no idea, why it went wrong.

Can anyone help?

回答1:

I've solved the problem: this error appears because exec() and shell_exec functions was disabled in php.ini file. To enable this functions you have to edit this string:

disable_functions =exec,passthru,shell_exec,system,proc_open

and delete exec, shell_exec:

disable_functions =passthru,system,proc_open