Error moodle generalexceptionmessage

The error/moodle/generalexceptionmessage appears due to many reasons which include faulty plugins, error in database, outdated moodle and many more.

Are you looking for a solution for the error message “error/moodle/generalexceptionmessage”? We can help you.

A few days ago, we had come across this error message and our Support Engineers fixed it efficiently.

Here at Bobcares, we often receive requests to fix Moodle errors as a part of our Server Management Services.

Today, let’s see the possible causes for this error and see how our Support Engineers fix this error.

Why does the exception error message show up?

We have seen this error appearing during moodle upgrade attempt, while attempting to add courses in moodle, creating a guest or admin user and many during many other occasions.

The most common causes for this error that we have seen is due to corrupt plugins, outdated moodle version, missing a few necessary PHP libraries and many more.

Among these, the most common one is the plugins that are mainly used in messaging.

Possible causes for error/moodle/generalexceptionmessage to appear

Now, let’s discuss the common causes due to which this error message appears.

1. Faulty plugins

Many of our customers enable plugins for messaging in moodle. Sometimes, these plugins won’t be compatible with the PHP version or the moodle version due to which it will throw an error message.

Hence, disabling this plugin will normally fix the error.

2. Missing PHP Libraries

We’ve seen customers experiencing this error if the necessary PHP libraries are not available on the server.

However, this can be easily found through the error message displayed in the moodle.

3. Outdated Moodle version

Sometimes, if the Moodle is not up-to-date then it will throw an error.

So it is always recommended to keep the moodle updated.

How we fix this error/moodle/generalexceptionmessage?

Our Support Engineers are well experienced in managing servers and are familiar with Moodle errors. Now, let’s see how our Support Engineers fix this error.

1. Faulty plugins

One of our customers approached us with the error message generalexceptionmessage in moodle. Here is the screenshot of the error message.

Our Support Engineers started troubleshooting this error by checking the version of Moodle.

As a result, we found that the moodle was of the latest version.

Then we went checking for any third plugins enabled for messaging if they are causing any problem.

For that, we followed the below steps:

1. Accessed the Site Administration.

2. Clicked on the Plugin and then Plugins overview option.

3. Then accessed the Additional plugins.

Here, we found that there was a third party plugin enabled. Disabling it fixed the error.

Through this, we could find that the plugin was causing the problem.

2. Missing PHP XML Library

We came across the same error message but on another occasion. One of our customers was trying to upgrade the moodle and ran into the below error message

# php moodle/admin/cli/upgrade.php
Default exception handler: Exception - Call to undefined function xml_parser_create() Debug:
Error code: generalexceptionmessage
* line 76 of /lib/xmlize.php: Error thrown
* line 307 of /lib/environmentlib.php: call to xmlize()
* line 355 of /lib/environmentlib.php: call to load_environment_xml()
* line 101 of /lib/environmentlib.php: call to get_latest_version_available()
* line 116 of /admin/cli/upgrade.php: call to check_moodle_environment()

!!! Exception - Call to undefined function xml_parser_create() !!!
!!
Error code: generalexceptionmessage !!
!! Stack trace: * line 76 of /lib/xmlize.php: Error thrown
* line 307 of /lib/environmentlib.php: call to xmlize()
* line 355 of /lib/environmentlib.php: call to load_environment_xml()
* line 101 of /lib/environmentlib.php: call to get_latest_version_available()
* line 116 of /admin/cli/upgrade.php: call to check_moodle_environment()
!!

After looking at this error message our Support Engineers found that the PHP XML library was missing.

Finally, we fixed this error by installing the XML library by running the below command:

apt-get install php7.0-xml
service apache2 restart

After this, the customer was able to upgrade the moodle.

[Need any assistance in fixing the moodle errors? – We’ll help you]

Conclusion

In short, the error/moodle/generalexceptionmessage appears due to many reasons which include faulty plugins, missing PHP libraries, outdated moodle and many more. Today, we saw how our Support Engineers fix this error.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = «owonCMyG5nEQ0aD71QM»;

Содержание

  1. 8. Errors and Exceptions¶
  2. 8.1. Syntax Errors¶
  3. 8.2. Exceptions¶
  4. 8.3. Handling Exceptions¶
  5. 8.4. Raising Exceptions¶
  6. 8.5. Exception Chaining¶
  7. 8.6. User-defined Exceptions¶
  8. 8.7. Defining Clean-up Actions¶
  9. 8.8. Predefined Clean-up Actions¶
  10. 8.9. Raising and Handling Multiple Unrelated Exceptions¶
  11. 8.10. Enriching Exceptions with Notes¶
  12. Why does error/moodle/generalexceptionmessage appear?
  13. Why does the exception error message show up?
  14. Possible causes for error/moodle/generalexceptionmessage to appear
  15. 1. Faulty plugins
  16. 2. Missing PHP Libraries
  17. 3. Outdated Moodle version
  18. How we fix this error/moodle/generalexceptionmessage?
  19. 1. Faulty plugins
  20. 2. Missing PHP XML Library
  21. Conclusion
  22. PREVENT YOUR SERVER FROM CRASHING!
  23. 4 Comments

8. Errors and Exceptions¶

Until now error messages haven’t been more than mentioned, but if you have tried out the examples you have probably seen some. There are (at least) two distinguishable kinds of errors: syntax errors and exceptions.

8.1. Syntax Errors¶

Syntax errors, also known as parsing errors, are perhaps the most common kind of complaint you get while you are still learning Python:

The parser repeats the offending line and displays a little ‘arrow’ pointing at the earliest point in the line where the error was detected. The error is caused by (or at least detected at) the token preceding the arrow: in the example, the error is detected at the function print() , since a colon ( ‘:’ ) is missing before it. File name and line number are printed so you know where to look in case the input came from a script.

8.2. Exceptions¶

Even if a statement or expression is syntactically correct, it may cause an error when an attempt is made to execute it. Errors detected during execution are called exceptions and are not unconditionally fatal: you will soon learn how to handle them in Python programs. Most exceptions are not handled by programs, however, and result in error messages as shown here:

The last line of the error message indicates what happened. Exceptions come in different types, and the type is printed as part of the message: the types in the example are ZeroDivisionError , NameError and TypeError . The string printed as the exception type is the name of the built-in exception that occurred. This is true for all built-in exceptions, but need not be true for user-defined exceptions (although it is a useful convention). Standard exception names are built-in identifiers (not reserved keywords).

The rest of the line provides detail based on the type of exception and what caused it.

The preceding part of the error message shows the context where the exception occurred, in the form of a stack traceback. In general it contains a stack traceback listing source lines; however, it will not display lines read from standard input.

Built-in Exceptions lists the built-in exceptions and their meanings.

8.3. Handling Exceptions¶

It is possible to write programs that handle selected exceptions. Look at the following example, which asks the user for input until a valid integer has been entered, but allows the user to interrupt the program (using Control — C or whatever the operating system supports); note that a user-generated interruption is signalled by raising the KeyboardInterrupt exception.

The try statement works as follows.

First, the try clause (the statement(s) between the try and except keywords) is executed.

If no exception occurs, the except clause is skipped and execution of the try statement is finished.

If an exception occurs during execution of the try clause, the rest of the clause is skipped. Then, if its type matches the exception named after the except keyword, the except clause is executed, and then execution continues after the try/except block.

If an exception occurs which does not match the exception named in the except clause, it is passed on to outer try statements; if no handler is found, it is an unhandled exception and execution stops with a message as shown above.

A try statement may have more than one except clause, to specify handlers for different exceptions. At most one handler will be executed. Handlers only handle exceptions that occur in the corresponding try clause, not in other handlers of the same try statement. An except clause may name multiple exceptions as a parenthesized tuple, for example:

A class in an except clause is compatible with an exception if it is the same class or a base class thereof (but not the other way around — an except clause listing a derived class is not compatible with a base class). For example, the following code will print B, C, D in that order:

Note that if the except clauses were reversed (with except B first), it would have printed B, B, B — the first matching except clause is triggered.

When an exception occurs, it may have associated values, also known as the exception’s arguments. The presence and types of the arguments depend on the exception type.

The except clause may specify a variable after the exception name. The variable is bound to the exception instance which typically has an args attribute that stores the arguments. For convenience, builtin exception types define __str__() to print all the arguments without explicitly accessing .args .

The exception’s __str__() output is printed as the last part (‘detail’) of the message for unhandled exceptions.

BaseException is the common base class of all exceptions. One of its subclasses, Exception , is the base class of all the non-fatal exceptions. Exceptions which are not subclasses of Exception are not typically handled, because they are used to indicate that the program should terminate. They include SystemExit which is raised by sys.exit() and KeyboardInterrupt which is raised when a user wishes to interrupt the program.

Exception can be used as a wildcard that catches (almost) everything. However, it is good practice to be as specific as possible with the types of exceptions that we intend to handle, and to allow any unexpected exceptions to propagate on.

The most common pattern for handling Exception is to print or log the exception and then re-raise it (allowing a caller to handle the exception as well):

The try … except statement has an optional else clause, which, when present, must follow all except clauses. It is useful for code that must be executed if the try clause does not raise an exception. For example:

The use of the else clause is better than adding additional code to the try clause because it avoids accidentally catching an exception that wasn’t raised by the code being protected by the try … except statement.

Exception handlers do not handle only exceptions that occur immediately in the try clause, but also those that occur inside functions that are called (even indirectly) in the try clause. For example:

8.4. Raising Exceptions¶

The raise statement allows the programmer to force a specified exception to occur. For example:

The sole argument to raise indicates the exception to be raised. This must be either an exception instance or an exception class (a class that derives from BaseException , such as Exception or one of its subclasses). If an exception class is passed, it will be implicitly instantiated by calling its constructor with no arguments:

If you need to determine whether an exception was raised but don’t intend to handle it, a simpler form of the raise statement allows you to re-raise the exception:

8.5. Exception Chaining¶

If an unhandled exception occurs inside an except section, it will have the exception being handled attached to it and included in the error message:

To indicate that an exception is a direct consequence of another, the raise statement allows an optional from clause:

This can be useful when you are transforming exceptions. For example:

It also allows disabling automatic exception chaining using the from None idiom:

For more information about chaining mechanics, see Built-in Exceptions .

8.6. User-defined Exceptions¶

Programs may name their own exceptions by creating a new exception class (see Classes for more about Python classes). Exceptions should typically be derived from the Exception class, either directly or indirectly.

Exception classes can be defined which do anything any other class can do, but are usually kept simple, often only offering a number of attributes that allow information about the error to be extracted by handlers for the exception.

Most exceptions are defined with names that end in “Error”, similar to the naming of the standard exceptions.

Many standard modules define their own exceptions to report errors that may occur in functions they define.

8.7. Defining Clean-up Actions¶

The try statement has another optional clause which is intended to define clean-up actions that must be executed under all circumstances. For example:

If a finally clause is present, the finally clause will execute as the last task before the try statement completes. The finally clause runs whether or not the try statement produces an exception. The following points discuss more complex cases when an exception occurs:

If an exception occurs during execution of the try clause, the exception may be handled by an except clause. If the exception is not handled by an except clause, the exception is re-raised after the finally clause has been executed.

An exception could occur during execution of an except or else clause. Again, the exception is re-raised after the finally clause has been executed.

If the finally clause executes a break , continue or return statement, exceptions are not re-raised.

If the try statement reaches a break , continue or return statement, the finally clause will execute just prior to the break , continue or return statement’s execution.

If a finally clause includes a return statement, the returned value will be the one from the finally clause’s return statement, not the value from the try clause’s return statement.

A more complicated example:

As you can see, the finally clause is executed in any event. The TypeError raised by dividing two strings is not handled by the except clause and therefore re-raised after the finally clause has been executed.

In real world applications, the finally clause is useful for releasing external resources (such as files or network connections), regardless of whether the use of the resource was successful.

8.8. Predefined Clean-up Actions¶

Some objects define standard clean-up actions to be undertaken when the object is no longer needed, regardless of whether or not the operation using the object succeeded or failed. Look at the following example, which tries to open a file and print its contents to the screen.

The problem with this code is that it leaves the file open for an indeterminate amount of time after this part of the code has finished executing. This is not an issue in simple scripts, but can be a problem for larger applications. The with statement allows objects like files to be used in a way that ensures they are always cleaned up promptly and correctly.

After the statement is executed, the file f is always closed, even if a problem was encountered while processing the lines. Objects which, like files, provide predefined clean-up actions will indicate this in their documentation.

There are situations where it is necessary to report several exceptions that have occurred. This is often the case in concurrency frameworks, when several tasks may have failed in parallel, but there are also other use cases where it is desirable to continue execution and collect multiple errors rather than raise the first exception.

The builtin ExceptionGroup wraps a list of exception instances so that they can be raised together. It is an exception itself, so it can be caught like any other exception.

By using except* instead of except , we can selectively handle only the exceptions in the group that match a certain type. In the following example, which shows a nested exception group, each except* clause extracts from the group exceptions of a certain type while letting all other exceptions propagate to other clauses and eventually to be reraised.

Note that the exceptions nested in an exception group must be instances, not types. This is because in practice the exceptions would typically be ones that have already been raised and caught by the program, along the following pattern:

8.10. Enriching Exceptions with Notes¶

When an exception is created in order to be raised, it is usually initialized with information that describes the error that has occurred. There are cases where it is useful to add information after the exception was caught. For this purpose, exceptions have a method add_note(note) that accepts a string and adds it to the exception’s notes list. The standard traceback rendering includes all notes, in the order they were added, after the exception.

For example, when collecting exceptions into an exception group, we may want to add context information for the individual errors. In the following each exception in the group has a note indicating when this error has occurred.

Источник

Why does error/moodle/generalexceptionmessage appear?

Are you looking for a solution for the error message “error/moodle/generalexceptionmessage”? We can help you.

A few days ago, we had come across this error message and our Support Engineers fixed it efficiently.

Here at Bobcares, we often receive requests to fix Moodle errors as a part of our Server Management Services.

Today, let’s see the possible causes for this error and see how our Support Engineers fix this error.

Why does the exception error message show up?

We have seen this error appearing during moodle upgrade attempt, while attempting to add courses in moodle, creating a guest or admin user and many during many other occasions.

The most common causes for this error that we have seen is due to corrupt plugins, outdated moodle version, missing a few necessary PHP libraries and many more.

Among these, the most common one is the plugins that are mainly used in messaging.

Possible causes for error/moodle/generalexceptionmessage to appear

Now, let’s discuss the common causes due to which this error message appears.

1. Faulty plugins

Many of our customers enable plugins for messaging in moodle. Sometimes, these plugins won’t be compatible with the PHP version or the moodle version due to which it will throw an error message.

Hence, disabling this plugin will normally fix the error.

2. Missing PHP Libraries

We’ve seen customers experiencing this error if the necessary PHP libraries are not available on the server.

However, this can be easily found through the error message displayed in the moodle.

3. Outdated Moodle version

Sometimes, if the Moodle is not up-to-date then it will throw an error.

So it is always recommended to keep the moodle updated.

How we fix this error/moodle/generalexceptionmessage?

Our Support Engineers are well experienced in managing servers and are familiar with Moodle errors. Now, let’s see how our Support Engineers fix this error.

1. Faulty plugins

One of our customers approached us with the error message generalexceptionmessage in moodle. Here is the screenshot of the error message.

Our Support Engineers started troubleshooting this error by checking the version of Moodle.

As a result, we found that the moodle was of the latest version.

Then we went checking for any third plugins enabled for messaging if they are causing any problem.

For that, we followed the below steps:

1. Accessed the Site Administration.

2. Clicked on the Plugin and then Plugins overview option.

3. Then accessed the Additional plugins.

Here, we found that there was a third party plugin enabled. Disabling it fixed the error.

Through this, we could find that the plugin was causing the problem.

2. Missing PHP XML Library

We came across the same error message but on another occasion. One of our customers was trying to upgrade the moodle and ran into the below error message

After looking at this error message our Support Engineers found that the PHP XML library was missing.

Finally, we fixed this error by installing the XML library by running the below command:

After this, the customer was able to upgrade the moodle.

[Need any assistance in fixing the moodle errors? – We’ll help you]

Conclusion

In short, the error/moodle/generalexceptionmessage appears due to many reasons which include faulty plugins, missing PHP libraries, outdated moodle and many more. Today, we saw how our Support Engineers fix this error.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

la solución que das en el punto 1 es la correcta, el problema es que al dar click en administración del sitio me da este error y no me permite entrar

Hello Diana,
Thanks for the feedback.If you are still facing any issues, Please contact our support team via live chat

I want to log in to Moodle app it show error . Please help

Hi,
Please contact our support team via live chat(click on the icon at right-bottom)

Источник

#1 05.06.2020 12:41:34

ujhjl
Участник
Зарегистрирован: 18.05.2018
Сообщений: 22

Исправить базу.

Добрый день. Подскажите как можно исправить базу moodle 3.8.2+.

unsupported_db_table_row_format   
если этот тест не пройден, это указывает на потенциальную проблему
В вашей базе данных есть таблицы, использующие антилопу в качестве формата файла. Рекомендуется преобразовать таблицы в формат файла Barracuda. Смотрите документацию Администрирование через командную строку для подробностей инструмента для преобразования таблиц InnoDB в Barracuda.

Пробовал вводить.

php admin / cli / mysql_compressed_rows.php —list
php admin / cli / mysql_compressed_rows.php —fix

Команды не отрабатывают, может как то внутри самой базы возможно что то нужно поправить?
Не силен в mysql к сожалению совсем.

Неактивен

#2 05.06.2020 12:56:25

deadka
Администратор
Зарегистрирован: 14.11.2007
Сообщений: 2399

Re: Исправить базу.


Зеленый свет для слабаков, долги отдают только трусы, тру гики работают только в консоли…

Неактивен

#3 05.06.2020 13:05:59

ujhjl
Участник
Зарегистрирован: 18.05.2018
Сообщений: 22

Re: Исправить базу.

root@ispa:/var/www/www-root/data/www/mydomen# php admin/cli/mysql_compressed_rows.php -f
!!! error/generalexceptionmessage !!!

Неактивен

#4 05.06.2020 13:07:39

deadka
Администратор
Зарегистрирован: 14.11.2007
Сообщений: 2399

Re: Исправить базу.

нде, неинформативно (. А в логи пишется что-нибудь?


Зеленый свет для слабаков, долги отдают только трусы, тру гики работают только в консоли…

Неактивен

#5 05.06.2020 13:10:16

vasya
Архат
MySQL Authorized Developer
Откуда: Орел
Зарегистрирован: 07.03.2007
Сообщений: 5791

Re: Исправить базу.

Неактивен

#6 05.06.2020 13:14:11

ujhjl
Участник
Зарегистрирован: 18.05.2018
Сообщений: 22

Re: Исправить базу.

vasya написал:

https://sqlinfo.ru/forum/viewtopic.php?id=7676

Видел это сообщение все сделал кроме третьего пункта он как раз мне и не понятен.

Переделать таблички (ALTER TABLE tablename ROW_FORMAT=DYNAMIC).

Можно как то внутри базы переделать таблички?
а потом например импортировать?
В базу могу заходить проблем нету, но что там нужно ввести чтобы исправить не догоняю.

Отредактированно ujhjl (05.06.2020 13:16:17)

Неактивен

#7 05.06.2020 13:28:39

vasya
Архат
MySQL Authorized Developer
Откуда: Орел
Зарегистрирован: 07.03.2007
Сообщений: 5791

Re: Исправить базу.

в базе, т.е. в консоли mysql (или с помощью иного клиента phpadmin и т.д.) выполнить команды
ALTER TABLE tablename ROW_FORMAT=DYNAMIC
вместо tablename имя таблицы и так нужное кол-во раз

Неактивен

#8 05.06.2020 13:35:08

ujhjl
Участник
Зарегистрирован: 18.05.2018
Сообщений: 22

Re: Исправить базу.

vasya написал:

в базе, т.е. в консоли mysql (или с помощью иного клиента phpadmin и т.д.) выполнить команды
ALTER TABLE tablename ROW_FORMAT=DYNAMIC
вместо tablename имя таблицы и так нужное кол-во раз

Так вопрос как узнать какие таблицы?
А все сразу возможно как то преобразовать?

Отредактированно ujhjl (05.06.2020 13:36:22)

Неактивен

#9 05.06.2020 14:02:43

vasya
Архат
MySQL Authorized Developer
Откуда: Орел
Зарегистрирован: 07.03.2007
Сообщений: 5791

Re: Исправить базу.

SELECT CONCAT(«ALTER TABLE `», TABLE_SCHEMA,«`.`», TABLE_NAME, «` ROW_FORMAT=DYNAMIC;») AS MySQLCMD FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = ‘имя вашей базы данных’;

сформирует нужный список команд

для дальнейшей автоматизации можно написать хранимую процедуру, которая их выполнит, см
https://webew.ru/articles/178.webew
https://webew.ru/articles/200.webew

Неактивен

#10 05.06.2020 14:57:30

ujhjl
Участник
Зарегистрирован: 18.05.2018
Сообщений: 22

Re: Исправить базу.

Команду выполнил но не помогло. Все равно висит.

Your database has tables using Antelope as the file format. You are recommended to 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.

Неактивен

#11 05.06.2020 15:03:33

vasya
Архат
MySQL Authorized Developer
Откуда: Орел
Зарегистрирован: 07.03.2007
Сообщений: 5791

Re: Исправить базу.

какую именно команду выполнили?

Неактивен

#12 05.06.2020 15:09:43

ujhjl
Участник
Зарегистрирован: 18.05.2018
Сообщений: 22

Re: Исправить базу.

SELECT CONCAT(«ALTER TABLE `», TABLE_SCHEMA,»`.`», TABLE_NAME, «` ROW_FORMAT=DYNAMIC;») AS MySQLCMD FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = ‘моя бд’;

Неактивен

#13 05.06.2020 15:13:17

vasya
Архат
MySQL Authorized Developer
Откуда: Орел
Зарегистрирован: 07.03.2007
Сообщений: 5791

Re: Исправить базу.

этот запрос сформирует список запросов вида alter table … для всех таблиц из вашей бд, которые нужно выполнить

это просто автоматизация. чтобы в ALTER TABLE tablename ROW_FORMAT=DYNAMIC не вставлять руками имя каждой таблицы из бд

Неактивен

#14 05.06.2020 15:18:57

ujhjl
Участник
Зарегистрирован: 18.05.2018
Сообщений: 22

Re: Исправить базу.

vasya написал:

этот запрос сформирует список запросов вида alter table … для всех таблиц из вашей бд, которые нужно выполнить

это просто автоматизация. чтобы в ALTER TABLE tablename ROW_FORMAT=DYNAMIC не вставлять руками имя каждой таблицы из бд

Он мне выводит такое

ALTER TABLE `veron`.`mdl_analytics_indicator_calc` ROW_FORMAT=DYNAMIC;
ALTER TABLE `veron`.`mdl_analytics_models` ROW_FORMAT=DYNAMIC;
ALTER TABLE `veron`.`mdl_analytics_models_log` ROW_FORMAT=DYNAMIC;
ALTER TABLE `veron`.`mdl_analytics_predict_samples` ROW_FORMAT=DYNAMIC;
ALTER TABLE `veron`.`mdl_analytics_prediction_actions` ROW_FORMAT=DYNAMIC;
ALTER TABLE `veron`.`mdl_analytics_predictions` ROW_FORMAT=DYNAMIC;
ALTER TABLE `veron`.`mdl_analytics_train_samples` ALTER TABLE `veron`.`mdl_analytics_indicator_calc` ROW_FORMAT=DYNAMIC;
ALTER TABLE `veron`.`mdl_analytics_models` ROW_FORMAT=DYNAMIC;
ALTER TABLE `veron`.`mdl_analytics_models_log` ROW_FORMAT=DYNAMIC;
ALTER TABLE `veron`.`mdl_analytics_predict_samples` ROW_FORMAT=DYNAMIC;
ALTER TABLE `veron`.`mdl_analytics_prediction_actions` ROW_FORMAT=DYNAMIC;
ALTER TABLE `veron`.`mdl_analytics_predictions` ROW_FORMAT=DYNAMIC;
ALTER TABLE `veron`.`mdl_analytics_train_samples` ROW_FORMAT=DYNAMIC;
ALTER TABLE `veron`.`mdl_analytics_used_analysables` ROW_FORMAT=DYNAMIC;
ALTER TABLE `veron`.`mdl_analytics_used_files` ROW_FORMAT=DYNAMIC;
ALTER TABLE `veron`.`mdl_assign` ROW_FORMAT=DYNAMIC;
ALTER TABLE `veron`.`mdl_assign_grades` ROW_FORMAT=DYNAMIC;
ALTER TABLE `veron`.`mdl_assign_overrides` ROW_FORMAT=DYNAMIC;
ALTER TABLE `veron`.`mdl_assign_plugin_config` ROW_FORMAT=DYNAMIC;
ALTER TABLE `veron`.`mdl_assign_submission` ROW_FORMAT=DYNAMIC;
ALTER TABLE `veron`.`mdl_assign_user_flags` ROW_FORMAT=DYNAMIC;
ALTER TABLE `veron`.`mdl_assign_user_mapping` ROW_FORMAT=DYNAMIC;
ALTER TABLE `veron`.`mdl_assignfeedback_comments` ROW_FORMAT=DYNAMIC;
ALTER TABLE `veron`.`mdl_assignfeedback_editpdf_annot` ROW_FORMAT=DYNAMIC;
ALTER TABLE `veron`.`mdl_assignfeedback_editpdf_cmnt` ROW_FORMAT=DYNAMIC;
ALTER TABLE `veron`.`mdl_assignfeedback_editpdf_queue` ROW_FORMAT=DYNAMIC;
ALTER TABLE `veron`.`mdl_assignfeedback_editpdf_quick` ROW_FORMAT=DYNAMIC;
ALTER TABLE `veron`.`mdl_assignfeedback_editpdf_rot` ROW_FORMAT=DYNAMIC;
ALTER TABLE `veron`.`mdl_assignfeedback_file` ROW_FORMAT=DYNAMIC;
ALTER TABLE `veron`.`mdl_assignment` ROW_FORMAT=DYNAMIC;
ALTER TABLE `veron`.`mdl_assignment_submissions` ROW_FORMAT=DYNAMIC;

и таких куча страниц но везде ROW_FORMAT=DYNAMIC;

Неактивен

#15 05.06.2020 15:24:50

vasya
Архат
MySQL Authorized Developer
Откуда: Орел
Зарегистрирован: 07.03.2007
Сообщений: 5791

Re: Исправить базу.

все правильно, теперь все эти запросы (alter table .. =DYNAMIC) нужно выполнить

Неактивен

#16 05.06.2020 15:26:22

ujhjl
Участник
Зарегистрирован: 18.05.2018
Сообщений: 22

Re: Исправить базу.

vasya написал:

все правильно, теперь все эти запросы (alter table .. =DYNAMIC) нужно выполнить

То есть брать по очереди и запускать?
там 18 страниц, а одной командой это не возможно сделать?
Ну как то сказать что все таблицы? Понимаю что могу глупость написать, но вдруг.

ALTER TABLE `veron`.`mdl_analytics_indicator_calc` ROW_FORMAT=DYNAMIC;

При чем когда делаю они возвращают пустой результат

MySQL вернула пустой результат (т.е. ноль строк). (Запрос занял 0.1083 сек.)
ALTER TABLE `veron`.`mdl_assignfeedback_editpdf_cmnt` ROW_FORMAT=DYNAMIC

Отредактированно ujhjl (05.06.2020 15:29:22)

Неактивен

#17 05.06.2020 15:29:42

vasya
Архат
MySQL Authorized Developer
Откуда: Орел
Зарегистрирован: 07.03.2007
Сообщений: 5791

Re: Исправить базу.

ujhjl написал:

То есть брать по очереди и запускать?
там 18 страниц

ALTER TABLE `veron`.`mdl_analytics_indicator_calc` ROW_FORMAT=DYNAMIC;

да, запускать по одному

или написать процедуру, которая сделает это в цикле

или вам повезло, если ваш клиент позволяет выполнять группу запросов.

Неактивен

#18 05.06.2020 15:31:30

vasya
Архат
MySQL Authorized Developer
Откуда: Орел
Зарегистрирован: 07.03.2007
Сообщений: 5791

Re: Исправить базу.

ujhjl написал:

При чем когда делаю они возвращают пустой результат

MySQL вернула пустой результат (т.е. ноль строк). (Запрос занял 0.1083 сек.)

так и должно быть

Неактивен

#19 05.06.2020 15:34:24

vasya
Архат
MySQL Authorized Developer
Откуда: Орел
Зарегистрирован: 07.03.2007
Сообщений: 5791

Re: Исправить базу.

ujhjl написал:

То есть брать по очереди и запускать?
там 18 страниц, а одной командой это не возможно сделать?
Ну как то сказать что все таблицы? Понимаю что могу глупость написать, но вдруг.

или сделать бэкап, удалить базу, обратно залить (по идее должно сработать)

Неактивен

#20 05.06.2020 15:36:19

ujhjl
Участник
Зарегистрирован: 18.05.2018
Сообщений: 22

Re: Исправить базу.

Супер спасибо помогло.
Выделил блоками и sql запрос выполнил.
А базу вроде перезаливал не помогало.

Отредактированно ujhjl (05.06.2020 15:37:09)

Неактивен

#21 05.06.2020 22:08:11

ujhjl
Участник
Зарегистрирован: 18.05.2018
Сообщений: 22

Re: Исправить базу.

Рано обрадовался теперь вылезло вот такое и не дает регистрироваться пользователям.

И ругается на кодировку БД. как можно изменить COLLATION

Error reading from database

More information about this error

×Debug info: COLLATION ‘utf8mb4_bin’ is not valid for CHARACTER SET ‘utf8’
SELECT ‘x’
FROM mdl_user
WHERE LOWER(email) COLLATE utf8mb4_bin = LOWER(?)
AND id IN (SELECT id
FROM mdl_user
WHERE email = ?
AND mnethostid = ?) LIMIT 0, 1
[array (
0 => ‘as@mail.ru’,
1 => ‘as@mail.ru’,
2 => ‘1’,
)]
Error code: dmlreadexception
×Stack trace:
line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown
line 1186 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
line 1918 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_recordset_sql()
line 1048 of /lib/authlib.php: call to moodle_database->record_exists_sql()
line 150 of /login/signup_form.php: call to signup_validate_data()
line 615 of /lib/formslib.php: call to login_signup_form->validation()
line 551 of /lib/formslib.php: call to moodleform->validate_defined_fields()
line 661 of /lib/formslib.php: call to moodleform->is_validated()
line 85 of /login/signup.php: call to moodleform->get_data()

Отредактированно ujhjl (05.06.2020 22:12:35)

Неактивен

#22 06.06.2020 08:50:20

ujhjl
Участник
Зарегистрирован: 18.05.2018
Сообщений: 22

Re: Исправить базу.

Сам отвечу, поменял

DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC
на

DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPRESSED

Все заработало. Ошибка исчезла, рега работает.
Интересно почему только?

Неактивен

Moodle: ошибки при загрузке курса (зависание процесса восстановления)

Дано: Moodle 3.2 и резервная копия курса в формате mbz. Параметры системы — Windows Server 2012 R2 + MS SQL Server + IIS
Проблема: при попытке загрузить (восстановить) курс страница зависает, долго грузится и в итоге приводит к ошибке «Невозможно отобразить страницу».
Причина, описанная ниже: это некорректный контент курса.

Причины ошибок восстановления могут быть разные (начиная от несовместимости версий Moodle и заканчивая банальной нехваткой места на сервере). Я приведу ту, что возникла у меня. Доступа к исходному курсу (из которого выгружался бэкап) у меня не было, был на руках только файл архива курса в формате mbz.
Восстановление делается по стандартной схеме описанной в данной инструкции — Как загрузить курс в Moodle из резервной копии.
При нажатии на кнопку «Приступить к восстановлению» страница делала вид, что происходит какой-то процесс, но ожидание даже в течении часа ни к чему не приводило (в итоге срабатывал timeout с выводом стандартной ошибки страницы). Если это делалось непосредственно на сервере, то процесс мог зависнуть так, что приходилось делать рестарт веб-сервера (в нашем случае IIS reset).

Включение дебаг режима также не давало результата: никаких вменяемых сообщений об ошибках не выводилось. Логи веб-сервера, логи PHP и системные логи также молчали.

Помог только следующий способ.
(естественно все попытки делаем в тестовой версии moodle)
Когда страница зависает, ожидаем несколько минут, затем останавливаем процесс и заходим в курс. Смотрим, что загрузилось, что нет.
Анализируем последний по порядку загруженный элемент, скорее всего проблема именно в его содержимом, на котором «спотыкается» загрузка курса. Далее можно попытаться изучить его содержимое, если хоть что-то относящееся к нему загрузилось, либо можно пытаться найти его непосредственно в mbz файле и посмотреть контент.
Если надо просто быстро проверить, является ли он причиной зависания, то на этапе выбора элементов перед загрузкой, снимите «флажок» около этого элемента и попробуйте загрузить курс заново. Если не помогло, то уберите загрузку следующего по порядку элемента.
В моем случае это помогло, но при повторной загрузке страница снова зависла. Оказалось, в курсе было три таких элемента (в терминах Moodle — файл и две книги). Т.е. загрузка курса продвинулась дальше, но снова спотыкалась на следующем элементе. Когда эти три элемента были исключены из загрузки, курс успешно восстановился до конца.
По моим предположениям причина была в том, что данные элементы содержали javascript-файлы (возможно срабатывала «отсечка» на уровне безопасности веб-сервера).

Если ничего не помогает, то лучше загружать курс частями и анализировать те части, на которых появляется ошибка.

Если Вам понравилась статья, пожалуйста, поставьте лайк, сделайте репост или оставьте комментарий. Если у Вас есть какие-либо замечания, также пишите комментарии.

4 / 4 / 0

Регистрация: 06.03.2018

Сообщений: 134

1

23.07.2021, 17:05. Показов 946. Ответов 1


Я пытаюсь запустить moodle на localhost, появляется ошибка — что я делаю не так и как я могу это исправить ? код config.php -переименовал его в свой localhost, установил соединение

PHP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php  // Moodle configuration file
 
unset($CFG);
global $CFG;
$CFG = new stdClass();
 
$CFG->dbtype    = 'mysql';
$CFG->dblibrary = 'native';
$CFG->dbhost    = 'localhost';
$CFG->dbname    = 'moodledb';
$CFG->dbuser    = 'root';
$CFG->dbpass    = '';
$CFG->prefix    = 'mdl_';
$CFG->dboptions = array (
  'dbpersist' => 0,
  'dbport' => 3306,
  'dbsocket' => '',
  'dbcollation' => 'utf8mb4_unicode_ci',
);
 
$CFG->wwwroot   = 'C:/Server/data/htdocs/moodle/moodle';
$CFG->dataroot  = 'C:/Server/data/htdocs/moodle/moodledata';
$CFG->admin     = 'admin';
 
$CFG->directorypermissions = 0777;
 
require_once(__DIR__ . '/lib/setup.php');
 
// There is no php closing tag in this file,
// it is intentional because it prevents trailing whitespace problems!

ошибка/generalexceptionmessage
Код, который был на сервере в конфигурации:

PHP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php  // Moodle configuration file
 
unset($CFG);
global $CFG;
$CFG = new stdClass();
 
$CFG->dbtype    = 'mariadb';
$CFG->dblibrary = 'native';
$CFG->dbhost    = 'localhost';
$CFG->dbname    = 'moodledb';
$CFG->dbuser    = 'moodleedu';
$CFG->dbpass    = 'moodleedpas';
$CFG->prefix    = 'mdl_';
$CFG->dboptions = array (
  'dbpersist' => 0,
  'dbport' => 3306,
  'dbsocket' => '',
  'dbcollation' => 'utf8mb4_unicode_ci',
);
 
$CFG->wwwroot   = 'https://moodle.com';
$CFG->dataroot  = '/var/www/moodledata';
$CFG->admin     = 'admin';
 
$CFG->directorypermissions = 0777;
 
require_once(__DIR__ . '/lib/setup.php');
 
// There is no php closing tag in this file,
// it is intentional because it prevents trailing whitespace problems!

Кроме того, вопрос в том, где я могу более конкретно посмотреть список ошибок в moodle — где он записывает данные?

__________________
Помощь в написании контрольных, курсовых и дипломных работ, диссертаций здесь



0



#php #moodle

Вопрос:

Я пытаюсь запустить moodle на локальном хосте, появляется ошибка — что я делаю не так и как я могу это исправить ? код config.php -переименовал его в свой локальный хост, установил соединение

 <?php  // Moodle configuration file

unset($CFG);
global $CFG;
$CFG = new stdClass();

$CFG->dbtype    = 'mysql';
$CFG->dblibrary = 'native';
$CFG->dbhost    = 'localhost';
$CFG->dbname    = 'moodledb';
$CFG->dbuser    = 'root';
$CFG->dbpass    = '';
$CFG->prefix    = 'mdl_';
$CFG->dboptions = array (
  'dbpersist' => 0,
  'dbport' => 3306,
  'dbsocket' => '',
  'dbcollation' => 'utf8mb4_unicode_ci',
);

$CFG->wwwroot   = 'C:/Server/data/htdocs/moodle/moodle';
$CFG->dataroot  = 'C:/Server/data/htdocs/moodle/moodledata';
$CFG->admin     = 'admin';

$CFG->directorypermissions = 0777;

require_once(__DIR__ . '/lib/setup.php');

// There is no php closing tag in this file,
// it is intentional because it prevents trailing whitespace problems!
 

ошибка/generalexceptionmessage

Код, который был на сервере в конфигурации:

 <?php  // Moodle configuration file

unset($CFG);
global $CFG;
$CFG = new stdClass();

$CFG->dbtype    = 'mariadb';
$CFG->dblibrary = 'native';
$CFG->dbhost    = 'localhost';
$CFG->dbname    = 'moodledb';
$CFG->dbuser    = 'moodleedu';
$CFG->dbpass    = 'moodleedpas';
$CFG->prefix    = 'mdl_';
$CFG->dboptions = array (
  'dbpersist' => 0,
  'dbport' => 3306,
  'dbsocket' => '',
  'dbcollation' => 'utf8mb4_unicode_ci',
);

$CFG->wwwroot   = 'https://moodle.com';
$CFG->dataroot  = '/var/www/moodledata';
$CFG->admin     = 'admin';

$CFG->directorypermissions = 0777;

require_once(__DIR__ . '/lib/setup.php');

// There is no php closing tag in this file,
// it is intentional because it prevents trailing whitespace problems!
 

Кроме того, возникает вопрос, где я могу более конкретно посмотреть список ошибок в moodle — где он записывает данные?

Комментарии:

1. «wwwroot» — это URL-адрес в конфигурации сервера, но локальный путь в локальной конфигурации… может быть?

2. @LarsStegelitz изменено: $CFG->wwwroot = ‘> локальный хост:3000/moodle/moodle ‘;. Ошибка все еще оставалась

Понравилась статья? Поделить с друзьями:
  • Error monitor world of tanks как исправить windows 10
  • Error modules with different cpu types were found
  • Error module version mismatch
  • Error module vboxdrv not found
  • Error module rewrite does not exist