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

No translation available

# 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?
- 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. The library was originally developped by Thomas Boutell and is now maintained by Pierre-A. Joye under the umbrella of PHP.net. If you are running your own webservem you can download it at libgd.org. 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.

### 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.