error right after installation - Config table does not contain version

error right after installation - Config table does not contain version

by Morgan McKenzie -
Number of replies: 11

Moodle Version: 2.1.1+ (Build: 20110928) 
(although I also tried with Moodle 2.1.1 1st August 2011 release with same result)
I'm using XAMPP version 1.7.7 
The computer I'm on is Windows 7, 64 bit.
PHP: 5.3.8

browser: Firefox and chrome, same result.

At the recommendation of one of the other posts on this same problem, I turned debug on but it didn't help me solve the problem. Here is the output:

----------------------------START OUTPUT------------------------

Config table does not contain version, can not continue, sorry.

Stack trace:
  • line 429 of \lib\setuplib.php: moodle_exception thrown
  • line 193 of \admin\index.php: call to print_error()
Coding error detected, it must be fixed by a programmer: block_manager has not yet loaded the blocks, to it is too soon to request the information you asked for.
Stack trace:
  • line 826 of \lib\blocklib.php: coding_exception thrown
  • line 348 of \lib\blocklib.php: call to block_manager->check_is_loaded()
  • line 6 of \theme\base\layout\general.php: call to block_manager->region_has_content()
  • line 654 of \lib\outputrenderers.php: call to include()
  • line 612 of \lib\outputrenderers.php: call to core_renderer->render_page_layout()
  • line 2026 of \lib\outputrenderers.php: call to core_renderer->header()
  • line ? of unknownfile: call to core_renderer->fatal_error()
  • line 1291 of \lib\setuplib.php: call to call_user_func_array()
  • line 328 of \lib\setuplib.php: call to bootstrap_renderer->__call()
  • line 328 of \lib\setuplib.php: call to bootstrap_renderer->fatal_error()
  • line ? of unknownfile: call to default_exception_handler()

 ----------------------------END OUTPUT-----------------------------------

 

There were also other posts for installing on MAC OS X, and they sais there were problems not having InnoDB.. I checked and I think I have it configured properly - here is what it says on my phpmyadmin > engines > InnoDB > Buffer Pool page:

Buffer Pool Usage
Total : 1,024 pages / 16,384 KiB
Free pages 135
Dirty pages 0
Pages containing data 887
Pages to be flushed 4
Busy pages 2
Buffer Pool Activity
Read requests 27,625
Write requests 2
Read misses 888
Write waits 0
Read misses in % 3.21 %
Write waits in % 0.00 %

I don't have a lot of experience with servers and such so I'd appreciate any guidance. I apoligize if this has already been resolved somewhere else, but I've serched the forum for a couple hours without finding an answer.
One last thing - I have plenty of ram and hard drive space, and this is a fresh install, so I don't think that space or corruption is the issuel
Thanks!
Average of ratings: -
In reply to Morgan McKenzie

Re: error right after installation - Config table does not contain version

by Mike Lister -

we had the same issues with our 1.9 installation. Tho we were running on Win2k3 MSSql IIS6.0 with PHP etc...

We found the database table it was complaining about and added the version to the table and refreshed the config admin page and it moved on from there.

In reply to Mike Lister

Re: error right after installation - Config table does not contain version

by Morgan McKenzie -

Thanks! I did that and now it seems to at least be able to move past that initial page.

For anyone else who sees this problem, this is what I did:

Opened <moodleinstalldir>/version.php

Found the value in $version

Opened 'mdl_config' in my database manager

Inserted key after last entry with name = 'version' and value = <value found in version.php>

If any developpers see this, is there some way you could ensure that when the database is populated initially by moodle that this is added? It's not hard to fix once you know what you're looking for but there isn't great documentation.

Thanks!

Average of ratings: Useful (1)
In reply to Morgan McKenzie

Re: error right after installation - Config table does not contain version

by Tyler Hogan -

I'm getting the same error, but I don't know how to edit a .frm file. I'm on a Mac. Any suggesstions?

In reply to Tyler Hogan

Re: error right after installation - Config table does not contain version

by Ken Task -
Picture of Particularly helpful Moodlers

First, make a backup of the database.

If it's an issue of tables not being innodb, there is a script inside

/moodle/admin/cli/ that could be run from a terminal session on your Mac to correct/set all tables to innodb.  The file is called 'mysql_engine.php' and according to comments in the file:

"MySQL engine conversions script.

It is recommended to stop the web server before the conversion.
Do not use MyISAM if possible, because it is not ACID compliant
and does not support transactions.

Options:
--engine=ENGINE       Convert MySQL tables to different engine
-l, --list            Show table information
-h, --help            Print out this help

Example:
\$sudo -u www-data /usr/bin/php admin/cli/mysql_engine.php --engine=InnoDB

Mac user would probably still have to use 'sudo' in the command above but the -u [user] might be different.  Look at other files in the directory for a clue.  Also, one might need to use the full path to php.  To find that php one has options:

whereis php

which php

or

php -i from the command prompt in a terminal session should show more than you'd care to know about php. ;)

'spirit of sharing', Ken

In reply to Morgan McKenzie

Re: error right after installation - Config table does not contain version

by Mathios B -

thanks a lot man, you saved me a whole lot of work! 

In reply to Morgan McKenzie

Re: error right after installation - Config table does not contain version

by Edgardo Alaniz -

Thank you very much Morgan McKenzie! Your solution worked on my case!

In reply to Edgardo Alaniz

Re: error right after installation - Config table does not contain version

by Kishore Babu M. N. -

Hi,

I have installed Xampp 1.8.3, moodle 2.6.1 on Windows 7 64 bit machine. All the installation went well. But when I try to start the application, I am getting the same error Config table does not contain version'.

I  logged into phpMyAdmin and accessed, mdl_config under bitnami_moodle, and added new column to the table with version and valueas  varchar (255). but still the same problem persist

 I have attached the error screen shots  for reference. Can any one help me to resolve this, please?  whatever I have done to add version mdl_config, is it the right way  to edit .frm file or in any other way I need to edit mdl_config.frm?

Thanks in advance.

 

Regards,

M. N. Kishore Babu.

Attachment changes.png
Attachment error.png
In reply to Kishore Babu M. N.

Re: error right after installation - Config table does not contain version

by Philipp Myrialius -

But after I inserted the version as you have done in the screenshot, I got "Error: Could not find a top-level course". How could I solve this problem?

In reply to Morgan McKenzie

Re: error right after installation - Config table does not contain version

by Kenneth Leung -

Yes. I would like to know how to add the version when doing a fresh installation. There is no mdl_config table for me to edit right now. 

In reply to Kenneth Leung

Re: error right after installation - Config table does not contain version

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Your installation failed (and you didn't notice). It HAS to complete right through to asking you for the admin profile and then the name of the site. I expect you didn't get that far.

There's no point trying to patch up a broken installation. 

It's all in the installation instructions but...

- make very sure you meet all the requirements for your version of Moodle
- delete the database and create it again, empty
- create the config.php by copying config-dist.php to config.php
- edit config.php and put in all your parameters (it is very well commented). Find the debugging section and uncomment the debugging lines
- try again

This time watch carefully for errors.

In reply to Morgan McKenzie

Re: error right after installation - Config table does not contain version

by Ravi T -

Thanks Morgan, It works for me on Windows 7 with WAMP server with Moodle v2.5