PDA

View Full Version : setting the upload_max_filesize in php.ini


adam
10-12-2009, 07:25 PM
Hi,

I am trying to raise the max file size for a php upload. I have tried a number of things, but still have the default 100,000 showing in the phpinfo(). I am using tomcat 6.0 Here is my latest attempt in my web.xml. Any ideas?

<servlet-mapping>
<servlet-name>com.caucho.quercus.servlet.QuercusServlet</servlet-name>
<url-pattern>*.php</url-pattern>
<init>
<php-ini>
<upload_max_filesize>2M</upload_max_filesize>
</php-ini>
</init>
</servlet-mapping>

And here is some of phpinfo()...

Quercus

PHP Version => 5.2.0
System => Linux 2.6.24-24-generic i386
Build Date => 20070628T2777
Configure Command => n/a
Server API => CGI
Virtual Directory Support => disabled
Configuration File (php.ini) Path => WEB-INF/php.ini
PHP API => 20031224
PHP Extension => 20041030
Debug Build => no
Thread Safety => enabled
Registered PHP Streams => php, file, http, https

PHP Variables
Variable Value
_REQUEST["dir"] 20
_REQUEST["MAX_FILE_SIZE"] 100000
_REQUEST["name"] adam
_REQUEST["JSESSIONID"] F760C33DADE3A2726EDEE38AF3EDC031
_GET["dir"] 20
_POST["MAX_FILE_SIZE"] 100000
_SERVER["SHLVL"] 1

emil
10-13-2009, 06:05 PM
Build Date => 20070628T2777


Looks like you're using a very old version (over 2 years old). Can you try upgrading? I just checked the code for the most recent version of Quercus and the upload file max is respected.

Emil

nam
10-14-2009, 04:10 PM
I think it was only recently that Quercus has been respecting the upload file limit (< 6 months ago).

adam
10-16-2009, 04:29 AM
thanks for the help, I will update my jar files and see if that helps. I had no idea I was using such out of date jars... anway, I will post my results after I have a chance to update.

Thanks

adam
10-25-2009, 06:01 PM
I tried to update my jar files, but I could not find the most recent jars? can you send a link to it?

I looked in the most recent quercus.war, but it was missing the relevant jar files (or did I miss them)? I downloaded Quercus 3.2.1 (but my build date was still the same old build stmp from my previous post ).

-Adam

nam
10-27-2009, 07:45 PM
The http://quercus.caucho.com should have the latest. We repackaged up quercus.jar into the resin.jar.