Location: PHPKode > scripts > EGallery > README.txt

Egallery is a free script that automatically generates image galleries by reading from a directory of image files.
It is designed as a simple way to share image files with clients and give them the ability to download high resolution copies from your own website.

// HOW TO USE //

1. Upload images to a new directory on your web server. For example: YOUR-WEBSITE.COM/sample/
2. Upload the /egallery/ directory to the same subdirectory that you just created on step 1. Example: YOUR-WEBSITE.COM/sample/egallery/
3. CHMOD the /egallery/cache/ directory as well as the contained index.html file to 777.
4. Upload the index.php file included with the download package to the directory you created on step 1.
5. (OPTIONAL) Configure egallery by editing the /egallery/settings.php file.
6. If you renamed or moved egallery to another location, make sure that you update the third line in the index.php file.

Once you have completed the step above, navigate to the image directory from step 1 using your web browser. The first time that you visit this page it may take a little while for the script to generate thumbnail files. After the initial load, those thumbnails will be cached resulting in a faster page load.


Q. Why don't I see thumbnails?
A. First, make sure that you have the correct write permissions (CHMOD 777 the cache directory and the index.html within it). Another possible cause may be that the images are so large that they are using up your server's memory. You may have to temporarily change your php.ini file settings to increase the memory limit. If you can get it as high as 128MB then you should be good to go. You can also try changing the MEMORY_LIMIT value in the thumb.php file.

Q. I see the error "Warning: shell_exec() has been disabled for security reasons in /egallery/functions.php on line 29"?
A. This is probably caused by your server being set to run PHP in Safe Mode. You will need to disable safe mode to run this script. If the error still doesn't go away, you should check with your web host to see if their own custom security permissions are preventing the script from running. As a last resort you could try changing lines 29-31 in /egallery/functions.php to the following:
		//$mimetype = trim(`file -bi $f`)
		foreach($imagetypes as $valid_type) {
			if(preg_match("@^{$valid_type}@", "image/jpg")) {


This script is a combination of lots of pieces of freely distributed code that I discovered across the web.

Egallery Homepage : http://ericheikkinen/
Jquery : http://jquery.com/
Jquery Masonry : http://masonry.desandro.com/
TimThumb : http://code.google.com/p/timthumb/
Directory List : http://www.the-art-of-web.com/php/dirlist/1/
Convert Byte to MB : http://www.phpfront.com/php/Convert-Bytes-to-corresponding-size/
Force Download : http://elouai.com/force-download.php
Image Upload : www.uploadify.com/



 - Initial release
1.1 : March 5, 2012
 - Improved security
 - Added image upload feature
 - Added zip download feature
 - Fixed bug caused by visiting index.php url
Return current item: EGallery