eth0g Posted January 15, 2007 Share Posted January 15, 2007 Hi all, I am building a virtual appliance of Oscommerce. Which is a shopping cart platform for building online stores (built with PHP and html). I have built a similar Mambo virtual appliance, and with mambo i managed to fix a problem which had me stumped for a while, but not with oscommerce. Because the ip address can vary based on the preferences of the user who loads the virtual appliance, i need Oscommerce to dynamicly pick up the ip address that server currently holds. With mambo i changed the live site path to the following:[b]$mosConfig_live_site = $_SERVER['HTTP_HOST']; [/b](wheras ussualy this would be similar to this:$mosConfig_live_site = 'http://www.bigshop.com.au' ; ) So my question is how do i do this for oscommerce. I need to replace the "http://www.yourdomain.com" below with somthin like $_SERVER['HTTP_HOST']; ?????? . I have tried lots of variations of what i used for mambo to no avail. Line i need to fix: [b]define('HTTP_SERVER', 'http://www.yourdomain.com'); // eg, http://localhost - should not be empty for productive servers[/b]Cheers for any help, hope someone who is a PHP expert can sort this form me.Keith Quote Link to comment Share on other sites More sharing options...
btherl Posted January 15, 2007 Share Posted January 15, 2007 Have you tried this:[code=php:0]define('HTTP_SERVER', 'http://' . $_SERVER['HTTP_HOST']); // eg, http://localhost - should not be empty for productive servers[/code]The reason being that HTTP_HOST doesn't include the leading "http://" Quote Link to comment Share on other sites More sharing options...
eth0g Posted January 15, 2007 Author Share Posted January 15, 2007 Hi thanks alot, i will try this and let you know. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.