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.

I’m SORRY to be difficult, but can you give a bit more explanation about what’s supposed to be showing up here?

I’m actually chasing TWO different problems on different servers.
Hestia5 = some gobbedly gook error
Hestia6 = just some ‘Error 500’

While trying to install WordPress on both.
I DID run apt update and upgrade on Hestia6 today, and I’m not positive that my sury thing is properly fixed. I’ve been trying to do all the verification steps.

I just need to know a bit more about what the ‘grep steps’ and the ‘sed steps’ are doing or are SUPPOSED to do.

The grep steps SHOWS me the disable-functions (I kept searching on DISABLED instead of disable) and I finally put it in there (on Hestia6). and then I nuked the subdomain, and it’s still giving me the ‘error 5’

I GUESS I technically need to go verify that ‘enforce subdomain ownership’ is set to false. I’ll go do that now. THANKS for all you guys do.

I just thikn that the SED steps are supposed to ‘fix things’ for me. I just wanted some basic explanation like 'Each Sed Step should give ZERO print statement’s. I just wanna know what to expect before executing random stuff online :slight_smile: SORRY and thanks again.

hey I got through the proc_open removal thing again. Sorry for taking up bandwidth and trying to resurrect an old thread. THANKS all.

1 Like