Project

General

Profile

Bug #1749

Tab is wrong when Multiple Access URL enable

Added by Marco Sousa over 9 years ago. Updated almost 9 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
21/07/2010
Due date:
% Done:

0%

Estimated time:
Complexity:
Normal
SCRUM pts - complexity:
?

Description

Hello,

when I'm enable Multiple Access URL on Chamilo 1.8.7, the system don't work correctly. In any forms (login, for example) of the new URL was redirect to the original URL.

The same problem occur on the tab (guides of top) (homepage, training, personal agenda... logout).

History

#1

Updated by Marco Sousa over 9 years ago

Hello,
I do not think is appropriate, but I inserted the code
below in line 376 of the file main_api.lib.php to resolve the problem - Before the line if (defined('SYSTEM_INSTALLATION') && SYSTEM_INSTALLATION)


        if (isset($_configuration['multiple_access_urls']) && $_configuration['multiple_access_urls'] == 1)
        {
            $server_protocol = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http';
            $server_name =
            isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME']
            : (isset($_SERVER['HOSTNAME']) ? $_SERVER['HOSTNAME']
               : (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST']
                  : (isset($_SERVER['SERVER_ADDR']) ? $_SERVER['SERVER_ADDR']
                     : 'localhost')));
            if (isset($_SERVER['SERVER_PORT']) && !strpos($server_name, ':')
                && (($server_protocol == 'http'
                     && $_SERVER['SERVER_PORT'] != 80 ) || ($server_protocol == 'https' && $_SERVER['SERVER_PORT'] != 443 ))) {
                $server_name .= ":" . $_SERVER['SERVER_PORT'];
            }
            $root_web = $server_protocol.'://'.$server_name.$root_rel;
            $root_sys = str_replace('\\', '/', realpath(dirname(__FILE__).'/../../../')).'/';
        }

What could be the solution to the problem?

Regards.

#2

Updated by Yannick Warnier almost 9 years ago

I think you don't configure the system correctly. There are a few steps needed:

  • configuration.php
  • define first url as the real url instead of localhost
  • define the others urls + virtualhost ServerAlias

In any case, I need a report a bit more complete to be able to do something

Also available in: Atom PDF