POST_MAX_FILESIZE

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
matt1234
Forum Commoner
Posts: 44
Joined: Wed Nov 26, 2008 9:43 pm

POST_MAX_FILESIZE

Post 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?
Mark Baker
Forum Regular
Posts: 710
Joined: Thu Oct 30, 2008 6:24 pm

Re: POST_MAX_FILESIZE

Post 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
matt1234
Forum Commoner
Posts: 44
Joined: Wed Nov 26, 2008 9:43 pm

Re: POST_MAX_FILESIZE

Post 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
User avatar
susrisha
Forum Contributor
Posts: 439
Joined: Thu Aug 07, 2008 11:43 pm
Location: Hyderabad India

Re: POST_MAX_FILESIZE

Post 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
matt1234
Forum Commoner
Posts: 44
Joined: Wed Nov 26, 2008 9:43 pm

Re: POST_MAX_FILESIZE

Post 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?
User avatar
susrisha
Forum Contributor
Posts: 439
Joined: Thu Aug 07, 2008 11:43 pm
Location: Hyderabad India

Re: POST_MAX_FILESIZE

Post by susrisha »

then its better you go for a php.ini file in the directory where you want to use it rather than .htacess
matt1234
Forum Commoner
Posts: 44
Joined: Wed Nov 26, 2008 9:43 pm

Re: POST_MAX_FILESIZE

Post by matt1234 »

You can use a php.ini file in any directory for that specific directory & subdirectories?
User avatar
susrisha
Forum Contributor
Posts: 439
Joined: Thu Aug 07, 2008 11:43 pm
Location: Hyderabad India

Re: POST_MAX_FILESIZE

Post by susrisha »

yes
matt1234
Forum Commoner
Posts: 44
Joined: Wed Nov 26, 2008 9:43 pm

Re: POST_MAX_FILESIZE

Post 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
User avatar
susrisha
Forum Contributor
Posts: 439
Joined: Thu Aug 07, 2008 11:43 pm
Location: Hyderabad India

Re: POST_MAX_FILESIZE

Post 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..
matt1234
Forum Commoner
Posts: 44
Joined: Wed Nov 26, 2008 9:43 pm

Re: POST_MAX_FILESIZE

Post by matt1234 »

Checked and they're both the same. Both columns take values from my main file.
Post Reply