Installing plugins solved. It was firewall issue.
Problem with editing H5P activity remains though and it appears it's not related to firewall.
Installing plugins solved. It was firewall issue.
Problem with editing H5P activity remains though and it appears it's not related to firewall.
Ok. So...
See attached screenshot. Error is back up and running. Here is the debug log:
Debug info: Duplicate entry '1-lwaldron' for key 'mood_user_mneuse_uix'Now I'm going to attempt the fix from Alain. Will updated accordingly.
INSERT INTO mood_user (city,auth,username,lang,confirmed,lastip,timecreated,timemodified,mnethostid,calendartype,maildisplay,mailformat,maildigest,autosubscribe,trackforums) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
[array (
0 => '',
1 => 'manual',
2 => 'lwaldron',
3 => 'en',
4 => 1,
5 => '190.213.53.25',
6 => 1558017072,
7 => 1558017072,
8 => '1',
9 => 'gregorian',
10 => '2',
11 => '1',
12 => '0',
13 => '1',
14 => '0',
)]
Error code: dmlwriteexception
×Stack trace: line 489 of /lib/dml/moodle_database.php: dml_write_exception thrown line 1329 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end() line 1375 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw() line 111 of /user/lib.php: call to mysqli_native_moodle_database->insert_record() line 3976 of /lib/moodlelib.php: call to user_create_user() line 4466 of /lib/moodlelib.php: call to create_user_record() line 143 of /login/index.php: call to authenticate_user_login()
Ok... so here is the result of the first run (admin/cli/mysql_collation.php -l):
Table collations summary for http://www.carphatt.com:
utf8mb4_unicode_ci: 901
utf8_general_ci: 522
utf8_unicode_ci: 51
Right, next... the result of ():
Converted: 171, skipped: 1303, errors: 0
So now... No error. I deleted the config file again and still no errors on install. Time to backup the database with the replacements and the updated collation.
Gentlemen, thanks. I hope this helps someone else in their migration. Turns out that Godaddy VPS phpmysql did not change the collation for all tables. The Moodle tools did the work accordingly.
Lisle, you're welcome. I hope the problem is solved now. I saw more problems like these (collation errors) in the forums.
The problem in our database was caused by a different collation (utf8_general_ci) that was imported from a database dump from another migration. After upgrading from 3.5.4+ to 3.5.5+ this collation error occured for the first time.
Wanted to thank you for this post. I experienced this issue on new users logins requiring a password update. Moodle would redirect between login/index.php and login/change_password.php until the browser would stop the redirect loop.
Thank you!
Justin
Just an update here. I was able to make some progress, but now experiencing issues with the following error:
"Table "qtype_essay_options" doesn't exist"
I went ahead and added it to see what would happen and now I'm seeing another error:
Default exception handler: Error reading from database Debug: Unknown column 'qeo.questionid' in 'on clause' SELECT q.* FROM question q JOIN backup_ids_temp bi ON bi.newitemid = q.id LEFT JOIN qtype_essay_options qeo ON qeo.questionid = q.id WHERE q.qtype = ? AND qeo.id IS NULL AND bi.backupid = ? AND bi.itemname = ? [array ( 0 => 'essay', 1 => '6229b2a2ef9a9fd5cbb5ba047765a97a', 2 => 'question_created', )] Error code: dmlreadexception * line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown * line 1245 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end() * line 106 of /question/type/essay/backup/moodle2/restore_qtype_essay_plugin.class.php: call to mysqli_native_moodle_database->get_records_sql() * line 84 of /backup/moodle2/restore_plugin.class.php: call to restore_qtype_essay_plugin->after_execute_question() * line 406 of /backup/util/plan/restore_structure_step.class.php: call to restore_plugin->launch_after_execute_methods() * line 113 of /backup/util/plan/restore_structure_step.class.php: call to restore_structure_step->launch_after_execute_methods() * line 181 of /backup/util/plan/base_task.class.php: call to restore_structure_step->execute() * line 178 of /backup/util/plan/base_plan.class.php: call to base_task->execute() * line 168 of /backup/util/plan/restore_plan.class.php: call to base_plan->execute() * line 339 of /backup/controller/restore_controller.class.php: call to restore_plan->execute() * line 104 of /admin/cli/import.php: call to restore_controller->execute_plan()
!!! Error reading from database !!! !! Unknown column 'qeo.questionid' in 'on clause' SELECT q.* FROM question q JOIN backup_ids_temp bi ON bi.newitemid = q.id LEFT JOIN qtype_essay_options qeo ON qeo.questionid = q.id WHERE q.qtype = ? AND qeo.id IS NULL AND bi.backupid = ? AND bi.itemname = ? [array ( 0 => 'essay', 1 => '6229b2a2ef9a9fd5cbb5ba047765a97a', 2 => 'question_created', )] Error code: dmlreadexception !! !! Stack trace: * line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown * line 1245 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end() * line 106 of /question/type/essay/backup/moodle2/restore_qtype_essay_plugin.class.php: call to mysqli_native_moodle_database->get_records_sql() * line 84 of /backup/moodle2/restore_plugin.class.php: call to restore_qtype_essay_plugin->after_execute_question() * line 406 of /backup/util/plan/restore_structure_step.class.php: call to restore_plugin->launch_after_execute_methods() * line 113 of /backup/util/plan/restore_structure_step.class.php: call to restore_structure_step->launch_after_execute_methods() * line 181 of /backup/util/plan/base_task.class.php: call to restore_structure_step->execute() * line 178 of /backup/util/plan/base_plan.class.php: call to base_task->execute() * line 168 of /backup/util/plan/restore_plan.class.php: call to base_plan->execute() * line 339 of /backup/controller/restore_controller.class.php: call to restore_plan->execute() * line 104 of /admin/cli/import.php: call to restore_controller->execute_plan() !! Potential coding error - existing temptables found when disposing database. Must be dropped!
I followed the advice of another moodier to resolve the max_packet_allowed error by moving the clause just under the mysqld section as it was under mysqlsafe. He said:
"2) Perhaps the problem is that, in your .cnf file above, you are setting the max_allow_packet value in the [mysqldump] section? If so, it only affects dumps. As I commented above, it must be "under the [mysqld] section of your config file".
https://moodle.org/mod/forum/discuss.php?d=245566
It appears that this solved the initial error.
But I'm having other issues. Any thoughts would be enormously appreciated! : )
Solved/Update: Solved my own problem by adding same table schema for qtype_essay_options from a previous install. Thanks Ken for your help in these forums. I wouldn't have been able to figure it out without your previous sharing. : )
Hi, I just set the php version to 7.0 and it works form me.
Hi Team,
I am using sharing cart plugin to duplicate the course. However these days, it takes along time to duplicate the smaller quiz. Please let me know, if there is any plugin available for duplicate the course and quiz.
My moodle version is 3.6
Thanks for the help
A VPS service would allow you to have root level access to files and programs. However, what I had was unmanaged VPS service which meant there was no technical support available to assist with configurations. If you very knowledgeable with Unix, CentOS, and other OS, and your a tech, then it would fine. I found a service from interServer.net that has Moodle Web Hosting for $5/mnt. It's an awesome deal and setup.
https://www.interserver.net/apps/moodle-hosting.html
It is the easiest setup for Moodle, cPanel access, and extras.
Thanks Daniel Troszok, I was using php 7.2 but as per your suggestion when I selected php 7.0 for website, moodle worked fine.
Thanks again
Hi there,
because of an update process of an older Moodle 3.0 site, I have to
install also Moodle 3.1.1.7.
However, an installation of a plain Moodle 3.1.1.7 (downloaded from moodle.org)
fails on my server (Debian 9.8 , MariaDB)
the first error message is on the web interface during the install process saying:
"Your database has tables using Antelope as the file format. Full UTF-8 support in MySQL and MariaDB requires the Barracuda file format. Please convert the tables to the Barracuda file format. See the documentation Administration via command line for details of a tool for converting InnoDB tables to Barracuda."
So I tried to convert the tables the prescribed way with "admin/cli/check_database_schema.php" getting
the next error-msg (on the shell)
#/var/www/html/moodle3117# php admin/cli/check_database_schema.php
!!! <p>Error: database driver problem detected</p>
<p>The site administrator should verify server configuration</p><p>PHP has not been properly configured with the MySQLi extension for it to communicate with MySQL. Please check your php.ini file or recompile PHP.</p> !!!
#/var/www/html/moodle3117#
So my guess that mysql extension for php is missing on the shell
in the following mysqlnd and mysqli are missing
#/var/www/html/moodle3117# php -m
[PHP Modules]
calendar
Core
ctype
date
ereg
exif
fileinfo
filter
gettext
hash
iconv
json
libxml
mhash
openssl
pcntl
pcre
PDO
Phar
posix
readline
Reflection
session
shmop
sockets
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
Zend OPcache
zlib
[Zend Modules]
Zend OPcache
#/var/www/html/moodle3117#
can you tell how to get moodle installed here ?
How to enable mysqli / mysqlnd ? php7.0-mysql is installed , it includes php-mysqli
I also tried to use mariadb - driver in the config.php. same result !
Thanks for help and hints!
Best,
Heinz
I've narrowed it down. The error is happening in 'auth/db/auth.php' in function 'user_login' in the line: $fromdb = $fields[strtolower($this->config->fieldpass)]; '$this->config->fieldpass' is correctly set to [Social Security Number] However, $fromdb gets an empty value Even though $fields['social security number'] gets the correct value from the database. Someone please shed some light on why this is happening?
I have made a back up of my courses but when i try to restore them it says the files are to large,can i increase the maximum size.
Hello!
With Moodle 3.5.3+ (Build: 20181116) I can login using admin user. When I update it to 3.5.6+ (Build: 20190514) Moodle show a database error and I can't login:
Debug info: Duplicate entry '1-adminuser' for key 'mdl_user_mneuse_uix'
INSERT INTO mdl_user (city,auth,username,lang,confirmed,lastip,timecreated,timemodified,mnethostid,calendartype,maildisplay,mailformat,maildigest,autosubscribe,trackforums) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
Stack trace:
line 489 of \lib\dml\moodle_database.php: dml_write_exception thrown
line 1329 of \lib\dml\mysqli_native_moodle_database.php: call to moodle_database->query_end()
line 1375 of \lib\dml\mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
line 111 of \user\lib.php: call to mysqli_native_moodle_database->insert_record()
line 3903 of \lib\moodlelib.php: call to user_create_user()
line 4393 of \lib\moodlelib.php: call to create_user_record()
line 141 of \login\index.php: call to authenticate_user_login()
My config.php has following $CFG-> dboptions before update:
$CFG->dboptions = array (
'dbpersist' => 0,
'dbport' => '',
'dbsocket' => '',
'dbcollation' => 'utf8mb4_general_ci',
);
What can I do?
Thanks in advance
It depends on your operating system and how PHP was installed on it in the first place. For common scenarios (e.g. Ubuntu and CentOS), the CLI extensions and the web extensions are installed at the same time so it's rarely an issue.
UPDATE:
I have an "Invalid Login Token" message in error_log
I'm using standard Clean Theme
Well done on narrowing it down, I think you're most of the way there. From what you've said: the column containing the password in the external database has spaces in the column name, i.e. "Social Security Number". So in the External Database settings in Moodle the Password Field setting is "[Social Security Number]", i.e. how SQLServer lets columns with spaces in their names be addressed.
The problem is that the query in user_login() then becomes:
SELECT [Social Security Number] FROM the_user_table WHERE username = 'the_username'
which works but the column name returned by the database, and thus becoming the key in $fields is "Social Security Number" not "[Social Security Number]". $fromdb searches for the latter but only the former is present so no match and the login fails.
One might suggest that Moodle should handle the password column having a space in it but there's no standard for this between different databases and spaces in column names should be avoided. If you can't change the name of the column you could add a database view that aliased the column name (e.g. CREATE VIEW user_view AS SELECT username, [Social Security Number] AS password, … FROM the user_table).
There's a forum for authentication issues which may help get a response in future.
Social Security Numbers sound like a bad candidate for the password field in security terms.
I have a problem with upgrading my moodle from 2.9 to 3.6 namely because I have 9 plugins out of 20 total that are not supported on 3.6. Some plugin functionality was added to later moodle version but some plugins are required for my client and must keep working. Now the only comment in official documentation about this recommend deleting the plugin. This is NOT an option for me. Is using an unsupported plugin version a viable option? From some source control changes I can see plugin changes for compatibility are minimal. For example plugin moodle-mod_attendanceregister:
2017.11.22.00 - Added a small patch to avoid a deprecated php method
Tested on Moodle 3.2 and Moodle 3.3
I know some plugins are dependent of some parts of moodle that change from version to version but how much is this a problem for upgrades in subversions of moodle (2.0-2.9,3.0-3.7)?
Is it practice for some web admins to test the plugins themselves and use them anyway?
A lot of plugins do not get updated compatibility so I assume I am not the only one with this problem but I can’t find any info related to this.