Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

user login error


Guest

Recommended Posts

I created a store account and I can not login, I get a DNS error. I read through some of the problems and solutions and checked my code out. I am not really a developer and just hack my way through. I have a shared SSL certificate and SSL is set to true on my configuration files.

 

My store page is at https://host55.ipowerweb.com/~info-sit/shop/catalog/

 

I have been racking my brain and reading code I really do not uderstand totally, but I get by with a little hel from my friends and no resolution yet, please help.

 

My https server is as indicated above and my http server is http://www.info-site.biz.

 

Thank You,

 

Frank

Link to comment
Share on other sites

Just before the site went down I found some code that is supposed to fix the problem to change the redirect to another page in general.php

 

I attempted to change the code, but everytime I tried and because of my lack of php knowledge I got a whole bunch of errors on my website, then I had to replace the generel.php file with the originally installed file to get everything to work again.

 

Can someone tell me the basics of editing the file, because if you leave blanks, or some other character, then the general.php becomes unuseable and I get errors.

 

I even tried to cut and paste the code, but that was worse, then I tried to painfully edit the code by hand and that didn't work either.

 

If I could modify the code correctly, then I might be able to actually use it and it may fix my problem.

Link to comment
Share on other sites

Roger, thank you for replying:

 

This is the code that I got from one of the login problem posts from mtimdog. But when I tried cutting and pasting it I started to get alot of errors on my webpage and I had to reload a new general.php file, so my site would work again. My link is My Webpage. I have a shared SSL certificate. If I click on the image for a product selection it goes to unsecured at http://www.info-site.biz/shop/catalog/prod...6c0109e437d878c. But worst than that I can not login after I sign up a new account as a new customer, I get a HTTP 404 error "the page can not be found". Also, if I do get through an order and I select "continue" at the end of the order process, I get another 404 error.

 

 

 

FROM mtimdog:

 

The error is in the tep_redirect function in includes/functions/general.php

 

I changed mine to this so it checks for http && store to change to https && https store,

 

then to check for http to https.

 

This fixed the SSL problem for me.

 

 

// Redirect to another page or site

function tep_redirect($url) {

if ( (ENABLE_SSL == true) && (getenv('HTTPS') == 'on') ) { // We are loading an SSL page

 

if (substr($url, 0, strlen(HTTP_SERVER) + strlen(DIR_WS_HTTP_CATALOG))== HTTP_SERVER . DIR_WS_HTTP_CATALOG){

$url = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG . substr($url, strlen(HTTP_SERVER)+ strlen(DIR_WS_HTTP_CATALOG)); // Change it to SSL with correct store

}elseif (substr($url, 0, strlen(HTTP_SERVER)) == HTTP_SERVER) { // NONSSL url

$url = HTTPS_SERVER . substr($url, strlen(HTTP_SERVER)); // Change it to SSL

}

}

 

header('Location: ' . $url);

 

tep_exit();

}

 

THE CODE I WANT TO REPLACE FOLLOWS:

 

// Redirect to another page or site

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 . substr($url, strlen(HTTP_SERVER)); // Change it to SSL

}

}

 

header('Location: ' . $url);

 

tep_exit();

}

 

 

Thank you for any help you can give me. Again, I have a difficult time changing the code (using the admin tool box from osCommerce) without getting empty spaces. I need to know where spaces begin and end or how to avoid them. I even downloaded another php editor with server software...etc...and plan to use that to try and edit the file and then compile it for error checking. A little beyond my league, but I might be able to do it. My big assumption is that this new code will solve my login problem and my "continue" problem..

 

Frank

Link to comment
Share on other sites

After much suffering and looking at code I made a change in the code that significantly changed the product operation (for me). Remember I have a shared SSL turned on and I have the entire shopping cart files under a folder called shop (admin and catalog files are under shop).

 

On the configure.php file I changed:

 

define ('DIR_WS_HTTP_CATALOG','/shop/catalog

 

to

 

('DIR_WS_HTTP_CATALOG','/~info-sit/shop/catalog

 

This is exactly like my secured catalog file code:

 

('DIR_WS_HTTPs_CATALOG','/~info-sit/shop/catalog

 

The ~info-sit is the user name to your web server connection.

 

I am tempted to change ALL the HTTP definitions from /shop/catalog

to

~info-sit/shop/catalog

But I think I will leave well enough alone. Everything is working great now and I am very happy I got this shopping cart. It is awesome and has a lot of functionality you do not find in other shopping carts.

Link to comment
Share on other sites

  • 1 month later...

I had the exact same problem as Frank and solved it in a similar way:

 

I changed two lines in bold my catalog/includes/configure.php from:

 

define('HTTP_SERVER', 'http://www.xxxxxx.com');

define('HTTPS_SERVER', 'https://sslxx.xxxx.com');

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

...

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

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

 

to:

 

define('HTTP_SERVER', 'http://www.xxxxxx.com');

define('HTTPS_SERVER', 'https://sslxx.xxxx.com/mysite');

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

...

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

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

 

and this solved the problem. (No idea why!)

 

Thought I'd report the fix, just in case some other poor soul stumbles across the same problem!

 

Anton

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...