Hello all, I am rather new to Moodle and as a part of a good cooperative group, I am responsible for the Moodle database and web servers, from hardware to application level all running Linux or Unix.
Trying to get Latex ( in fact texlive ) to work in Moodle, the last few days I have been wondering about the following error:
Error: latex executable (/usr/bin/latex) is not readable
All permissions were ok, and I could run the command as the apache user. After searching thoroughly on this web and in search machines, rummaging throug php code and writing some test scripts, we found a hint about the culprit here.
We were not aware that open_basedir, a php variable was set in the apache virtual host config. It is not set anywhere in the php.ini file. The value was only revealed in phpinfo , showing that the site was confined to the webroot, and had no access to the rest of the Linux server.
Looking into the Apache config, it was evident that we had overlooked the variable setting:
DirectoryIndex index.php index.html index.htm
Options -Indexes FollowSymLinks
Header unset Etag
Allow from all
php_admin_value open_basedir "/var/www/"
php_admin_value upload_tmp_dir /var/www/php_tmp
The Problem was solved by adding the directory containing the executables, i.e. /usr/bin. Thus the line looked like this:
php_admin_value open_basedir "/var/www:/usr/bin"
Heopefully this may serve as a guide to someone in the similar situation.
Also I would like to mention a very helpful script for debugging this problem:
Best regards, Anna Jonna.