Jump to content

Oscommerce ! $_SERVER['HTTP_HOST'];


eth0g

Recommended Posts

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
Link to comment
https://forums.phpfreaks.com/topic/34213-oscommerce-_serverhttp_host/
Share on other sites

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.