Skip to main content Help Control Panel

YACS CMS : Open source !

Community «   Discussion forum «   Installation support «   web address != to physical directory, install problem «  

Comment: web address != to physical directory, install problem

<< Previous Next >>
" 'HTTP_HOST' ... If this variable exists it should always be used over 'SERVER_NAME' "


Until now I was relunctant to use HTTP_HOST because it is mandatory only for HTTP 1.1 compliant agents, and because it is set by the browser itself.

Since your last comment I will:
  • replace in all scripts all references to $_SERVER['SERVER_NAME'] to $context['self_name'] (about 340 code changes)
  • set $context['self_name'] in shared/global.php with $_SERVER['HOST_NAME'], if it exists, or with $_SERVER['SERVER_NAME']


Please let me a couple of days to achieve this and to test these changes at some up and running sites.

by Bernard on Aug. 1 2004