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.

Php.ini diffrent

Discussion in 'General Discussion' started by gestinfo, Jun 26, 2011.

  1. gestinfo

    gestinfo Member

    Joined:
    Jun 26, 2011
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Hi,
    Some basic questions to host multiple domains (yes I searched) ... If the sites need different PHP.INI settings, how do you handle?

    i have VPS XEN

    thanks for you Help
     
  2. Kristian0911

    Kristian0911 Member

    Joined:
    Jan 17, 2011
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    Copy the main php.ini file under domain name document root folder as ".home/username/public_html/" folder and make the changes as per requirement.

    Thanks :)
     
  3. gestinfo

    gestinfo Member

    Joined:
    Jun 26, 2011
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Just copy file php.ini ,,, no other modification ??
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Assuming you are using suPHP, you can use the following steps:

    1) Create a .htaccess file in the "/home/username/" directory for the account you would like to have custom php.ini settings on.

    EX:

    Code:
    # touch /home/username/.htaccess
    Note: If you create the file via the command line as "root", ensure you adjust the ownership of the file:

    Code:
    # chown username.username /home/username/.htaccess
    2) Add the following line to the .htaccess file mentioned in step 1:

    Code:
    suPHP_ConfigPath /home/username/
    This will ensure suPHP uses the custom php.ini within the "/home/username/" directory for every PHP page in the entire "username" account.

    3) Copy the server's default php.ini file to the account:

    Code:
    # cp /usr/local/lib/php.ini /home/username/php.ini
    4) Adjust the ownership of the copied php.ini file:

    Code:
    # chown username.username /home/username/php.ini
    5) Edit "/home/username/php.ini" to make the desired changes for the account.

    Thank you.
     
  5. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
  6. gestinfo

    gestinfo Member

    Joined:
    Jun 26, 2011
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Y'a t'il quelqu'un qui peut le faire pour moi ,, je suis pret a debourser

    merci a l'avance
     
  7. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    You haven't stated which PHP handler is being used on the machine? Are you using DSO, suPHP, CGI or FCGI for the PHP handler?

    Also, it might be difficult for most others to understand your last response since it was in French. I actually know some French and I believe you are basically asking if someone would do it for you for payment. Personally, we cannot do that on the forum here for you.

    You may be better off letting us know your PHP handler in WHM > Apache Configuration > PHP and SuExec Configuration area and following the steps on how to handle adding individual php.ini files given Michael's directions. Otherwise, you could hire someone from our system admin and developers catalog:

    Dev & Sys Admin Services « Application Catalog
     
Loading...

Share This Page