Large Uploads (Drupal)

Some of the site managed using Drupal require the ability to upload large files Pictures etc. PHP places a server limitation of 2Mb which is not very big these days.

In order to get around this limitation it is required that you override these restrictions. To do this you need to create a file in the root of the drupal installation that contain the settings that override the server defaults. This file is saved as "php.ini" sometimes it is this file may already exist or a file called "php5.ini" will exist instead. That not a problem use php5.ini and create a symbolic link to php5.ini called php.ini. If the implementation php on the server refers to php.ini, then the symbolic link will refer to php5.ini in the drupal directory. This will then be read and acted on.

The command to create the symbolic link is shown below.

#> ln -s php5.ini php.ini

Modify the php5.ini file to show the following, using the vim editor. See information on the Drupal website relating to this. Increase upload size in your php.ini

#> vim php5.ini

memory_limit=64M
upload_max_size=7M
or any other appropriate size.

To save and exit VIM Press [Esc], then :wq

Now modify the Drupal settings them selfs
Administration ----> Site Configuration ----> Images

Change the max upload size (option) from 800K to 7168K. This creates a folder called /sites/default/files/images/temp to hold temporary copies of the image files