Setting open_basedir = ~/public_html in php.ini results in access denied

PeteS

Well-Known Member
Jun 8, 2017
380
85
78
Oregon
cPanel Access Level
Root Administrator
Ummm... Are you saying it must be set per user, in their own php.ini file? (I also noted there was a bug in v66 relating to this; possibly that's what you are referring to?) Why do that doc specify "~/public_html" if it doesn't work? (It actually seems exactly right to me, but it doesn't work.)

Maybe this will help: I'm using FPM on some sites (that works per the docs), and some CGI handler (fails). FastCGI mod is installed but doesn't show as an option in non-FPM handlers. SuPHP no installed because it's 5 years out of date. mod_ruid no installed.

I'm sure I'm just not understanding something correctly...
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello,

The documentation includes the following note:

This setting only affects servers that use the mod_php Apache module.
Thus, the documented setting is only application to mod_php (DSO). If you are using a PHP handler other than DSO, then you must set that value for each account in their individual php.ini files as noted in the thread linked in my last response. The exception to that is PHP-FPM, as with PHP-FPM you must set the value using the instructions on the following post:

PHP-FPM configuration settings

Thank you.