Re: problems with uploads to wordpress
Michael Adams <[email protected]> Sun, 04 Dec 2011 09:34:24 +1300
| Newsgroups | gmane.org.user-groups.linux.new-zealand.general |
|---|---|
| Message-ID | <[email protected]> |
On Saturday 03 December 2011 13:26, Steve Holdoway wrote:
> >> that's at 8MB already, should it be bigger than
> > >> upload_max_filesize by
> > >> some factor?
> > >
> > > You can also set MAX_FILE_SIZE in a form to limit it. Also,
> > > check that
> >
> > i'm not sure what you mean by "a form"
>
An INPUT HTML Element is a FORM element. MAX_FILE_SIZE is often used
as shown:
<input type="hidden" name="max_file_size" value="500" />
<input type="file" />
May be worth a quick check. Max file size IIUC is set in KB; thus a
value of 500 = 500kb.
> Most uploads are controlled by a button saying 'go'. In the
> pre-ajax world at least. This is encompassed in a <form></form>
> block.
>
> > > the default upload_max_filesize and post_max_size aren't being
> > > overridden either in code or .htaccess.
> >
> > i haven't defined any .htaccess files, where in the code is it
> > likely to be altered? the web searches i ahve found point to
> > wordpress taking whatever is defined by php as the limiting
> > factor
>
> Exactly.
>
> Defaults are in /etc/php.ini ( or in your debian/ubuntu / apache
> case /etc/php5/apache2/php.ini ).
> upload_max_filesize = 2M
>
> Overrides can be put in .htaccess
> php_value upload_max_filesize 2M
>
> Or in php code
> ini_set("upload_max_filesize", "2M");
>
> hth,
>
> Steve
Add this code in ".htaccess":
php_value upload_max_filesize 8M
php_value post_max_size 8M
php_value max_execution_time 100
php_value max_input_time 100
You can increase the file upload limit according to your requirement.
--
Michael
_______________________________________________
NZLUG mailing list [email protected]
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug