<?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=Sessions_FAQ</id>
	<title>Sessions FAQ - История изменений</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.mipt.ru/index.php?action=history&amp;feed=atom&amp;title=Sessions_FAQ"/>
	<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=Sessions_FAQ&amp;action=history"/>
	<updated>2026-05-06T20:51:02Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>http://wiki.mipt.ru/index.php?title=Sessions_FAQ&amp;diff=5393&amp;oldid=prev</id>
		<title>Олег Давидович: 1 версия импортирована</title>
		<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=Sessions_FAQ&amp;diff=5393&amp;oldid=prev"/>
		<updated>2024-10-18T06:45:37Z</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:45, 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=Sessions_FAQ&amp;diff=5392&amp;oldid=prev</id>
		<title>1&gt;Stevenf: Very minor spelling correction: &#039;There&#039;s&#039; refers to a singular way to do something, whereas &#039;There are&#039; refers to various ways to do something.</title>
		<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=Sessions_FAQ&amp;diff=5392&amp;oldid=prev"/>
		<updated>2015-03-20T05:32:54Z</updated>

		<summary type="html">&lt;p&gt;Very minor spelling correction: &amp;#039;There&amp;#039;s&amp;#039; refers to a singular way to do something, whereas &amp;#039;There are&amp;#039; refers to various ways to do something.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Managing a Moodle site}}&lt;br /&gt;
== What is the purpose of Sessions? ==&lt;br /&gt;
Web applications are &amp;quot;stateless&amp;quot;. That is, by nature, any information stored in program variables is lost each time a script completes. That happens on every page. So for anything other than completely trivial scripts you need to have a way of storing information for that user for the current login. There are various ways to do this but the simplest is an implementation of PHP&amp;#039;s native $_SESSION[] array that will keep information for a particular user on the same PC for a short period of time.&lt;br /&gt;
&lt;br /&gt;
== What information do they hold?==&lt;br /&gt;
Sessions hold a range of information. The fact that you are logged on, your user profile, etc. Anything that needs to be available on all Moodle pages quickly.&lt;br /&gt;
&lt;br /&gt;
== How are they constructed? ==&lt;br /&gt;
It&amp;#039;s a PHP thing. It&amp;#039;s very simple. Moodle issues the session_start() &amp;#039;command&amp;#039; and then access PHP&amp;#039;s $_SESSION variable. The contents of that automagically persist in a written file/database/memcached server.&lt;br /&gt;
&lt;br /&gt;
== How long should they be retained for? ==&lt;br /&gt;
There is no reason to keep them beyond the current, well, session. &lt;br /&gt;
&lt;br /&gt;
== Do I need to include them in my site backups? == &lt;br /&gt;
No, not at all. The information required is for the immediate purposes of Moodle and is not required beyond that. &lt;br /&gt;
&lt;br /&gt;
== Do I need to delete them? ==&lt;br /&gt;
&lt;br /&gt;
Session files should automatically be deleted when they are no longer needed. If files are building up you should look into why.&lt;br /&gt;
&lt;br /&gt;
=== How do I delete them? ===&lt;br /&gt;
It&amp;#039;s not very elegant, but at quiet times you can simply delete the sessions directory in moodledata. The worst that will happen is that anyone logged in gets thrown off. A slightly more elegant solution would delete any files in that directory more than a few hours old.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[[Session handling]]&lt;br /&gt;
&lt;br /&gt;
[[Category:FAQ]]&lt;br /&gt;
&lt;br /&gt;
[[de:Sitzungen FAQ]]&lt;/div&gt;</summary>
		<author><name>1&gt;Stevenf</name></author>
	</entry>
</feed>