Westhost Logo

Search Articles

Categories

  • Back to PHP (Applications and Scripts)

    How To Change Custom Local PHP Settings


    This article is for cPanel Accounts. Determine where your account is with this guide.

    Keep in mind a lot of errors can be caused by Zend and other PHP extensions that place an “extension” line in the php.ini. If for instance, someone places their php.ini in their public_html directory, this can break Zend Optimizer.

    What should be done when you create a php.ini is copy the server php.ini into your public_html and then modify the necessary lines. This can be done with the following command:

    cat /usr/local/lib/php.ini >> /home/username/public_html/php.ini

    This will take whatever is in /usr/local/lib/php.ini and append it to a php.ini in the respective directory.

    To make a php.ini file recursive you need to place this in a .htaccess file:

    suPHP_ConfigPath /home/<user>/public_html/php.ini

    Replace <user> in the line above with your cPanel / FTP username.



    Related Articles

    Can’t Find what you need?

    No worries, Our experts are here to help.