we installed Moodle 1.8 on SuSE 10.2 (php5) with no problems; now we tried to install Moodle on SLES9 (php4), but when we executed the install script we got the following error message:
Warning: main(/lib/adminlib.php): failed to open stream: No such file or directory in /moodle/install.php on line 134
Fatal error: main(): Failed opening required '/lib/adminlib.php' (include_path='.:') in /moodle/install.php on line 134
------
We established that moodle wants to find the adminlib.php in the absolute directory of lib and not in the moodle lib directory; but we do not know why.
We also cannot explain why it works on SuSE 10.2 and not on SLES9? (The only differences are the versions of the needed software.)
Does anyone know what is wrong with our installation or what we did wrong?
Thanks in advance,
Barbara
BD,
What is the value of the $CFG->dirroot variable in config.php? It should be the absolute path of your Moodle web folder, where index.php and install.php are.
There is also something suspicious about the value shown for include_path, but one thing at a time.
RLE
Now we read about the detailed configuration and edited the config.php script. There is the value of the $CFG->dirroot "/moodle". But it doesn't work as well.
Thanks,
Barbara
BD,
Normally, letting install.php create config.php automatically works okay, but you need to answer the questions correctly. If you make a mistake (don't we all! ) in answering a question, you can fix it by editing config.php. But to do that, you need to know the correct answer.
You now seem to be confused about the location of your Moodle web files. "moodle" is usually the name of the folder, but it is relative to the root web folder for your system. Since you are able to edit your config.php, I presume you do that (or are able to) while you are in the folder that file is in, i.e., while that folder (moodle) is your current active folder (or directory). So my suggestion is: while you are in the moodle folder, type this command
pwd
at the Linux command prompt (I'm assuming you have access to the command prompt). It should give you the absolute pathname of the moodle folder. That's what $CFG->dirroot should be equated to in config.php (between the quotes of course).
RLE
the absolute path of the moodle directory is "/moodle".
We started to edit the config.php manually, because while trying the configuration via the install.php script, we always got the error message described in our first post (after choosing the language).
Hence we edited the config.php and started the admin page; we were able to set up the tables, etc. Also the "Setting up plugin tables" worked well, but after this site we got the message "Your session has timed out. Please login again". But when we tried to login with admin/admin it was not possible and still is.
So what is the problem?
Thanks,
Barbara
BD,
This might help you to log in:
http://moodle.org/mod/forum/discuss.php?d=62327#282373
Other than that, I don't know why install.php was looking for php files in the wrong place. Hopefully once you are able to log in as admin you'll be okay.
RLE
What else could we try?
Thanks,
Barbara
BD,
I'm sure you've already checked this, but I have to ask. In my first post in this thread I mentioned that there was something suspicious about the include_path. It contains only one path, namely ".". That means the current folder, in this case, /moodle. So it should have looked for /lib/adminlib.php relative to /moodle, i.e., /moodle/lib/adminlib.php. Have you checked that that file is there? Because if it is it should have found it.
Also, the reason I suspected something about include_path, aside from the fact that it is so short, is that I've seen a bug related to that before. One of the things that happened is that it was truncated. The other thing that happened is that an extra quotation mark was in it, but that hasn't happened in your case. Do you know what value include_path has in your php.ini file? Even if it did truncate it, that shouldn't have caused it to fail to find the adminlib.php file. Maybe it's because it ends with a colon.
The main point is, if that file is missing, that would definitely cause problems whether you use install.php or not, but it would be easy to fix, by downloading (or maybe just unzipping) Moodle again.
RLE