Debugging upload problems on JoomGallery

Download the files linked below this article (make sure you are running the same version of JoomGallery or you might run into trouble) and put them in ‘administrator/components/com_joomgallery/adminclasses/’ and make sure the directory is writable to the httpd user (if you don’t like the idea of giving Apache write permissions on the whole directory, as an alternative, you could create a file called ‘debug.log’, change the owner to the httpd user and chmod it to 775 so the logging function will not have to create it itself).

Now fire up the Java uploaded and try to upload a batch of photos – it should fail as before. Only this time, grab the debug.log file from that folder (http or ftp will do) and look where the script stopped.

If you are having memory problems, you will most likely have a last line saying "Creating thumnail" or "Resizing image" or similar. If that is the case, PHP ran out of memory while attempting to resize the image and it died. Read on for ideas how to fix this. Also, read up to see exactly how much memory PHP has available and how much is probably needed – in this case, the guess is wrong and the ‘spare’ memory is not enough to keep going. In my case, the script had 16MB to work with and guessed it needed 13MB to resize the photo – it guessed wrong…

If you have a different line ending the log, I suggest you open up the ‘admin.upload.class.php’ file and try to hunt down the exact function that killed your upload. Use the function lines in the logs to determine the correct function (some logging messages appear multiple times in that class). After you figure out what was going wrong, you can try to fix it – or drop me or the JoomGallery devs a note ^^

{jd_file file==8}{jd_file file==9}

Related Post

Leave a Reply

Your email address will not be published. Required fields are marked *