Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-26182

Notice: Undefined index: SCRIPT_NAME in /var/www/moodle/testing/lib/setuplib.php on line 723

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.1
    • Fix Version/s: 2.0.2
    • Component/s: General
    • Labels:
      None
    • Environment:
      CentOS 5.5, Linux 2.6.18-194.el5PAE, nginx 0.8.53, php 5.3.4 as FastCGI
    • Database:
      Any
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      This message always displays on every page if open debug mode.

      I searched it and found other php product said the problem can be solved by setting variables_order=EGPCS in php.ini. I tried but did not work. variables_order always be GPCS. The official php doc (http://php.net/manual/en/ini.core.php) says "In both the CGI and FastCGI SAPIs, $_SERVER is also populated by values from the environment; S is always equivalent to ES regardless of the placement of E elsewhere in this directive." It seems that GPCS is equal to EGPCS in my server

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            sunner Sunner Sun added a comment -

            Additional info:

            The site works well. It seems that nothing is affected by this notice.

            Show
            sunner Sunner Sun added a comment - Additional info: The site works well. It seems that nothing is affected by this notice.
            Hide
            skodak Petr Skoda added a comment -

            Hello,
            the problem is that nginx is not 100% Apache compatible, somebody with access to some servers has to add workarounds for all differences in the $_SERVER global for all supported operating systems and write some docs explaining necessary settings.

            Petr

            Show
            skodak Petr Skoda added a comment - Hello, the problem is that nginx is not 100% Apache compatible, somebody with access to some servers has to add workarounds for all differences in the $_SERVER global for all supported operating systems and write some docs explaining necessary settings. Petr
            Hide
            skodak Petr Skoda added a comment -

            I have found several pages describing a bug where SCRIPT_NAME is missing, maybe this could help you:
            http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=608987

            Show
            skodak Petr Skoda added a comment - I have found several pages describing a bug where SCRIPT_NAME is missing, maybe this could help you: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=608987
            Hide
            sunner Sunner Sun added a comment -

            Thank you, sokdak!

            After adding "fastcgi_param SCRIPT_NAME $fastcgi_script_name;" in nginx's configure, the problem is solved.

            If the docs you mentioned above needs any info about nginx, I'd like to help.

            I think, this issue can be closed.

            Show
            sunner Sunner Sun added a comment - Thank you, sokdak! After adding "fastcgi_param SCRIPT_NAME $fastcgi_script_name;" in nginx's configure, the problem is solved. If the docs you mentioned above needs any info about nginx, I'd like to help. I think, this issue can be closed.
            Hide
            skodak Petr Skoda added a comment -

            I have added the info directly into moodle code, see the linked PULL request.

            Thanks for the report and cooperation.

            Petr

            Show
            skodak Petr Skoda added a comment - I have added the info directly into moodle code, see the linked PULL request. Thanks for the report and cooperation. Petr
            Hide
            dongsheng Dongsheng Cai added a comment -

            Another nginx tip of running moodle https: Moodle complains sslonlyaccess error, it is actually because the $_SERVER['HTTPS'] is not set by nginx by default, have to add "fastcgi_param HTTPS on;" to "server{}" section.

            Show
            dongsheng Dongsheng Cai added a comment - Another nginx tip of running moodle https: Moodle complains sslonlyaccess error, it is actually because the $_SERVER ['HTTPS'] is not set by nginx by default, have to add "fastcgi_param HTTPS on;" to "server{}" section.
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            I keep this open for consideration of last comment from Dongsheng. Should we introduce another check for that?

            Feel free to close it if no further action is necessary as far as the original problem (SCRIPT_NAME check + tip) has been already integrated.

            Ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - I keep this open for consideration of last comment from Dongsheng. Should we introduce another check for that? Feel free to close it if no further action is necessary as far as the original problem (SCRIPT_NAME check + tip) has been already integrated. Ciao
            Hide
            skodak Petr Skoda added a comment -

            reclosing, going to file new issue for the ssl issue

            Show
            skodak Petr Skoda added a comment - reclosing, going to file new issue for the ssl issue

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  21/Feb/11