Can I override php.ini/.user.ini settings?

Note: On our new platform, custom PHP settings need to be declared in a file called .user.ini, not php.ini. If you have a php.ini file, you will need to rename it to .user.ini in order for it to work.

Most of the variables in the .user.ini file can be overwritten to allow you to customise the PHP environment for your hosting. You can do this by creating a .user.ini file and uploading to the directory you want to use this in. There are no special permissions needed to create this file and you won't need a full copy of the existing file, you can simply enter the directives/parameters you want to change.

To make sure this takes effect, ensure that your file is named .user.ini (.ini being the file extension) and then add your directives in the following format:

variable_name = variable_value ;

Using this method you can update settings such as the maximum filesize to upload, maximum execution time for script etc.

upload_max_filesize = 20M ;
post_max_size = 20M ;
max_execution_time = 60 ;

This file will take effect from the location this is uploaded to, for this to update the settings for your entire site upload to the level above the public_html folder.

  • 0 Utilizadores acharam útil
Esta resposta foi útil?

Artigos Relacionados

Is PHP a CGI or Apache module?

PHP runs as a CGI at GreenBackEnd Hosting. This is because it is more secure than running it as...

Can I place a PHP script in any directory I choose?

Yes. PHP scripts do not have to reside in any particular directory and will run anywhere in your...

What are the correct file permissions for a PHP file?

As a general rule, the permissions of a PHP file should take one of two sets of values, either...

Does GreenBackEnd Hosting support Image::Magick?

Yes we do, and in case you need to know the exact version number, at the time of writing, the...

What is the path to sendmail?

Should you need the absolute path to sendmail for use in a CGI script, it's in../usr/sbin/sendmail