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!

how can enable additional phpini in php 5.4 for a user

Discussion in 'General Discussion' started by mehdi, Aug 29, 2015.

  1. mehdi

    mehdi Registered

    Joined:
    Aug 29, 2015
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    usa
    cPanel Access Level:
    Root Administrator
    hello my dear friends
    im a linux server admin
    i wnat enable additional phpini for a user in php 5.4 for enable open base_dir
    thanks
     
  2. JacobPerkins

    JacobPerkins Well-Known Member

    Joined:
    May 2, 2014
    Messages:
    619
    Likes Received:
    96
    Trophy Points:
    103
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Hi,

    If you want to allow your customers to use custom php.ini files, you will need to ensure you're running SuPHP as your PHP handler, and you'll need to add the following snippet into your htaccess file located at '/home/user':
    Code:
    # Add the following to your .htaccess
    ########## Begin - use custom php.ini
    suPHP_ConfigPath /home/username/public_html
    <Files php.ini>
    order allow,deny
    deny from all
    </Files>
    ########## End - use custom php.ini 
     
  3. mehdi

    mehdi Registered

    Joined:
    Aug 29, 2015
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    usa
    cPanel Access Level:
    Root Administrator
    hello again thank you for answer
    i enabled it and i have a question
    after enable this config can i disable or enable a php function for a user ?
    can you show me a example ?
    thanks
     
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,749
    Likes Received:
    1,885
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello :)

    Could you provide an example of what type of PHP function you wan to enable or disable? Are you referring to a PHP module or a function that's included in the disable_functions line in the php.ini file? Note you may find this thread helpful if your goal is to increase security:

    https://forums.cpanel.net/threads/methods-to-increase-security-on-suphp-restricting-who-can-use-php-ini-files.167186/

    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