Thank you for your reply.
As far as I see there are two getUserIP() calls to replace. One in the rating.php and one in the upgrade.php. I have enabled the gallery sessions as well. Are you able to tell me if I need to set session_start() in these two files as well or will be $_SESSION['GalleryUser'] "transfered" by the zenphoto session?
I am still hoping to get rid of the problem by myself....
Zenphoto will do the session_start() if the gallery sessions option is selected. Placing your user id into the sessions array as you did will propegate it to all scripts that are part of that session.
However, sessions can expire, etc. This depends on PHP settings. Your other option is to store the user id in a cookie. That does not require sessions, thus does not need the gallery sessions option.
I guess, I am going to lose this battle....
a:1:{i:1;d:5;} => User-ID 1a:2:{i:1;d:5;i:3;d:3;} => User-ID 3a:3:{i:5;s:1:"4";i:3;s:1:"4";i:4;d:5;} => User-ID 4a:4:{i:5;s:1:"4";i:3;s:1:"4";i:4;d:5;i:6;d:2;} => User-ID 6I can't get it work.....
I am not exactly sure what your problem is:
a:1:{i:1;d:5;} => user 1 rating 5
a:2:{i:1;d:5;i:3;d:3;} => user 1 rating 5; user 3 rating 3
a:3:{i:5;s:1:"4";i:3;s:1:"4";i:4;d:5;} => user 5 rating "4"; user 3 rating "4"; user 4 rating 5
a:4:{i:5;s:1:"4";i:3;s:1:"4";i:4;d:5;i:6;d:2;} => user 5 rating "4"; user 3 rating "4"; user 4 rating 5; user 6 rating 2
Thank you for your patience, sbillard! I really appreciate it.
I hope to be able to explain where my problems are.
For the lines 'a:1...' and 'a2:...' I understand you explanation.
However, with the following updated entries of 'a3:...' and 'a4:...' I don't understand the change of the listing (rating within double quote and the entry of "s:1"). And where is the rating and the user-ID of user 1 at the entry of 'a3:...' and 'a4:...'?
Line a1 shows the first rating of user 1 and line a4 shows the last rating of user 6 (including the rating of users 1, 3, 4 [b]and[/b] 6).
A user with ID 5 has not rated any image.
Well, I really do not know what to say. The database items you show are serialized arrays of what is stored as the voters. They translate as follows. (The array index is the voter, the value is the vote.)
`
a:1:{i:1;d:5;}array
1 => float 5
a:2:{i:1;d:5;i:3;d:3;}array
1 => float 5
3 => float 3
a:3:{i:5;s:1:"4";i:3;s:1:"4";i:4;d:5;}array
5 => string '4' (length=1)
3 => string '4' (length=1)
4 => float 5
a:4:{i:5;s:1:"4";i:3;s:1:"4";i:4;d:5;i:6;d:2;}array
5 => string '4' (length=1)
3 => string '4' (length=1)
4 => float 5
6 => float 2
`
So if a user 5 has not rated your image then you have some problem with your user management since clearly there is an entry for a 5 in your data.
Thank you everybody for supporting my request. My changed rating-system is working now! I guess I had some cache problems but now it seems that everything is fine.
I will now move the zenphoto-gallery to my live system, hoping that everything will keep working as well....
Thank you again for all your assistance and last but not least your patience!