Secrets on How Twitter Can Help You Increase Newsletter Signups17 March 2015
How Entrepreneurs Can Gain a Fresh Business Perspective17 March 2015
Different software will require you to have custom php .ini file or have a customized PHP configuration which can differ from increasing the upload limit and even adjusting the memory limit. Fortunately, as much as you cannot be able to make these chances on a server wide basis, you can do the same locally from within your account. All you have to do is follow these easy steps and you will be ready to go in no time.
Please note: In order for the changes of the create user.ini file to reflect on all the sub folders within a given directory, a separate user.ini has to be created for each directory.Ideally, if the file created is within say the public_html folder, the changes will only impact the software that is installed in the targeted folder. Any other installations that are made to a subfolder herein like say public_html/blog are not affected.
On that note, here is a step by step guide on how you can be able to create your own user .ini.
- Begin with opening up the file manager in the control panel. This will differ but in most cases, this is the SiteAdmin or the cPanel. Make sure that the hidden files are visible and that you are in the public_html directory. This is indicated by the www.
- To create your new .user.ini file, head to the top of the page and click on New File. This allows you to access the tool that you will use in the creation process.
- Once you click on the New File icon, there will be a pop up. This will require you configure and name the new file. Add the text .user.ini in the New File Name box without forgetting the dot that appears before the word user in the filename.
- Just like that, you have created a file for .user.ini. Since that is now complete, you will be required to add the lines that you would like customized and edit the file. To highlight the file, locate it on the file list and click on it just once.
- After highlighting the desired file, click on the Edit link which you will find at the top of the page.
- By doing this, you will have opened the file editor which now allows you to input your custom configuration settings. Because the .user.ini file has just been created, do not be concerned to see it being empty. Take the line from the server-wide php.ini file that you intend to change as well as the new value.
In those simple and easy to follow steps you now have your own custom .user.ini file and the website will now be able to use the custom PHP configurations changes that you have added. Some of the most common lines that need altering from time to time when you are making your PHP changes include;
Customizing the Memory Limit
Even though there is not a set limit, it is highly recommended that users stick to about 128M. This guide should walk you through the process of being able to increase your memory.
Once you have set up your .user.ini file, the next step is to open up the file using your preferred command line editor and therein input,
The changes should take place instantaneously without restarting the web server.
Adjusting your Max Upload
Ideally, 128MB is the standard default for reseller, managed and shared VPS but you can readjust these to about 2GB.
Using your preferred command line editor, input the following line after your .user.ini. file has been set up and is open.
You can set these to whatever value you like and the changes are prompt without requiring the web server to be restarted.
Note; if you use the POST method, you will be required to increase the post_max-size and the upload_max_filesize concurrently. Ensure that you set the former at a slightly higher value than the latter as recommended by PHP.
Adjusting the Post Max Size
The default value for this in most VPS is still 128MB but can be adjusted to about 2GB max. You set the value for this higher than that of the upload_max_filesize for everything to be configured properly.
Using the same procedure as above process, input the following line into the opened.user.ini file using your preferred command line editor.
The changes are prompt and not web server restart in required.
Adjusting the Max Execution Time
This refers to the maximum time in seconds that a PHP script can be allowed to run. Usually, it is set to around 60 seconds by default and when the time runs out you should experience a PHP error. However, given different circumstances, the 60 seconds can be exceeded.
Using the same criteria as above, input;
The value here can be as long as you wish. However, it is worth remembering that servers are meant to terminate any PHP connections that take longer than 30 minutes.
Changing the Max Input Time
This is the maximum amount of time in seconds that a PHP script can be allowed to receive or accept input and it is usually set at 60 seconds.
After you open the .user.ini file, user your preferred command line editor to insert this line;
The value here is also unlimited but the server protocol is the same as that of the max execution time.
Adjusting the Register Globals Value
In PHP 5.3, this option was deprecated and it is not available in PHP 5.4. It is NOT recommended to enable this either way even though some of the older scripts might have it.
Adjusting Your Magic Quotes
The same scenario as that of the Register Global Value applies in this case and it is equally not recommended to enable this.