Auto Photo Gallery


  1. What is PHPic?
  2. Minimal configuration
  3. How to use PHPic
  4. Personnalize an album
  5. Troubleshooting
  6. Coming soon...

1. What is PHPic?

PHPic allows to publish photo or picture albums online. It aims to be simple of use and completely customizable.

PHPic was developped by Denis Bredelet
PHPic is distributed under the GPL license

2. Minimal configuration

PHPic is a server-side software, which means you do not need to install any software on your computer. You just need to copy files on your web space, as you would for HTML pages.

The server needs to be PHP-enabled. At the time of writing, only PHP 4 or later is supported. Some features require the GD library.

3. How to use PHPic

To use PHPic, first download the archive and extract it on your disk.
The archiving software should create a folder called "phpic". This folder needs to be copied in full to your web space.

Then create a directory on the server that will hold all of your photo albums, you can call it "Gallery" for instance. Copy the following file in this directory:

For each album you would like to publish, create a new directory inside "Gallery" and copy the following files there:
The folder hierarchy on the server should look like this:
	PHPic files...

|	index.html
|	. . .
|----> Gallery
	|	phpic_settings.php
	|----> Flowers
	|	|	Album.php
	|	|	Image.php
	|	|
	|	|----> images
	|			im0001.jpg
	|			. . .
	|----> Holidays		
		|	Album.php
		|	Image.php
		|----> images
				. . .
You can add or remove pictures in the album simply by adding or removing files in the "images" folder.

In the above example, the holiday album can be seen at the address:
(replace "" with the URL of your website)

4. Personnalize an album

After the first visit to your photo album, PHPic creates a file "bag/album.ini" in the directory where it is kept. To personalize the title of the album and the text of the pictures, this file needs to be edited. The syntax is the following:
Title=title of the album
Text=description of the album (optional)

im0001.jpg=picture title: picture description (optional)
. . .
The phpic_settings.php file contains options that you can change to you liking. It is also possible to choose different options for each album, simply place a different version of phpic_settings.php in each of them.

Options selected for a specific album override general options.

But the best way to personalize the look of your album is to modify Album.php and Image.php with a web page editor. Depending on the editor you are using, you may have to rename the file to Album.html or to Image.html before modifying it.

Once you are satisfied with the style of your album, why wouldn't you share it? You can send the Album.php and Image.php you created to my e-mail address, I will publish them on the website.

5. Troubleshooting

1- I installed PHPic, but the pictures don't show up in the web page or strange text inside <? ?> signs are displayed.

Check that the web pages have the extension "php" and not "html". Contact your web hosting company to see if you need to enable PHP for your site.

2- I installed PHPic, but my photo album is not showing at all.

Check that you didn't forget to copy phpic_settings.php in the appropriate directory. Look if the directory /phpic/support contains a document called "error.log". This document lists execution errors. If it is not there, edit Album.php in a text editor and remove the @ sign in front of the "include" commands at the beginning of the file. Then display the source code of the web page in your browser to see the execution errors.

3- Album.php is giving errors such as "Fatal: call to undefined function..."

Make sure that PHPic is correctly installed on the web server. Copy phpic/support/info.php in the root directory of your web site and open it in a web browser (e.g. At the moment, PHPic requires PHP version 4 or later. The GD library needs to be installed for full functionality.

4- My photo album displays all right in the web browser, but the file album.ini contains only some of the pictures.

Pictures are added to the album as they are displayed. To make sure that all the pictures are added to album.ini, first visit the album until the last page.

5- My web page editor gives errors when I try to open Album.php or Image.php with it.

It is possible that the editor doesn't like PHP tags. In that case, open the file in a text editor and replace all instances of <? and ?> with <% and %> respectively. Try opening the file in the web page editor again. If that doesn't solve the problem, replace <? and ?> with <script language="php"> and </script> respectively. Depending on server configuration, the <% ... %> tags may or may not work with PHP.

6. Coming soon...

- Photo gallery
Lets you see all the albums on your web site.

- Administrative interface
Lets you modify the titles and descriptions without the need to copy files back to the server.
Allows you to add or remove photos online

- Etc.

Special thanks

Thanks to the PHP developers for making PHPic possible
Thanks to Chris Bielinski for phpINI
Thanks to Jake Olefsky for exifer
Thanks to Tommy 'Akiro' Tonteri allowing me to use the name "PHPic"