DDL sql execution error

DDL sql execution error

by Brian LaMaster -
Number of replies: 4

I am trying to do a fresh install of Moodle 2.3.2 on a Linux server.

  • WHM 11.32.4 (build 14)
  • CENTOS 5.8 x86_64 virtuozzo on vps
  • cPanel 11
  • MySQL 5.1.63
  • MySQL client version: 4.1.22
  • PHP 5.4.8
  • phpMyAdmin Version 3.4.10.1
  • PHP memory limit is 2048.(The reason for the high PHP limit is because I am running WordPress on my main site and of course Moodle is PHP as well. So, my workload is PHP based.)

When Moodle does the server check, I meet the minimum requirements but it says that I should install SOAP, INTL, and XMLRPC.

As far as SOAP goes, I am unsure if it is the plugin or application it is wanting. I installed SOAP (plugin) under Perl PHP I think it was. But it is not affecting the Moodle install for some reason. I’m not sure how to install xmlrpc or add the php_extension of intl. I tried editing the php_extension under the PHP Configuration Editor but it didn’t work. Here is what I have as extensions. pdo.so, pdo_sqlite.so, sqlite.so, pdo_mysql.so, mysqli.so, xmlrpc, SOAP

Will any of these issues affect my install since they are “recommended” and not “required”?

Now to the root of my issues… When I try to install Moodle 2.3.2 it gives me a DDL sql execution error. I’ve deleted the database and started over. I’ve also removed the Moodle install and started over several times. Right now, I am at a loss. I tried installing 2.2.5 but it said something about the database is newer than the Moodle code or something like that. I cannot go backwards in MySQL because my server doesn’t support it. So, right now I am at MySQL 5.1.63 and I am stuck with it unless I go to My SQL 5.5. So, that isn’t going to help me out.

Here is what I get when I try installing 2.3.2+ 

DDL sql execution error

More information about this error

It is usually not possible to recover from errors triggered during installation, you may need to create a new database or use a different database prefix if you want to retry the installation.

Debug info: Table 'mdl_config' already exists CREATE TABLE mdl_config (id BIGINT(10) NOT NULL auto_increment,
name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '', value LONGTEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CONSTRAINT PRIMARY KEY (id)) ENGINE = MyISAM DEFAULT CHARACTER SET utf8 DEFAULT COLLATE = utf8_unicode_ci
Error code: ddlexecuteerror

Stack trace:

  • line 413 of /lib/dml/moodle_database.php: ddl_change_structure_exception thrown
  • line 803 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 88 of /lib/ddl/database_manager.php: call to mysqli_native_moodle_database->change_database_structure()
  • line 77 of /lib/ddl/database_manager.php: call to database_manager->execute_sql()
  • line 404 of /lib/ddl/database_manager.php: call to database_manager->execute_sql_arr()
  • line 356 of /lib/ddl/database_manager.php: call to database_manager->install_from_xmldb_structure()
  • line 1423 of /lib/upgradelib.php: call to database_manager->install_from_xmldb_file()
  • line 184 of /admin/index.php: call to install_core()

Here's where I've been to resolve this issue.

http://docs.moodle.org/23/en/error/moodle/ddlexecuteerror

http://tracker.moodle.org/secure/IssueNavigator.jspa?pager/start=0

Any ideas would be greatly appreciated!

Please note that I am the server Administrator and I am not an expert at Linux servers. If I know where to go to fix things I can. So, if you are going to tell me how to change something, please be as detailed as possible.

Thanks,

Brian

Average of ratings: -
In reply to Brian LaMaster

Re: DDL sql execution error

by Ken Task -
Picture of Particularly helpful Moodlers

Don't think the DB has been deleted ... this indicates it found an exsiting database:

It is usually not possible to recover from errors triggered during installation, you may need to create a new database or use a different database prefix if you want to retry the installation.

and it also suggest to use a different DB prefix: rather than the default mdl_.  One could use somehing else like mdl2_.  Using your PHPMyAdmin tool you should see if the DB exist and if it has any tables in it.

Should also ask, was the original install from your hosting providers menus and via a script they provide?

With your VPS plan, do you have complete and total access - with no restrictions - to the operating system?  Do you have ssh access, for example?

If you do have complete/total access and ssh + yum installed, one could install missing PHP extensions rather easily.  However, I think that you might NOT have total and complete access, so for some things, the only way to do them (like adding php5-xml) is to contact your hosting provider (ECOMMERCE-HOSTING - according to the IP address behind the WHM script link in your posting).

'spirit of sharing', Ken

Average of ratings: Useful (1)
In reply to Ken Task

Re: DDL sql execution error

by Brian LaMaster -

Ken,

Thanks for replying. I will look into that.

In the meantime I did some research and it appears that part of my problem was that I was using the default directory permissions (in the config.php file) of 0277 (I think) and I changed it to 0750 and it worked. 

Thanks again!

Brian

In reply to Brian LaMaster

Re: DDL sql execution error

by Nobuyuki Fujioka -

Hi, Brian

I have the same problem.  How did you solve it?  I changed 0277 to 0750 in the config.php file.  But, nothing happened.  I am using a windows pc to set up a test site.

Thank you,

Noby

In reply to Nobuyuki Fujioka

Re: DDL sql execution error

by Toshihiro KITA -
Picture of Plugin developers Picture of Translators
In my case, setting PHP variables like max_execution_time, max_input_time, memory_limit to larger values did work to get rid of the 'mdl_config already exists' errors.
(you have to set the values in php.ini or in .htaccess and restart apache before moodle installation)

Average of ratings: Useful (1)