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

I’m getting this error when I’m trying to setup a new wordpress site on a subdomain

Cannot do ‘Process::run’: The PHP functions proc_open() and/or proc_close() are disabled.

I tried apt update and upgrade. Rebooted.
I did notice some WARNING from yuri that I had a mismatch on something, I wish I had taken a screenshot on that. I just hit q to continue (that was my only option)

I deleted the subdomain webs and recreated them

Most of my other sites appear to be functional
I really forgot to block SSH logins, I normally have that firewall rule disabled. But I forgot to re-enable the ‘block SSH’ firewall rule, so it’s been open for a few weeks

yeah. I removed proc_open from the disabled functions list in config > webserver > php > advanced

Now the site creation process appears to be working better

And ideas on WHY proc_open was in my disabled functions list?
or whether my fix was a good idea?

Hestia disables several functions to avoid security issues.

❯ grep -A3 Disable /usr/local/hestia/bin/v-add-web-php
# Disable exec and other harmfull php functions
sed -i "s/disable_functions =.*/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,proc_open,popen/g" /etc/php/$version/fpm/php.ini

sed -i "s/disable_functions =.*/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/g" /etc/php/$version/cli/php.ini
1 Like

so why am I getting an error when I try to install wordpress?

THAT is the issue. for some reason WordPress was failing to install.
Should I add proc_open back to the disabled_functions list?
Do I need to do this for EACH version of Php?

thanks so much

1 Like

Because seems you are using the normal install (you are not using quick install) that uses PHP-FPM and Wordpress wants to use the function proc_open but it is disabled. If you use PHP CLI you won’t have this issue because proc_open is not disabled in PHP CLI.

Yes, you should.

Only for the one you are using to install Wordpress.