Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help wıth Login error please


Ulysses

Recommended Posts

G'day,

 

When a registered client tries to login, they get a 404 error. The script ıs looking for index.php in https://secure.apc-online.com/index.php instead of http://shop.apc-online.com/index.php (ie apc-online.com/shop/index.php)

 

The script is installed in sub-domaın using main domain secure SSL as follows:

 

http://shop.apc-online.com

https://secure.apc-online.com

 

Here's an extract from the ../shop/includes/configure.php

 

++++++ START ++++++

 

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

define('HTTP_SERVER', 'http://shop.apc-online.com'); // eg, http://localhost - should not be empty for productive servers

define('HTTPS_SERVER', 'https://secure.apc-online.com'); // eg, https://localhost - should not be empty for productive servers

define('ENABLE_SSL', true); // secure webserver for checkout procedure?

define('HTTP_COOKIE_DOMAIN', 'shop.apc-online.com');

define('HTTPS_COOKIE_DOMAIN', 'secure.apc-online.com/shop');

define('HTTP_COOKIE_PATH', '/');

define('HTTPS_COOKIE_PATH', '/shop/');

define('DIR_WS_HTTP_CATALOG', '/');

define('DIR_WS_HTTPS_CATALOG', '/shop/');

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/client/public_html/shop/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

++++++ ENDS ++++++

 

Site currently in dev stage so fee free to register, login etc (but before 1 Feb 2004).

 

I'm sure ıt's something simple for you guys, but it's got us stumped.

 

Thanks for your input and wisdom on this problem.

 

Ulysses

Link to comment
Share on other sites

  • 2 weeks later...

Where is your ssl from? Host provided shared ssl or do you have your own cert? If you have your own then I think the config would be the same domain and not https://secure.blah blah. Mine are on shared so my https:// setting is st01.startlogic.com/~myaccountname.

 

Your problem looks like it's soley in the configure.php file IMO.

The Wiki Docs: Read them, live them and be thankful for them!

Link to comment
Share on other sites

  • 1 month later...

Hi Mibble,

 

It's define('DIR_WS_HTTP_CATALOG', '/'); because it's a root directory install (not ../catalog/ etc)

 

Hi trendyfashion,

 

My own SSL cert is installed on my own IP & domain as a sub-directory.

 

The contents of my configure.php is above. Can you see anything wrong?

 

Hi athein,

 

Sadly it's not fixed yet. I'll try for another month and if I still can't fix it or get help, then I'll have to get another script.

 

Thank you all

 

Ulysses

Link to comment
Share on other sites

G'day all,

 

Some new observations regarding the problem.

 

++++++

New Observation 1:

 

The error is caused by line 65 of login.php which says:

tep_redirect(tep_href_link(FILENAME_DEFAULT));

 

and line 38 of includes/filenames.php it sats:

define('FILENAME_DEFAULT', 'index.php');

 

These two directives together therefore point to https://secure.apc-online.com/index.php (where there is nothing) instead of https://secure.apc-online.com/shop/index.php

 

++++++

New Observation 2:

 

The same re-directing problem happens when client finishes shopping and arrives at Your Order Has Been Processed! page - checkout_success.php

and clicks on the "Continue" button.

 

++++++

 

Thank you all

 

Ulysses

Link to comment
Share on other sites

Final plea for assistance to help us fix the bugs in this script before we either dump it or pay someone to fix it.

 

Can anyone please help with the login issues described above? The problem appears to be the script's inability to know where it is supposed to go to from configure.php when it is installed on a subdomain.

 

The shop is way behind schedule and is still a work in progress. So click to your heart's content to see the errors.

 

Appreciate any assistance from anyone who knows this script. Especially the author of configure.php who should know how to fix this problem.

 

Thank you

 

Ulysses

PS If we ever go live with this it will say Now Open somewhere!

Link to comment
Share on other sites

  • 2 weeks later...

Has anyone fixed this yet??? I have the same problem. I have been searching through forums for any help and after 3 days have stumbled here..

Link to comment
Share on other sites

G'day rccarman,

 

Unfortunately we have found no simple solution to this problem.

 

We had a php/mySQL programmer look at it and the prognosis is that there is a structural flaw in the architecture upon which the script is built.

 

Maybe, maybe not, I have no idea. But from what I've been told, it would be cheaper for us to buy another domain with its own SSL certificate and start from scratch etc etc than it would for us to pay the guy to fix the script. Pity really.

 

Good luck.

 

Ulysses.

Link to comment
Share on other sites

My solution?

Started using Click Cart Pro. Not being able to login is a deal breaker for me, current clients and future clients. Thanks!

Link to comment
Share on other sites

I just had this problem and got rid of it rather easily...

I figured my host must not like https or not even have it, so i just changed the https server to a http one...

 

change this line:

define('HTTPS_SERVER', 'https://secure.apc-online.com');

 

to

define('HTTPS_SERVER', 'http://secure.apc-online.com');

(just delete the s off https)

 

did that and it all works for me now! :)

hope that helps

Link to comment
Share on other sites

  • 2 months later...

As a matter a fact this is due to the redirect-function "tep_redirect" (see file "\catalog\includes\functions\general.php"). It assumes that your catalog is in the same directory for NON-SSL as for SSL, where in fact it isn't.

 

I changed this function to the following and it is working perfectly (try at your own risk ;) ):

 

  function tep_redirect($url) {
   if ( (ENABLE_SSL == true) && (getenv('HTTPS') == 'on') ) { // We are loading an SSL page
     if (substr($url, 0, strlen(HTTP_SERVER)) == HTTP_SERVER) { // NONSSL url
       $url = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG . substr($url, strlen(HTTP_SERVER . DIR_WS_HTTP_CATALOG)); // Change it to SSL
     }
   }
   header('Location: ' . $url);

   tep_exit();
 }

:angry: As for KarlostheDingbat's reply: don't set the HTPPS_SERVER to an HTTP-url. It's not encrypted/safe ;)

Link to comment
Share on other sites

That worked for me!! THANK YOU THANK YOU THANK YOU!!!!

Mark

 

Contributions Used:

STS

B2B Suite

Description in Product Listing

Header Tag Controller

Easypopulate

Purchase Orders

USA Flag

Local Delivery

New Attributes Editor

Pickup

Link to comment
Share on other sites

  • 1 month later...

Isn't it normally OK to just use an HTTP for checkout if you route your payment through something like PayPal so long as the card informtaion is not submitted to an insecure URL? I don't use it and I could be wrong, but I think it's OK.

Link to comment
Share on other sites

  • 3 months later...
  • 1 month later...
  • 2 months later...

Thanks for the tip urchin.nl. I think it would be a great idea if this fix was added to the main code. Is there a way to suggest this or has it been done?

 

Sean

Link to comment
Share on other sites

  • 11 months later...

Solution in this thread cured 404 redirects for me as well - Thank You! :thumbsup:

 

As a matter a fact this is due to the redirect-function "tep_redirect" (see file "\catalog\includes\functions\general.php"). It assumes that your catalog is in the same directory for NON-SSL as for SSL, where in fact it isn't.

 

I changed this function to the following and it is working perfectly (try at your own risk ):

 

 function tep_redirect($url) {
  if ( (ENABLE_SSL == true) && (getenv('HTTPS') == 'on') ) { // We are loading an SSL page
 if (substr($url, 0, strlen(HTTP_SERVER)) == HTTP_SERVER) { // NONSSL url
   $url = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG . substr($url, strlen(HTTP_SERVER . DIR_WS_HTTP_CATALOG)); // Change it to SSL
 }
  }
  header('Location: ' . $url);

  tep_exit();
}

As for KarlostheDingbat's reply: don't set the HTPPS_SERVER to an HTTP-url. It's not encrypted/safe

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...