check_slasharguments Error reading environment data (16)

check_slasharguments Error reading environment data (16)

by David Heuring -
Number of replies: 11

Trying to upgrade from Moodle 2.8+ (Build 20141112) to Moodle 3.0. on my development server.  When I did the Environment check, I got the following error.

check_slasharguments Error reading environment data (16)
I checked the forum and there are some really old posts from Moodle 1.7 about this error but they don't seem to apply. 

My server software is Ubuntu 14.04.  Apache2 and MySQL are both up-to-date. 

Any advice on problem solving this is much appreciated.

Average of ratings: -
In reply to David Heuring

Re: check_slasharguments Error reading environment data (16)

by Just H -
In reply to Just H

Re: check_slasharguments Error reading environment data (16)

by David Heuring -

Thanks.  That was one of the first things I did.  I unticked the Http option and ran Environment again and got the same error.  I then tried the second option by adding line to my apache2 config file, but it didn't make a difference.  Kind of stumped at this point.

In reply to David Heuring

Re: check_slasharguments Error reading environment data (16)

by David Heuring -

Yea, I had checked on both of these already.  Made sure the HTTP use slash arguments was ticked and I added  the line "AcceptPathInfo On" to my apache2.conf file (and restarted Apache).  Neither of these removed the error message.  I haven't seen this problem anywhere else.  Anyone got a suggestion?

In reply to David Heuring

Re: check_slasharguments Error reading environment data (16)

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

So in your first post, you said you unticked slash arguments and in the second you said you checked it?  Is it checked or not?

In reply to Emma Richardson

Re: check_slasharguments Error reading environment data (16)

by David Heuring -

It is currently ticked.  When I first started problem solving, I un-ticked it to see if that would get rid of the error message, but it didn't.  So  re-ticked it so it is back to how it was originally set.

In reply to David Heuring

Re: check_slasharguments Error reading environment data (16)

by Matteo Scaramuccia -

Hi David,
how has PHP been deployed under Apache? Module or FPM?

Matteo

In reply to Matteo Scaramuccia

Re: check_slasharguments Error reading environment data (16)

by David Heuring -

Matteo,

When I originally set up the LAMP stack on a Linode server, I started with Ubuntu 14.04 for the OS.  I then installed Virtualmin and let it install and configure Apache2, MySQL, and PHP.  So I'm not sure whether it is Module or FPM.  I just checked and my PHP version is 5.5.9-1ubuntu4.14.  In case it will help, I've attached the first page of PHP Info from my Moodle installation. 

In reply to David Heuring

Re: check_slasharguments Error reading environment data (16)

by Matteo Scaramuccia -

Hi David,
that is under CGI/FastCGI (Server API) so you need to take care of slash arguments in a different way starting with knowing that Moodle slash arguments means PATH_INFO support.

You could follow https://www.linode.com/docs/websites/lamp/how-to-install-a-lamp-stack-on-ubuntu-14-04 for a PHP stack deployed as module BUT since you're using Virtualmin you need to follow its way of doing.

Please add/uncomment cgi.fix_pathinfo=1 in the php.ini file (/etc/php5/cgi/php.ini or that in your home) and check in /etc/apache2/mods-available/fcgid.conf for something like the few lines below:

<IfModule mod_fcgid.c>
  AddHandler    fcgid-script .fcgi
  FcgidConnectTimeout 20
  PHP_Fix_Pathinfo_Enable 1
</IfModule>

Restart Apache and look for the Moodle check.

HTH,
Matteo

In reply to Matteo Scaramuccia

Re: check_slasharguments Error reading environment data (16)

by David Heuring -
Thanks, Matteo,  I really appreciate your advice.  Unfortunately, it hasn't resolved the problem.  I did as you said.  First, I found all instances of the php.ini and un-commented the cgi.fix_pathinfo=1 line.  These were the locations:

/etc/php5/apache2/php.ini
/etc/php5/cgi/php.ini
/etc/php5/cli/php.ini
/home/********/etc/php.ini
/home/********/etc/php5/php.ini
/usr/share/php5/php.ini-development
/usr/share/php5/php.ini-production
/usr/share/php5/php.ini-production.cli

Next, I went to /etc/apache2/mods-available/fcgid.conf and added the PHP_Fix_Pathinfo_Enable 1 line.  See below:

<IfModule mod_fcgid.c>
  FcgidConnectTimeout 20
  PHP_Fix_Pathinfo_Enable 1
  <IfModule mod_mime.c>
    AddHandler fcgid-script .fcgi
  </IfModule>
</IfModule>

I then did a "service apache2 restart" and checked the Moodle Environment page but the same error was listed at the bottom as before.  Did I do something wrong?  If not, what else could it be?

David
In reply to David Heuring

Re: check_slasharguments Error reading environment data (16)

by Matteo Scaramuccia -

Hi David,
unfortunately I do not have a Virtualmin-based server to use it for debuggin your issue: I've just read the documentation on how it is supposed to perform the deploy of PHP and post how the setup should be "fixed".

In a "plain" server I'd use the things below to troubleshoot your issue:

  1. PHP as module under Apache or PHP-FPM under nginx (or Apache with mod_proxy_fcgi) - working combinations can be found in a recent issue, MDL-51554, too
  2. a simple PHP page to test the PATH_INFO support before using Moodle for checking for it: a file named e.g. phpinfo.php containing one line, <?php phpinfo();, and a browser pointing to it as http://hostname/path/to/phpinfo.php/a/folder/with/a/file.txt showing that PATH_INFO equals to /a/folder/with/a/file.txt
  3. Iterate on the PHP configuration tuning until (2) will work as expected

What version of Virtualmin are you running on?

HTH,
Matteo

In reply to Matteo Scaramuccia

Re: check_slasharguments Error reading environment data (16)

by David Heuring -

Matteo.

The Virtualmin version is 4.18.gpl.  I have the exact same LAMP set up on the development and production servers but it is only the development server that gives this error message when I go to check the environment to install Moodle 3.0. 

So I did as you suggested and created the simple PHP page and ran it from my browser.  I was then able to the compare the print out with my Moodle's PATH_INFO.  I went through both line-by-line but there was no difference between them.

I'm beginning to think the best thing to do is to rebuild the server and install 3.0 from scratch since I don't seem to be able to get past that error message.