Home arrow PHP arrow Page 3 - Setting Up a Web-Based Image Gallery

Coppermine Gallery - PHP

Everybody has heard the “a picture is worth a thousand words” proverb. That’s true. It is important to be able to manage and organize our pictures, especially when we have a relatively large amount of web storage space. One of the ways to accomplish this is by setting up web-based image gallery management applications. In this article, we are going to tackle this subject and present some real-world applicable solutions.

  1. Setting Up a Web-Based Image Gallery
  2. 4images Gallery
  3. Coppermine Gallery
  4. Concluding Thoughts
By: Barzan "Tony" Antal
Rating: starstarstarstarstar / 9
May 06, 2008

print this article



Coppermine Gallery is another freeware web-based image gallery management application. It sports numerous features and works on every web space as long as its PHP requirements are met (>= 4.1.0). MySQL (4.x recommended) is also necessary due to its user-based operation (we need a database because users can register with passwords, etc.). Also, it runs on any web server starting from IIS up to Apache.

As I already mentioned on the previous page, you should also have a working copy of either GD or ImageMagick if you want to utilize all of its capabilities, such as the automatic creation of thumbnails. The same applies to Coppermine Gallery. Now that we know the absolute requirements, let's check out some of its features.

First off, we can categorize images in albums, galleries, and categories. Thumbnails are automatically generated and other image resizing functions aren't neglected either. The searching feature is possible too. Likewise, it has a solid user management and comment system. You can have private galleries accessible only to persons located within a specific group. You can tag images, leave comments as feedback, and so forth.

The slide show viewer should be appreciated when you need to present more than a few dozen images. Uploading images can be done using one or both of the following routes: via a standard web browser or through an FTP client. You can also display a clickable film strip of thumbnails in order to enhance user interaction.

You should not worry about templates since, by default, the application comes with lots of free templates that you can use to change the appearance of your galleries. However, if you have the necessary skills (plain HTML, CSS, PHP, etc.), then you may want to customize one of the templates to fit into the aesthetics and tables of your already existing website. You can do that, too. Oh, and it also has an e-card feature.

We should be quite convinced and willing to give this a shot. This means the time has come for us to grab ourselves a copy and start the installation procedure (which is supposed to be very easy). Visit the official download section and get the latest version. At the time of writing, the latest stable version was 1.4.18 [April 14, 2008].

Extract the content of the archive and please find the readme.txt located within. You should always start by reading the official documentation. Anyway, here it is briefly: you need to upload all of the files and directories to a particular folder on your web space, generally, something like /cpg14x is recommended. Now it's time to set the necessary 777 permissions for the following directories:

chmod 777 (drwxrwxrwx) : include

chmod 777 (drwxrwxrwx) : albums

chmod 777 (drwxrwxrwx) : albums/userpics

chmod 777 (drwxrwxrwx) : albums/edit

chmod 777 (drwxrwxrwx) : images (you will create this directory)

As you can see above, the last directory, which we called "images," is the one you need to create. It's where you will store your images, media files, etc. As soon as you've created it, don't forget to set its permissions to read+write+execute.

Right after you have completed this step, you can kick start the installation script by pointing your web browser to the following link: mysite.com/cpg_directory/install.php, where cpg_directory is the folder where Coppermine is located. Follow the instructions and be sure to provide correct and accurate information regarding the MySQL database.

By the way, you need to have a database already created in which Coppermine will write the required tables and later on use it as its database too. If you do not  have one, then please create a new one prior to launching the installation script. Once you are done, you can type in the necessary information and launch the install procedure.

During the installation, when you are asked for ImageMagick's path, if you have no idea what it is or whether or not you have a copy of IM, you should leave that field empty because then the script tries to locate and use GD by default. Moreover, if you want to enable logging at some point later on and/or use additional extra plug-ins, then you need to set the necessary permissions on those directories too.

In a nutshell, I think that this briefly covers the entire installation procedure. As always, you should refer to the original documentation prior to and during the installation. There are lots of customizations possible later on. And be sure to visit the Control Panel in order to specify your needs and whatnot. Anyway, by now you should be able to set up another image gallery management web application. We're doing well!

>>> More PHP Articles          >>> More By Barzan "Tony" Antal

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...

Developer Shed Affiliates


Dev Shed Tutorial Topics: