Important: This article applies to customers with shared hosting.
Overview
- How do I modify the PHP settings in my package?
- Customizing PHP on Windows Hosting Packages
- Are there any specific settings that should be included in the php.ini file?
- Do I need to change the file permissions once it is uploaded?
- How quickly do the new settings take effect?
- Where can I go for more information on settings for the php.ini file?
- What is the file name and type I would make?
With our Web Hosting package, you can modify the default PHP settings for your package. Default values for PHP are modified with a custom php.ini file that can be created and then uploaded into the cgi-bin folder of the hosting package's root folder.
Our support staff are not able to provide support for modifications to the php.ini file. For that reason, we strongly recommend that you make a backup of any existing php.ini file, if one exists, before making modifications. To make these changes, you will need access to the server via an FTP client and have access to Notepad on a PC or TextEdit on a Mac.
How Do I Modify the PHP Settings in my Package?
Follow these instructions to modify the PHP settings of your package:
2. Navigate to the /cgi-bin folder, locate and then download the file, php.ini.
3. Open the file with the appropriate text editor. If the .ini file does not exist, then create a new file and save the file as php.ini.
Note: The file name must be lowercase.
- memory_limit = 128M
- output_buffering = 2048
Customizing PHP on Windows Hosting Packages:
Make a .user.ini file within the www (root web) folder for PHP changes. The syntax of the file contents is the same as a Unix package—the settings take effect almost immediately.
-
Example: memory_limit = 128M
Note: Windows users can choose the desired version of PHP by using the PHP Manager available in the IIS Manager or by modifying the *.php handler order in your web.config file.
Note: Please review the frequently asked questions related to custom modifications of your PHP settings.
Are there any specific settings that should be included in the php.ini file?
The settings in the /cgi-bin/php.ini override all of the settings from the server's php.ini. You should include all settings as listed above.
Note: If any of your custom settings adversely affect other users on the server, the settings may be removed or your packages suspended.
Do I need to change the file permissions once it is uploaded?
Once the file is uploaded, the default permissions on the file will allow it to work without making any changes. For security reasons, we recommend that you reset the file permissions to the lowest possible permissions that will allow it to function, which is 500 (-r-x --- ---).
How quickly do the new settings take effect?
The new settings take effect once you delete the php.ini.coalesced file within the /cgi-bin/.php folder. Otherwise, the change is instant. You can then verify your settings by using a standard PHP info command, run from a normal PHP file in the /htdocs folder. Click here for more detail.
Where can I go for more information on settings for the php.ini file?
For more information on php.ini settings, click here to visit visit the PHP Release website. Also, search the term php.ini using any major search engine.
What is the file name and type I would make?
The file name, which is Case sensitive, is php.ini—all lowercase. The file type is a standard text document with no encoding. You would not call functions like in PHP code, but simply define them as documented in the example.