1

Hi i implemented file upload in the cakePHP files are uploaded fine but my code does not support to upload a file with size more than 1 Mb, i tried in the following way but there is no use.

I added the following lines in the .htaccess file

php_value post_max_size 10M
php_value upload_max_filesize 10M

and added the following lines in the upload() in TestController

 $post_max_size = ini_get('post_max_size');
 $upload_max_filesize = ini_get('upload_max_filesize');     
 LogUtil::$logger->debug('Post Maximum Size :  '. $post_max_size);
 LogUtil::$logger->debug('Upload Maximum Size :  '. $upload_max_filesize);

The loggers does not shown the modified vales for upload max filesize and postmaxsize

Please guide me, Thanks in advance.

user2484678
  • 31
  • 1
  • 5

1 Answers1

1

open php.ini file.

find the upload_max_filesize in your php.ini file.

change the value based on requirement.

save the file.

restart the apache server.

now its working.

jems
  • 93
  • 5