Fresh installation on Debian stable - acli/ATutor GitHub Wiki

This logs my experience of installing ATutor on Debian stable (just to prove that my pull request is more general than “just a MacOSX problem”). Because this is my second installation, I expect the experience to be much smoother; however, I have opted to at least try run the installation wizard through the w3m browser so that I can discover text-browser-related bugs if there are any. So the experience might still turn out to be frustrating.

The Debian system I’m working with is on a remote server, so using a text browser to access it actually corresponds very well to how I actually tend to work with remote servers.

The text based installation having failed, I subsequently followed up with another installation attempt using Google Chrome.

Table of Contents

The experience of running the wizard through a text browser

Javascript check failed as expected

  • On my Debian system, the requirements check screen (install/index.php) reports that all requirements are OK except Javascript, which is obviously going to be the case

Mysterious “password cannot be empty” errors

  • The installation wizard displayed myterious “Administrator password cannot be empty.” and “Personal Account Password cannot be empty.” [inconsistency in original] messages, even though none of these were empty. My guess is a Javascript check run amok somewhere.
  • The Javascript function encrypt_password() is called on the passwords, so text-browser users should theoretically be able to get past the screen if they manually SHA1-hashed their passwords in the form.
  • Unfortunately, instead of updating the password fields, the encrypt_password() function puts the encrypted forms in a separate field, so text browser users are out of luck.
  • This means that we should never have been allowed to get to step 1 in the first place.
  • This also means the error message is wrong.

The experience of running the wizard through a graphical browser

The database creation step was all skipped because the database tables had all been created during the previous text browser installation. Very ironic.

Failure to detect support for protected content directory

  • At step 4, the wizard complains about “It has been detected that your webserver does not support the protected content directory feature. The content directory stores all of the courses' files.”
  • This is of course wrong. Bug in the detection code.
  • Tracing step4.php:
    • Got into line 99, inside the “if (isset($host['path']))” case.
    • Got into line 124, inside the “if($fp)” case inside the “else” half of “if ($port == 443)”; i.e., the code correctly detected the host name, the port number (80), and the fsockopen succeeded
    • The fread loop got
 HTTP/1.1 404 Not Found
 Server: nginx/0.7.67
 Date: Thu, 02 May 2013 19:52:33 GMT
 Content-Type: text/html
 Content-Length: 169
 Connection: close
    • Then the code looks for an “ATutor-Get: OK” header, which obviously isn’t going to be there since we got a 404.
    • So the question now becomes: What exactly is it trying to GET, and what assumptions is it making?
    • In line 124, it is trying to HEAD (not GET) @$path (why the @?) at host @$host (why the @ again?)
    • It is trying to send this:
 HEAD /get.php/?test HTTP/1.0
 Host: atutor-test.gniw.ca
    • At first glance it looked like it should be /get.php?test and not /get.php/?test, and the extra slash is causing the 404. Further debugging revealed that when the slash is present, the script is not being called at all. This suggests that this behaviour is a result of the difference between nginx and Apache
  • Conclusion: Depending on what the installer is actually trying to test, its conclusion might be valid, but the requirements section also needs to list PATHINFO support as recommended and should ideally point to tutorials on how to set that up on non-Apache servers
  • The lack of info on the forums suggests that some ATutor problems might be the result of a lack of transparency.

Various random oddnesses

  • In step 2, but only sometimes:
 Resource interpreted as Image but transferred with MIME type text/css: "http://atutor-test.gniw.ca/install/stylesheet.css". install.php:9

BUGS OBSERVED

  1. Mysterious “Administrator password cannot be empty.” and “Personal Account Password cannot be empty.” when step 3 is being completed through a non-Javascript browser due to Javascript hackery. This appears to also affect the normal login screen.
  2. The site name, once committed to the database, is not updated even if you specified a different name by rerunning the installer.
  3. On the Anonymous Data Collection screen (step 6), the MySQL version is always blank. Removing the @ operator from step6.php reveals that the error was “Warning: mysql_connect() [function.mysql-connect]: Access denied for user '…'@'localhost' (using password: YES) in …/ATutor/install/include/step6.php on line 157”
⚠️ **GitHub.com Fallback** ⚠️