Tag Archives: programming

More AJAX for NextGEN Gallery

When I review the questions in the forum , I can see that still the biggest problems is caused by the memory limit. It’s annoying that the create thumbnail process stopped or failed very often. I did my best to catch the problem, but as you can see from the 1&1 problem, I’m helpless when the script didn’t get the correct result from the web server.

For Version 1.00 I introduce a new AJAX based solution. Instead to process the thumbnail operation for all images via the PHP script ,I used a AJAX solution which submit each thumbnail step by step. This will ensure that the main script not suddenly stopped by a fatal error or warning. Here are some pro’s and con’s about my new solution :

Pro 

  • A fatal error (memory_limit) will not break the main script
  • I can show up any error message as inline message
  • It will only in strange cases hit the “Max Script Execute Time”
  • Therefore I can combine different server intensive operation (thumbnails, resize, set watermark ) 

Contra

  • Require much more time
  • More database queries during the process

I uploaded this changes now to my GoogleCode project, if somebody is interested for testing , go and get the trunk code. It also contain now the new ImageMagick support (Thanks to the help of Frederic De Ranter). Please note that the trunk is fresh alpha build : not tested, not reviewed and nothing for a live blog system !

Tagged , , ,