Problem installing phpMyAdmin version 2.62 on Moodle 1.8x

Problem installing phpMyAdmin version 2.62 on Moodle 1.8x

by John Mc Hale -
Number of replies: 3

Hi Moodlers,

I am currently having a look at version 1.8x of Moodle for possible deployment on company intranet. Until now, the version that has been used is Moodle 1.62, running on Wiindows 2K3 Server SP1, Apache 2.24, PHP 5.21, MySQL 5.022-max-community-nt.

I have been using phpMyAdmin version 2.62 for administering the database side of Moodle, and dearly hoped that installing it on 1.8 would be as straight forward as on 1.62 (i.e. by copying phpMyAdmin files into /root/admin/mysql on target server).

I have done this, and changed any config items that needed changing in config.inc.php.

All going well so far, and the Database link even appears under the Server branch of the Administration tree, but when I click on it...

"This page is only accessible to the admin user".

I have being trying to debug the problem, and have traced it as far as a call to function create_context() in /lib/accesslib.php, which issues the error:

Error: could not insert new context level "50", instance "1"

Now I know that context level "50" = CONTEXT_COURSE, and I am assuming that instance "1" is the front page course ID, but i'm not exactly sure what the problem is from here. Everything else about the installation appears to be working OK.

Any sympathetic Moodler know what's going on????

Average of ratings: -
In reply to John Mc Hale

Re: Problem installing phpMyAdmin version 2.62 on Moodle 1.8x

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers

John - Did you download from CVS the mysql files? If so, it should be version phpMyAdmin 2.10.1. I just dropped those files into the /admin/mysql folder and it worked like a charm. There is no need to mess with config.inc.php or anything else. The one advantage to this approach is that you do not have to worry about messing up any other databases other than your Moodle one since it does not give you access to other databases. You other option is to just setup phpMyAdmin outside of Moodle altogether. I have a series of tools that I put in a tools folder and then I limit which IPs can access that directory to static ips of our Moodle admin team. Alternatively or in tandem you can password protect the tools directory. This ensures that only folks who ought to have access to the tools can get to them and helps to eliminate the fear of having your database password cracked. I would recommend using what is in CVS. Let me know if you have any further challenges getting it set up. Peace - Anthony

In reply to Anthony Borrow

Re: Problem installing phpMyAdmin version 2.62 on Moodle 1.8x

by John Mc Hale -

Hi Anthony,

you're a star!

I downloaded phpMyAdmin 2.10 from CVS and copied the files into the /admin/mysql folder. I then created a config sub-folder and ran the setup script to create a configuration file. This worked like a charm, and although I could'nt see the Database link in the Server branch of the Administration tree, running the script /serverroot/admin/mysql/index.php brought me straight into the phpMyAdmin page...

So I thought ??? OK so there must be something in the 1.62 config.inc.php file that is making 1.8x bawlk, so I copied the config.inc.php file created with the CVS version of phpMyAdmin, into the root folder of phpMyAdmin version 2.62, which I moved once again to /admin/mysql, ... and lo and behold, phpMyAdmin 2.62 is now working like a charm and showing up in the Administration tree.

Thanks to you for getting the thought process kick started!

In reply to John Mc Hale

Re: Problem installing phpMyAdmin version 2.62 on Moodle 1.8x

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers
John - I'm glad you were able to get it. Happy Moodling! Peace - Anthony