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

# Installation - Frequently Asked Questions (FAQ)

Reading the FAQ is a good idea when trying to troubleshoot particular issues. However, it doesn't make the rest of the documentation obsolete - if you can't find an answer here, make sure to have read the entire documentation. Search the support board thoroughly before starting a new support request on the forum.

## Table of contents:

- What are the minimum requirements for the installation and use of Coppermine 1.5.x ?
- What's ImageMagick and how can I get it?
- What's GD and how can I get it?
- How do I find out which version of PHP I have?
- How do I find out which version of GD I have?
- What's the difference between GD1 and GD2?
- How do I enable gd on my Windows server?
- How do I enable ImageMagick on my Windows server?
- What are the steps to get Coppermine running?
- How can I install ImageMagick or GD?
- I'm short on webspace. Is there a "minimum install"?
- When installing I get the error `Fatal error: Call to undefined function: imagecreatefromjpeg() in /include/picmgmt.inc.php on line 168`. What does that mean?
- When installing I get the error `Warning: mkdir(dummy) [function.mkdir]: Permission denied in /your/path/to/coppermine/install.php on line 126`. What does that mean?
- What FTP mode should I use?

## What are the minimum requirements for the use of Coppermine 1.5.x ?

- any webserver, Apache recommended (Coppermine has been reported to work with Apache, Microsoft Internet Information Server (IIS), Roxen WebServer, Abyss, JanaServer)
- PHP 4.3.0 or better, PHP 5 is supported
- GD lib or Image Magick
- mySQL 3.23.23 or better (4.1 recommended). Don't confuse the client api version (which is shown in phpinfo) with the mySQL version!

## What's GD and how can I get it?

GD is a graphical library which enables PHP to do image manipulation. If you are running your own webservem you can download it at www.boutell.com/gd/. You will need to recompile PHP on (L)Unix systems, depending on your setup Apache as well. Most recent versions of PHP come with GD - go for a package. On most windows systems, you can just enable it in the php.ini file. If you are subscribing to a webhost: find out through your webhost if GD/GD2 support is available on your site. If not, ask your webhost if you can have it or find yourself another webhost. GD/GD2 are pretty much a standard feature at most webhosting services.

## What's ImageMagick and how can I get it?

ImageMagick is another graphical library like GD/GD2 for image manipulation. If you are running your own webserver, you can download it at imagemagick.org. There are sources available for Unix, Linux, Mac and Windows executables, as well as binary packages for various server operating systems. You cannot install ImageMagick if you are subscribing to a webhost.

[top of page]

## How do I find out which version of PHP I have?

If you haven't installed Coppermine, yet, create a blank file named "info.php". Add the following code to it: `<?php phpinfo(); ?>`. Save the file and upload it to your webserver, then run it in your browser (e.g. http://www.yourdomain.com/info.php). The very first line should read "PHP Version X.Y.Z"
Please note: leaving info.php on your server could be a security risk; either delete it after use or move it into a password protected directory!
If you have already installed Coppermine, you will find a phpinfo file (phpinfo.php) within the coppermine folder. Log in to your Coppermine setup as the admin and simply point (type in the URL) your browser to http://yourdomain.tld/your_coppermine_folder/phpinfo.php or click on the phpinfo link in Coppermine's admin menu.

## How do I find out which version of GD I have?

If you haven't installed Coppermine, yet, create a blank file named "info.php", put this code into it: `<?php phpinfo(); ?>`. Save the file and upload this file to your webserver, then run it in your browser (e.g. http://www.yourdomain.com/info.php). Look for a table like this:

gd

GD Support | enabled
GD Version | 1.6.2 or higher
FreeType Support | enabled
FreeType Linkage | with TTF library
JPG Support | enabled
PNG Support | enabled
WBMP Support | enabled

Please note: leaving info.php on your server could be a security risk; either delete it after use or move it into a password protected directory!
If you have already installed Coppermine, you will find a phpinfo file (phpinfo.php) within the coppermine folder. Log in to your Coppermine setup as the admin and simply point (type in the URL) your browser to http://yourdomain.tld/your_coppermine_folder/phpinfo.php. Then scoll down to the GD section of the display.

## What's the difference between GD1 and GD2?

GD2 is an updated version of GD1 and, as such, will create pictures with better quality (intermediate and thumbnails).

Here's an example taken from w-nailer: about resizing (Original pic size: 1024 x 768 pixels):
GD 1.8.4: ImageCreate ImageCopyResized 128 x 96 pixels | GD 2.0.1: ImageCreateTrueColor ImageCopyResampled 128 x 96 pixels

Upgrades of the GD lib after coppermine has already installed will not affect pictures that were previously created. It will only affect those created after the upgrade. Unless you are running your own webserver, you cannot upgrade nor install GD lib - only your webhost can!

The main difference between GD 1 and GD 2 lies in the color depth: GD1 only supported a limited color depth of 256 colors per image. This lead to very poor quality.

By now, the GD1 library is totally outdated and should only be found on very old hardware. If you're webhosted, you should have GD2. If your webhost is still only offering GD1, it's probably time to look for another, better webhost.

### How do I enable GD on my Windows server?

GD 1.x 2.x are normally part of all standard PHP distributions under Windows
To check if you have it, go to the directory where you installed PHP, go to the "extensions" subdir and see if you have a file named "php_gd2.dll".
Ocassionally, you will also need to edit your php.ini file (located in windows directory normally) and remove the ";" that is at the beginning of the line:
`extension=php_gd2.dll` (at the end of the file). This will cause PHP to load the GD2 extension.
Whenever you make changes to php.ini, remember that you will need to restart your webserver before changes become effective.
ImageMagick it quite complicated to use under Windows
Greg

Side-note: the coppermine dev team does not recommend self-hosting. We are not trying to encourage you to run a webserver on your own if you don't know your way around. We left this paragraph in the FAQ section for reference. Please understand that we can not advise on webserver setup issues.

### How do I enable ImageMagick on my Windows server?

ImageMagick is quite complicated to set up on Windows. There are several things to be taken into account. The Coppermine support board is not the right place to ask for help on installing it, as it deals with Coppermine, not "How to set up a server" (most people on the Coppermine boards don't run their own webserver, but they have webspace by a webhost). Instead, try to find support boards on the internet that deal with this special topic.

The path to ImageMagick mustn't contain spaces or special characters. You have to make sure that the user the webserver runs under actually has the needed permissions to run the ImageMagick executables.

## What are the steps to get Coppermine running?

as stated in the install section:

1. Download Coppermine
2. Unzip it to your harddrive
3. Upload the contents of the coppermine folder to your server (you can install it in the root or in a unique folder with a name of your choosing).
4. CHMOD (CHange permission settings MODe) your newly uploaded Coppermine "include" and "albums" folders and subfolders to allow for read/write access. If your webhost does not provide file management tools to let you do this, you will probably need to search the net, download and install an FTP program to facilitate this.
   For details, read the permission section.
5. Create a database with your website management tools if you don't already have one. You do not have to add any tables to your newly created database. Coppermine will create them for you. If you already have a database on your site, Coppermine can use that as well.
6. If you are installing on a Yahoo Webserver, read this thread first.
7. Point your browser to http://www.yoursite.com/coppermine/install.php and follow the directions of the install file (basically the mySQL-tables will be created there and the config table will be filled with default values)
8. Upon successful installation, you can delete the install.php file from your website, but you don't have to, as Coppermine makes sure that the installer is not being run a second time.
9. Point your browser to http://www.yoursite.com/coppermine/ , and login as admin using the ID and Password you provided during install. With admin controls turned on, click on the CONFIG menu button to start customizing your coppermine photo gallery as suggested in the "getting started" section of the docs.
10. Experiment with your new install, create a few categories, sub-categories, and albums. Upload a few pics (not too many, just yet), test if everything works.
11. Point your browser to http://www.yoursite.com/coppermine/docs/ and READ the docs. The documents included with CPG1.5.x have been updated from previous versions to help answer your questions and issues so that you can get the site you want the first time out. Reading the docs takes but a few minutes. Resolving issues after the fact can take days, even weeks.
12. If your new Coppermine install is in a sub folder on your site, publish your site by linking it to your homepage.

## How can I install ImageMagick or GD?

You can only install ImageMagic or GD if you're running your own server or if you have at least shell access to your webserver. If your site is being hosted by a webhost you can only contact your webhost and ask them to install it for you. If they refuse choose another webhost or use GD instead.

## I'm running short on webspace. Is there a "minimum install"?

This is of course a contradiction in terms: running a gallery page usually means that you will need considerable webspace to store your pics, but if you only want to publish a few pics with what little webspace you have left, there are some files that don't have to be uploaded or that can be removed if not needed. It is however recommended that only experienced users create a minimum install; when in doubt, do a full install.

1. Remove all languages that you don't need (if your users are all from the same country).
   It's recommended that you keep English anyway even if your users use another language, just for you as admin to be able to temporarily switch to English. If you need to use the language fallback option, you will have to keep the english language file no matter what.
   Delete all files in the lang-subfolder of your coppermine install except yourlanguage.php (e.g. if you're using french, delete all files but /lang/french.php).
2. Remove the unneeded parts of the documentation Remove the documentation parts that you don't need, i.e. the language sub-folders of the documentation that doesn't apply.
   If you're only going to use English, delete the folders `docs/fr/` and `docs/de/` etc.
3. Remove all unnecessary themes
   Remove all themes you won't use from your themes folder. If you're using a customized theme, it's recommended to leave the classic theme in place for administrative purposes.
   If you're using the theme "Eyeball" that comes with coppermine, you can safely delete the sub-folders "classic", "fruity", "hardwired", "igames", "mac_ox_x", "project_vii", "rainy_day" and "water_drop" from your themes folder.
4. Remove bridge files
   The Coppermine package includes bridge files used for integration of coppermine with bulletin board software like phpBB, SMF etc. It is safe to delete some files in the bridge folder; if you are using bbs integration, you will have to keep the bridge file that corresponds to the bbs you're using. If you are not using integration, you must keep the file coppermine.inc.php. The file udb_base.php is required under all setups and must not be deleted.
5. Remove the flags
   If you're not going to use the "select language by flags" option that can be enabled on the theme, it's safe to delete the flags folder (/your_coppermine_folder/images/flags/). If you are using the flags feature, you can of course delete all flags you don't use at all.
6. Remove files that are needed for install or upgrade only
   Once Coppermine has been installed and is "up-and-running", you can safely delete the files that are needed for installing only: from the coppermine root folder, delete install.php, update.php. You can delete the folder "sql" as well.
   If you want to update/upgrade your coppermine install later (once a new version comes out), you will of course have to re-upload the update files and the sql folder to your webserver.
7. Choose to only display full-sized images and thumbnails.
   This is option that will save most webspace when used properly, so here are detailed setup instructions:
   - Determine the max resolution that you are going to allow. This should be something that makes sense and fits on the screen of most users (and depends to your theme as well). Recommended setting is 800 pixels (which is being used in this example configuration)
   - Set "Create intermediate pictures" to "no".
   - Set "Max width or height of an intermediate picture" to "800".
   - Set "Max width or height for uploaded pictures (pixels)" to "800".
   - Set "Auto resize images that are larger than max width or height" to "Yes: Everyone ". This will result in bigger images being resized during upload.
   - Above mentioned config sections will be taken into account for future uploads. If you already have pictures within your gallery, do as suggested and use the admin tools to get rid of the intermediate images.
8. Turn logging off The log files will eat up space as well. In Coppermine's config, scroll to the very bottom and turn logging off there.
9. Delete the plugins you don't need There are some plugins that come with Coppermine out of the box. Delete them if you want to save some webspace. Don't delete the plugin folder - just delete the sub-folders that you don't need.

### When installing I get the error `Fatal error: Call to undefined function: imagecreatefromjpeg() in /include/picmgmt.inc.php on line 168`. What does that mean?

This error means that the version of PHP installed on your server does not support the GD1/GD2 image library.
If you know that the ImageMagick suite is installed on your server, you could try using it instead. Otherwise, you will have to find another webhost or convince your existing webhost to have GD1/GD2 installed (the GD image library is now a standard component of PHP and should normally be installed and available, de facto). Coppermine won't run without gd or image magick.

### When installing I get the error `Warning: mkdir(dummy) [function.mkdir]: Permission denied in /your/path/to/coppermine/install.php on line 126`. What does that mean?

The script must have the right to create and delete files.

- on *nix/linux-webservers:
  chmod the coppermine directory (and all subdirectories) to 755 (rwxr-xr-x). To find more about chmod: check some of these fine chmod tutorials
- on Windows/IIS:
  Check if the user the webserver runs the php-scripts under (usually called IUSR) has sufficient rights to read, execute, change, delete in the Coppermine folder. To find out how, ask your webhost or read the server manual, if you're running your own server.
- on Windows/Apache:
  Check the account Apache runs under and set the rights in the file-system.

For details, read the permission section.

### What FTP mode should I use?

File Transfer Protocol (FTP) is used to exchange and manipulate files over a computer network. An FTP client may connect to an FTP server to manipulate files on that server.

There are two different transfer modes in FTP.

All images (.jpg, .gif, .png etc) should be uploaded as binary, all files that contain text (php, htm, css, js etc.) in ASCII mode. Most FTP clients have an "auto" mode that will use the proper mode for each file; if your FTP client has "Auto", use it. This mode is particularly usefull then installing Coppermine as the package contains a mixture of file type. If your client does not have an "Auto" mode then switch to "Binary". For more information consult the manual for your FTP client or read up the Wikipedia article on FTP.