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

4images 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



4images Gallery is a web-based image gallery management system. It's based on PHP and MySQL. It has an extensive list of features and runs smoothly and efficiently without requiring much user interaction during the installation process. It has a really intuitive and straightforward graphical user interface and that's why most prefer it.

Let's enumerate some of its key features: user registration, management (users, images, etc.), comment system, administration via password(s), spam control (captcha), lots of templates and design "skins," and you can edit the original template to fit into your web site using the incorporated HTML editor. Multi-language support isn't overlooked either; German and English are possible as far as I know.

An additional RSS feed broadcasting feature is also incorporated. Thanks to this RSS capability, you can be notified of the latest comments, images added to particular categories, and so forth. You can schedule a backup process for the database.

Finally, it sports an extensive list of image-based functions and features, such as uploading images via web browser, automatic resize, rating by users, comments, download counter, download as an archive (more images), customizable e-cards, tagging system for each image (keywords, etc.), thumbnail generation, and protection against hot-linking. The latter is crucial to taking care of your own bandwidth.

That covers its capabilities. Now the time has come for us to actually download its archive and find out how we can set it up. Head over to the 4images Gallery official site. Now move to the Download section. At the time of writing, the latest version was 1.7.6 and it is accompanied by a really impressive download count: 529,798. And I bet at least 70% of those downloads are working copies spread over the World Wide Web!

After you have extracted the archive, please find the /docs/ folder, inside of which you should search for the "Installation.english.txt" plain text file. Read the documentation carefully, even though I'll do my best to explain this short process as briefly and clearly as possible. You should never ignore the useful habit of reading "read me" files.

Host the whole extracted archive to a particular folder on your web space -- let's assume the following: mysite.com/4images. Fire up your web browser and target this location. A new page will open where you need to fill in the required fields. Right after, you can begin the installation by clicking on the Start Installation button.

(Fully functional 4images gallery-Image Courtesy of 4images Gallery)

It's important that the installer script handles the management of your MySQL database. Assuming you have given the correct information (passwords, etc.), it should set up the necessary tables in the database you have specified. Finishing this step, the script automatically generates and tries to upload the config.php file.

If writing permissions aren't given to that specific directory, then you will have the ability to download the config.php and host it, manually overwriting the default one. This is important because it's going to contain your very own configuration settings. After this point, we can consider the installation process to be done.

However, a few things are still left to do. You need to set the necessary permissions to the following folders. The permissions are: drwxrwxrw, meaning 777. This is required in order to have full read, write, and execute permissions. It makes sense, right? The 4images web app should read, write, and execute the PHP scripts from those folders.

chmod 777 (drwxrwxrwx) : data

chmod 777 (drwxrwxrwx) : data/database

chmod 777 (drwxrwxrwx) : data/media

chmod 777 (drwxrwxrwx) : data/thumbnails

chmod 777 (drwxrwxrwx) : data/tmp_media

chmod 777 (drwxrwxrwx) : data/tmp_thumbnails

chmod 777 (drwxrwxrwx) : templates

chmod 777 (drwxrwxrwx) : templates/default

chmod 777 (drwxrwxrwx) : templates/default/media

As well as for the following files (666 since no execution is required):

chmod 666 (-rw-rw-rw-) : all files in the directory "templates/default"

chmod 666 (-rw-rw-rw-) : all files in the directory "templates/default/media"

That's all, the setup is complete. Still, you shouldn't forget to delete install.php and all variations of update_*.php files, or at least rename them or move them to a backup folder. Otherwise, each time you visit your 4images' link, the installation screen will still pop up. I'd also recommend enabling the Caching System, but for this please refer to the Cache.english.txt located in the /docs/ directory. Its topic is beyond the scope of this article.

As a final note, now that your 4images Gallery is working, you should visit the Control Panel to configure your gallery management system the way you want!

>>> 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: