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 .

1

3 Answers 3

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
Sign up to request clarification or add additional context in comments.

1 Comment

@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.
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

4 Comments

if i upload this file then show Internal Server Error .
put those lines after RewriteEngine On line
i also use this line on line no 1 .
Please show your entire .htaccess file in your question.
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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.