[Labs-l] PHP upload file size

YiFei zhuyifei1999 at gmail.com
Mon Nov 16 00:12:24 UTC 2015


For an easier way, as php loads .user.ini from cgi directory, for "commonsarchive" (formally a MediaWiki install on tool labs), I wrote in /data/project/commonsarchive/public_html/w/.user.ini:

upload_max_filesize = 100M
post_max_size = 100M

It should work without restarting webservice.

> On Nov 16, 2015, at 1:56 AM, Ricordisamoa <ricordisamoa at openmailbox.org> wrote:
> 
> I made it work assuming "myproject" is the tool's name, e.g. "commonshelper" then putting this in /data/project/myproject/php.ini
> 
> post_max_size = "16M"
> upload_max_filesize = "4M"
> 
> and this in /data/project/myproject/.lighttpd.conf
> 
> fastcgi.server += ( ".php" =>
>         ((
>                 "bin-path" => "/usr/bin/php-cgi -c /data/project/myproject/php.ini",
>                 "socket" => "/tmp/php.socket.$tool",
>                 "max-procs" => 2,
>                 "bin-environment" => (
>                         "PHP_FCGI_CHILDREN" => "2",
>                         "PHP_FCGI_MAX_REQUESTS" => "500"
>                 ),
>                 "bin-copy-environment" => (
>                         "PATH", "SHELL", "USER"
>                 ),
>                 "broken-scriptfilename" => "enable",
>                 "allow-x-send-file" => "enable"
>          ))
> )
> 
> Then webservice2 restart
> 
> Perhaps there's a simpler way...
> 
> Il 14/11/2015 22:07, Magnus Manske ha scritto:
>> How can I change the upload_max_filesize and post_max_size values (usually in php.ini) for a tool (using lighttpd)?
>> 
>> 
>> _______________________________________________
>> Labs-l mailing list
>> Labs-l at lists.wikimedia.org
>> https://lists.wikimedia.org/mailman/listinfo/labs-l
> 
> _______________________________________________
> Labs-l mailing list
> Labs-l at lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/labs-l
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.wikimedia.org/pipermail/labs-l/attachments/20151116/1816c62c/attachment.html>


More information about the Labs-l mailing list