Easy Ajax Album 1.0.beta-1

My easy online photo gallery software is now complete enough to be given a version number. Please welcome version 1.0.beta-1. Browse the example site to get an idea of what it looks like.

Easy Ajax Album is an open source PHP script that enables you to create an online photo album in seconds. Just copy the index.php file into the image directories on your web-server. That’s it! Download it here! [source]

You must have the GD module available in PHP. This is usually available, but you might have to turn it on. Check your hosting provider’s documentation. If you have any problems, then please tell me so that I can improve it for the next release.


  • Simple to install.
  • Smooth modern user interface, using Ajax technology.
  • Slide show.
  • Visitor comments.
  • Captions.
  • EXIF data display.
  • Support for themes.
  • No database required!

What’s New in this version?

  • Theme switcher. There are three themes in the default download. You can make your own by just dropping a CSS file into the _exa/themes directory.

  • You can now rename an image.

  • Spam resistant features help to cut down on comment spam.

  • Improved comment management helps you clean up if a spam or two does make it through.

Still to come

  • Search for text in caption or image name.

  • Basic Image Editing, especially image rotation.

  • Support for NO Javascript. Currently the site requires Javascript to be turned on.

  • Screen Size Detection so that you don’t have to tell it how big you want the slide-show images.

  • Even Easier Installation. It should be possible for the script to replicate itself into subdirectories that contain images, relieving the user of that chore.

Comment · Comments Feed · TrackBack

  1. Tatort said,

    12 April, 2007 @ 09:52

    Speacial Thanks, great tool.

  2. Oclee said,

    15 April, 2007 @ 13:46

    Very nice. However, what annoys me a little indeed is that the script has to be copied manually in all subdirectories of the album. That will become especially annoying whenever a new version is to be deployed. You might also want give some attention as to avoid visitors from browsing the created _exa directories.

    In any case, keep up the good work!

  3. alex said,

    16 April, 2007 @ 07:58

    Oclee: Yes I’m hoping to make it do that for you in a future version. However, in the meantime you can just put symbolic links into your subdirectories.

  4. Res said,

    12 May, 2007 @ 09:58

    Can i get your blog theme?? please … it’s so nice, i love it.

  5. Benko said,

    29 May, 2007 @ 18:35

    Thanks, you made some ppl at my office very happy using it in an intranet blog, would have liked a “hold” comment for approval feature but hey… it worked wonderfully as is.

  6. Anu said,

    16 June, 2007 @ 18:03

    Great Script. But i found 1 problem: If the photo directory have 6-8 levels of phot directories then single snap view doesnt work. Looks like there is a problem with the directory path which is in the href.

  7. Anton said,

    25 June, 2007 @ 09:57

    Very nice :-)

    But how I get “exif data display” to work? Requirements?

  8. Amanda said,

    1 August, 2007 @ 18:48

    Thanks for the cool script. Just wanted to let you know I ran into a problem with it this morning. I have about 300 pictures in a folder (some of them are pretty large) and the index.php page started throwing this memory error: “Fatal error: Allowed memory size of 8388608 bytes exhausted ” I fixed it by adding “iniset(“memorylimit”,”24M”);” to the top of the index.php script. but that’s probably not a great permanent solution. Have you seen this before? Do you have any other suggestions?

    Thanks, Amanda

  9. omers said,

    26 August, 2007 @ 13:11

    Thanks! Cool script. Its also easy to use and install. I want to create user accounts. But how can I add permission system? Or is there anyother good script like this one but have account system?

  10. Brian Lasseter said,

    18 September, 2007 @ 20:59

    This is a super cool script… I’ve been looking for some sort of easy gallery thing for a long time.

    You rock my world. :-)

  11. David said,

    4 October, 2007 @ 05:33

    Great work on the script, the drop-and-go-ness is pretty awesome. I found one thing very annoying, and that was I wanted the newest albums to show up at the top. So, I re-worked the directory reading so that the album directories are in order by timestamp, instead of whatever order the readdir decides to use. Here’s my changes… replace the “read_contents” function with this code (disclaimer: I’m no PHP expert, so there may be a better way to do this):

    /** For sorting the array of directories by timestamp */ function dateSort($a, $b) { if ($a[1] == $b[1]) return 0; return ($a[1] > $b[1]) ? -1 : 1; }

    /** Returns a sorted list of imadateSortges in $dirname. */ function readcontents($dirname=’.’) { $imagefiles=array(); $directories=array(); $tempdirectories=array(); if($handle=opendir($dirname)) { while($fname=readdir($handle)) { $fpath=$dirname.’/’.$fname; if(isdir($fpath) && iswriteable($fpath)) { if(pregmatch(‘/^[^.]/’,$fname)) // ignore the exa and any hidden directories $tempdirectories[] = array($fname, filemtime($fname)); } elseif($mime=imagemime($fpath)) { $im=new ImageFile($fpath,$mime); //$imagefiles[$fname]=new ImageFile($dirname.’/’.$fname,$mime); $imagefiles[sprintf(‘%012d%s’,$im->datetime(),$fname)]=$im; } } // end while closedir($handle); ksort($imagefiles); } usort($tempdirectories, array($this, “dateSort”)); foreach ($tempdirectories as $directory) $directories[] = $directory[0]; return array($directories,arrayvalues($imagefiles)); }

  12. GLart said,

    20 October, 2007 @ 14:18

    Very nice. Only a question. Can i but a backround music ?

  13. Anton said,

    22 October, 2007 @ 21:49

    Requirements for “exif data display” = php with exif support enabled

    Don’t know the php extensions on your host? Upload a small file (i.e. save as phpinfo.php) with content:

    to your host and call it via http://yourserver/phpinfo.php

    Delete it after use (server security)!

  14. Anton said,

    22 October, 2007 @ 21:52



  15. Anton said,

    22 October, 2007 @ 21:54

    ok, last try to submit the content:




    replace < with

  16. Anton said,

    22 October, 2007 @ 21:56

    no replace required!

  17. henry said,

    4 February, 2009 @ 12:37

    i put the index.php on my /var/www/gallery directory i pointed my browser to http://localhost/gallery

    it ask me to put my admin password.. so i did, and press set password..

    once i press that button i get this error..

    Warning: fopen(./_exa/config.php) [function.fopen]: failed to open stream: Permission denied in /var/www/gallery/index.php on line 337
    Warning: fwrite(): supplied argument is not a valid stream resource in /var/www/gallery/index.php on line 338
    Warning: Cannot modify header information - headers already sent by (output started at /var/www/gallery/index.php:337) in /var/www/gallery/index.php on line 2083


    Warning: mkdir() [function.mkdir]: Permission denied in /var/www/gallery/index.php on line 160
    Warning: chmod() [function.chmod]: No such file or directory in /var/www/gallery/index.php on line 161
    Warning: fopen(./_exa/themes/black.css) [function.fopen]: failed to open stream: No such file or directory in /var/www/gallery/index.php on line 2272
    Warning: fwrite(): supplied argument is not a valid stream resource in /var/www/gallery/index.php on line 4018
    Warning: fclose(): supplied argument is not a valid stream resource in /var/www/gallery/index.php on line 4055
    Warning: fopen(./_exa/themes/neutral.css) [function.fopen]: failed to open stream: No such file or directory in /var/www/gallery/index.php on line 2272
    Warning: fwrite(): supplied argument is not a valid stream resource in /var/www/gallery/index.php on line 4051
    Warning: fclose(): supplied argument is not a valid stream resource in /var/www/gallery/index.php on line 4055

    i’m not really sure if i’m install this right.. isee people are not having.. but what am i doing wrong?

  18. alex said,

    4 February, 2009 @ 16:26

    Hi Henry,

    Your web server needs to be able to write to the directory where you installed the index.php. Something like this should make your gallery directory world-writable:

    chmod 777 /var/www/gallery
  19. sven said,

    11 March, 2009 @ 22:25

    wow it is realy cool :)

    but, could you add 2 features please :

    • not nessasary to copy the index.php to each folder
    • add rss support

    with those 2 features it would be the best app for me.


  20. behnam said,

    19 May, 2009 @ 20:28

    Great script! Thanks, just one question:

    When I make a new folder inside the folder (that contains the script) and add images to it the folder is shown in the startpage, but when you press it so view it I get this error message:

    Forbidden You don’t have permission to access /gall/Lasernight/?d=c on this server.

    I have chmod 777 on all the folders and uploading and viewing images without a subdir works great, but when I put images in folders I get the message above, why?

  21. Fauzan Sohail said,

    30 June, 2009 @ 02:57

    Can this work with wordpress themes?

  22. Martin Teufel said,

    23 March, 2010 @ 07:05

    cool tool ;-)

  23. james said,

    21 April, 2010 @ 01:57

    hi i love your image gallery script but can you kindly tell how to use your comment posting scriot alone , i am interested in cmments alone plz help .the way you are creating individual est files to store comments is great but i dont want to create another folder i just want to place the index.php in image directory and in that directory only i want text files to be stored no furthur files inside gallery folder plz help plz send to my email id bydbest@gmail.com

  24. Marenz said,

    25 October, 2010 @ 13:32

    Great PHP script, thank you very much.

    Just another question. Is it possible to convert all pictures at once, so that all preview pictures are ready to use. On my server, PHP create the thumbnails and all other sizes after clicking a link, thus I have to click on every picture and wait.

  25. Grafikdesign Wien said,

    13 November, 2010 @ 18:44

    great: neat, simple & fast.

  26. Twi said,

    27 June, 2011 @ 10:17

    Installed it onto my new website over the weekend. I found the very easy to set up. I’d be interested in properly integrating it into the styles of my own site, so will have a look at generating some new css scripts for the gallery. One question though: my gallery directories each contain (on average) over a hundred images. So far I’ve uploaded four directories worth, with a lot more still to do. The images themselves have all been re sized to 1200 pixel wide on batch. The gallery appears to be loading up quite slowly which I think could frustrate new visitors to the site. I’ve examined the new directories the php generated, and I get the impression the script does to produce thumbnails for the ‘thumbnail views’, but instead uses the original higher resolution images. Is there a way to get the script to either read from an existing thumbnails directory to generate the pages, or alternatively create thumbnails from each image in the gallery directories? Thumbnails are created for the initial layout to display the folders, but not for each image.

  27. Andrew said,

    28 November, 2011 @ 02:13


    I love the script it works great but now I am having and issue with it. when i go to the landing page it renders correctly but if I select a folder in the list it asks me to setup an admin password again. Is there something I am doing wrong? I have 777 permission on the var/www folder it is in and I have copied the index.php file in to all sub dirs. then symlinked the dirs and initial index.php to the var/www/gallery so I can view it.

Leave a Comment