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!

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:
    44,344
    Likes Received:
    1,853
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice