Page 1 of 1

Change upload_max_filesize for specific customer/website

Posted: Wed Nov 16, 2016 5:16 pm
by Spheerys
Hi,

Is it possible to change the upload_max_filesize only for specific customer or website, instead of changing it globally on /etc/php5/{apache2,cgi,cli}/php.ini file ?

Re: Change upload_max_filesize for specific customer/website

Posted: Mon Nov 21, 2016 3:35 pm
by Naldinho
Yes it is possible -- I've seen ISPs do it using a user.ini file which is a user specific php.ini -- I've never done it myself nor do I know anything about how to configure that but it is possible.

Re: Change upload_max_filesize for specific customer/website

Posted: Mon Nov 21, 2016 4:36 pm
by Spheerys
You mean create a user.ini file on the /public_html directory, with specific directive should works ?
I don't think so, because if the admin sys set globally a upload_max_filesize (for example) to 10Mo, he probably don't want specific user can set this parameter to 500Mo.

But maybe I'm wrong !
I'll test it :)

Re: Change upload_max_filesize for specific customer/website

Posted: Wed Nov 23, 2016 6:07 am
by skurudo
Spheerys wrote:You mean create a user.ini file on the /public_html directory, with specific directive should works ?
I don't think so, because if the admin sys set globally a upload_max_filesize (for example) to 10Mo, he probably don't want specific user can set this parameter to 500Mo.
If you use php as cgi / fcgi you can add to users separate php.ini files with own values.

In other case, you can edit /home/$user/conf/web/apache2.conf (or httpd.conf) and add upload_max_filesize value. But remebmer, if you will rebuild user or WEB those changes will be lost.