User login

Increasing PHP file upload limits... capabilities is another matter

Upping PHP's maximum file size upload limit:

Your problem: the file upload settings page on your Drupal site (if you've found it) is telling you silly PHP won't let people upload big files, to wit:

Your PHP settings limit the maximum file size per upload to 200 MB.

There's two places that this has to change in your php.ini file; this can also be set in your settings.php PHP initialization variables.

We at Agaric like the sledgehammer - nay, mechanized battering ram - approach to fixing niggling little problems, so here's what we're going to make those sections look like:

; Maximum allowed size for uploaded files.
upload_max_filesize = 200M

and

; Maximum size of POST data that PHP will accept.
post_max_size = 400M

Here's what you have to do in command line shell commands, which is sort of like poetry...

locate php.ini
vi /etc/php5/apache2/php.ini
/upload
i

cursor keys cursor keys...

00
esc
/post_max

cursor keys cursor keys... backspace

400
esc
shift-ZZ

(which saves and exits from the vi text editor)

apache2ctl restart

(which restarts Apache, in our configuration, which, you'll note, is Apache 2.)

Now go to admin/settings/uploads ...

Your PHP settings limit the maximum file size per upload to 200 MB.

That's more like it!

The Agaric way is not recommended for mortals, sane people, or even deities or insane people with weak stomachs.

Agaric already covered this subject on this page but here we cut to the chase!

Upping PHP's maximum file size upload limit:

Your problem: the file upload settings page on your Drupal site (if you've found it) is telling you silly PHP won't let people upload big files, to wit:

Your PHP settings limit the maximum file size per upload to 200 MB.

There's two places that this has to change in your php.ini file; this can also be set in your settings.php PHP initialization variables.

We at Agaric like the sledgehammer - nay, mechanized battering ram - approach to fixing niggling little problems, so here's what we're going to make those sections look like:

; Maximum allowed size for uploaded files.
upload_max_filesize = 200M

and

; Maximum size of POST data that PHP will accept.
post_max_size = 400M

Here's what you have to do in command line shell commands, which is sort of like poetry...

locate php.ini
vi /etc/php5/apache2/php.ini
/upload
i

cursor keys cursor keys...

00
esc
/post_max

cursor keys cursor keys... backspace

400
esc
shift-ZZ

(which saves and exits from the vi text editor)

apache2ctl restart

(which restarts Apache, in our configuration, which, you'll note, is Apache 2.)

Now go to admin/settings/uploads ...

Your PHP settings limit the maximum file size per upload to 200 MB.

That's more like it!

The Agaric way is not recommended for mortals, sane people, or even deities or insane people with weak stomachs.

Agaric already covered this subject on this page but here we cut to the chase!

Comments

You will probably (a) not

You will probably (a) not want to use such insanely large limits and (b) want to make sure you also have memory settings higher than the default, also in php.ini. The increases here are comparatively modest. Note also that upload size isn't the same as the resource limits here, but timeout in particular may need to be increased a lot for larger uploads.

;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;

max_execution_time = 60 ; Maximum execution time of each script, in seconds
max_input_time = 100 ; Maximum amount of time each script may spend parsing request data
memory_limit = 64M ; Maximum amount of memory a script may consume (16MB)

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Internal paths in single or double quotes, written as "internal:node/99", for example, are replaced with the appropriate absolute URL or path. Paths to files in single or double quotes, written as "files:somefile.ext", for example, are replaced with the appropriate URL that can be used to download the file.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.