PHP functions proc_open() and/or proc_close() are disabled

It appeared to me today when installing wordpress using hestiacp

Downloading from https://github.com/wp-cli/wp-cli/releases/download/v2.12.0/wp-cli-2.12.0.phar… md5 hash verified: a592bbf68fc5143bfad5800cb4947253 Error: Cannot do ‘Process::run’: The PHP functions proc_open() and/or proc_close() are disabled. Please check your PHP ini directive disable_functions or suhosin settings. Error: cmd exited with errors

I solved it in the php ini editor

Before
disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dis patch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,exec,system,passthru,shell_exec,proc_open,popen

After
disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_ signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,exec,system,passthru,shell_exec

I removed proc_open,popen from that list and wp reinstalled it.
I don’t know why wp stopped installing, nor why this appeared or if the code was already like this

I would like to know if this influences other things in Hestia PHP, etc. If not, that’s fine, I’ll leave it like this.

Hello, The same thing happened to me.

We look forward to hearing more comments.

Thanks

same thing happened to me just now

proc_open and other functions are disabled by default when using php fpm but using php cli, proc_open should be enabled.

To check if proc_open is disabled in cli (if you get no output, the function is enabled):

grep -r proc_open /etc/php/*/cli/

To check if proc_open is disabled in fpm (you should see the function disabled):

grep -r proc_open /etc/php/*/fpm/

If proc_open is disabled in cli, execute this command:

sudo /usr/local/hestia/install/upgrade/manual/secure_php.sh
1 Like

Thanks its works

2 Likes