installation headache ++

installation headache ++

by Wolfgang Schneider -
Number of replies: 6
Hi,
trying to install moodle has been more than a headache, more like a nightmare sad
When calling up the /admin/index.php I regularly get the following type of error messages

(mysql): DELETE FROM `modules` WHERE `name` = 'chat'
--------------------------------------------------------------------------------
1146: Table 'k7149.modules' doesn't exist
Error
--------------------------------------------------------------------------------
(mysql): ALTER TABLE `modules` DROP `fullname`
--------------------------------------------------------------------------------
1146: Table 'k7149.modules' doesn't exist
Error

Seems like the script wants to update something that isn't there because I am doing a new installation ... ??

Trying to fool the system, I ran the mysql.spl query with myphpadmin and got all the tables created ... when calling up the /admin/index.php then, I never get the last screen for setting up an admin user, because for some strange reason there is already an admin and a guest set up ... but their passwords are unknown to me and I can't log myself in as an administrator ...

my last try is this one ... anyone know what's going on? bugs? or perhaps my stupidity in not being able to read instructions, or what?
Any help is appreciated ... perhaps dropping moodle altogether is the solution that would work for me and my server? sad



Average of ratings: -
In reply to Wolfgang Schneider

Re: installation headache ++

by RW Wood -

I had the same problem and couldn't change the admin password from the program, so I created a new user with the same password as the one I wanted to use for admin, then went into the DB and copied the encoded string into the admin definition. At the same time I made the other changes to name, etc. that wouldn't stick when tried from the admin interface. Then when I logged in using 'admin' and the new password, it was fine.

HTH
RWW

In reply to Wolfgang Schneider

Re: installation headache ++

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Setting up the tables is usually quite straightforward.

Moodle needs to start with a completely empty database. Sounds like you are trying to use a database that already has tables in it.

If not, then it's possible the database user doesn't have the correct permissions to create tables.
In reply to Martin Dougiamas

Re: installation headache ++

by Wolfgang Schneider -
Ok .. problem then is that my one database that I have is NOT EMPTY ...
Now, why would a database need to be empty in the first place? Are you in effect putting the same limitation on users as the claroline folks, except they need many databases created and moodle just needs one new database ? sad
In reply to Wolfgang Schneider

Tables not being created correctly

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Wolfgang,

I understand your frustration, but please don't get upset.

I'm happy to try and solve your problem - and please remember this is an open source product: unlike your ISP I am charging you nothing to use this software that I have spent over three years developing.

Please also remember that if you are just testing it then you can install it on your own computer where you are not subjected to the restrictions of the ISP you have chosen.

Moodle was originally intended for people running it on their own machines, or organisations with a spare Linux box handy. Databases are actually extremely cheap - Moodle.com is a machine that only costs about US$400 and I can make thousands of databases on it in about twenty seconds, so it sounds like your ISP is making good money.

The reason I check for an empty database is because then I don't need to check for every single table's pre-existence all the time. If a table called config already existed I would have to check every field to make sure it was a Moodle config table and not one from another application.

OK, so, on to your very unusual problem...

I've got no more ideas as to what is causing it, it sounds like there were errors creating the tables in the first place. If you can send me (via private email) access to your phpmyadmin and ideally ssh access or ftp access then I'll take a quick look at it.
In reply to Martin Dougiamas

Re: Tables not being created correctly

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
I wrote a small script that fixed Wolfgang's problem. It allows Moodle to share a database with other applications, and will be included in future releases as admin/forcetables.php
In reply to Martin Dougiamas

Re: Tables not being created correctly

by Wolfgang Schneider -
the script worked wonderfully !! Thanks, Martin!

The only problem left which I encountered in the installation process was that I did not get to the screen for setting up an administrator user, rather I ended up all of a sudden in the application running and could not sign on as admin because there was no admin user set up ... I then used myphpadmin to "manually" insert a user and admin user and now things are happily running smile