Can't finish an installation process

Can't finish an installation process

by White Wolf -
Number of replies: 14

I'm trying to make a fresh new installation of latest version of Moodle, but it can't be finished. I tried it several times (erased tables in db), but always I am stucked in creation tables. My latest successfully created tables are quiz tables. Last line on the installation page show RESOURCE.

I am running on Apache server, PHP 5.2.0, mySQL 5.0.27-log.

I also tried use this setting "admin/index.php?ignoreupgradewarning=1" that helped me to continue in creation of RESOURCE tables, then it stucks on message about successful setting of resource tables.

Average of ratings: -
In reply to White Wolf

Re: Can't finish an installation process

by White Wolf -
Well, I just found this sentence in Installing Moodle article Check that PHP isn't in a restricted "Safe Mode" (commercial web hosts sometimes have safe mode turned on). My provider is using Safe Mode setting. Is it possible to solve my situation anyway?
In reply to White Wolf

Re: Can't finish an installation process

by Talking Jazz -
Hello,

I´m facing the same problem: The install-script doesn´t set up the tables correctly.

It´s my first installation, I´ve downloaded version 1.7.x. The server-requirement were all passed correctly, inluding safe-mode.

I get the following answer:

(mysql): CREATE UNIQUE INDEX mdl_conf_nam_uix ON mdl_config (name)
1142: INDEX command denied to user 'xxx'@'localhost' for table 'mdl_config_plugins'

for several actions.

I´ve also tried to load up the tables manually by using the mysql.sql (I replaced the prefix by mdl) - no success. The upload stopped after 9 tables.

So - may anybody give advice? Should I maybe try an older version of moodle?

Thanks for your time, TalkingJazz
In reply to Talking Jazz

Re: Can't finish an installation process

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Hi "Jazz",
the error message means that the MySQL username that Moodle is using does not have sufficient privileges (i.e. it is not sufficiently powerful) to create an index.

Therefore, to fix your difficulties, you need to give the MySQL username more privileges. If you don't know how to do this, please consult with your ISP helpdesk who will give you precise instructions on how to do this on your particular server.

good luck and Happy New Year!
Gordon
In reply to Gordon Bateson

Re: Can't finish an installation process

by Talking Jazz -
Hi Gordon,

thank you for your advise. smile

I`ve - after reading severeal threads concerning the problem - guessed that there might not be enough privileges. So far I´m not allowed to give myself more privileges and my providers´ helpdesk will be back next year wink...

So I´ll poor myself a glas of prosecco (Salute!) in and will welcome the New Year.

Happy New Year to you!

TalkingJazz
In reply to Talking Jazz

Re: Can't finish an installation process

by Talking Jazz -
After having been granted by my provider with the necessary database-user-privileges the installation-process went throught without any further problems.

My first moodle is set up - hurrrraaaaaa! tongueout clown

After presently testing various other elearning-systems like ATutor, claroline, docebo or dokeos it seems to be the most comfortable.

Greetings TalkingJazz
In reply to Talking Jazz

Re: Can't finish an installation process

by White Wolf -

TJ, congratulations!

What kind of privileges you've been granted? What have you changed? Tell me more details, please.

Greetings, ww6

In reply to White Wolf

Re: Can't finish an installation process

by Talking Jazz -
Hello White Wolf,

as a database-user various privileges when using a mysql-database can be grantet, take a closer look here: http://dev.mysql.com/doc/refman/5.0/en/user-privileges-table.html

Notes:

  • PRIVILEGE_TYPE can contain one (and only one) of these values: SELECT, INSERT, UPDATE, REFERENCES, ALTER, INDEX, DROP, CREATE, VIEW.

My privilege was "usage" - but for this special database I needed a more wide "create"-privilege. I´ve been installing OpenSource-systems for several years but the problem of user-privileges was completly new to me! Because of the low-level-privilege I was not able to do the "CREATE" index or unique index with the installation-script: Some tables were installed, other brought Error-Messages.

I sent an email to my provider (that was nothing I could have changed myself) so that he could grant more privileges to me. After this, the installation ran smoothly without further complications...

Greetings TalkingJazz




In reply to Talking Jazz

Re: Can't finish an installation process

by White Wolf -

Hi TJ,

thank you for your reply. I have wrote to my provider asking him for more privileges and am waiting for his response. I'll let you know the result soon, hopefully.

Best regards ww6

In reply to White Wolf

Re: Can't finish an installation process

by Talking Jazz -
Hi White Wolf,

I hope you´ll be successful! I sent two of the Error-Codes to my provider... he knew prompt which privileges I needed... wink

Have a nice day, TalkingJazz
In reply to Talking Jazz

Re: Can't finish an installation process

by White Wolf -

Hi Talking Jazz

My provider told me I have enough privileges and he sees the problem in installation script. I decided to create Moodle local in my PC under EasyPHP and import created database on server. I sovled this way my problem and I am successfuly running Moodle. big grin

In reply to Gordon Bateson

Re: Can't finish an installation process

by White Wolf -

Hi Gordon

I see you are more familiar with Moodle than I am. Will you be willing to help me out with my problem? Thanx for any response.

Happy New Year!

WhiteWolfSix aka ww6

In reply to White Wolf

Re: Can't finish an installation process

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Hi Wolf,
I would help if I could, but from what you say your server is in "safe mode", which I understand does not allow Moodle to do things it must do - such as read and write to files and folders elsewhere in the file hierarchy.

At least I am pretty sure that you won't be able to complete the automatic installation of Moodle until you switch off Safe Mode. To switch off Safe Mode, you need to change a setting in "php.ini" (the PHP settings file) and then restart your web server. If you are using a shared server, you may not have sufficient privileges to be able to do this yourself, so please consult with your ISP helpdesk.

If I were in your situation, I would bypass the install script and create the config.php by hand. It is not difficult, and only requires inserting a handful a values, so that Moodle knows how to access to DB and how to access its files on the server and via the web. Have a look at config-dist.php in your Moodle directory.

If you still get the basedir error having created your own config.php, then I would try one final thing, and that is to try to add the inaccessible folder to the list of accessible folders.
  1. in the "basedir" error message, you will see the "include" list of directories, which the folders on your server that PHP is allowed to access. Probably this list finishes with "/tmp". Let's say it is "/path/to/www:/tmp" Copy the list of "include" folders in your message
  2. now, look for a file called ".htaccess" in your Moodle folder. If there is not there, create it (as a text file)
  3. open the ".htaccess" file with a text editor
  4. copy and paste the following text to ".htaccess"
    <Directory /path/to/www/moodle/>
    php_admin_value open_basedir "/path/to/www:/path/to/moodledata:/tmp"
    </Directory>
  5. save the modified ".htaccess"
  6. access Moodle again
But I feel you would do best to devote your energies to getting Safe Mode switched off

all the best
Gordon
In reply to Gordon Bateson

Re: Can't finish an installation process

by White Wolf -

Hi Gordon,

first of all, thank you for your response, you were first person who tried help me out with my problem.

Regarding SAFE MODE, I am on commercial hosting and my provider won't switch Safe Mode off, as he argue this is for my security.

Regarding Config.php, there is no problem, I was able to download it and manually put on website. As you can see from my first post, my installation started and was creating many db tables but stuck on some stage, I don't understand why (maybe due to Safe Mode).

ww6