1
shagreel
Selected module does not exist! bug
  • 2003/12/24 16:26

  • shagreel

  • Just popping in

  • Posts: 13

  • Since: 2003/1/17


I did a fresh install and I could not get to the modules admin page because it always reported that the module did not exist. The following line in common.php was the problem.

$url_arr = explode('/', str_replace(str_replace('https://', 'http://', XOOPS_URL.'/modules/'), '', 'http://'.$HTTP_SERVER_VARS['HTTP_HOST'].$xoopsRequestUri));

HTTP_HOST returns the actual servers hostname. This always fails because I am using a virtual server with a virtual hostname. I changed HTTP_HOST to SERVER_NAME and that returns the correct host name.


2
CBlue
Re: Selected module does not exist! bug

Glad to see you were able to solve your problem, shagreel!

3
shagreel
Re: Selected module does not exist! bug
  • 2004/2/9 16:55

  • shagreel

  • Just popping in

  • Posts: 13

  • Since: 2003/1/17


I would like to bring this up again. Could this be changed in the code so that I do not have to maintain this hack. I find that $HTTP_SERVER_VARS['HTTP_HOST'] needs to be replaced with $HTTP_SERVER_VARS['SERVER_NAME'] in both include/cp_header.php and include/common.php. Probably a few other places also, but these are the two that constantly cause me problems. SERVER_NAME will return the right value if you are on virtual host or not. It is the value that should probably always be used.