Enable/Disable PHP open_basedir protection from command line

ugcoder

Registered
Jan 10, 2015
2
0
1
cPanel Access Level
Root Administrator
Hello Devs!

I am writing an automation script for cPanel. But I have got myself stuck at a point. I want to automatically disable PHP open_basedir protection. For that I need to know how to do so from command line.

Please let me know the command if you know.

Thanks in advance.
 

cPanelMichael

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

You can modify the following setting in the /var/cpanel/cpanel.config file:

phpopenbasedirhome=1

Change "1" to "0" to disable the option, and run the following command after saving the file:

Code:
/scripts/restartsrv_cpsrvd
Thank you.