Page 1 of 1

POST_MAX_FILESIZE

Posted: Tue Mar 31, 2009 9:58 am
by matt1234
What can I do about changing the PHP settings of POST_MAX_FILESIZE, UPLOAD_MAX_FILESIZE on one page or in one folder?

I know ini_set() doesn't work but I also tried a .htaccess file and that doesn't work either

Any other methods?

Re: POST_MAX_FILESIZE

Posted: Tue Mar 31, 2009 11:39 am
by Mark Baker
upload_max_filesize is PHP_INI_PERDIR, meaning it can be set in the php.ini file, .htaccess or httpd.conf

I'm not familiar with POST_MAX_FILESIZE: if you mean POST_MAX_SIZE, then that is also PHP_INI_PERDIR

Re: POST_MAX_FILESIZE

Posted: Wed Apr 01, 2009 10:34 pm
by matt1234
I tested some things and noticed that changing a php setting in htaccess doesn't seem to work for me for some reason

Re: POST_MAX_FILESIZE

Posted: Wed Apr 01, 2009 11:44 pm
by susrisha
couldnt help in detail but i have faced the same problem earlier.. got the solution and posted in my blog..
Have a look at the post
http://fresherlearning.blogspot.com/200 ... s-for.html

Re: POST_MAX_FILESIZE

Posted: Thu Apr 02, 2009 12:18 am
by matt1234
I see that it says if you try using .htaccess to change php settings you have to restart the server. What if I have hosting with a company?

Re: POST_MAX_FILESIZE

Posted: Thu Apr 02, 2009 1:17 am
by susrisha
then its better you go for a php.ini file in the directory where you want to use it rather than .htacess

Re: POST_MAX_FILESIZE

Posted: Thu Apr 02, 2009 1:26 am
by matt1234
You can use a php.ini file in any directory for that specific directory & subdirectories?

Re: POST_MAX_FILESIZE

Posted: Thu Apr 02, 2009 1:57 am
by susrisha
yes

Re: POST_MAX_FILESIZE

Posted: Thu Apr 02, 2009 2:16 am
by matt1234
Ok, I found this http://www.washington.edu/computing/web ... p-ini.htmlbut when I run a phpinfo() in that directory, it says that the configuration file path is my default file in the original directory of my normal one

Re: POST_MAX_FILESIZE

Posted: Thu Apr 02, 2009 2:25 am
by susrisha
have you checked that there will be two columns for each of the variable set.. one is local and the other one corresponding to main ini file ? just have a look and see if your amended rules have been displayed in the local values..

Re: POST_MAX_FILESIZE

Posted: Thu Apr 02, 2009 2:31 am
by matt1234
Checked and they're both the same. Both columns take values from my main file.