How to Chage Php Config in Cpanal

Discussion in 'Site & Server Administration' started by remorex007, Dec 21, 2009.

  1. #1
    Hello Friends i'm new to cpanal i like to change my php configuration in cpanal any one here can tell me how to change.

    when i search in google i got this link

    /usr/local/cpanel/bin/rebuild_phpconf

    how to enter into that place can any one tell me how to goto that place.
     
    remorex007, Dec 21, 2009 IP
  2. Hostwaresupport

    Hostwaresupport Guest

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hello,

    If you have ssh access to your server. You can run following command which will give you path to your php.ini file which is php configuration file. Either way you can edit your php configuration in WHM

    1. php -i | grep php.ini

    You can edit this file using editor like vi, nano etc. and can change settings

    2. vi /usr/local/lib/php.ini

    However, edit this file if you know what you are doing, otherwise I would like to suggest to take help of any expert.

    Thanks
     
    Hostwaresupport, Dec 22, 2009 IP
  3. krishmk

    krishmk Well-Known Member

    Messages:
    1,376
    Likes Received:
    40
    Best Answers:
    0
    Trophy Points:
    185
    #3
    You should see an option in your cpanel which says "PHP Configuration" or "php.ini QuickConfig" under the "Software/Services" section. This was on cpanel version 11. Might look different for you if you are using a different version.

    If you are on shared hosting some settings cannot be changed.
     
    krishmk, Dec 22, 2009 IP
  4. SecureCP

    SecureCP Guest

    Messages:
    226
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    If PHP is running as a DSO, you can also try php_flag and php_value in .htaccess as well. Any of the above will work too.
     
    SecureCP, Dec 22, 2009 IP
  5. kailash

    kailash Well-Known Member

    Messages:
    1,248
    Likes Received:
    42
    Best Answers:
    0
    Trophy Points:
    190
    #5
    To make the changes in PHP configuration, you will need the root access of the server. The default location of php.ini is /usr/local/lib/php.ini for cPAnel server. You may also need to recompile Apache and PHP to enable/disable options.

    Kailash
     
    kailash, Dec 22, 2009 IP
  6. RHS-Chris

    RHS-Chris Well-Known Member

    Messages:
    1,007
    Likes Received:
    35
    Best Answers:
    10
    Trophy Points:
    150
    #6
    You need to use WHM for this, not cPanel. Once you log into WHM, you can go to:

    Main >> Service Configuration >> PHP Configuration Editor
     
    RHS-Chris, Dec 22, 2009 IP