Jump to content



Photo
- - - - -

Redirect Loop after changing host


This topic has been archived. This means that you cannot reply to this topic.
8 replies to this topic

#1   sLaV-

sLaV-
  • Members
  • 861 posts

Posted 26 April 2009 - 13:43

We just changed hosts, when we changed over we have the register_globals error which I fixed thanks to the Register Globals patch - we had an SSL certificate on the old host which we still need to move to the new one - at the moment we have uploaded all our files + database tables + records and the site is functioning - however when we try to look at a category or a product, we're getting the:
Redirect Loop
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

I tried switching our Ultimate SEO URLs contribution off but that still didn't help - still same issue.
Tried removing all the code in product_info.php and only left the require('includes/application_top.php'); part which it looks like is causing the error - something in application_top.php is causing the redirect I believe.
If I try to access /product_info.php on its own the page works (gives me the "product not found" page) but as soon as I try to view a product (product_info.php?products_id=xx) - redirect loop!

At the moment we are still being hosted by our old host but that is due to expire in a few days and in the meantime we have been uploading our stuff to the new host - the address of the new host is http://203.170.86.178/~pcstudio/
My configuration file:

<?php
/*
  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
*/

// Define the webserver and path parameters
// * DIR_FS_* = Filesystem directories (local/physical)
// * DIR_WS_* = Webserver directories (virtual/URL)
  define('HTTP_SERVER', 'http://203.170.86.178/~pcstudio'); // eg, http://localhost - should not be empty for productive servers
  define('HTTPS_SERVER', ''); // eg, https://localhost - should not be empty for productive servers
  define('ENABLE_SSL', false); // secure webserver for checkout procedure?
  define('HTTP_COOKIE_DOMAIN', 'http://203.170.86.178/~pcstudio');
  define('HTTPS_COOKIE_DOMAIN', '');
  define('HTTP_COOKIE_PATH', '/');
  define('HTTPS_COOKIE_PATH', '/');
  define('DIR_WS_HTTP_CATALOG', '/');
  define('DIR_WS_HTTPS_CATALOG', '/');
  define('DIR_WS_IMAGES', 'images/');
  define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
  define('DIR_WS_INCLUDES', 'includes/');
  define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
  define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
  define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
  define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
  define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

  define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
  define('DIR_FS_CATALOG', '/home/pcstudio/public_html/');
  define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
  define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

// define our database connection
  define('DB_SERVER', 'xxx'); // eg, localhost - should not be empty for productive servers
  define('DB_SERVER_USERNAME', 'xxx');
  define('DB_SERVER_PASSWORD', 'xxx');
  define('DB_DATABASE', 'xxx');
  define('USE_PCONNECT', 'false'); // use persistent connections?
  define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'
?>

I'm not too sure if HTTP_COOKIE_DOMAIN is correct.


ANY help would be HIGHLY appreciated as we need to change our name servers to point to the new host soon!

Thanks

Edited by sLaV-, 26 April 2009 - 13:44.


#2   web-project

web-project
  • Members
  • 4,320 posts

Posted 26 April 2009 - 13:51

define('HTTP_COOKIE_DOMAIN', 'http://203.170.86.178/~pcstudio');
it should be domain name or nothing at all!

simply change to:
define('HTTP_COOKIE_DOMAIN', '');

Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here!
8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself.
Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues.
Any issues with oscommerce, I am here to help you.

#3   sLaV-

sLaV-
  • Members
  • 861 posts

Posted 26 April 2009 - 23:52

define('HTTP_COOKIE_DOMAIN', 'http://203.170.86.178/~pcstudio');
it should be domain name or nothing at all!

simply change to:
define('HTTP_COOKIE_DOMAIN', '');


Tried that also - same thing happens /sad.gif' class='bbc_emoticon' alt=':(' />

#4   bktrain

bktrain
  • Members
  • 2,108 posts

Posted 27 April 2009 - 00:15

I tried switching our Ultimate SEO URLs contribution off but that still didn't help - still same issue.
Tried removing all the code in product_info.php and only left the require('includes/application_top.php'); part which it looks like is causing the error - something in application_top.php is causing the redirect I believe.
If I try to access /product_info.php on its own the page works (gives me the "product not found" page) but as soon as I try to view a product (product_info.php?products_id=xx) - redirect loop!

Did you check your .htaccess file? Make sure the rewrite for ultimate seo is pointing to the correct path.
Remember to backup database, files and pictures.

I have a problem for your solution
I reject your reality and substitute my own
My mind not only wanders, it sometimes leaves completely
The problem with the gene pool is that there is no lifeguard
Everyone’s entitled to my opinion


Links
Security
SSL Help
Basics for design V2.3+

#5   sLaV-

sLaV-
  • Members
  • 861 posts

Posted 27 April 2009 - 00:25

Did you check your .htaccess file? Make sure the rewrite for ultimate seo is pointing to the correct path.


Yep even tried removing the htaccess file and disabling the Ultimate SEO URLs contribution - same thing - oh well looks like we'll have to cancel new host and go back to old one.

Thanks for the help /smile.gif' class='bbc_emoticon' alt=':)' />

#6   spooks

spooks
  • Members
  • 7,017 posts

Posted 27 April 2009 - 00:33

have u tried clearing the cache?

also check contents of 'local' folder
Sam

Remember, What you think I ment may not be what I thought I ment when I said it.

Contributions:


Auto Backup your Database, Easy way

Multi Images with Fancy Pop-ups, Easy way

Products in columns with multi buy etc etc

Disable any Category or Product, Easy way

Secure & Improve your account pages et al.

#7   bktrain

bktrain
  • Members
  • 2,108 posts

Posted 27 April 2009 - 00:43

require('includes/application_top.php'); part which it looks like is causing the error - something in application_top.php is causing the redirect I believe.

just another thought. There is a call for includes/classess/seo.class.php in includes/application_top.php.
Remember to backup database, files and pictures.

I have a problem for your solution
I reject your reality and substitute my own
My mind not only wanders, it sometimes leaves completely
The problem with the gene pool is that there is no lifeguard
Everyone’s entitled to my opinion


Links
Security
SSL Help
Basics for design V2.3+

#8   sLaV-

sLaV-
  • Members
  • 861 posts

Posted 27 April 2009 - 00:47

have u tried clearing the cache?

also check contents of 'local' folder


yep tried both of those also - local folder had nothing in it ... went through everything have no idea what would've been causing it /sad.gif' class='bbc_emoticon' alt=':(' />


just another thought. There is a call for includes/classess/seo.class.php in includes/application_top.php.


even tried removing this call to this when i disabled ultimate seo urls - no luck - i literally tried everything i could think of /sad.gif' class='bbc_emoticon' alt=':(' />

Edited by sLaV-, 27 April 2009 - 00:48.


#9   matty235

matty235
  • Members
  • 1 posts

Posted 01 February 2010 - 20:34

I am experiencing the same problem.... have you found a solution to it?

Thank you!