E-mail:
Password:

PHP Gallery Tutorial and Installation How To

  • Mini-Me

  • $6.95 /month
  • 500 MB Storage
  • 1 FTP Account
  • 25 Subdomains
  • 15 GB Bandwidth
  • 50 E-mail Boxes
  • 25 MySQL DBs

This tutorial describes how to use the PHP Gallery software with your NEXCESS.NET web hosting account. NEXCESS.NET specializes in hosting php galleries and this tutorial is meant to help you quickly setup your php gallery with our web hosting service.

PHP Gallery is freeware but if you wish to send the makers a donation, you can visit their website here.

For the sake of this tutorial we'll assume that you own the domain 'johnsmith.com' and are setting up a php gallery at http://johnsmith.com/gallery/.

Follow these steps to complete the tutorial:

  1. Download the latest version of PHP Gallery from the gallery website and unzip the contents of the zip file to your desktop using http://www.winzip.com.

    You'll see that you have a folder called 'gallery' with all the necessary files and folder to make it run.

    Create 2 blank files with a text editor,(i.e. Notepad, Note Tab, Editplus, Crimson Editor).

    Call one .htaccess and the other config.php. Place these inside the 'gallery' directory.

    Note: Some text editors will append '.txt' to the end of the file name if you try to save it as '.htaccess'. If this happens, either upload the file as it is and then use your ftp program to rename it, removing the '.txt' from the end of it, or if you have Windows setup to show file extensions, select the file, hit F2 to rename it and remove the '.txt' from the file that way.

  2. Upload the 'gallery' directory to your web hosting account. You should do this via FTP and there are FTP tutorials on our tutorials page if you need help doing that.

  3. Create a directory on your web hosting account called 'albums'.

    Gallery will use this directory to store the albums you create and the images you upload to those albums. This directory can reside inside the 'gallery' directory or outside the 'gallery' directory - your choice. Make note of where on your web hosting account you create this directory.

  4. You need to set permissions to make some of the files and directories writable. This involves using the CHMOD command. If you do not understand CHMOD, read over the ftp tutorials. Chmod as follows:

    • chmod 777 albums (this is the album dir created in step 3)
    • chmod 666 .htaccess
    • chmod 666 config.php
    • chmod 755 setup/ (setup/ is a directory)
  5. Run the PHP Gallery configuration wizard by pointing your browser to http://yourdomain.com/gallery/setup/index.php. In our example, that means: http://johnsmith.com/gallery/setup/index.php.

    You should see this screen:

    PHP Gallery Web Hosting Tutorial - Main index page

    Note: Safe Mode is on by default and ImageMagik SHOULD be installed. If you see a warning that ImageMagik is missing, make a post in the forums or email us to let us know about the problem. You'll also need to make a post letting us know to turn Safe Mode off for your domain.

    Read through the other items in the list to see if there are any other problems, then click 'Next Page' to continue.


  6. Now you're on Step 2 of the Configuration Wizard:

    PHP Gallery Web Hosting Tutorial - Creating admin account

    Choose a title for your gallery or use the default. Choose a password for the admin account. This will be the account you use to manage your gallery.

    Check to make sure the 'album' directory is set to the correct path. In this example, the path would be '/home/johnsmith.com/html/gallery/albums'.

    Use '/tmp' for the temporary directory.

    The 'Gallery URL' and 'Album URL' should be correct.

    If you'd like to add watermarks to your images, put the full path to a directory you create for storing the watermark images. In this example, it would be '/home/johnsmith.com/html/gallery/watermark' once you've created a 'watermark' directory in the 'gallery' folder.

    If you have your gallery also stored on other servers, in case there are problems with this one, list them here with the most reliable one at the top.

    Most of the other settings are strictly user preference. In most cases, the default values should be ok. If you'd like to use the email function of the gallery, make sure you enter an admin email address and a sender email address in the specified fields.

    Once you've gone through all the settings on this page, click 'Next Page' to continue.

  7. Now you're on Step 3 of the Configuration Wizard:

    PHP Gallery Web Hosting Tutorial - Photo gallery settings

    This page contains all the settings for the appearance of your photo gallery. Once again, these are your own preference as to how you'd like your gallery to look.

    Once you've changed the settings to match your needs, click 'Next Page' to continue.

  8. Now you're on Step 4 of the Configuration Wizard:

    PHP Gallery Web Hosting Tutorial - Review settings

    This page lists all the settings you've changed on the last 3 pages. It's just used for reference and can be skipped. Click 'Save Config' to continue.


  9. You've changed the settings to match your preferences and saved your configuration. You should now be on the final page:

    PHP Gallery Web Hosting Tutorial - Final installation page

    You need to secure your gallery before you'll be able to use it. On this server, you need to CHMOD some files again to make it secure. Here are the settings:

    • chmod 644 .htaccess
    • chmod 644 config.php
    • chmod 400 setup/ (setup/ is a directory)
  10. Once you've made the necessary changes to make your gallery secure, click on 'Enter the Gallery' to view your finished gallery:

    PHP Gallery Web Hosting Tutorial - Main gallery page

  11. On the main gallery page, click 'login'. Using the username 'admin' and the password you specified in the setup, login to the gallery. You now have full admin privileges for adding pictures and administering your gallery. The PHP Gallery web hosting tutorial is now complete.

    For more information on using PHP Gallery once it's setup, check out the PHP Gallery documentation.

  12. Back to web hosting tutorials page