Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: cpg 1.5.34 (stable) strange behavior  (Read 7745 times)

0 Members and 1 Guest are viewing this topic.

npetrov

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
cpg 1.5.34 (stable) strange behavior
« on: January 20, 2015, 08:06:35 pm »

Hello all,
I have strange problems with my gallery located at http://gallery.pigeons-bg.com.
Recently i migrate it to the amazon web services EC2 and the gallery start to behave strange. Like there is a cached or static index page.
For example if i have a 2 new pictures uploaded and waiting for approval and after i confirm them from the admin area and open the index page i just didn't see them on the front page. I need to refresh the index page to be able to see them. Also if i close the gallery and after that i re-open the page on the other day i always see the old pictures and i need to refresh the index page to see the new images. This happens on more than 2 different computers.

Another problem that i found long time ago (maybe it is related) is that if i login with my username/password and after that open the index http://gallery.pigeons-bg.com WITHOUT index.php in the URL i am just logged out (the users menus are hidden) and i need to try to login again with my username/password then i receive a error that i'm already logged in.

There are no errors in the error log files or at the mysql logs/slow logs etc. I use only apc as a php cache but this continues to happen even if i disable the APC.
Note:
This is installation which is more than 7 years old and was using the same database all the time. Few years ago i change the url that gallery use it was something like pigeons-bg.com/gallery/ and now it is on subdomain, not sure if this could be related.

Another thing, currently there are two images that needs to be approved. If there is someone else who wants to have a look just let me know i will approve the images when you already have visit the gallery.

P.S. Before the migration sometimes there where some issues with logging in/out depending on that if the "Home" link is with or without index.php and sometimes when you access specific urls like "last uploaded" or "list of albums" or "last commented".

After the migration i was installing 3 different plugins (if that makes any sense)
1. Facebook sharer - still active
2. External tracker - active
3. Slider - not active - removed just for test if the problem will continue
4. HTML 5 upload - active
And the last one HTML5uploader cannot be removed from the plugin manager page with error "A valid form token could not be found". I guess that this is related to the setting that this plugin is the default method for uploading files.

Here is http://gallery.pigeons-bg.com/info.php php info if you need it.

Sorry for the long post, but i want to fix these issues. Any help or suggestion will be appreciated.

Regards,
Nikolay
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: cpg 1.5.34 (stable) strange behavior
« Reply #1 on: January 20, 2015, 08:32:36 pm »

I'm ready to visit your gallery. Does it only happen on index.php or also on thumbnails.php?album=lastup? I'm currently viewing this page in my browser: http://gallery.pigeons-bg.com/thumbnails.php?album=lastup
Logged

npetrov

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: cpg 1.5.34 (stable) strange behavior
« Reply #2 on: January 20, 2015, 08:38:04 pm »

Hello Andre,
Thanks for your reply.

Cannot confirm for thumbnails.php?album=lastup now it doesn happen when i was trying but when i login and click on the "Home" i was again logged out.
If you want i could approve the images waiting and we could check again, just let me know what you want me to do.

Thanks,
Nikolay
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: cpg 1.5.34 (stable) strange behavior
« Reply #3 on: January 20, 2015, 08:40:44 pm »

Please approve them, I also opened index.php.
Logged

npetrov

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: cpg 1.5.34 (stable) strange behavior
« Reply #4 on: January 20, 2015, 08:45:05 pm »

Hmmm i tried to approve them but i still receive the error "A valid form token could not be found" and after double check it appears that both of the images are already approved and uploaded but they are still waiting for approval somehow... Please feel free to upload a new picture whatever you like i will approve it for the test.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: cpg 1.5.34 (stable) strange behavior
« Reply #5 on: January 20, 2015, 08:50:57 pm »

Sounds like a caching issue, from either Amazon, APC or your browser(s). Try to refresh the approval page, I assume those 2 pictures won't appear anymore in the list.
Logged

npetrov

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: cpg 1.5.34 (stable) strange behavior
« Reply #6 on: January 20, 2015, 08:56:17 pm »

Yes after refresh they disappear but there where another 4-5 images for approve, i approve them and they didn't appear on the index page again. Could you try to refresh the index again or close you browser open it with another and refresh again?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: cpg 1.5.34 (stable) strange behavior
« Reply #7 on: January 20, 2015, 09:04:10 pm »

Your gallery looks the same to me, even if I manually refresh it (3 times the same picture from today, the rest are older ones).
Logged

npetrov

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: cpg 1.5.34 (stable) strange behavior
« Reply #8 on: January 20, 2015, 09:12:06 pm »

For me also sounds like a caching issue but there are no caching mechanisms configured. I remember once i saw a similar issue with bad configured varnish but i have only apc and this apc was enabled before the migration and even with disabled apc i steel have the same problem.

Ok, how many pictures you see on the home page uploaded today 20th ? Could you also try to close your browse and reopen the page again? I'm using Firefox on both of the PC at my home and my work also and i have the same problems. Currently at the moment i also test from another pc which access the website for the first time but with chrome and there are no problems with missing images, only the one with index.php which somehow see me logged in and out in the same time.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: cpg 1.5.34 (stable) strange behavior
« Reply #9 on: January 20, 2015, 09:26:13 pm »

I currently see 7 pictures from today, but it were just 3 a few minutes ago.
Logged

npetrov

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: cpg 1.5.34 (stable) strange behavior
« Reply #10 on: January 20, 2015, 09:32:34 pm »

Yes, exactly :) This is the strange behavior. I guess you are using firefox, right? Btw i was also trying with iceweasel and chrome on linux, and i cannot see any missing images. I suppose that the new version of firefox is caching more than usual....  ::)
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: cpg 1.5.34 (stable) strange behavior
« Reply #11 on: January 20, 2015, 09:35:56 pm »

I'm using Firefox 35.
Logged

npetrov

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: cpg 1.5.34 (stable) strange behavior
« Reply #12 on: January 20, 2015, 10:17:44 pm »

Yep, the same....i will make a few more tests also i want to try it with a clear install, because it is interesting to me and will also try to upgrade the mysql database instance because a have some doubts about it. I will paste the results when i have enough time.
Thanks Andre for your help.
Logged

npetrov

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: cpg 1.5.34 (stable) strange behavior
« Reply #13 on: January 23, 2015, 03:39:13 pm »

Hi again,
There was some problems with upgrading the mysql instance at amazon rds, because of the terrible service they offer i would need to migrate the database to a different availability zone to upgrade it and that is bullsh*t!
So after a few more investigations I take the decision to return it to the old host where it was working well. But it seem that the problem exist there too. After that I found that with a new clean installation of cpg (even in amazon) it works without any of the above mentioned problems. And also i remember that (not sure) before or immediately after the migration i have updated the gallery to version 1.5.34 so the only one reason for me is that the problems were caused by this update, which is strange.
Next step is to try to migrate the content (images, comments, settings....) of this gallery to a newly created clean install of the gallery, because this installation is very old and have been migrated on different servers many times.
So is there any documentation about this, because i was comparing the databases of my installation and a new clean install and there are differences between the tables (because of the plugins installed which create some tables) and also there are difference between the table prefix...in my installation the prefix is cpg_ but at the new installation is cpg15x_ which will cause problems. Maybe there are more things that i need to think about it before i start?
Thanks,
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: cpg 1.5.34 (stable) strange behavior
« Reply #14 on: January 23, 2015, 08:06:41 pm »

I doubt that the upgrade causes that issue. I suggest to have a closer look at the installed plugins in your gallery. If you haven't installed any plugins nor if the issue still occur if you temporary uninstall them or/and disable the plugin engine, I suggest to perform the upgrade as described in the docs again, maybe one of the files got corrupted during upload. I don't think so, but just to make sure.

Next step is to try to migrate the content (images, comments, settings....) of this gallery to a newly created clean install of the gallery
If you "migrate" everything, the result is the same gallery with the same content and setting as you already have. You could try to edit include/config.inc.php of your new, clean gallery to use your old database. Of course Coppermine will display just the trash can symbol for all pictures, but you could try to if loggin in and uploading/approving pictures work as expected, so we maybe get an idea what exactly is wrong with your actual gallery.
Logged

npetrov

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: cpg 1.5.34 (stable) strange behavior
« Reply #15 on: January 25, 2015, 01:18:20 am »

Hi,
Even with disabled plugins the problem still exist. I upload all the files from 1.5.34 again...without change. I was updating from 1.5.28 to 1.5.34 but according to the way of the upgrade i don't think that this is related.
I even change apache with nginx just to check and it was very interesting that when i reload the page to check if nginx is working and i have to see the degault nginx page, without configuring virtualhost (server block) for the gallery, instead of the default page of nginx the page that opens was the page with the gallery, which is NOT possible.  :o I guess this is related to Firefox cache...however with google chrome the problems still exist with or without plugins, with apache or nginx. And another strange thing is that this is happening only with the gallery not with the rest of the websites on the server. There are smf forums, wordpresses, opencarts, roundcube etc. which works without problems.

I have no more ideas.  :-\
Logged

npetrov

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: cpg 1.5.34 (stable) strange behavior
« Reply #16 on: January 25, 2015, 11:33:15 am »

I have progress :)
It appears that the problem with cache was caused because of apache mod_expires and its strange configuration, which i disable and for now it seems that it works better. I will confirm this in few days.
The only one thing that remind to fix is the problem with the sessions (a very old problem) when sometimes you are logged and while browsing the website you are just logged out and the users menus disappears, but when you try to log in again it returns you that you are already logged in.
Andre, do you have any idea about this, could it be because of the very old database? Any guess? Because with a new installation this doesn't happen.

Thanks,
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: cpg 1.5.34 (stable) strange behavior
« Reply #17 on: January 25, 2015, 08:27:47 pm »

could it be because of the very old database?

I don't think so. In the past, a user reported an issue like that, but that has been fixed over 4 years ago: http://forum.coppermine-gallery.net/index.php/topic,59698.0.html

On each page load, Coppermine searches for a cookie with a specific client ID, which is generated like this:
Code: (bridge/coppermine.inc.php) [Select]
$this->client_id = md5($superCage->server->getRaw('HTTP_USER_AGENT').$CONFIG['site_url']);
As the site_url parameter is static, the only reason why Coppermine doesn't find the cookie is, that your brower's user agent is (temporary) different, or not transmitted at all. There exist some "security" tools that may do something like that, but as it works with the new installation that also doesn't make sense. I'm sorry, but I currently cannot tell you why it happens.

Are you able to reproduce that behavior? E.g. does it happen every x page loads? Does it just happen with a specific browser / with all browsers you tested?
Logged

npetrov

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: cpg 1.5.34 (stable) strange behavior
« Reply #18 on: January 26, 2015, 08:50:44 am »

Hello,
Thanks for the explanations!
Currently at the moment i was testing with Firefox 35 but i'm unable to reproduce the problem, maybe because i clear all the cache testing for the caching issue...i don't know, but when this happens it doesn't happen on each x page loads. Except the one that i already describe
Quote
Another problem that i found long time ago (maybe it is related) is that if i login with my username/password and after that open the index http://gallery.pigeons-bg.com WITHOUT index.php in the URL i am just logged out (the users menus are hidden) and i need to try to login again with my username/password then i receive a error that i'm already logged in.
I have some complaints from users which are the following :
After they log in in the gallery and click on "Last commented" the website tells that they are not logged in, and after the same procedure of log in the websites tells that they are already logged in. One of the users says that he was testing this on different PCs and the problem still appears in all of them. They (the users/visitors) are not technical persons at all and it is hard to ask them for more information.

I think that this appears when i tick on remember me while logging in.
I will test this again from my PC at work, because i don't clear the cache there and i'm pretty sure that i will still have the problem. I have another PC where i could test it from a user's side, because i have access to it.
I will reply later.
Thank you Andre!
Logged

npetrov

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: cpg 1.5.34 (stable) strange behavior
« Reply #19 on: January 26, 2015, 09:31:02 am »

Hi,
Using my work pc, before cleaning the cache of the browser here are the results:
First image show the "Welcome Guest" message after i log in to the gallery (and of course as a last images some pictures uploaded 5 day ago)  :o
And second image shows that i'm not logged in the gallery after a few click on the pages and trying to logout.

After cleaning the cache i have no issues with this, so it must be related to the cache....

I will continue to monitor this behavior now and if something appears i will update.

Thanks again Andre!
Nikolay
Logged
Pages: [1]   Go Up
 

Page created in 0.028 seconds with 19 queries.