Activities

April 2010
M T W T F S S
« Mar   May »
 1234
567891011
12131415161718
19202122232425
2627282930  

Customizing php local variables on web

I need to reset the php values of ‘upload_max_filesize” to 11MB but the default settings were set to 2MB. But I do not want to change this setting affected globally.

Here are the tips.

1. Create a empty ‘php.ini; file on the web where you want to use the upload size high.

I want upload variable set to 12MB on this web folder (/home/wwwasd/public_html/uploadsfiles) only.
Eg. http://asd.com/uploadfiles
I created a php.ini under ‘/home/wwwasd/public_html/uploadsfiles’ and add the values “upload_max_filesize = 20M”

#vi /home/wwwasd/public_html/uploadsfiles/php.ini
add the following lines and save the file.

upload_max_filesize = 20M

If it is not work in some servers, then you may use the .htaccess files to do that.
Add the value in .htaccess file
php_value variable value

php_value upload_max_filesize 100M

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>