So I was running the stable Gallery 1.3.2 version and using Gallery Remote 1.0 (stable).
Everything worked great.
I upgraded to Gallery 1.3.4-cvsb11 and everything looked like it was working great. I however wasn't a good sysadmin and didn't go through and test everything. Turns out, gallery remote stopped working. I upgraded to the newsest gallery remote (1.01b3) and turned the logging all the way up and checked it out.
I was getting :
1045470554863|TRACE|GalComm2 |<br />
<b>Fatal error</b>: Cannot redeclare createnewalbum() (previously declared in C:wwweloisegallerygallery_remote2.php:457) in <b>C:wwweloisegalleryutil.php</b> on line <b>1435</b><br />
1045470554863|ERROR|GalComm2 |com.gallery.GalleryRemote.GR2Exception: Server contacted, but Gallery not found at this URL (http://XXXXXXXXXXX/gallery/)
(ignore the XXXXX, thats my editing)
So, I went in and looked at util.php, and low and behold it's defining a function called createNewAlbum. I do some diffs against 1.3.2 and this is a new function which is used in
do_command.php
publish_xp.php
gallery_remote2.php
however, there are two different functions, one defined in util.php and one defined in gallery_remote2.php with the same name. The util function is looking for one paramater and is the one being used by do_command.php and publish_xp.php. The one in gallery_remote2.php is looking for 4 paramaters and is only used in gallery_remote2.php.
This wouldn't be a problem, however, gallery_remote2.php calls init.php which calls util.php which is causing the
Cannot redeclare createnewalbum() (previously declared in C:wwweloisegallerygallery_remote2.php:457) in <b>C:wwweloisegalleryutil.php</b> on line <b>1435</b>
error.
This looks, for all intents and purposes, like a bug to me.
My workaround which looks to work great, is simply rename the function that gallery_remote2.php is using so that the two functions are discreet.
modify line 253 of gallery_remote2.php, changing createNewAlbum to something else (I used createNewAlbumGR)
modify line 457 of gallery_remote2.php, changing createNewAlbum to something else (I used createNewAlbumGR)
Any comments on this would be appreciated, I'm curious if anyone else is experiencing this scenario.
-Gene Wood
Posts: 1479
Good going... I'll work this out with the developer who declared that othr function. It doesn't belong in GR anyway, if this other function does the trick, I'll use that instead.
Thanks for tracing this.
Posts: 8
Not a problem. Let me know what the end fix (instead of workaround) should be for this when you get it.
-Gene Wood
Posts: 1479
I've just fixed this in Gallery 1.3.4b13. A method name conflict was inadvertently introduced in 1.3.4b11. You don't need to upgrade GR, just Gallery.