• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question Moodle / PHP 7.4.20 / Slash Arguments

xdaniel

New Pleskian
Hello,
I had a running installation on Plesk Obsidian (latest). Without any update of Moodle it stopped working. I think this happened when the server uodated to PHP 7.4.20.
There were several symptoms where files could not be loaded (user images / designcache).
The installation was running with PHP FPM nginx).
A lot of hints and reading about this issue had no success.
In the end I disabled Slash Arguments in Moodle (which wasn't updated since May 2021, 3.9.7) and it worked again.
But Slash Arguments are needed for some modules in Moodle.
My question now is, how to configure Plesk Obsidian on Ubuntu 18 to make Moodle work with Slash Arguments?
Thanks in advance.
Daniel
 
Hello,

I'm facing the same issue, moodle was working perfectly and suddenly stop working and the only way I magened to made it work, was disabling the Slash Arguments, but this instance of moodle needs the Slash Arguments due we have SCORM modules.

Does anyone any advice? We are running:

  1. Plesk Obsidian Versión 18.0.36
  2. CentOS Linux 7.9.2009 (Core)
  3. Test it with PHP 7.3.29 and PHP 7.4.21
 
Hello,

I'm facing the same issue, moodle was working perfectly and suddenly stop working and the only way I magened to made it work, was disabling the Slash Arguments, but this instance of moodle needs the Slash Arguments due we have SCORM modules.

Does anyone any advice? We are running:

  1. Plesk Obsidian Versión 18.0.36
  2. CentOS Linux 7.9.2009 (Core)
  3. Test it with PHP 7.3.29 and PHP 7.4.21

I have more news regarding this issue, I created a new subdomain, rsynced the moodle directory and created a copy of the database, so in principal the exact same moodle (data and & db) but in another subdomain. Turns out that when I active the Slash Arguments in moodle it ACTUALLY WORKS!. I'm really don't understand what happed, I have performed a diff to check and the only differences are:


Some cache files

The config.php file that was modified to connect the 'dev/copied' database.

Any clue?
 
Hello Dark452,
on my site I switched to FPM Apache and I could make it work again. Before it even didn't work with this, but now it does without having changed anything. Just a few restarts :-(.
 
Hello Dark452,
on my site I switched to FPM Apache and I could make it work again. Before it even didn't work with this, but now it does without having changed anything. Just a few restarts :-(.

Many thanks! It did worked! I've tried this during the day(move from nginx to apache) but I totally forgot to swith the php-fpm to apache.

I really don't understand what happen and why my other moodle instances do work with nginx, this behavior is really strange.

I truly appreciate your help, you saved me!
 
Hi there,

I was struggling with the same issue today. Switching to "PHP-FPM served by Apache" didn't change anything for me, though.
Based on the nginx error log is was quite obvious, that all php scripts with slash arguments were not forwarded to php-fpm.

So I tried to adapt the nginx configuration suggested in the Moodle docs (Nginx - MoodleDocs)
The only tricky part was finding the proper fastcgi_pass parameter. Using "find" I located php-fpm.sock in /var/www/vhosts/system/<domain>, and that did work just fine. At least if you use the full path.
I therefore added the following to the beginning of the "additional nginx settings" box.
Of course you need to replace <domain-name> :)

location ~ [^/]\.php(/|$) { fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_index index.php; fastcgi_pass unix:/var/www/vhosts/system/<domain-name>/php-fpm.sock; include fastcgi_params; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; }

That worked for me.
Please note that I still have
- php-fpm served by Apache enabled
- in the nginx settings, only "proxy mode" is enabled, intelligent handling of static files, direct handling of static files and nginx caching are disabled

Hope that helps!

Christian
tethis-it.at
 
Thanks a lot! This was really helpful. I can now again access my profile pages and think it was good for the performance too.
 
Back
Top