Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Enable/Disable PHP open_basedir protection from command line

Discussion in 'cPanel Developers' started by ugcoder, Apr 17, 2017.

Tags:
  1. ugcoder

    ugcoder Registered

    Joined:
    Jan 10, 2015
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    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.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,419
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page