Posts made by Visvanath Ratnaweera

Picture of Particularly helpful Moodlers Picture of Translators
Leon

It could have been, that Ubuntu differs from Debian in this respect. But from past experience I knew it is not so. Here is the evidence:

# ps uax | less | grep php
root      608747  0.0  0.2 225752 32880 ?        Ss   14:39   0:01 php-fpm: master process (/etc/php/7.4/fpm/php-fpm.conf)
www-data  608760  0.1  0.2 231168 44148 ?        S    14:39   0:22 php-fpm: pool www
www-data  608761  0.1  0.3 231180 55380 ?        S    14:39   0:22 php-fpm: pool www
But I have a suspicion: In the error above:

call to print_error()" while reading response header from upstream, client: x.x.x.x, server: _, 
x.x.x.x is not my IP, it is something close to the server IP! So some network jugglery in between?

@Nimal, I sent you a PM with internal details, for a tcpdump/WireShark session.

@all, I will abandon this migration and come back after the proper background research.

Thanks all for rhyming in!
Average of ratings: Useful (1)
Picture of Particularly helpful Moodlers Picture of Translators
Ran in to edit time out:

The full error is:
* line 739 of /admin/index.php: 
call to print_error()" while reading response header from upstream, client: x.x.x.x, server: _, 
request: "GET /admin/index.php?sessionstarted=1&sessionverify=1&lang=en HTTP/1.1", 
upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock:", host: "example.com"

Could it be a mess in the way mulitiple PHP versions are handled? This server has only the default, PHP 7.4

# ls -l /var/run/php
total 4
-rw-r--r-- 1 root     root      6 Oct 16 14:39 php7.4-fpm.pid
srw-rw---- 1 www-data www-data  0 Oct 16 14:39 php7.4-fpm.sock
lrwxrwxrwx 1 root     root     30 Oct 13 21:02 php-fpm.sock -> /etc/alternatives/php-fpm.sock

# ls -l /etc/alternatives/php*
lrwxrwxrwx 1 root root 15 Aug  3 22:40 /etc/alternatives/php -> /usr/bin/php7.4
lrwxrwxrwx 1 root root 31 Aug  3 22:40 /etc/alternatives/php.1.gz -> /usr/share/man/man1/php7.4.1.gz
lrwxrwxrwx 1 root root 24 Oct 13 21:02 /etc/alternatives/php-fpm.sock -> /run/php/php7.4-fpm.sock

# ls -l /run/php
total 4
-rw-r--r-- 1 root     root      6 Oct 16 14:39 php7.4-fpm.pid
srw-rw---- 1 www-data www-data  0 Oct 16 14:39 php7.4-fpm.sock
lrwxrwxrwx 1 root     root     30 Oct 13 21:02 php-fpm.sock -> /etc/alternatives/php-fpm.sock
Average of ratings: Useful (1)
Picture of Particularly helpful Moodlers Picture of Translators
Hi Ken

"XSendfile aka X-Accel-Redirect" is a performance enhancement. Tried just now nevertheless. No effect.

Following the other links right now...

Edit: If I comment out the else block (starting 737)

726 // make sure admin user is created - this is the last step because we need
727 // session to be working properly in order to edit admin account
728  if (!empty($CFG->adminsetuppending)) {
729     $sessionstarted = optional_param('sessionstarted', 0, PARAM_BOOL);
730     if (!$sessionstarted) {
731             redirect("index.php?sessionstarted=1&lang=$CFG->lang");
732     } else {
733         $sessionverify = optional_param('sessionverify', 0, PARAM_BOOL);
734         if (!$sessionverify) {
735             $SESSION->sessionverify = 1;
736             redirect("index.php?sessionstarted=1&sessionverify=1&lang=$CFG->lang    "); 
737         } else {
738             #if (empty($SESSION->sessionverify)) {
739             #    print_error('installsessionerror', 'admin', "index.php?sessions    tarted=1&lang=$CFG->lang");
740             #}
741             #unset($SESSION->sessionverify);
742         }
743     }
744 

 I get 
ERR_TOO_MANY_REDIRECTS
Average of ratings: Useful (1)
Picture of Particularly helpful Moodlers Picture of Translators
The LAN solution is a solid one for exams in a controlled environment. I understand that the LAN is Ethernet (wired), not wireless.

For for the students to access the server with a FQDN few things become necessary. But before you take the trouble, what is the purpose of a (worldwide unique) FQDN in an island  (isolated from the internet)? Pure IP addresses work without DNS.

If you want to go there, the domain 'home' is reserved exactly for this: https://en.wikipedia.org/wiki/.home. That means configuration to the DHCP server in your router.

It doesn't end there. The next level is https://en.wikipedia.org/wiki/Captive_portal.

It is not advised to "reuse" official FQDNs, even in isolated environments.

BTW, the MoodleBox does all that. I understand, the feeling, that a Mac delivers my Moodle is not the same if it were Linux or Windows.
wink