<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>http://wiki.mipt.ru/index.php?action=history&amp;feed=atom&amp;title=SQLite</id>
	<title>SQLite - История изменений</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.mipt.ru/index.php?action=history&amp;feed=atom&amp;title=SQLite"/>
	<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=SQLite&amp;action=history"/>
	<updated>2026-05-07T20:42:44Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>http://wiki.mipt.ru/index.php?title=SQLite&amp;diff=5267&amp;oldid=prev</id>
		<title>Олег Давидович: 1 версия импортирована</title>
		<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=SQLite&amp;diff=5267&amp;oldid=prev"/>
		<updated>2024-10-18T06:44:52Z</updated>

		<summary type="html">&lt;p&gt;1 версия импортирована&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Предыдущая версия&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Версия от 06:44, 18 октября 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Олег Давидович</name></author>
	</entry>
	<entry>
		<id>http://wiki.mipt.ru/index.php?title=SQLite&amp;diff=5266&amp;oldid=prev</id>
		<title>1&gt;Tim@horizoneducationnetwork.org: clean up, typos fixed: , $ → $,  (3)</title>
		<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=SQLite&amp;diff=5266&amp;oldid=prev"/>
		<updated>2022-05-19T16:19:44Z</updated>

		<summary type="html">&lt;p&gt;clean up, typos fixed: , $ → $,  (3)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Installing Moodle}}&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;SQLite&amp;#039;&amp;#039;&amp;#039; is a serverless SQL database implementation. Moodle has experimental support for it. It is not recommended for production Moodle sites.&lt;br /&gt;
&lt;br /&gt;
Moodle&amp;#039;s SQLite driver requires SQLite PDO driver to be present in PHP. It won&amp;#039;t work with native (non-PDO) SQL driver in PHP.&lt;br /&gt;
&lt;br /&gt;
It contains bugs - it just doesn&amp;#039;t work. Following documents some attempts to use it and what needs to be investigated.&lt;br /&gt;
&lt;br /&gt;
== Moodle 2.2 and SQLite ==&lt;br /&gt;
&lt;br /&gt;
Following is for Moodle 2.2.4 (Build: 20120706). Probably the same for 2.2.11 (build 20130708). You need to set the following parameters. It will work if you don&amp;#039;t set the null values, but you&amp;#039;ll get notices if you set PHP debug level to high.&lt;br /&gt;
 $CFG-&amp;gt;dbtype= &amp;#039;sqlite3&amp;#039;;&lt;br /&gt;
 $CFG-&amp;gt;dblibrary= &amp;#039;pdo&amp;#039;;&lt;br /&gt;
 $CFG-&amp;gt;dbhost= null;&lt;br /&gt;
 $CFG-&amp;gt;dbname= null;&lt;br /&gt;
 $CFG-&amp;gt;dbuser= null;&lt;br /&gt;
 $CFG-&amp;gt;dbpass= null;&lt;br /&gt;
 $CFG-&amp;gt;dbprefix= &amp;quot;&amp;quot;; // any prefix (e.g. &amp;#039;mdl&amp;#039;) is ignored, therefore don&amp;#039;t use it, because it upsets 3rd party modules&lt;br /&gt;
 $CFG-&amp;gt;dboptions= array();&lt;br /&gt;
&lt;br /&gt;
Then you need to fix lib/ddl/sqlite_sql_generator.php. Copy definitions of functions getCreateTempTableSQL($xmldb_table) and getDropTempTableSQL($xmldb_table) from lib/ddl/postgres_sql_generator.php.&lt;br /&gt;
&lt;br /&gt;
Then installation works fine; however, it dies after installed, saying &amp;#039;PHP catchable fatal error&amp;#039;. Let&amp;#039;s investigate:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 cd &amp;lt;moodledata&amp;gt;&lt;br /&gt;
 ll *sq*&lt;br /&gt;
 -rw-r--r-- 1 apache apache 1624064 Oct 23 08:46 _d41d8cd98f00b204e9800998ecf8427e.sq3.php&lt;br /&gt;
 # your DB file may have a different name _d41d8cd98f00b204e9800998ecf8427e.sq3.php&lt;br /&gt;
 # change ownership, so that I can write to the DB. Change group access rights, so that Apache can still write to it.&lt;br /&gt;
 sudo chown &amp;lt;myusername&amp;gt; _d41d8cd98f00b204e9800998ecf8427e.sq3.php&lt;br /&gt;
 chmod g+w _d41d8cd98f00b204e9800998ecf8427e.sq3.php&lt;br /&gt;
 sqlite _d41d8cd98f00b204e9800998ecf8427e.sq3.php&lt;br /&gt;
 SELECT * FROM config WHERE name LIKE &amp;#039;%debug%&amp;#039;;&lt;br /&gt;
 UPDATE config SET value=32767 WHERE name=&amp;#039;debug&amp;#039;; -- This is for PHP 5.4+&lt;br /&gt;
 .quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then you get following and more warnings, and it dies:&lt;br /&gt;
&lt;br /&gt;
 Warning: Invalid argument supplied for foreach() in /var/www/html/elearning/lib/enrollib.php on line 604&lt;br /&gt;
 Warning: array_key_exists() expects parameter 2 to be array, boolean given in /var/www/html/elearning/lib/navigationlib.php on line 1069&lt;br /&gt;
 Warning: Invalid argument supplied for foreach() in /var/www/html/elearning/lib/navigationlib.php on line 1074&lt;br /&gt;
 Warning: array_slice() expects parameter 1 to be array, boolean given in /var/www/html/elearning/lib/navigationlib.php on line 1632&lt;br /&gt;
 Warning: Invalid argument supplied for foreach() in /var/www/html/elearning/lib/navigationlib.php on line 1635&lt;br /&gt;
 Warning: Invalid argument supplied for foreach() in /var/www/html/elearning/lib/navigationlib.php on line 1711&lt;br /&gt;
 Strict standards: Non-static method PEAR::setErrorHandling() should not be called statically, assuming $this from incompatible context in /var/www/html/elearning/lib/formslib.php on line 64&lt;br /&gt;
 Strict standards: Non-static method HTML_QuickForm::registerElementType() should not be called statically, assuming $this from incompatible context in /var/www/html/elearning/lib/formslib.php on line 2517&lt;br /&gt;
 ...&lt;br /&gt;
 Strict standards: Declaration of repository_instance_form::validation() should be compatible with moodleform::validation($data, $files) in /var/www/html/elearning/repository/lib.php on line 1888&lt;br /&gt;
 Strict standards: Declaration of repository_type_form::validation() should be compatible with moodleform::validation($data, $files) in /var/www/html/elearning/repository/lib.php on line 1990&lt;br /&gt;
 Strict standards: Declaration of repository_local::get_listing() should be compatible with repository::get_listing($path = &amp;#039;&amp;#039;, $page = &amp;#039;&amp;#039;) in /var/www/html/elearning/repository/local/lib.php on line 168&lt;br /&gt;
 Strict standards: Declaration of repository_recent::type_config_form() should be compatible with repository::type_config_form($mform, $classname = &amp;#039;repository&amp;#039;) in /var/www/html/elearning/repository/recent/lib.php on line 236&lt;br /&gt;
 Strict standards: Declaration of repository_upload::get_listing() should be compatible with repository::get_listing($path = &amp;#039;&amp;#039;, $page = &amp;#039;&amp;#039;) in /var/www/html/elearning/repository/upload/lib.php on line 204&lt;br /&gt;
 Strict standards: Declaration of repository_user::get_listing() should be compatible with repository::get_listing($path = &amp;#039;&amp;#039;, $page = &amp;#039;&amp;#039;) in /var/www/html/elearning/repository/user/lib.php on line 135&lt;br /&gt;
 Warning: Invalid argument supplied for foreach() in /var/www/html/elearning/lib/enrollib.php on line 160&lt;br /&gt;
 Strict standards: Declaration of enrol_manual_plugin::get_bulk_operations() should be compatible with enrol_plugin::get_bulk_operations() in /var/www/html/elearning/enrol/manual/lib.php on line 292&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
== Moodle 2.6.1+ (build 20140207) ==&lt;br /&gt;
Preparing config.php in the above way wasn&amp;#039;t good enough. The install doesn&amp;#039;t even start. http://localhost/moodle-26/admin/index.php?lang=en&amp;amp;agreelicense=1 lists &amp;#039;database&amp;#039; server check: Error reading environment data (10).&lt;br /&gt;
&lt;br /&gt;
There also is lib/ddl/sqlite_sql_generator.php, which probably needs to be fixed.&lt;br /&gt;
&lt;br /&gt;
== From old documentation ==&lt;br /&gt;
The other database parameters are not used. The database tables are stored in the &amp;#039;moodledata&amp;#039; file area. &lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* https://docs.moodle.org/dev/Student_projects/SQLite&lt;br /&gt;
* http://www.sqlite.org/&lt;br /&gt;
&lt;br /&gt;
[[Category:SQL databases]]&lt;/div&gt;</summary>
		<author><name>1&gt;Tim@horizoneducationnetwork.org</name></author>
	</entry>
</feed>