# Coppermine Photo Gallery v1.5.x: Documentation and Manual

# Uploading by HTTP

Regular HTTP uploads use the browser's built-in capabilities to upload files to a server. The maximum file size is determined by two basic factors: the speed and amount of data the web-browser can upload before timing out, and the allowed file size determined by server settings. Note that those settings are not determined by coppermine, but the server config (php.ini). Users who are webhosted usually can't edit php.ini, so they will have to live with the settings the webserver admin has set up. Those who actually run their own server and can edit php.ini should take a look at the settings if (large) http uploads fail:

1. max_input_time- 60 seconds is the default time limit for uploading files.
   This time limit includes the time it takes for the files to upload, so if you exceed this limit, the file will not even parse, and the browser will not get a response. You can workaround this by trying to upload smaller or fewer files, or you can try uploading over broadband. The best solution, of course, is to increase the time limit to something more in line with your needs.
2. upload_max_filesize - 2MB is the default limit for individual files.
3. post_max_size - 8MB is the default limit for post requests.
4. memory_limit - 8MB is the default size.
5. PHP's LimitRequestBody - 512KB default limit. (mainly an issue on Redhat/Apache systems. Found in /etc/http/conf.d)
   In general, upload_max_filesize < post_max_size < memory_limit in order for uploads to function properly. Coppermine may warn you if a file exceeds upload_max_filesize, but it cannot warn you if the total size of all the files exceeds the post limit or the memory limit.
6. file_uploads - This determines whether or not PHP will allow file uploads. It must be set to 'On'.
7. upload_tmp_dir - This specifies the temporary directory where PHP stores uploaded files.
   The most common issue caused by this setting is an open_basedir warning. In this situation, your server administrator has restricted the files that PHP can work with to a certain directory. If he does not create and specify a temporary directory within the open_basedir restriction, PHP will attempt to use the OS temporary directory, and it will be rebuffed by the open_basedir restriction.
8. allow_fopen_url - This controls PHP's ability to read files using URL/URIs. If it is disabled, Coppermine will not be able to upload from URLs.

It should be obvious that the files have to be uploaded somewhere (into some folder) on your webserver - this is the albums folder within the folder you installed coppermine on your server. The HTTP uploads go into subfolders of the "userpics" folder (which resides within the "albums" folder). Obviously, the coppermine upload script needs write permissions to upload the files there. This is why you have to change permissions on the albums folder and everything within it during coppermine install - make it writable for the user the webserver runs under. This is done using the CHMOD command on Unix/Linux based servers. If you experience issues with uploading, make sure that you have set the permissions correctly.

## Upload interfaces

Coppermine comes with two upload interfaces: a traditional one that is using plain HTML methods and allows uploading one file at a time and an advanced, flash-driven interface that allows several files to be uploaded from one screen.

### Flash-driven multiple-files upload interface

The flash-driven interface offers more features and is easier to use, that's why it's recommended to use that interface as a default.

#### Usage

1. Select an album from the album dropdown list
2. Click the "Browse" button and navigate to the file you want to upload
3. Select more files to upload by repeating step 3
4. Click the "Continue" button after having all files that you want to upload (The button will appear after you have uploaded at least one file).
5. You'll be sent to a screen where you can enter details about the uploaded files. After filling in, submit that form using the "Apply changes" button at the bottom of that form.

### HTML-driven single-file upload interface

The HTML-driven single uploads form is recommended for those who don't have Flash installed (for whatever reasons) and particularly to trouble-shoot upload issues.

#### Usage

1. Select an album from the album dropdown list
2. Click the "Browse" button and navigate to the file you want to upload
3. Enter file title, description and keywords into the corresponding fields if applicable
4. Click the "Upload file" button to submit the form and actually upload the file.