Slashdot is powered by your submissions, so send in your scoop


Forgot your password?
Programming IT Technology

Gallery 2.0 Released 224

uss_valiant writes "From the Gallery website: "We are incredibly pleased to announce the release of Gallery 2.0! Over three years of design and development have gone into creating the best online photo management product possible. Gallery 2.0 is the natural successor to Gallery 1, and we hope that you like what you see. Don't wait, download Gallery 2 now!" From a developers point of view, the Gallery 2 framework is particularly interesting because it's written with modern programming patterns (OOP, extreme programming, test driven development, MVC, factories, modularity, ...) in mind which is rather unusual for PHP based projects. Over 1500 unit tests ensure correct functionality and its architecture is really impressive."
This discussion has been archived. No new comments can be posted.

Gallery 2.0 Released

Comments Filter:
  • FYI (Score:4, Informative)

    by Anonymous Coward on Tuesday September 13, 2005 @06:22PM (#13551658) []

    The Gallery Project is an open source PHP project enabling simple management and publication of photographs and other digital media through a PHP-enabled Apache or IIS web server. Photo management includes automatic thumbnails, resizing, rotation, and flipping, among other things. Albums can be organized hierarchically and individually controlled by administrators or privileged users.
  • +5 Insightful! (Score:5, Insightful)

    by h0bbel ( 105687 ) on Tuesday September 13, 2005 @06:22PM (#13551666) Homepage
    RC1 was codenamed +5 Insightful, how nice :)
  • Gallery (Score:3, Insightful)

    by Saiyaman ( 859809 ) on Tuesday September 13, 2005 @06:25PM (#13551701)
    I have been using the Beta of 2 for Gallery for a while. I love it. It is great if you want to share photos with friends after a fun night partying. Also allows your friends to upload pictures if they are so inclined.
    • Re:Gallery (Score:5, Informative)

      by Scooter ( 8281 ) <owen@annicnova[ ] ['.fo' in gap]> on Tuesday September 13, 2005 @06:53PM (#13551926)
      I agree - I had used Gallery 1.3.x for years and it was "OK", but was a pain to permission up, and stored all the images below the doc-root, so it was trivial to bypass the security anyway.

      All of this has now been fixed, with a robust user/group model with a permission "tree" ("view all sizes" implies "view full size" and "view thumbnail" for example), and the images stored in a dedicated data directory outside of the web server doc-root. They've also fixed that annoying "feature" of 1.x.x where it would output image URLs with the explicit host name used during the install. This meant for my old gallery, that all the image URLs were prefixed with my internal host name for the server, so you got no images when browsing it from outside (unless you had a real non-proxied connection to the Intarweb and could edit the local hosts file :P ) It no longer gets it's knickers in a twist and corrupts it's own config file either (although I suspect this only happened on certain combinations of PHP and Apache)

      Gallery 2 demonstrates the ease of use of a mature project. Upgrading within 1.x.x release used to be a bit of a chore, but after unpacking Gallery 2 to a new virtual server, a couple of MySQL commands to create and permissiona new database, all I had to do was browse to the new server, and tell it where the data was for the old gallery and it just got on with it. Detected all the image tools and preserved all the comments and metadata.

      The "help n fill" on the local server paths is a bit spooky, but handy. The upload options are comprehensive, even supporting Xo's "publish to Internet" function, although I can't really reccomend that - it's very slow. The best option is to use Gallery Remote - a swing app that lets you just drag images, or folders or zip files of images onto it to upload to your gallery.

      It even acts as a shop, letting your customers select images to buy from smaller versions and then making them a handy zip archive for checkout time.

      Now I don't have to bother emailing pictures to family and friends - I just made them a user id each, created some groups, permissioned up the albums (and it supports inheritence too for permissions) and mailed people the link :)

      Fantastic job guys.
  • Anyone have an alternate link or a server thats running it since the site is borked?
  • I have been using JAlbum [] for my photo album projects for quite some time now. I like it pretty well and there are a lot of templates out there for it. I'm not crazy about it though. I checked earlier versions of Gallery a while back but I didn't care for the look of the UI and the webpages it created. Anybody try this new version of Gallery yet? Any other free web albums you guys would recommend?
    • Since the functionality is completely separated from display, you can use its easy to customize templating system to completely adapt its look to your needs. I've been using it for a few months, and I must say I'm impressed. Seems to be the best photo gallery in town :)
    • I spent a while looking at various photo galleries a while ago and couldn't find a single one I was happy with.

      The main problem is that I'd like to have one photo in multiple albums. I know that was on the requested features for Gallery - anyone know if it made it into this release? (I can't check with the website not responding).

      I'd also like one that doesn't arbitrarily use the terms 'album', 'collection', 'category', etc., in strange and bizarre ways. They're the same bloody thing! (in that they're all u
      • You can definitely have a photo in multiple albums in G2. They're called linked items or something similar. There are only albums and items in Gallery. There is a root album that can contain an arbitrary number of subalbums and items. Items can be photos, movies, or anything else a plugin is available for. Some have even added support for audio items.

        Regarding your complaints about keywords, they can be added to items and searched for, but there is still a lot to be done in this area. AFAIK, the next versi
      • Are you more interested in a dynamic website (a la Gallery FTA) or an up-front generated static html + pictures directory tree? I've written the latter for myself, and though it has not been worked on in a while, I've been looking to do a rewrite and major overhaul/enhancement this winter. If you're more interested in pre-generating html, I definitely could use some help with this project.
    • by Anonymous Coward
      I have been using Quick Digital Image Gallery [] for a few years now. My reasons for choosing it over gallery:
      1) much smaller code, much easier to understand, much easier to hack. 2) more secure than gallery. I was scared off by the large number of security problems gallery was having back then (and apparently still are, I'm told but haven't confirmed there was another one discovered recently?).

      Qdig isn't for everyone though, as it is rather spartan. It does come with a web-based admin script I've never u
    • Coppermine (Score:2, Informative)

      by Derf_X ( 651876 )
      Coppermine seems nice, but I never tried it since all my pictures (1100+ pictures) are already on Gallery.

      JAlbum was the first I tried, but it was not practical for adding pictures to albums and comments to pictures, so I switched to Gallery. It works for me since I have my own server on a DSL line. Mambo is already slow on it (P166MMX), so I suspect Gallery 2 will be the same since it also uses MySQL.

  • PHP != Crap Code (Score:5, Interesting)

    by ilkahn ( 6642 ) on Tuesday September 13, 2005 @06:27PM (#13551726) Homepage
    I have often remarked that a "Writing Maintainable Enterprise Class Systems in PHP" book would be the best thing since sliced bread for the PHP community. There is nothing so wrong with the language and the environment (although some have likened it to training wheels without the bycicle) that can't be remedied with discipline, communication, and the use of mindful quality software development discipline.

    PHP has been a wonderful language in which to "put together quick solutions which grow into large projects" for me in fields from accounting to my current work in Industrial / Manufacturing! The interfaces you can write to control PLCs and generate plant floor intelligence using *good* PHP and a web server are light years beyond what is usually available on a shop floor with PanelViews and Vorne displays (Light bars...) Someone out there would be smart to write a PHP-for-software-engineering book.
    • The problem is, when those small projects become big projects, they usually need to be completely rewritten from scratch because the small projects were not written with maintainability in mind.

      This is the primary problem with languages like PHP. There is *NO* structure to them, no type strictness, no standard practices. ASP (original) suffered from the same problems.

      JSP and ASP.NET have a lot better structure to them, and standard practices, not to mention tools that follow them.
      • I've found that the lack of structure to some PHP programs can be beneficial; you can write a one-off program, then refine it piece by piece into usable code. But, that said, I have some system design experience in C++ and Java, so I tend to structure my code a lot more logically than some people.
      • Re:PHP != Crap Code (Score:4, Interesting)

        by ilkahn ( 6642 ) on Tuesday September 13, 2005 @06:51PM (#13551916) Homepage
        I guess that's sort of the point I wanted to make, is that with some foresight and proper discipline, those small projects, when they become big projects, don't need to be rewritten from scratch, if maintainability was in mind from day one. Take PEAR::DB or one of the more advanced O/R mapping PHP frameworks (such as Propel), throw a decent templating system on there (such as Smarty), keep your code highly cohesive and loosely coupled, and the benefits of the language and the libraries are *massive*.

        I spent 4-5 years trying to get JSP to work as a "rapid development prototype to full scale application" environment, and I constantly ran into issues with Tomcat, Jasper, JAR file surprises, all of the warts that come with the Java language, etc... I switched to PHP for all "non-transactional" code when I did a study whereby I analyzed the amount of time it took one of my teams to react to "changing customer requirements" utilizing PHP/Apache as opposed to how much time it took another team of mine to react to similar requirement changes using JSP/Tomcat. I am not saying that JSP couldn't have worked, it's just that it seemed to not really have as many benefits as I would have liked for an environment that required as much agility as that which I found myself in.

        I have to admit, my experience with ASP is nearly nill, as I have not been able to convince any clients to allow me to test out MS platforms controlling plant floor hardware.

        All that being said, when my company writes something that requires "transactional integrity", we do pick Java for the backend... it's just that those situations in my field really are few and far between.
        • Re:PHP != Crap Code (Score:5, Interesting)

          by NickV ( 30252 ) on Tuesday September 13, 2005 @07:26PM (#13552236)
          You're comparing a decent templating engine (Smarty) with crap Java technology (JSPs.) Most modern Java programmers disdain JSPs and use other, better templating technologies. Try using Velocity [] . Requires no recompiling when you make changes and is a very very easy templating language that provides an amazing amount of power (you literally can drop items into a hashtable of VelocityContexts and then access them by using "$" notation... such as "$") If you want something that will really rock your world, check out JSF [] or Tapestry [] (it turns web programming into writing an event-driven application, like desktop apps.)

          The problem with most PHP applications is that they don't scale. I don't mean that in a "PHP SUXORS! YOU CAN'T WRITE S$!@ IN IT"... I mean that most PHP applications aren't built with any real caching implementations (like this gallery software, or phpbb, or nuke, etc...) and the PHP frameworks that I looked at don't really provide that functionality.

          The stuff availble for Java is just so much more powerful. You have the Hibernate [] OR mapping package that provides an amazing amount of OR work for you, including the ability to plug in multiple transactional caches, session caches, database connection pools (including the ability to have clustered caches across multiple boxes.) You have complex messaging architectures to talk to and keep multiple machines in sync. You have great web service APIs and great search engines that can be plugged in. Stuff to that degree just doesn't exist for PHP.

          It often shocks me to see so many "Enterprise Level" PHP apps released with no caching implementation... you shouldn't see ANY home page hit a database on every hit. (And yes, you can easily avoid stale content by eviction, injection routines.)

          So yes, you can definitely write decent stuff in PHP. But for the highly scalable enterprise environment, the libraries and packages that exist for Java and ASP just don't exist.

          The other thing I hate about PHP is that there just is no IDE that is of the caliber of Eclipse for PHP (and PHPEclipse just ain't there yet.) A professional IDE allows me to introspect objects, trace stacks, change variables on the fly per hit and control each thread individually. This kind of power makes debugging and performance testing so much easier and more powerful than a PHP app. Good luck trying to seriously profile a PHP app...

          So yea, PHP has it's place. It's wonderful for quick one-offs. I just wouldn't want to code a massive user load, transactional, high availability, multiple machine cluster application on it.
          • FYI, You don't need caching to be a part of the application server. Just make sure you generate good expiration times for your pages, and then use a reverse proxy front-end server. The proxy will cache requests, and pass new ones to the backend. I use this with great results on mod_perl, with a lightweight apache front end on the same machine for the reverse proxy.
          • by ilkahn ( 6642 )
            I actually agree completely regarding caching... The proliferation of "databases that seem quick enough" has led to an entire generation of programmers that think that it's perfectly reasonable to do a handful of database queries per page load.

            However, in my particular case, I have different needs. My company writes "shop floor intelligence" systems in which PHP is my *middleware* language. We use Smarty/PHP to generate XML/[other streams] from proprietary interfaces to PLCs or embedded shop floor systems
            • Sorry, I was in a "web" frame of mind, since we were talking about a web application.

              It is nice that languages like PHP are interpreted (or at least dynamically run in a way that seems interpreted) and its nice that functionality is provided out of the box. It does make it very easy to modify code on the fly in production (something that is very scary though!)

              Java provides similar type of functionality too if you need it(you can do hotdeploys of .class files [sorta], and you can use other technologies such
              • Wow... did we just have a reasonable discussion on slashdot? That's creepy. :)

                But yeah, modifying production code on the fly was something that took me a while to get used to. I had come from a tradition "IT Environment" in which you had programmers coding in a dev environment, and test environments, and staging, and deployment... etc... And suddenly, I find myself in an environment where you *can't* really have a test environment. How do you test, for example, a mile long conveyor that diverts packages
          • "The problem with most PHP applications is that they don't scale. "

            I would like to know what you mean by "scale". Even if we stipulate everything you say as being true are they really that important in order to scale your application? Is ORM mandatory for large scale application? Certainly MS does not think so because they don't reccomend ORM for .NET applications.

            Let me rephrase the question. How large can a PHP application scale? Presuming savvy programmers how much load can a PHP application take before
          • I used the zend studio IDE years ago and it was sharp at the time but I don't think it's cheap to purchase now.

            I was hoping to see more from PHPEclipse. Quite honestly, the plugin was a dissapointing to me. I don't see any reason to tie it to the XAMPP packages and it loses so much of the awesome functionality of Eclipse that I quickly resorted back to Macromedia homesite for a glorified text editor.
        • While I agree with you that you CAN create good and maintainable and scalable code in PHP (as well as just about any language), the question is, does the language, common toolsets, and best practices promote good use of the language. Also, does the language allow simple and easily caught mistakes?

          The lack of any real type safety in PHP makes it difficult to track down simple typos (for example, misspelling a variable name). I don't mean syntax errors, since those are easily caught, but typo's that are not
    • I have had years of dealing with PHP sites. PHP is a security nightmare. Just last Sunday morning I was dealing with yet-another-PHP-exploit-on-a-client-server. You might want to keep that in mind when reading the vitriol below.

      Most PHP code I've looked at is vile: the people who wrote it cannot code worth a damn and seem to program completely by trial-and-error. register_globals anyone? no checking return values? Grabbing values from POST variables and using them unconditionally, without any sort of valida
    • I write well-structured (in my opinion, at least) PHP code a lot at work. These things are some of my main dislikes:

      • No namespaces. Once you get a few different third-party libraries loaded they start trampling over each other's class and function names. While you can name classes with a prefix (MyCrazyApp_Thing) it gets tedious to type the prefix constantly and other developers don't comply. Having standardized namespaces means that there can be the concept of a "default" namespace for the current scope a
    • I've often remarked that "Flying to the Moon and Back on a Paper Airplane" would be the best thing since sliced bread for space exploration.
  • Marketing (Score:3, Funny)

    by gunpowda ( 825571 ) on Tuesday September 13, 2005 @06:28PM (#13551735)
    Gallery 2.0 is the natural successor to Gallery 1...

    Of course, it were a Microsoft product, the natural successor would be 'Gallery Super Uber Ultimate Edition'.

    • by mblase ( 200735 )
      Of course, it were a Microsoft product, the natural successor would be 'Gallery Super Uber Ultimate Edition'.

      You sure you're not thinking of the "Street Fighter" series?
    • by ImaLamer ( 260199 )
      The code name for the project would be Minneapolis [] and the final product would be called Opportunity.
  • by tonigonenstein ( 912347 ) on Tuesday September 13, 2005 @06:30PM (#13551747)
    OOP, extreme programming, test driven development, MVC, factories, modularity
    • Nope, sorry, they forgot XML and Object-Relational Impedance Mismatch.

      Not bad, but I'm sure with a little more work they could throw at least half a dozen other nearly meaningless phrases in there.
  • Slashdotted (Score:3, Informative)

    by xot ( 663131 ) <fragiledeath@g[ ] ['mai' in gap]> on Tuesday September 13, 2005 @06:33PM (#13551777) Journal
    • Please use the SourceForge link below people. The Gallery forums aren't working either because the site is being owned.

      Gallery 2 []

      I have a gallery2 site too. It'l be nice when I can get enough bandwidth to get the full version of gallery2 :(

      Site (With default theme and ~500 pics): here []
  • by swillden ( 191260 ) * <> on Tuesday September 13, 2005 @06:40PM (#13551831) Homepage Journal

    Hey, has anyone tried out the Debian gallery2 package? Does it do a good job of migrating the data, or does it install stand-beside? I have a gallery 1 installation that my whole family uses, and I'd like to know if it's safe to upgrade, or if I should wait for the bugs to be worked out.

  • by TimCrider ( 215456 ) on Tuesday September 13, 2005 @06:46PM (#13551875)
    Slashdot Effect [ FAILED ]
  • Anyone have a cache or alternate download page?
  • by Karamchand ( 607798 ) on Tuesday September 13, 2005 @06:56PM (#13551957)
    Since the gallery.menalto-site seems to be slashdotted already here's a working download link at least, directly from gallery 2.0 file list []
  • For those interested. Gallery is the next big one in line to move its site to drupal []
  • by jackstack ( 618328 ) on Tuesday September 13, 2005 @07:07PM (#13552071) Journal
    1. Upload a huge honking zip file of compressed images and create an album
    2. Integrated "Publish to Your-Special-Gallery" from WindowsXP "My Pictures" folder
    3. Easy to customize permissions
    This (along with gnump3d) are my two FAVORITE web apps for linux.
  • Try out Gallery Local [], a smart client for gallery.

    It allows viewing of your gallery offline. It takes advantage of the new XML-RPC routines available in Gallery 2.
  • My Gallery (Score:2, Interesting)

    by jelevy01 ( 574941 )
    If anyone cares here is my gallery: []
  • Give me a break. (Score:4, Interesting)

    by saberworks ( 267163 ) on Tuesday September 13, 2005 @07:48PM (#13552402)
    If this is an example of good PHP coding someone please shoot me. They use their own internal "require_once" instead of simply using ini_set to set the include directories correctly. They name all their included files *.inc and *.class which can be a severe security issue if these files are available from the web root (which by default they are).

    From the code I saw, everything is extremely over-engineered (read: too freaking complicated). It looks like they have some input sanitization functions but they aren't used consistently.

    The coding style throughout isn't consistent (but who cares?).

    On the plus side, they have used PHPDOC or some similar syntax to document their classes and functions (makes for good API docs). They have used external libraries for some things like templating and database abstraction (can't say much for their choices but at least they didn't rewrite those from scratch).

    The error handling also looks particularly nightmarish:
    if ($ret->isError()) {
    return array($ret->wrap(__FILE__, __LINE__), null);
    (repeated 12 times in one 100 line file!!!!)
    • Re:Give me a break. (Score:5, Informative)

      by Warren_Canuck ( 522319 ) < minus caffeine> on Tuesday September 13, 2005 @09:08PM (#13553072)
      About the internal "require_once", maybe you should read the comments on it then you would see that G2 keeping track of what files it has already included and only using PHP's (very slow) require_once speeds up the function by about 10x (line 2480, modules/core/classes/GaleeryCoreApi.class)

      As for the coding style not being constistent, could you please give an example? G2 has very strict code style guidelines that have to be followed for a patch to be accepted (you can find them on the g2 codex site which is currently getting hammered). The code may appear complicated but if you take the time to read things it's actually quite legible and it makes sense. Usually people who have not worked on very large team projects feel intimidated by something as large and complex as Gallery2, I know I was when I first started working on it.

      I admit the .inc and .class issue appears to be somewhat concerning, nothing that can't be fixed by 2 lines in a .htaccess file though. I'll be sure to bring it up at the next meeting.

      The error handling code works and I challenge you to find a cleaner way to let the developer know exactly where an error occured so they can fix it. Why does it occur so often? Because error checking is good, it's just too bad more people don't do it.
      • Re:Give me a break. (Score:3, Interesting)

        by Fweeky ( 41046 )
        "The error handling code works and I challenge you to find a cleaner way to let the developer know exactly where an error occured so they can fix it."

        I'll take "exceptions" for £50, Bob. Unfortunate that PHP5 doesn't seem to be taking off quite like PHP4 did; I wonder if that's because many of the people who would find the new new features attractive are finding other languages suit them better? I know I did, and I used to really love PHP and was dead excited by Zend Engine 2 :/
        • I'll take 'exisiting installbase' for $100, Bob. The installbase of PHP5 is NOWHERE as near as PHP4 right now and since most of our users don't run their own servers but instead rely on webhosting companies, PHP5 isn't really an option. I agree, PHP5 has a ton of great features and I'm sure they would help greatly with Gallery2 but we simply can't switch to it or we'd be preventing what would amount to probably 90% of our userbase from upgrading to it.
          • Yup, that's kinda why I said "I wonder why it hasn't taken off", given so many people were really itching for the new features (even if they removed half of them during ZE2 development, meh). Oh, and you didn't explicitly say anything about usability, just "cleaner" ;)

            Seems a bit like a chicken and egg problem in some ways; very few people use the new features because most people don't have control over their own servers, so those that do have control don't see a point in upgrading because.. nobody uses th
    • I didn't look at the code, so I just assume just assumer g2 is over-engineered from what you wrote.

      I find it funny that g2 is over-engineered because it is specified in the article that XProgramming was used to develope it. And one of the advantage that makes XProgramming so great is that it should prevent you from over-engineering your stuff.
  • Safe mode (Score:2, Informative)

    by doctela ( 889621 )
    One of the problems with Gallery 1 was that it would not run with PHP's safe mode, which is often used in shared web hosting. Does Gallery 2 also have this restriction? (The site's still slashdotted.) There are other PHP-based photo gallery solutions that do not have this restriction, such as Coppermine [].
  • Wordpress support (Score:3, Informative)

    by Coppit ( 2441 ) on Tuesday September 13, 2005 @08:50PM (#13552943) Homepage
    To easily include gallery pictures in your blogs, check out the wpg2 [] plugin.
  • Second to one (Score:3, Informative)

    by fulldecent ( 598482 ) on Tuesday September 13, 2005 @09:37PM (#13553251) Homepage
    Camera Life is so much better: []
  • mysql_connect() (Score:3, Informative)

    by rsd ( 194962 ) on Tuesday September 13, 2005 @09:42PM (#13553277) Homepage
    whats the point of
    the Gallery 2 framework is particularly interesting because it's written with modern programming patterns (OOP, extreme programming, test driven development, MVC, factories, modularity, ...)
    If they still have not got the basics:
    Warning: mysql_connect(): Too many connections in /usr/www/website/ on line 31 Too many connections
    Every PHP+MySQL HowTo^H^H^H^H^Htutorial explains that mysql_pconnect() should be used.
    • A comment from the mysql_pconnect man page (NOT written by me though):

      Normally you do NOT want to use mysql_pconnect. This function is designed for environments which have a high overhead to connecting to the database. In a typical MySQL / Apache / PHP environment, Apache will create many child processes which lie in idle waiting for a web request to be assigned to them. Each of these child processes will open and hold its own MySQL connection. So if you have a MySQL server which has a limit of 50 conne
    • Note that their web site is running Drupal, as Gallery is a photo gallery, not a CMS. They didn't write the code their site is running on.
  • I clicked on the link [] [] . I thought it looked good. Then I scrolled down and looked at the bottom of the page:

    Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /usr/www/website/ in /usr/www/website/ on line 10 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /usr/www/website/drupal.g

  •" /

    Seems their site's working just fine.
  • I just upgraded to Gallery v. 2.0, but now I can't use Gallery Remote to upload photos. I keep getting the following error message:

    Server contacted, but Gallery not found at this URL ( [] )

    Any pointers? Has anyone else experienced this? Does Gallery Remote work at all with g2?
  • Don't wait, download Gallery 2 now!

    Couldn't you have waited till I got my copy first? :)
  • Gallery 2.0 is the natural successor to Gallery 1...

    I disagree. I was going to try one of the Beta or Alpha releases of 2.0 a while back, but as soon as I read that it required MySQL, I turned tail and ran.

    One of the beautiful things about Gallyer 1.x is that it didn't require a relational database, which IMHO is massive overkill for such a simple application from a data perspective.

No problem is so large it can't be fit in somewhere.