RE: Changing IP Names : LUSENET : S-Mart Shopping Cart : One Thread


I have an idea of how I can fix the problem of the cart sometimes seeing the "domain" IP ( and sometimes seeing the IP address (, but I am not sure how to do it. I am pretty sure it is a server related thing since I didn't have this problem before I moved servers, but there should be a way around it. The line that gets the IP for the user for the cart name:

$host = $ENV{'REMOTE_HOST'};

Is there a way to make that always use the physical numbers...another words convert it to physical numbers all the time instead of whatever the server gives it? I am not familiar enough with CGI or Perl to really know how this is done. Does anyone out there have any ideas. I think if I can tell it that every time it wants the REMOTE_HOST it should use the instead of the IP it would work correctly. I have determined that the substitution is totally random, just occurs once in a while...and never in the same spot in the script. By converting it to straight IP numbers every time, then no matter what it comes up with from the server it will always be the same. Any suggestions would be great. Hopefully someone knows how this would be done.

Thanks In Advance,

William Deniston

-- William Deniston (, November 25, 1998



This should fix the problem.

Bye, JS

-- Jeremy Smith (, November 28, 1998.

I have implemented cookies with my cart. If you are interested to know more, email me at

God bless!

-- Patrick Chan (, March 20, 2000.

Moderation questions? read the FAQ