Installation problem in 3.7.2+

Re: Installation problem in 3.7.2+

by Patrick Williams -
Number of replies: 0

Hi folks,

Having battled with 1&1 Ionos with this issue since first installing Moodle in March I thought I'd quickly share the solution!

As Mikel says, you need php.ini (and set_path_info.php) in *every* folder, but there's an easy way to do this (which is easy to update as well). After many hours on the phone, a helpful tech support agent (finally!) sent this over to me:

- - - - - - - - - - - - -

1. Create a php.ini file (if you don't have one already)

2. Paste this code inside your php.ini and save your changes
auto_prepend_file = set_path_info.php

3. Create a set_path_info.php file

4. Paste the code inside set_path_info.php and save the changes
<?php
if (getenv('ORIG_PATH_INFO')) {
    putenv("PATH_INFO=".getenv('ORIG_PATH_INFO'));
}
if ($_SERVER['ORIG_PATH_INFO']) {
    $_SERVER['PATH_INFO'] = $_SERVER['ORIG_PATH_INFO'];
}
if ($_ENV['ORIG_PATH_INFO']) {
    $_ENV['PATH_INFO'] = $_ENV['ORIG_PATH_INFO'];
}
?>

5. Create a symbolic link (symlink) of your "php.ini" & "set_path_info.php" in every subdirectory, using SSH terminal, starting in the root of your Moodle installation:
find -type d -exec ln -s $PWD/php.ini {}/php.ini \;
find -type d -exec ln -s $PWD/set_path_info.php {}/set_path_info.php \;

- - - - - - - - - - - - - - - -

The 'symbolic links' make it appear to the server that php.ini and set_path_info.php from the root of your Moodle installation are in *every* subdirectory.

'slasharguments' issue solved! Thank goodness!


There's another issue to watch out for on a 1&1 Ionos shared server (this broke my Moodle installation last week!) - there is a file quota limit AND a disk space quota limit, despite the contract being for 'unlimited' space. My default disk quota was set to 50GB, which they increased to 75GB when this issue arose. They cannot increase the file quota, sadly.

Where this gets tricky is in running backups: What I recommend is limiting the number of Moodle installs to keep well within the file quota, then if you need to back up the Moodle directory, just zip/pack it to a .zip file.


I hope this is useful to someone and can help them avoid the HOURS that I spent on the phone to tech support explaining the same problem over and over again!

All the best,

Patrick

Average of ratings: Useful (3)