Is It Possible To Adjust PHP Limits On Forpsi Web Hosting?

Last updated December 5th, 2023 23:14

Do you have a website on shared hosting with Forpsi and need to adjust specific PHP limits? If your hosting is on a newer Linux server with PHP 8.x, you can easily do it manually. Today, we’ll look on question, if is it possible to adjust PHP limits on Forpsi web hosting, using FTP and the .user.ini file. Specifically, we’ll modify three commonly requested limits: file upload via PHP, max execution time, and, as a bonus, the memory limit.

You’ll need to adjust the first value when using PHP to upload larger files to your website. Generally, this may be necessary, especially when trying to migrate a website using an external plugin. The second value indicates the duration for which a script can run and perform its activities before the server forcibly terminates it.

Is It Possible To Adjust PHP Limits On Forpsi Web Hosting?

If you want to modify PHP values, you’ll need FTP access through any FTP client. You can use a popular program like Filezilla. Here’s how to proceed:

  • Download and install the Filezilla program.
  • Log in to FTP using the program by entering the server name, FTP login, and password.
  • Open the www folder on FTP.
  • On your computer, create a file named user.txt.
  • Upload this file to the www folder on FTP.
  • Rename this file on FTP to .user.ini (dont forget the dot at the beginning).

How to adjust the size of the uploaded file and the maximum execution time for a script

To be able to upload larger files using PHP, you will need two directives. We will demonstrate the upload setting with an example of a value set to 512 MB.

				
					upload_max_filesize = 512M
post_max_size = 512M
				
			

To extend the script’s execution time, add another directive, max_execution_time. Once again, in the example, we will demonstrate increasing the limit to 5000 seconds.

				
					max_execution_time = 5000
				
			

Increase directives if possible at once

Since you will be adjusting PHP limits in a relatively significant way, consider whether you really need it, or if you need to have it set this way all the time. It may pose a certain security risk, and if you only need this increase for a specific activity, remove the directives from the file as soon as possible. This will return the PHP values to the original settings configured by the web server administrator. For the normal operation and basic activities of a website, such large limits are usually unnecessary.

As for the memory limit, which is another relatively requested directive, you can also adjust it using this file. However, first ask yourself whether increasing the memory limit will solve your problem, or if it will only mask it and postpone the solution for another time. It’s not very common for a website to consume, for example, 1 GB of memory, and usually, it indicates a problem in the code. Increase the memory limit only if necessary and only for the specific action or until the memory allocation issue is resolved. The directive for a memory limit of 768 MB looks like this:

				
					memory_limit = 768M
				
			

Is It Possible To Adjust PHP Limits On Forpsi Web Hosting?

Conclusion

As for PHP limits, as you can see, adjusting the values is not particularly complicated. However, it is essential to keep in mind and carefully consider why and for what purpose you are increasing a specific limit. This is not only for the security of your website but also to ensure that, in the end, your website does not begin to overload the shared web server. If you are interested in other directives for the .user.ini file, you can find their list here: List of php.ini directives.

You can make adjustments to directives with the values PHP_INI_USER, PHP_INI_PERDIR, and PHP_INI_ALL using this file.

The website is created with care for the included information. I strive to provide high-quality and useful content that helps or inspires others. If you are satisfied with my work and would like to support me, you can do so through simple options.

Byl pro Vás tento článek užitečný?

Klikni na počet hvězd pro hlasování.

Průměrné hodnocení. 0 / 5. Počet hlasování: 0

Zatím nehodnoceno! Buďte první

Jak užitečný vidíte tento článek.

Sledujte mě na sociálních médiích.

Je mi líto, že pro Vás nebyl článek užitečný.

Jak mohu vylepšit článek?

Řekněte mi, jak jej mohu zlepšit.

newsletter

Subscribe to the Newsletter

Stay informed! Join our newsletter subscription and be the first to receive the latest information directly to your email inbox. Follow updates, exclusive events, and inspiring content, all delivered straight to your email.

Odebírat
Upozornit na
guest
0 Komentáře/ů
Vložené zpětné vazby.
Zobrazit všechny komentáře.

Pokud mi chcete napsat rychlou zprávu, využije, prosím, níže uvedený
kontaktní formulář. Děkuji.

Další Kontaktní údaje