[SOLVED] problems-thumbs, upload, CVS builds, and permission

mackis5

Joined: 2005-04-25
Posts: 22
Posted: Mon, 2005-04-25 14:47

Hi,
I am a happy user of Gallery since 1.5 years, and now I have been trying out the G2.

I realized that its very much slower then the newest 1.5.. build, but I guess this will be solved when we have the release version. I added a php accelerator, and this helped me a bit.

1) My thumbnails are very often not loaded even though I only have 3 x 3 thumbs per page. Often one or two are missing, and when I refresh, they do appear. I checked the time out, but it has nothing to do with that.

2) I try to keep my album up to date with the night builds, and since about 2 weeks, I have a problem each time I upgrade. The problem is that index.php doesnt work. I have to reverse it to an old version. All other files are working.

3) I cant get the remote Java uploader to work with the latest CVS version. It complains about that the gallery_remote2.php doesnt exist... it does.

4) I cant get the permission to work like it should.(?) I have just one main category called GALLERY and then about 60 sub-albums - in total about 4500 pictures.
I would like to set permission per sub-album, so I added all Logged in Users (group) to be able to "view all versions" This does not work.

The only way I can do this is to add "Logged in Users Group" to the MAIN GALLERY, UNCHECK the inherit checkbox, and then add the usergroup to a single SUB-ALBUM.

If I only try to add the group to a sub-album without adding the permission as above, it doesnt work. If this is how its suppose to work, maybe a lookup should be made, when you are trying to add a group or a user to a sub-album, that tells you that you have to add this permission into the main Gallery permission.

I think it would be wonderful to have a permission admin page, where you can see all permissions for everything, and where you could add/remove users/groups. Like it is now, I have to login as the user (since I cant see what they can access), and then adjust it.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2005-04-25 17:21

2) "doesn't work" is not enough information. index.php changed today so please retry tomorrow; before that it did not change since 28-Jan.

3) gallery_remote2.php does exist? well, it shouldn't.. that's how the applet talks to G1, not G2.

4) i can't understand what you're trying to do.. adding view all permission for logged in users group will allow any logged in user to see that album.

 
mackis5

Joined: 2005-04-25
Posts: 22
Posted: Mon, 2005-04-25 18:44
mindless wrote:
2) "doesn't work" is not enough information. index.php changed today so please retry tomorrow; before that it did not change since 28-Jan.

3) gallery_remote2.php does exist? well, it shouldn't.. that's how the applet talks to G1, not G2.

4) i can't understand what you're trying to do.. adding view all permission for logged in users group will allow any logged in user to see that album.

thanks for your answer.

2)ok, I am using the first BETA 2 index.php. This is the version I have to use to get it to work. Everything else is just showing a blank page. I know, its weird. Dont know if it has to do with my environment. I use newest PHP 4.x.x with sambar webserver, and newest MYSQL 3.*.* on an XP sp2. It has been a very nice environment for me, and it has always been working perfect, even though the requirements has been "Only for apache 2" (E.G G1, PHP nuke, etc...).

3) hmm, when I try to use the remote application (or the build in applet) - version 1.4.2-b13, I get an error: "Error: Server contacted, but Gallery not foundat this URL (http://mysite.com/album/gallery_remote2.php)" This was working in prior version (BETA 2 but not CVS builds). All connecting strings are correct.

4)I refrase to make it more clear.
Ok, adding a usergroup "Logged in users" do work without any problem. Then all users have access to all sub-galleries. If I uncheck the inherit checkbox, no users will have access UNLESS I choose a sub-gallery to be shared.

Now to my problem:
If I decide to share one sub-gallery, WITHOUT sharing the main gallery, the user have no access to the sub-gallery.
My question is: Is it necessary to share the main gallery with the group, with the inherit unchecked, to be able to share sub-galleries? I dont want all users to see all albums, also, they have old permissions from the G1 that I have to change. Can I do this in an easy way, or is my only option to step through each sub-gallery?

Thats why it would be so neat to have an admin page that would handle all permissions for all users, where you could add/remove as you want. Lets say you edit a user. There you could add/remove all galleries/items that you would like.The same for a group.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sat, 2005-04-30 21:31

Please fill out the support template so that we don't have to ask you lots of questions about your environment:

Gallery URL (optional):
Gallery version:
Webserver (with version):
Datatabase (with version):
PHP version (eg 4.2.1):
phpinfo URL (optional):
Graphics Toolkit(s):
Operating system:
Web browser/version:
G1 version (for migration bugs):

Performance for G2 will be less than G1 for smaller gallery installs because we now have the extra overhead of a database, and the modular architecture introduces more layers of abstraction. We will still make it faster before the final release, but I doubt it we'll be able to make it more than 25% faster at this point. If that.

I'm not sure what's happening with your thumbnails. Possibly an issue with using certain graphics toolkits on Windows. What graphics toolkit are you using? Do you get anything in your error logs at that time? Can you enable logged debug mode in your config.php and try again and see if there are any errors appearing in the log?

The issue with Gallery Remote could also be caused by issues using custom error handlers on windows. Does the upload applet work? (that uses similar technology).

Each album (and each item) has its own complete set of permissions. You don't need to share the root album in order to allow access to a sub album. However, if the user has no read access to the root album, then you have to give the user a link directly to an album where he has read access, or he'll be prompted to log in.

I agree it would be nice to allow you to view all the permissions for a specific user. That's a little tricky to implement, but it's on our list of possible approaches for when we redesign the permissions interface.

 
mackis5

Joined: 2005-04-25
Posts: 22
Posted: Sat, 2005-04-30 23:07

Please fill out the support template so that we don't have to ask you lots of questions about your environment:

Gallery URL (optional):
Gallery version:Latest CVS version / try to update every third day or so
Webserver (with version):Sambar 6.1
Datatabase (with version):MYSQL 3.23.58
PHP version (eg 4.2.1):4.3.10
phpinfo URL (optional):
Graphics Toolkit(s):GD 2.028, ImageMagick 6.1.9
Operating system:XP sp2, English
Web browser/version:
G1 version (for migration bugs):1.5

bharat wrote:
I'm not sure what's happening with your thumbnails. Possibly an issue with using certain graphics toolkits on Windows. What graphics toolkit are you using? Do you get anything in your error logs at that time? Can you enable logged debug mode in your config.php and try again and see if there are any errors appearing in the log?

Will try that, and a report will follow.

bharat wrote:
The issue with Gallery Remote could also be caused by issues using custom error handlers on windows. Does the upload applet work? (that uses similar technology).

I am not sure what you mean. The upload applet does not work (see earlier posting), since about a week. I have to try the lates update from the CVS and try it out again.

bharat wrote:
Each album (and each item) has its own complete set of permissions. You don't need to share the root album in order to allow access to a sub album. However, if the user has no read access to the root album, then you have to give the user a link directly to an album where he has read access, or he'll be prompted to log in.

I dont think this is totally clear. Dont think the 1.x worked like that. I could not find this information, but now I understand. Its more or less like how the file permission with child objects where you have inherit as default. So if the usergroup has no access (actually not added to the main gallery) they cant access the child object, even thought they have access to the child object. Thats why you have to give the user a direct link. Hmm, I dont think it make sence to have it like that, or rather, not necessary.

bharat wrote:
I agree it would be nice to allow you to view all the permissions for a specific user. That's a little tricky to implement, but it's on our list of possible approaches for when we redesign the permissions interface.

Ok, I understand. Would be a super feature.

Here is the debug file. I added the debug code, when I opened a child gallery, and 8 out of 9 thumbnails opened. The page was loaded after 5 seconds, so I guess that it has nothing to do with the time out.

 
mackis5

Joined: 2005-04-25
Posts: 22
Posted: Sat, 2005-04-30 23:42

Here is another debug, where 5 thumbs were missing.
The album is now updated with the newest CVS.
Dont know if it matters, but thumbs missing are:
img_4732.jpg
img_4723.jpg
img_4719.jpg
img_4781.jpg
img_4712.jpg

I cant still use the java applet upload. Get:
Error: Server contacted, but Gallery not found at this URL (http://www.****.com/album/gallery_remote2.php)

 
mackis5

Joined: 2005-04-25
Posts: 22
Posted: Sat, 2005-04-30 23:49

Here is the exacly same album that I managed to load after refreshing 10 times. Every time I refreshed, different thumbs were missing, and finally they all loaded.

I attach the debug file here since it might be good if you want to diff the files.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Fri, 2005-05-06 08:31

The fact that you're getting different missing images each time indicates that your server is failing to process the requests properly. If there's a time when they all work, then it's unlikely that the problem is the G2 code. Check your server error logs to see if your webserver is seg faulting, and/or check your webserver error log to see if PHP is dying. Finally check your access log when you refresh the page to see if every request for an image is returning a 200 status code. You can also install the LiveHTTPHeaders extension in Firefox and watch image requests to see which ones are failing.

My guess is that this is a server configuration issue, but it's hard to tell what the exact problem is without more details.

 
virshu
virshu's picture

Joined: 2003-09-13
Posts: 314
Posted: Mon, 2005-05-09 16:58

mackis5, re: missing thumbnails problem... I had something like that before. It turned out to be that GD was the highest priority toolkit, and web server was multitasking (generating several thumbnails simultaniously), and PHP was running out of memory. My solution was to disable GD (or at least make it lower priority than ImageMagick). See if it solves the problem.

don't know much about remote, or other problems

 
mackis5

Joined: 2005-04-25
Posts: 22
Posted: Mon, 2005-05-09 17:51
virshu wrote:
mackis5, re: missing thumbnails problem... I had something like that before. It turned out to be that GD was the highest priority toolkit, and web server was multitasking (generating several thumbnails simultaniously), and PHP was running out of memory. My solution was to disable GD (or at least make it lower priority than ImageMagick). See if it solves the problem.

don't know much about remote, or other problems

Did not work for me.
This starts to drive me nuts. I upgraded mysql to 4.1.11, and PHP to 4.3.11, but nothing canged.

 
mackis5

Joined: 2005-04-25
Posts: 22
Posted: Mon, 2005-05-09 18:09
bharat wrote:
The fact that you're getting different missing images each time indicates that your server is failing to process the requests properly. If there's a time when they all work, then it's unlikely that the problem is the G2 code. Check your server error logs to see if your webserver is seg faulting, and/or check your webserver error log to see if PHP is dying. Finally check your access log when you refresh the page to see if every request for an image is returning a 200 status code. You can also install the LiveHTTPHeaders extension in Firefox and watch image requests to see which ones are failing.

My guess is that this is a server configuration issue, but it's hard to tell what the exact problem is without more details.

I have no errors at all in my server logs (like php, webserver, sqlserver or system)

I now monitored the load with LiveHTTPHeaders. Here is the result:
22 out of 30 thumbs loaded
I stepped through the LiveHTTPHeaders log, and found 1 out of 8 unloaded thumbs inside the log file, and obv. 7 / 8 are totally missing. I attach the LIVEHTTP code here.
Missing thumbs are img_210 (this can be found in the log file, but it was not loaded), img_205, img_204, img_201, img_200, img_195, img_186, img_184

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Wed, 2005-05-11 03:51

I can't get this rar file to open. It keeps giving me errors. Can you try uploading it again as a ZIP file? Thanks!

 
mackis5

Joined: 2005-04-25
Posts: 22
Posted: Wed, 2005-05-11 11:09

I have now changed Web server to apache2
The problem remained, and I started to play around with the php.ini
I uncomment the following that was supose to help my server, but actually it did the opposite:

zend_extension_ts="C:\Program Files\Zend\lib\ZendExtensionManager.dll"
zend_extension_manager.optimizer_ts="C:\Program Files\Zend\lib\Optimizer-2.5.7"
zend_optimizer.optimization_level=15

Its fine now, but it requires some more testing.

Thanks for all you help.
(I will not upload the rar file again)