How do I set php.ini variables for my application?
Posted by Arvand Sabetian (Import) on 18 July 2009 08:39 PM
This is for Linux hosting accounts only!|
variable = value;
variabl2 = value2;
Where variable and variable2 are php.ini variables. For example, if you need to set the memory_limit to 128M and post_max_size to 64M, you would put the following inside your php.ini file -
memory_limit = 128M;
post_max_size = 64M;
Here is another example of a php.ini file content
max_execution_time = 60
memory_limit = 256M
upload_max_filesize = 256M
post_max_size = 256M
Make sure to upload the php.ini beside the script that is being called from the browser. The php.ini must exist in the same directory.
More common variables are:
After you created the php.ini file, you can now create the phpinfo.php file with these 3 lines in it, which will show you if the settings you created are correct: