#author("2025-04-04T03:25:38+00:00","default:iseki","iseki")
#author("2025-04-04T03:26:24+00:00","default:iseki","iseki")
** Trouble Shooting [#pb17590c]
*** Install 
**** Install で Unicode のエラー (moodle-4.5.3+, php-8.2.28)(ちゃんとデータベースは utf8mb4 になっているのに...)
**** Install で Unicode のエラー (moodle-4.5.3+)(ちゃんとデータベースは utf8mb4 になっているのに...)
<pre>
All data must be stored in Unicode format (UTF-8). For new installations, the database must have UTF-8 as default character set. If you are upgrading, you need to follow the UTF-8 migration process.

すべてのデータはユニコードフォーマット (UTF-8) で保存する必要があります。新しいインストールの場合、データベースのデフォルト文字セットをUTF-8にする必要があります。アップグレードする場合、あなたはUTF-8移行処理に従う必要があります。
</pre>

- config.php の $CFG->dboptions['dbcollation'] を 'utf8mb4_unicode_ci' に変更する.
<pre>
$CFG->dboptions = array (
  'dbpersist' => 0,
  'dbport' => '',
  'dbsocket' => '',
//  'dbcollation' => 'utf8mb4_uca1400_ai_ci',
  'dbcollation' => 'utf8mb4_unicode_ci',
);
</pre>
- 元々の utf8mb4_uca1400_ai_ci ってなんでしょう?
-- php-8.1.32 + Moodle-4.4.7+ では utf8mb4_uca1400_ai_ci でも通る.
-- Moodle-4.4.7+ では utf8mb4_uca1400_ai_ci でも通る.
-- utf8mb4_uca1400_ai_ci は半角,全角を区別しない,および空白を識別しない模様(DBの移行でユニークキーの重複のエラーが出た).
-- 要 ちゃんと調査(2025/4/4)

*** Upgrade
**** column「communication-&gt;contextid」を修正できません。index「mdl_comm_con_ix(contextid)」に依存関係が見つかりました。
- データベースにアップグレード先のファイルが存在する.
- データバースを空にして,restore する.
*** Asynchronous backups disabled
- 管理メニュー -> コース -> 非同期バックアップ/リストア
*** Moodle 4.20 + PHP 8.2 で  configlockmappings Deprecated のエラー [#e641c03d]
- cache/classes/config.php の L42辺りに ''#[AllowDynamicProperties] '' を追加


*** 何てこったい! admin のパスワードを忘れちまった! [#oee0968b]
- php  (moodle path)/admin/cli/reset_password.php  でリセットできる.


*** Failed to unserialise data from file. Either failed to read, or failed to write. [#a06b08f9]

+ Execute script purgecaches to reset the cache system. 
++ php /moodle/admin/cli/purge_caches.php
+ Remove all files and directories unde directory /moodledata/cache

Information from [[https://coderwall.com/p/py-nba/moodle-easy-solution-to-failed-to-unserialise-data-from-file-either-failed-to-read-or-failed-to-write]]


*** Fatal error: $CFG->dataroot is not writable, admin has to fix directory permissions! Exiting. [#qbe61935]
- パーミッションが正しくとも,[[SELinux]] が有効だと起きる


*** PHP Parse error:  syntax error, unexpected '[' in /home/apache/moodle-3.1.0/lib/outputrenderers.php on line 112 [#n85cd201]
- 画面が真っ白
- yum が勝手に PHP関連のライブラリを更新(バージョンダウン)しちゃったせい
- 使用している PHP の入れ直し.


*** 利用可能なアップデートデータを取得できません - 不明なURLエラーです。 [#i07d1823]
- see http://docs.moodle.org/24/en/SSL_certificate_for_moodle.org
- http://curl.haxx.se/ca/cacert.pem から cacert.pem をダウンロードし,moodledata/moodleorgca.crt として保存する.


*** 2.6.3 [#u46e2536]
- 小テストの統計の各設問表示でPHPのエラー
- 2.6.2 では問題なし
- question/classes/statistics/responses/analysis_for_class.php
- $onlyactualresponse はクラスインスタンスなのに (string)$onlyactualresponse とか してる.おいおい.
 --- analysis_for_class.php.orig 2014-05-15 15:31:31.938393184 +0900
 +++ analysis_for_class.php      2014-05-15 15:32:04.524281160 +0900
 @@ -107,7 +107,8 @@
              return true;
          } else if (count($this->actualresponses) == 1) {
              $onlyactualresponse = reset($this->actualresponses);
 -            return (string)$onlyactualresponse != $this->modelresponse;
 +            return !$onlyactualresponse->response_matches($this->modelresponse);
 +            //return (string)$onlyactualresponse != $this->modelresponse;
          }
          return false;
      }

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 ページ一覧 検索 最終更新   ヘルプ   最終更新のRSS