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.

Login

Who's Online

330 user(s) are online (103 user(s) are browsing Support Forums)


Members: 0


Guests: 330


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits