Re: Seeing $_SERVER variables in home.php
X-Cart definitely does something strange for HTTP_REFERER and stuffs it into $HTTP_REFERER then unsetting $HTTP_SERVER_VARS["HTTP_REFERER"]. This is done in prepare.php and checks to see if its loaded in an iframe and uses iframe_referer instead of HTTP_REFERER if so. REMOTE_ADDR is stuffed into $REMOTE_ADDR. Its also stuffed into $CLIENT_IP if not accessed through a proxy and tries to get the real client IP if accessed through a proxy. X-Cart also stuffs all of the elements of $HTTP_SERVER_VARS into individual variables with the same name as the element key (e.g. $HTTP_SERVER_VARS['HTTP_USER_AGENT'] is stuffed into $HTTP_USER_AGENT). You can use either (except yout must use $HTTP_REFERER) but using the individual variables will give you the advantage of any special logic X-Cart applies as in the above variables.
But your real problem is probably not declaring $HTTP_SERVER_VARS as global. Try adding this before your print statements.
global $HTTP_SERVER_VARS;
Or use the individual variable names if you want to use them.
__________________
Manuka Bay Company
X-Cart Version 4.0.19 [Linux]
UGG Boots and other fine sheepskin products
http://www.snowriver.com
|