Moodle
  1. Moodle
  2. MDL-26910

Missing webserver for setup_get_remote_url() in setuplib

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.2
    • Fix Version/s: 2.0.3
    • Component/s: Installation
    • Labels:
    • Environment:
      PHP Version:5.3.3 Syste:Linux Server API: CGI/FastCGI
    • Database:
      MySQL
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE
    • Rank:
      16905

      Description

      Some Provider have HTTPD as Webserver.
      The function setup_get_remote_url() must be extended for example with following code.

      else  if (stripos($_SERVER['SERVER_SOFTWARE'], 'HTTPD') !== false) {
              //HTTPD server
              $rurl['fullpath'] = $_SERVER['REQUEST_URI'];
      }
      

        Activity

        Hide
        Petr Škoda added a comment -

        What server is there installed? I suppose it is Apache, right?

        Show
        Petr Škoda added a comment - What server is there installed? I suppose it is Apache, right?
        Hide
        Petr Škoda added a comment -

        Could you please send me a full var_dump($_SERVER) of the server?

        Show
        Petr Škoda added a comment - Could you please send me a full var_dump($_SERVER) of the server?
        Hide
        Petr Škoda added a comment -

        Or is it httpd-wasd? If yes I definitely need the content of $_SERVER when accessing some slasharguments URL such as "http://yoursite.example.com/moodle/index.php/škoďák", otherwise people might report weird bugs caused by incompatibilities of our codebase with this server software. Thanks!

        Show
        Petr Škoda added a comment - Or is it httpd-wasd? If yes I definitely need the content of $_SERVER when accessing some slasharguments URL such as "http://yoursite.example.com/moodle/index.php/škoďák", otherwise people might report weird bugs caused by incompatibilities of our codebase with this server software. Thanks!
        Hide
        Jan Westphal added a comment -
        array(31) { ["HTTP_HOST"]=> string(27) "p138104.mittwaldserver.info" ["HTTP_USER_AGENT"]=> string(87) "Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.16) Gecko/20110319 Firefox/3.6.16" ["HTTP_ACCEPT"]=> string(63) "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" ["HTTP_ACCEPT_LANGUAGE"]=> string(35) "de-de,de;q=0.8,en-us;q=0.5,en;q=0.3" ["HTTP_ACCEPT_ENCODING"]=> string(12) "gzip,deflate" ["HTTP_ACCEPT_CHARSET"]=> string(30) "ISO-8859-1,utf-8;q=0.7,*;q=0.7" ["HTTP_KEEP_ALIVE"]=> string(3) "115" ["HTTP_CONNECTION"]=> string(10) "keep-alive" ["HTTP_COOKIE"]=> string(73) "MOODLEID_=%25E2%25C8%2513E%25BD; MoodleSession=ougpnet40lppi6pu09ckt0c912" ["PATH"]=> string(51) "/usr/bin:/bin:/usr/local/typo3sh/bin:/usr/local/bin" ["SERVER_SIGNATURE"]=> string(5) "HTTPD" ["SERVER_NAME"]=> string(27) "p138104.mittwaldserver.info" ["SERVER_ADDR"]=> string(13) "172.16.42.240" ["SERVER_PORT"]=> string(2) "80" ["REMOTE_ADDR"]=> string(13) "87.178.199.78" ["DOCUMENT_ROOT"]=> string(23) "/home/www/p138104/html/" ["SERVER_ADMIN"]=> string(21) "[support@mittwald.de]" ["SCRIPT_FILENAME"]=> string(31) "/home/www/p138104/html/info.php" ["REMOTE_PORT"]=> string(5) "50653" ["GATEWAY_INTERFACE"]=> string(7) "CGI/1.1" ["SERVER_PROTOCOL"]=> string(8) "HTTP/1.1" ["REQUEST_METHOD"]=> string(3) "GET" ["QUERY_STRING"]=> string(0) "" ["REQUEST_URI"]=> string(9) "/info.php" ["SCRIPT_NAME"]=> string(9) "/info.php" ["SERVER_SOFTWARE"]=> string(5) "HTTPD" ["REDIRECT_STATUS"]=> string(3) "200" ["PHP_SELF"]=> string(9) "/info.php" ["REQUEST_TIME"]=> int(1301292718) ["argv"]=> array(0) { } ["argc"]=> int(0) } 
        
        Show
        Jan Westphal added a comment - array(31) { [ "HTTP_HOST" ]=> string(27) "p138104.mittwaldserver.info" [ "HTTP_USER_AGENT" ]=> string(87) "Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.16) Gecko/20110319 Firefox/3.6.16" [ "HTTP_ACCEPT" ]=> string(63) "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" [ "HTTP_ACCEPT_LANGUAGE" ]=> string(35) "de-de,de;q=0.8,en-us;q=0.5,en;q=0.3" [ "HTTP_ACCEPT_ENCODING" ]=> string(12) "gzip,deflate" [ "HTTP_ACCEPT_CHARSET" ]=> string(30) "ISO-8859-1,utf-8;q=0.7,*;q=0.7" [ "HTTP_KEEP_ALIVE" ]=> string(3) "115" [ "HTTP_CONNECTION" ]=> string(10) "keep-alive" [ "HTTP_COOKIE" ]=> string(73) "MOODLEID_=%25E2%25C8%2513E%25BD; MoodleSession=ougpnet40lppi6pu09ckt0c912" [ "PATH" ]=> string(51) "/usr/bin:/bin:/usr/local/typo3sh/bin:/usr/local/bin" [ "SERVER_SIGNATURE" ]=> string(5) "HTTPD" [ "SERVER_NAME" ]=> string(27) "p138104.mittwaldserver.info" [ "SERVER_ADDR" ]=> string(13) "172.16.42.240" [ "SERVER_PORT" ]=> string(2) "80" [ "REMOTE_ADDR" ]=> string(13) "87.178.199.78" [ "DOCUMENT_ROOT" ]=> string(23) "/home/www/p138104/html/" [ "SERVER_ADMIN" ]=> string(21) "[support@mittwald.de]" [ "SCRIPT_FILENAME" ]=> string(31) "/home/www/p138104/html/info.php" [ "REMOTE_PORT" ]=> string(5) "50653" [ "GATEWAY_INTERFACE" ]=> string(7) "CGI/1.1" [ "SERVER_PROTOCOL" ]=> string(8) "HTTP/1.1" [ "REQUEST_METHOD" ]=> string(3) "GET" [ "QUERY_STRING" ]=> string(0) "" [" REQUEST_URI "]=> string(9) " /info.php " [" SCRIPT_NAME "]=> string(9) " /info.php " [" SERVER_SOFTWARE "]=> string(5) " HTTPD " [" REDIRECT_STATUS "]=> string(3) " 200 " [" PHP_SELF "]=> string(9) " /info.php " [" REQUEST_TIME "]=> int (1301292718) [" argv "]=> array(0) { } [" argc"]=> int (0) }
        Hide
        Jan Westphal added a comment -

        screen of info.php

        Show
        Jan Westphal added a comment - screen of info.php
        Hide
        Jan Westphal added a comment -

        I hope that the dump can help.

        Show
        Jan Westphal added a comment - I hope that the dump can help.
        Hide
        Petr Škoda added a comment -

        This looks like some kind of "security through obscurity" setup trying to hide the actual server used, I am always wondering why they keep doing this. Anyway thanks for the information, I will add a new section there for these clever hosters.

        Show
        Petr Škoda added a comment - This looks like some kind of "security through obscurity" setup trying to hide the actual server used, I am always wondering why they keep doing this. Anyway thanks for the information, I will add a new section there for these clever hosters.
        Hide
        Petr Škoda added a comment -

        Fix will be available in the next weekly build, thanks for the report.

        Petr

        Show
        Petr Škoda added a comment - Fix will be available in the next weekly build, thanks for the report. Petr

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: