How to enable "proc_open" for one user?

What functions do you have disabled in the php.ini file that php-fpm is using?

Any functions included there cannot be enabled any where else.

So if you have proc_open disabled in your php.ini file, then you won't be able to enable it for any users in their php-fpm pool file.

If you want proc_open enabled for a particular user, then you have to remove proc_open from the php.ini file, then add it to all of the disabled_functions php_admin_value directive for all of the php-fpm pools. Then remove it from the disabled_functions php_admin_value for the pool that you want it enabled on.
 
I have php5 and php 7 installed. I set the settings for php 7 since that is the version I am using.
I restarted the php-fpm.service

Okay I will create a ticket there :eek:
 
Hello, I'm facing the same issue.

An account needs to enable proc_open which is disabled globally.

If I disable it globally it works but if I try an override only for that single user it doesn't work...

The Process class relies on proc_open, which is not available on your PHP installation.

I did the modification as @ditto reported and in my phpinfo() I don't see the function blocked
 

Attachments

  • FireShot Capture 025 - phpinfo.png
    FireShot Capture 025 - phpinfo.png
    30.3 KB · Views: 30
maybe it need "popen"? try te enable it too

nope... popen enabled too but no luck...


./data/users/xxxxxxx/php/php-fpm72.conf

php_admin_value[disable_functions] = exec,system,passthru,shell_exec,dl,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
 
The disable_functions can only be set once in the main php.ini file, and cannot be overridden by other areas. You need to remove it from php.ini file then and set it php-fpmXX.conf for all users with different values.

Note, in this case PHP cli won't have the disable_functions at all.
 
Is this still only option?

I would like to enable proc_close on one account. I need to manually modify every conf on all the accounts on the sever? o_O

DA please have a mercy
 
Last edited:
Hello guys,

Apologies for digging this thread but how do I enable proc_open for a single user on CloudLinux using LSAPI?

Thank you!
 
Last edited:
Back
Top