0

I want to upload big file in my admin panel but not in every where and public users access to upload big file ,
I use ini_set in my core.php , bootstrap , controller , ... but its not working for me ,
My ini_set is :

ini_set("memory_limit","300M");
ini_set('upload_max_filesize','200M');
ini_set('post_max_size', '20M');
ini_set('max_execution_time', '200');
ini_set('max_input_time','200');

Thanks

ali786
  • 142
  • 3
  • 10

2 Answers2

2

Your problem has nothing to do with CakePHP. Values like "upload_max_filesize" cannot be changed using ini_set(). Your question is already answered here.

Community
  • 1
  • 1
ADmad
  • 8,102
  • 16
  • 18
  • are you say i cannot change "upload_max_filesize" on the fly and only put it in .htaccess or php.ini ? – ali786 Sep 29 '12 at 08:18
  • my problem is i dont want access public user to upload big file . – ali786 Sep 29 '12 at 08:20
  • Yes you cannot change that value from php script itself. So set it to whatever max. value you want from php.ini or .htaccess and then add validations in your application to prevent public users from uploading large files. In HTML5 you can add client side validation too. – ADmad Sep 29 '12 at 11:14
0

Are you/cakephp setting the ini values inside of a .htaccess file as well? Could be some sort of overriding happening.

ge0man
  • 546
  • 3
  • 4
  • i can put & use ini in my .htaccess and its working but i do not want public user access uploading big file . – ali786 Sep 29 '12 at 06:40