Problems, need help? Have a tip or advice? Post it here.
11 posts Page 1 of 2
I have a website that has caching turned on for speed. Every couple of weeks the site goes down with a redirect loop error. Once I delete the cached files the site goes back up without any issues. I wish I had more details but not sure why cache would cause a redirect loop. Any ideas where I could be going wrong?
I've had that reported once before so this definitely is an issue.

Can you please let me know the version of Couch you are using?
I'll get you a patch that should, hopefully, rectify this problem.

I'd request you to please try it out on the site for a few days and give us feedback on its efficacy. If it works, we'll move it into the main codebase.

Thanks.
Hi KK,

Using 1.4. I did have the site URL defined. I wonder if that could cause the issue?
Thanks.

I've PMed you a patch.
Do test it out for a few days and let me know if it helps in resolving the issue.
hello all, I happened to be looking a Couch site that launched about 2 years ago in order to make one or two changes for my client. It is on v.1.3.5 and the site URL is defined in the config file. One of the pages had a redirect loop. It was fine with me logged in as super admin. I deleted the cache, logged out and the loop problem has resolved.

I found this topic and wondered what had happened? Do I need this patch?
@potato, the 1.4.5 release contains a patch for this issue.
... so I need to do a Couch upgrade for the site. I have quite a few sites which are using pre 1.4 Couch - is this the only way to resolve the issue?

Do you know if the redirect problem always manifests itself using this version of Couch? It would take a lot of time to do the upgrades - so if it isn't entirely necessary I wouldn't do it!
Do you know if the redirect problem always manifests itself using this version of Couch?
It is definitely not 'always' but it is known to happen sometimes (have had only three reports of this problem so far).

Anyway, if you do not wish to upgrade to the latest version, you'll have to apply the patch manually. Allow me to tell you how -

It is a simple change and involves only a single file.
Open couch/cms.php in a text editor and find the following pair of lines (should find them at around line 349 depending on your version)
Code: Select all
fwrite( $handle, serialize( $pg ) );
fclose( $handle );

Replace those two lines with these four -
Code: Select all
@flock( $handle, LOCK_EX );
@fwrite( $handle, serialize( $pg ) );
@flock( $handle, LOCK_UN );
@fclose( $handle );

Hope it helps.
the manual patch method would be much quicker for me - many thanks! I'll go ahead with it because I'd hate for my sites to be seen with this problem - I think it would undermine confidence.
sorry, I'm back again on this .... I applied the patch and was doing some more viewing across the site in question just now and got another redirect error. Again, deleting cache sorted it out. I double checked the patch - and it was all in place.

Just wanted to report this so that you know the patch hasn't resolved the issue. I guess I need to upgrade to the latest version after all.
11 posts Page 1 of 2