php.ini file and your PHP settings in cPanel

How do I change the PHP environment for my site with php.ini?

Generating a new php.ini file:

    1. Login to your cPanel
    2. Click on the PHP Config icon located under "Software/Services"
      Software / Services
    3. Choose the version of php you will be using
      • PHP 5.2
        All files with the extension .php will be handled by the PHP 5.2 engine.
        Legacy PHP with security updates. Compatible with most environments.
      • PHP 5.2 (Single php.ini)
        Same as PHP 5.2, but all subdirectories will use ~/public_html/php.ini
      • PHP 5.2 (FastCGI)
        All files with the extension .php will be handled by PHP 5.2 FastCGI processes.
        FastCGI for PHP makes all your PHP applications run through mod_fastcgi instead of mod_suphp. This eliminates the overhead of loading the PHP interpreter on every hit. Since it is always in memory ready for the next hit, the responses will be generated faster.
      • PHP 5.3
        All files with the extension .php will be handled by the PHP 5.3 engine.
        Most reliable and compatible version of PHP.
      • PHP 5.3 (Single php.ini)
        Same as PHP 5.3, but all subdirectories will use ~/public_html/php.ini
      • PHP 5.4
        All files with the extension .php will be handled by the PHP 5.4 engine.
        Latest version of PHP.  Note: Source Guardian and Zend Guard Loader not currently supported.
      • PHP 5.4 (Single php.ini)
        Same as PHP 5.4, but all subdirectories will use ~/public_html/php.ini
    4. Choose any extensions you might need for your scripts
    5. Click the "Save Changes" button.

If you have any further questions about configuring the php.ini file, there are extensive descriptions within the file itself. You may also find more help at: http://www.php.net/docs.php

  • 2 Users Found This Useful
Was this answer helpful?

Related Articles

php.ini turn off magic quotes

If you want to have it off, try the following in .htaccess under DSO PHP handler: Code:...

php.ini file for your specific needs

Here is the solution which will help: 1.  Create a “php.ini” file in your...