0

upgrade upload_max_filesize

currently show 2M

i Want To 50M

php.ini code

upload_max_filesize=30M;

.htaccess file code

php_value upload_max_filesize 30M

but these file is not work

if i upload .htaccess file then show 500 server error .

please sol this problem thanks .

sanjay joon
  • 133
  • 1
  • 14
  • i don't think you need to change the .htaccess file. possible solustion. http://stackoverflow.com/questions/2184513/php-change-the-maximum-upload-file-size – Amit Sarwara Jun 09 '16 at 08:38

3 Answers3

1

PHP has several configuration options to limit resources consumed by scripts. By default, PHP is set to allow uploads of files with a size of 2MB or less.

Try increasing the following values in php.ini, for example:

memory_limit = 32M
upload_max_filesize = 32M
post_max_size = 32M
Abdul Manan
  • 2,255
  • 3
  • 27
  • 51
  • @AdbulManan has probably diagnosed the problem correctly, so I would check that first. But another possibility is that your /tmp folder does not have the necessary free space to upload the file. Assuming your on a Linux environment, typing `df -h` from the command line should show you how much space you have left there. – Ben Hillier Jun 09 '16 at 08:44
1

If you want to set those values only for specific project then do it in .htaccess file otherwise set values in php.ini file

.htaccess file should be:-

php_value post_max_size 32M
php_value upload_max_filesize 32M
Amit Verma
  • 40,709
  • 21
  • 93
  • 115
Ravi Hirani
  • 6,511
  • 1
  • 27
  • 42
1

set the value of upload_max_filesize and post_max_size in your php.ini:

Maximum allowed size for uploaded files. upload_max_filesize = 50M

Must be greater than or equal to upload_max_filesize post_max_size = 50M

User2403
  • 317
  • 1
  • 5