forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 upgrading => Topic started by: Anrulz on October 03, 2011, 11:29:48 pm

Title: Error 310 (net::ERR_TOO_MANY_REDIRECTS): after upgrading
Post by: Anrulz on October 03, 2011, 11:29:48 pm
I upgraded from from an old 1.5 to latest cpg, I deleted all files folders except anycontent.php, config file and albums folder, I uploaded new files, I deleted install.php then I visited my gallery, everything looked nice!but when I click on a picture or login I get :

Fehler 310 (net::ERR_TOO_MANY_REDIRECTS): Zu viele Umleitungen.

Means too many redirections ... FYI : I dont have a .htaccess file.So I thought maybe my new server has some problems tried to make a fresh cpg install on another database and this one worked fine, all good, so I said maybe if I change database information to my formal cpg all will work but it didnt I had exactly the same 310 Error, so from here I am assuming the problem is with my tables, but I dont know what to edit, what do do ... I would be glad if you guys can help me!Thanks a lot

PS:Cant give the URL for security reasons, but if it is really necessary I can PM the mods.

Anrulz
Title: Re: Error 310 (net::ERR_TOO_MANY_REDIRECTS): after upgrading
Post by: Αndré on October 05, 2011, 03:55:07 pm
If you don't want to give us your gallery url, we cannot give you support.
Title: Re: Error 310 (net::ERR_TOO_MANY_REDIRECTS): after upgrading
Post by: Anrulz on October 05, 2011, 04:53:15 pm
I am sorry you are right , I think editing the first post is not possible but here is the url:

www.hababam.biz/galeri

and the dir is pwd protected here it is : login/pass = galdor.hababam : thyglr

The problem is I assume with the "login"

when the debug mode is on there are lots of stuff being displayed but I turned it off now from phpmyadmin, if necessary I can turn it on again.

Thank you very much,
Anrulz
Title: Re: Error 310 (net::ERR_TOO_MANY_REDIRECTS): after upgrading
Post by: Αndré on October 07, 2011, 10:11:11 am
Was your gallery ever bridged to another software?
Title: Re: Error 310 (net::ERR_TOO_MANY_REDIRECTS): after upgrading
Post by: Anrulz on October 07, 2011, 03:04:15 pm
Yes it was bridged with joomla but I disabled the bridge from the config file I set 1 to 0.
Title: Re: Error 310 (net::ERR_TOO_MANY_REDIRECTS): after upgrading
Post by: Anrulz on October 09, 2011, 04:48:13 pm
would it be possible to switch to wordpress and let every picture like a new artivle or maybe 10 pictures as one article?
Title: Re: Error 310 (net::ERR_TOO_MANY_REDIRECTS): after upgrading
Post by: Αndré on October 11, 2011, 01:30:30 pm
Yes it was bridged with joomla but I disabled the bridge from the config file I set 1 to 0.
Just to make sure, please reset all values in the bridge table.
Title: Re: Error 310 (net::ERR_TOO_MANY_REDIRECTS): after upgrading
Post by: Anrulz on October 11, 2011, 09:43:46 pm
I did still same error
Title: Re: Error 310 (net::ERR_TOO_MANY_REDIRECTS): after upgrading
Post by: Anrulz on October 11, 2011, 10:28:05 pm
I compared a fresh install config db and my config and changed allow_unlogged_access to 3, now pictures are available for viewing but unfortunately login still has the same problem
Title: Re: Error 310 (net::ERR_TOO_MANY_REDIRECTS): after upgrading
Post by: Joe Carver on October 12, 2011, 12:46:37 am
Start looking at your .htaccess files for redirects / rewrites that could interfere.

Your hosting company might be able to help.
Title: Re: Error 310 (net::ERR_TOO_MANY_REDIRECTS): after upgrading
Post by: Αndré on October 12, 2011, 09:50:11 am
From the initial post:
I dont have a .htaccess file

To verify if there's really no redirection outside of Coppermine, please rename login.php to something different and create a new login.php file with the content
Code: [Select]
<?php echo "test"?>
Title: Re: Error 310 (net::ERR_TOO_MANY_REDIRECTS): after upgrading
Post by: Anrulz on October 12, 2011, 05:09:12 pm
When I click login I see only the text : test, right now I am leaving it like this but I will be testing new stuff like taking the login.php from the fresh install and replacing but I dont think this will solve ...
Title: Re: Error 310 (net::ERR_TOO_MANY_REDIRECTS): after upgrading
Post by: Αndré on October 12, 2011, 07:43:44 pm
If you see "test" it means, that the redirection issue comes from Coppermine and no redirection rule as Joe expected. Replacing all core files might fix your issue. Please give it a try, maybe some files got corrupted during upload.
Title: Re: Error 310 (net::ERR_TOO_MANY_REDIRECTS): after upgrading
Post by: Anrulz on October 12, 2011, 10:19:39 pm
Better than replacing I deleted all the files except config, albums and anycontent, then unzipped the latest package, and later I ran the upgrade or update.php ... there is nothing to replace ... all files are core files but in phpmyadmin I see that the fresh cpg I installed has few more tables than my old installation, I dont know why ... but I dont think this causes the problem
Title: Re: Error 310 (net::ERR_TOO_MANY_REDIRECTS): after upgrading
Post by: Αndré on October 12, 2011, 11:24:05 pm
So it works now as expected?
Title: Re: Error 310 (net::ERR_TOO_MANY_REDIRECTS): after upgrading
Post by: Anrulz on October 12, 2011, 11:36:20 pm
I did what I said on the 3rd of October, so it isnt working.The problem is with the database ...When I change the config file of a fresh new install cpg with my old config file which means I use the database of my old cpg, the login.php is giving the same error.
Title: Re: Error 310 (net::ERR_TOO_MANY_REDIRECTS): after upgrading
Post by: Αndré on October 13, 2011, 09:20:52 am
Sorry I missed the
I dont think this causes the problem


If it's your database, it's impossible to say what's wrong without having a look at your database. Please attach a dump of your Coppermine database to your next reply.
Title: Re: Error 310 (net::ERR_TOO_MANY_REDIRECTS): after upgrading
Post by: Anrulz on October 13, 2011, 11:31:08 am
Done

[attachment removed]
Title: Re: Error 310 (net::ERR_TOO_MANY_REDIRECTS): after upgrading
Post by: Αndré on October 13, 2011, 12:25:05 pm
There's something wrong with your cookie settings (I haven't checked yet what exactly). Additionally a workaround has been implemented wrongly causing an infinite loop.

Please open login.php, find
Code: [Select]
$ref = $CPG_REFERER ? '?referer='.urlencode($CPG_REFERER) : '';and replace with
Code: [Select]
$ref = $CPG_REFERER ? '?reload_once&referer='.urlencode($CPG_REFERER) : '?reload_once';
Title: Re: Error 310 (net::ERR_TOO_MANY_REDIRECTS): after upgrading
Post by: Anrulz on October 13, 2011, 12:41:11 pm
This helped now there isnt the infite loop but when I login it tells me : Welcome guest ... and I dont look like logged in ... because login.php is still displayed and I dont see admin options or logged user options ... and in the login.php it gives me this warning :

Enter your username and password to login
Warning your browser does not accept script's cookies

In the database I changed "cpg15" cookie to "hababam_galeri" something like this, created my own cookie, can this be the problem?
Title: Re: Error 310 (net::ERR_TOO_MANY_REDIRECTS): after upgrading
Post by: Αndré on October 13, 2011, 01:40:43 pm
I also get that message when I use your database. Your cookie name is "hababam.biz_galeri". I changed it to "hababam_biz_galeri" in my testbed and don't get that message anymore, so I assume there's an issue with the dot in the cookie name. Please remove/replace the dot in your cookie name and report if it works as expected.
Title: Re: Error 310 (net::ERR_TOO_MANY_REDIRECTS): after upgrading
Post by: Anrulz on October 13, 2011, 10:36:03 pm
Oh my god, I cannot believe this stupid dot causing all of this ... it wasted 2 weeks from me, but as comparing to the fresh install I was thinking to change it to cpg15x to make things work, now all works! maybe I didnt need to edit the login.php I am gonna write the code I deleted back, but now everything works! thanks a zillion times :) have a nice day!
Title: Re: Error 310 (net::ERR_TOO_MANY_REDIRECTS): after upgrading
Post by: Anrulz on October 13, 2011, 10:39:21 pm
Sorry for the econd post ... I cant delete/edit my posts thus can you please delete my attached DB?
Title: Re: Error 310 (net::ERR_TOO_MANY_REDIRECTS): after upgrading
Post by: Joe Carver on October 14, 2011, 12:59:13 am
... can you please delete my attached DB?

Done
Title: Re: Error 310 (net::ERR_TOO_MANY_REDIRECTS): after upgrading
Post by: Αndré on October 14, 2011, 10:00:56 am
FYI: the suggested code change will be in the next release anyway, so you don't need to delete it. Additionally I'll try to fix the dot issue.
Title: Re: Error 310 (net::ERR_TOO_MANY_REDIRECTS): after upgrading
Post by: Anrulz on October 14, 2011, 08:13:16 pm
Thank you very much guys! much appreciated!
Title: Re: Error 310 (net::ERR_TOO_MANY_REDIRECTS): after upgrading
Post by: Αndré on October 17, 2011, 12:11:12 pm
FYI: You cannot use dots in cookie names in PHP. I've added a check that disallow dots in the cookie name configuration in SVN revision 8271.