PHP ini - Configuring the PHP Environment

January 15, 2014     0 comments

How do I (or can I) change the PHP environment for my site with php.ini?

cPanel PHP Config

  1. Login to your control panel (cPanel login)
  2. Click on the PHP Config icon located under "Software/Services"
  3. Choose the version of php you will be using (details here)
    • 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.
    • PHP 5.4 (Single php.ini) Same as PHP 5.4, but all subdirectories will use ~/public_html/php.ini
    • PHP 5.4 (FastCGI) All files with the extension .php will be handled by PHP 5.4 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.
  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.

How helpful was this article to you?