What is php.ini ?
The php.ini file and changing PHP Settings
The php.ini file is a special file for PHP and various flavors such asÂ suPHP (pronounced sue-p-h-p,Â This secure environment makes 777 file permissions unacceptable, and makesphp.ini necessary.).
The php.ini file is where you declare changes to your PHP settings. You can use the default settings for the server, change specific settings by editing the existing php.ini, or create a new text fileÂ and name it php.ini.
The server is already configured with standard settings for PHP that have been selected by our administrators to be the most optimal setting for a majority of our customers. Unless you specifically need to change one or more of the settings, there is no need to create or modify a php.ini file. If the php.ini file does not exist in your account, then your site will use the default PHP settings defined on the server.
Making Changes - Best Practices
It is best if you have a copy of the default php.ini file in your cPanel Home directory (
/home/username/) and then make changes to that file. (See below for file location for Plesk.)
Location of custom php.ini
The copy of the default php.ini file would need to be located in the following location:
- Plesk for VPS:
Be sure to replace "username" with your actual cPanel user name, and "$DOMAIN" with your actual domain.
Making Changes via cPanel's php.ini QuickConfig
You can also make changes to php.ini via the "php.ini QuickConfig" utility in the "Software/Services" section of your cPanel.
- Login to cPanel.
- Click onÂ php.ini QuickConfig in the "Software/Services" section.
- Enable QuickConfig if not already enabled.
- Change the settings that you want to change.
- Click theÂ Save Changes button to save your changes.
Making Changes - Alternate Method for cPanel
Instead of having us create and setup the php.ini file for you, you can place your php.ini file in your Home Directory (
/home/username/) yourself and then add this code to your primary .htaccess (
Be sure to replace "username" with your actual cPanel user name.
Some common changes that you must make when moving from non-secure php environment to suPHP:
For example, if your site had these settings in aÂ
SuExec users must put them in aÂ
php.inifile instead. Here is the proper syntax:
Was this answer helpful?
How to Open an ftp Connection to a Remote System Ensure that you have ftp authentication....
How to enable Update now button for Awstats CATEGORIES: CPANEL, GENERAL, WHM Cpanel login...
How to whitelist an IP Address in ConfigServe Firewall (CSF) config server Firewall (CSF) allows...
Uploading to an Addon Domain To upload to an addon domain with an FTP client you have 2 options...
How to install OpenManage Server Administrator (OMSA) on VMware to collect logs 1. Download Dell...