Upload_max_filesize


#1

I’m wanting to increase the upload limit for my WordPress installation so it can handle some of the bigger images from my D300. I was about to create a custom php.ini when I read this:

“Make modifications to this file as necessary. Note that some variables (in particular, post_max_size and upload_max_filesize) are subject to internal limitations; increasing them significantly beyond the default values will not work correctly.”

What is the internal limitation on upload_max_filesize?


#2

No idea, sorry.

How large are the files you’re dealing with?

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#3

I have one set to 100 Megs.

-Scott


#4

I had the same problem. I had to install my onwn php and then you can change your php.ini to increase file upload size.


#5

Where I can find the php.ini file to edit the upload_max_filesize ?


#6
  1. Setup your website so you can edit your php.ini

  2. Using a text editor, search for and edit the following strings in php.ini:

post_max_size upload_max_filesize

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#7

As far as I know, you can only modify that setting by doing a custom php install. You can find out more about it here: http://wiki.dreamhost.com/Installing_PHP5


#8

For simple options such as upload_max_filesize, just the php.ini mod is all you need. I’ve set up a PDF reference library and had to go the php.ini route in order to be able to upload large files.

-Scott


#9

Initial question still wasnt’ answered:

What is the internal limitation on upload_max_filesize?

I do know how to change php.ini parameters by creating custom php.ini, but this “internal limitation” is not clear and it may be important since later this wiki document says:

“increasing them significantly beyond the default values will not work correctly.”

Otherwise it is still not clear how much can it be increased because who can live nowadays with such a ridiculously low upload limit as few MB that dreamhost sets up in default php.ini?


#10

I don’t think there’s a real “internal limitation.” The default is 7M. I bumped mine up to 100M. Nobody at DH has complained. I think the internal limitation is determined by how much of a memory and CPU load you put on the server on a regular basis.

If one wants to test this out, keep increasing upload_max_filesize until it stops working or they tell you to stop.

-Scott


#11

[quote]I don’t think there’s a real “internal limitation.” The default is 7M. I bumped mine up to 100M. Nobody at DH has complained. I think the internal limitation is determined by how much of a memory and CPU load you put on the server on a regular basis.

If one wants to test this out, keep increasing upload_max_filesize until it stops working or they tell you to stop.[/quote]
A test with PHP craps out consistently at 38 MiB at about 24 KiB/s. The file is 10x that size though and Perl is still working it :wink:

Customer since 2000 :cool: openvein.org


#12

Initial question doesn’t contain enough info to give a qualified response.

The build default for PHP is 2MB. The devs at PHP default the installation to 2MB because they are aware that PHP isn’t the platform of choice as a stable file transfer mechanism. DreamHost is being generous by overriding and bumping the limit to 7MB at build time. You can “upload” multi-Gigabyte files on a server with a “2MB PHP limit” btw.

How long is a piece of string?

The number you’re seeking is volatile and method-dependent, but is limited only by file system restrictions if you know what you’re doing. If you’re POSTing a file into memory then you’re going to hit a limit. If there’s a session going on you’re going to hit a limit. Slow connection? You’re going to hit a limit. There might be a limit on /tmp filesizes in shared so create and set your own. If you’re having problems keeping a session alive use AJAX or something to keep the user’s browser active.

You can upload multi-Gigabyte files using PHP, but it’s better to write the file to the destination in chunks using more robust methods. This is why God invented the CGI and protocols other than HTTP.

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost