Jump to content

Changing the upload limit


UnderHosts

Recommended Posts

i tried making a new php.ini file but that wouldn't work, is there any other to change the upload limit, i just went on the phpinfo but there is no way to edit.

 

thanks.

Is your server running as Apache or cgi? If Apache it needs to be in .htaccess.

Link to comment
Share on other sites

In an .htaccess file in the same directory as the script, include this line:

 

php_value upload_max_filesize

 

where is the size of the allowable upload. For example, if the desired filesize is 20 meg, the following directive would be placed in the .htaccess:

 

php_value upload_max_filesize 20M

 

Remember with .htaccess, this would enable it in the directory you place the .htaccess and every subfolder from that point.

Link to comment
Share on other sites

Howdy,

 

If you have root access and the current PHP upload limit is at 2MB run this bash script at your own risk.

 

 

php -i | grep php.ini | awk {'print $6'} >> phpPath.txt; for i in 
$(cat phpPath.txt);do replace "upload_max_filesize = 2M" "upload_max_filesize = 32M" -- $i; done; rm -rf phpPath.txt

 

 

Thanks,

Adam

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated