How to enable "proc_open" for one user?

sparek

Verified User
Joined
Jun 27, 2019
Messages
136
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.
 

zakazak

Verified User
Joined
Dec 20, 2018
Messages
21
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:
 

tundasrl

Verified User
Joined
May 17, 2008
Messages
36
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

tundasrl

Verified User
Joined
May 17, 2008
Messages
36
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
 

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
14,255
Location
GMT +7.00
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.
 

xerox

Verified User
Joined
Jul 16, 2019
Messages
93
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:

justjosh

Verified User
Joined
Oct 13, 2019
Messages
19
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:
Top