the Internet Windows Android

Connection session. How to set the limit of the connection sessions on the TP-LINK router? Logic of the session


Sessions in PHP or as data about the user who came to the site or the buyer is saved when moving between the site pages without much difficulty. The lesson is very important. Relevant to create 95% of sites.

What is a session in php

The sessions are used to store temporary data information (for example, that the user has entered the site) when moving between the pages of one site. When using sessions, the data are stored in temporary files on the server.
Most often by sessions (and cookies, too, too) use when creating online stores, forums, bulletin boards, social networks, blogs and other resources. The convenience of the session system is the storage of temporary information of the user / buyer, the data about which is in fast access Defined time. The session has a natural shelf life - until the browser is closed. If you close only the page, then when opening the site, the user / customer data will still be available.

Logic of the session

Session (or session) is a kind of temporary data storage. Immediately warn you, it is worth a small amount of data. For example, login and password of the setting user or its serial number in the database.

Example of work
1. The user enters the login and password and comes to the site
2. Data with login and password are saved in the session of one of the pages of the site:

File index.php.

Session_start (); // Each file in which you want to use these sessions should at the beginning of the code contain the "Start Session" command

$ login \u003d "admin";
$ password \u003d "pass";
$ _Session ["Login"] \u003d $ login; // Save the variable containing login
$ _Session ["password"] \u003d $ password; // Save the variable containing password

3. When you go to another page of the site, this data will also be available:

File example.php. (or any other page)

Echo "Your Login". $ _ Session ["Login"]; // Will out "Your Login Admin", although on this page we did not write data!
See, everything is simple!

4. If you want to clear the session data, then enough:

File example.php.

Session_start (); // Run the session again again

Unset ($ _ session ["Login"]); // so unregistered the variable or "destroyed"
Echo "Your Login". $ _ session ["Login"]; // Will out "Your Login". Since we destroyed it in the last line, then there is no data

Session_destroy (); // destroy the session. All data, including $ _session ["Password"] no longer. When they are querying will display an error
In general, such a transmission looks like pOST methodBut only you should no longer write a lot of excess code, but all the data transmitted from the page to the page are stored in temporary files on the server. I repeat the sessions must contain small amounts of data, so they are appropriate for the storage of the login / password, the basket of the buyer and other small volumes.

Transfer values \u200b\u200bor array using PHP session

In the session, you can record not only the string, but also an array of data. Just do not overdo it with the volume of the array, since all this will affect the fasting and occupied space on the server.

We use some again start page index.php.

Session_start ();

$ r \u003d array ("one", "two", "three");

$ _Session ["arr"] \u003d $ r;

On the page where everything will be displayed
Save data in sessions and go through the link to another page, where all the data will be output.

File recipient, page test.php. Where we open an array

Session_start ();
Print_R ($ _ session ["arr"]);
// Remove
/*
Array.
\u003d\u003e One.
\u003d\u003e Two.
\u003d\u003e Three.
*/
?>
You may want to refresh the lesson in memory. In general, everything should be clear.

Other features for working with sessions

session_UnRegister (String) - Session forgets the value of a given global variable;
session_destroy () - the session is destroyed (for example, if the user left the system by pressing the output button);
session_set_cookie_params (int lifetime [, String Path [, String Domain]]) - With this feature, you can install how long the session will live, setting the UNIX_TIMESTAMP that determines the death time of the session.

List of features for working with sessions (Session) in PHP
session_cache_expire - Returns the end of the current cache action
Session_Cache_Limiter - Gets and / or Sets Cashel Cashet Limiter
Session_Commit - Alias \u200b\u200bSession_Write_Close ()
Session_Decode - Decodes session data from line
session_destroy - destroys all data registered for the session
session_encode - encrypts the data of the current session as a string
session_get_cookie_params - Gets Cook Settings Session
session_id - Gets and / or Sets Current Session ID
session_is_registered - determines whether the variable is registered in the session
session_module_name - Gets and / or Sets the current session module
session_name - Gets and / or sets the name of the current session
session_regenerate_id - modifies the current session identifier recently generated
Session_register - registers one or more variables for the current session.
session_save_path - Gets and / or sets the path of saving the current session
session_set_cookie_params - Sets the parameters of the Cook session
Session_Set_Save_Handler - Sets the storage features of the user level session
Session_start - initializes session data
Session_UnReGister - Relisters a variable from the current session
Session_unset - frees all variables session
Session_Write_Close - writes session data and end session

Examples of sessions

Page View Counter During the session. Vite example. However, after closing the browser, the countdown will begin again.

Some page visits meter as part of one session

// A simple example of using sessions without cookies.
session_name ("test");
session_start ();
$ _Session ["Count"] \u003d @ $ _ session ["count"] + 1;
?>

Counter


In the current work session with the browser, you opened this page.
Once (a).
Close the browser to reset this meter.
Click here to update the page!
At each transition, the counter will increase by 1)

Thanks for attention! Good luck in endeavors!

Sessions in PHP are a mechanism for saving on the client's computer information server side. In fact, the session in PHP is not such a difficult topic, but for her understanding you need to know the principle of working cookies in PHP. So, if you do not know how cookie works in PHP, you first read the appropriate article, and then return here.

The word session from English is translated as a session, so the sense of sessions in PHP becomes more understandable, but the term "session", and we will use it in this article.

The sessions in PHP are very similar to the cookie, the same pairs are the key \u003d\u003e value, only they are stored on the server side.

SESSION_START ()

Session We need to start, for this there is a session_start () function. This feature starts a session, or a session as you can call it.

The session_start () function is desirable to call at the very beginning of the page, but in my examples I do not do this.

Array $ _Session.

Sessions are groups of variables that are stored on the server, but belong to one unique visitor. I repeat, this is the key point: sessions are stored on the server.

In order to ensure the interaction of each visitor with its data from its session is used cookie file., the creation of which PHP gives himself, you don't need to be worried about it. This cookie matters only for the server and cannot be used to obtain the user data.

On the server, the session data is stored in a text file and they are available in pHP program In an array $ _session. To preserve the variable in the session, you need to assign a value in this array.

Let's finally start using examples. Everything is very simple.

Sessions in php. value. ";?\u003e

Now let's try to get a value from an array $ _session in another example.

Sessions in php.

Note, if in the second example, we delete the session_start () function, then we will not have access to the $ _session array data.

SESSION_ID ()

After the session is created, you automatically access the unique session identifier using the session_id () function. This feature allows you to specify and receive the value of the session identifier.

Sessions in php.

You can look in the toolbar for your browser developers (in Chrome to do this, press Ctrl + Shift + I, then Resources, and will find a cookie), this domain put your cookie browser with the name PHSESSID and approximately such a value: "7G5DF9RKD1HHVR33LQ1K6C72P7".

It is according to the pHPSESSID value that will define your browser and work with the corresponding set of variables that will be available to the script through the $ _session array, as already written earlier.

Session_name () function

If the session_id () functions allows you to get the session identifier value, the session_name () function allows you to find out the session name.

Sessions in php.

Once again about the session_start () function

Now we know more about the prozhanism of the sessions in PHP and you need to return to the session_start () function again. This feature initializes the session mechanism for current user. How exactly this happens:

  • If the user launched the site for the first time, the session_start () sets the cookie from the client and creates a temporary storage on the server associated with the user ID.
  • Specifies the repository associated with the transmitted current identifier.
  • If there is data in the repository on the server, they are placed in an $ _session array.
  • If register_globals from the php.ini file is ON, then all the elements of the $ _session array are transformed into global variables.

An example of using the session

Now we will look at an example that will allow minor experiments with sessions.

Sessions in php.

Counter

In the current session you opened the page time.

Open an example in "\u003e this tab.

All the work of sessions is based on an array $ _session, it is clearly seen in this example.

If you close the browser window, the session will stop, our meter will reset. This behavior of sessions in PHP can be changed, we will return to this issue a little further in the article.

Completion of the session

In order to complete the session, we need:

  1. Clear $ _session array.
  2. Delete temporary storage on the server.
  3. Delete session cookie.

Clear Massive $ _Session can be using the session_unset () function.

The session_destroy () feature deletes the temporary storage on the server. By the way, she does nothing more.

You need to delete a session cookie using the setcookie () function, which we studied in a studio with cookie in PHP.

Example of completion of the session:

Completion of the session

The session is completed.

Now you can conduct an experiment: run an example with a meter in one window, wind the counter, and then run an example with the deletion of the session and renew the page with the meter.

Remove the cookies file can be done like this:

setcookie (session_name (), "", time () - 60 * 60 * 24 * 32, "/")

Once again about the session_name () and session_id () functions

The session_name () and session_id () functions are rare in practice, but I am writing about them, since the article needs to be revealed by the mechanism of operation of sessions in PHP.

Using these functions, you can specify your own names and identifiers of sessions, but it is not recommended to do this. If you wanted to set them, then write these functions with arguments before the session_start () function, as in the example below:

Sessions in php.

When using this example, all users will be assigned the same session identifier.

We will stop more detail if you start an example from the section about the session_name () function (here is the link) in different browsers (for example, in Chrome and Internet Explorer), then in each browser will have its own, unique session identifier. Browsers store cookies each in their folder, so the session_start () function will give each browser to create your own, unique identifier and, accordingly, for each browser will be created a unique storage on the server. Therefore, an example with a meter (this) in each browser will work independently of each other.

If you specify the same session identifier for all users, they will work with one repository on the server. Here is an example of a counter that will consider visits from different browsers:

100) (session_unset (); session_destroy ();)?\u003e Sessions in php.

Counter number 2.

Opened the page in different browsers time.

Open an example in "\u003e this tab.

If you run this example, it is not a fact that you will see a unit there. Other visitors could already change the values \u200b\u200bin the session storage on the server. When in this case, the server deletes the repository - I do not know, so when the meter is exceeded, the value of 100 will complete the session.

Setting the waiting time

By default, the session "lives" until the visitor closes the browser window. This is due to the fact that the session_start () function lies with the client such a cookie.

The lifetime of the session can be changed using the session_set_cookie_params () function, here is its syntax.

session_set_cookie_params (int lifetime [, String Path [, String Domain [, Bool Secure]]]))

In practice, it is enough to use only the first parameter (Lifetime), write down the time in seconds, which determine how many server must remember the session's status after the browser is closed.

The SESSION_SET_COOKIE_PARAMS () function is applied only for the script period.

Here is an example of using this feature:

Sessions in php.

Counter number 3.

Counter value:.

Open meter in "\u003e this tab.

Screw the counter and close the browser, after 30 Sukund again, open this example. Your session will continue.

The web server does not support a permanent connection with the client, and each request is processed as new, without any connection with the previous one.
That is, it is impossible to track requests from the same visitor nor save variables between the preview of individual pages. Here, to solve these two tasks, sessions were invented.
Actually, the session, if in a nutshell - this is a mechanism that allows you to unambiguously identify the browser and creating a file for this browser on the server in which the session variables are stored.

I will not paint in detail in such a mechanism. These are such a traveler case, as a shopping cart in the e-store, authorization, as well as not quite trivial problems, such as the protection of interactive parts of the site from spam.

In principle, it is quite easy to make your own analogue of sessions, not as functional as built into PHP, but similar in essence. On cookies and database.
When prompted the script, we see whether Cook came with a certain name. If there are no cookies, then put it and write a new line to the database with the user data. If there is a cook, we read the data from the database. We remove old records from the base from the base and here we are ready for the session mechanism. It is completely easy. But there are some nuances that prefer the use of the embedded mechanism of sessions.

If only the first is enabled, then when the session is started (each time the session_start ()) call, Cook is installed by the client. The browser properly at each request this Cook returns and PHP has a session identifier. Problems begin if the Cook browser does not return. In this case, without receiving cookies with an identifier, PHP will start a new session all the time, and the mechanism will not work.

If only the second is included, then the Cook is not exhibited. And it happens, for what, mostly, actually, it is worth using the built-in session mechanism. After the script does its work, and the page is fully formed, PHP views it all and adds to each link and to each form to transmit the session identifier. It looks like this:
Index turns into
Index
and the forms add a hidden field

And the browser when clicking on any link, or when you click on the button in the form, send us a variable in the query - the session identifier!
For obvious reasons, the identifier is added only to relative links.

Theoretically, in our homemade sessions on cookies and the database with you, you can attribute to all references to the ID - and then our own sessions will work independently of Cook. But, you see - more pleasant when someone else does this work? ;-)

By default, both options are enabled in the latest PHP versions. How does PHP come in this case? Cook is always exhibited. And link links only only if the RNR did not find a cook with a session identifier. When the user in the short time for this session comes to the site, it is made by Cook, and the links are complemented. The next time you request, if cookies are supported, PHP sees Cook and ceases to complement the links. If cookies do not work, then PHP continues to properly add the ID to the links, and the session is not lost.
Users who have cookies will see a long link from the ID only once.

Fuh. With the transfer of the identifier finished.
Now it remains to tie a file with data on the server side.
PHP will do it for us. Just write enough
session_start ();
$ _Session ["Test"] \u003d "Hello World!";

And PHP will write to a file associated with this session, the TEST variable.
Here is a very important remark.
An array $ _session is special.
In it, in fact, there are variables that we go to make accessible in various scripts.
To put a variable in the session, it is enough to assign it an array element $ _session.
To get its value - it is enough to apply to the same item. An example will be slightly lower.

Decaying garbage - deleting outdated PHP files also deals itself. As with the coding of data and a bunch of any other necessary things. As a result of this concern, work with sessions turns out to be very simple.
So we, in fact, come to the example of the work of the sessions.
The example is very small:
session_start ();

echo "You updated this page." $ _ session ["Counter"] ++. "Once.";
echo "
update ";
?>

We check whether we have a Counter variable in the session, if not, then we create it with a value of 0, and then we derive its value and increase the unit. The enlarged value is recorded in the session, and the next time you call the script, the variable will be 1, and so on.
Everything is very simple.

In order to have access to a variable session on any pages of the site, you need to write only one (!) Location at the very beginning of each file in which we need sessions:
session_start ();
And further access the elements of the $ _session array. For example, the authorization check will look something like this:
session_start ();
if ($ _session ["authorized"]<>1) {
header ("location: /auth.php");
exit;
}

Remove variables from the session.
If you have register_globals \u003d off, then you can write
unset ($ _ session ["var"]);
If not, then nearby It is necessary to write with it
session_unregister ("var");

The most common mistakes that give PRP when trying to work with sessions are:
Two of them,
Warning: Cannot Session Cookie - Headers Already Sent
Warning: Cannot Session Session Cache Limiter - Headers Already Sent

caused by the same reason, the solution is described in this fak
Third
Warning: Open (/ TMP \\ SESS_SID, O_RDWR) Failed: No Such File Or Directory (2) in Full_Script_path on Line Number (earlier she looked like Warning: Failed to Write Session Data (Files). Please Verify That The Current Setting of Session.Save_path IS Correct (/ TMP)),
If you translate it from English, explains in detail the problem: the path specified in PHP.ini is unavailable to the directory in which the session files are written. This error fixes the easiest way. Just register the directory that exists and is available for recording, for example,
session.save_path \u003d C: \\ Windows \\ Temp
And do not forget to reboot Apache after that.

As it turns out, the intelligence of human has no limits, and therefore I have to clarify:
A third error message (it is impossible to find a directory) will inevitably lead to the appearance of the first two, since the error message is the output to the browser and after it is impossible to use headers. Therefore, do not rush to seek premature conclusion, and first write the right way!

The next prevalence problem when working with sessions is a heavy legacy register_globals. Do not give the script variables the names that match the indexes of the $ _session array!
When register_globals \u003d on, the values \u200b\u200bwill overwrite each other, and you are confused.
And when register_globals \u003d OFF another error will appear: "Your Script Possibly Relies On a Session Side-Effect Which Existed Until PHP 4.2.3.", In the event that there is a variable session in the script, and the global variable with the same name . To get rid of it, you should always initialize variables before use (or at least check for existence) and not to give global variable names that match the indexes of the $ _session array.

If it does not work, but no messages are displayed, then add two lines to the very beginning of the script that are responsible for the output of all errors on the screen - it is quite possible that there are errors, but you just don't see them.
ini_set ("display_errors", 1);
error_Reporting (E_ALL);

Or see errors in Error_log. In general, the topic of displaying error messages is beyond the scope of this article, so just make sure at least you can see them. Slightly turning about the search for errors can be found in this section.

If you are sure that there are no errors, but the above example does not work anyway, then it is possible that the PHP is not included in the PCL pass through the ul, and cookies for some reason do not work.
See what you have with cookies.
In general, if you "don't work" sessions, first try to transfer the identifier of the session with your hands, that is, make a link and attribute to it identifier:
session_start ();
if (! Isset ($ _ session ["Counter"])) $ _session ["Counter"] \u003d 0;
echo "You updated this page." $ _ session ["Counter"] ++. "Once.

update ";
?>

It should be verified that the session.use_only_cookies directive is not enabled, which prohibits PHP to accept the session identifier if it was transmitted via the URL

If this example does not earn, then the problem is either in banal typos (Half "problems" with sessions comes from an incorrectly written variable name), either in a too old version of PHP: the session support appeared in version 4.0, and the $ _session array - in 4.1 (before that was used $ http_session_vars).
If it works, then the problem is in cookies. Tracking - what a bunch is put by the server to the browser, whether the browser returns it. Search is very helpful, looking through viewing the exchange of HTTP headers between the browser and the server.
The explanation of the principle of work of the Cook goes beyond the scope of this and so too large text, but at least make sure that the server of the Cook with the identifier sends, and the browser returns. And at the same time identifiers coincide with each other \u003d)
Installing cookies should look like
Set-Cookie: PHPSESSID \u003d PRLGDFBVLG5FBSBSHCH6HJ0CQ6;
or how
Set-Cookie: PHPSESSID \u003d PRLGDFBVLG5FBSBSHCH6HJ0CQ6; path \u003d /
(if you request a script not from the root catalog)
Server response should look like
Cookie: PHPSESSID \u003d PRLGDFBVLG5FBSBSHCH6HJ0CQ6
or
Cookie: PHPSESSID \u003d PRLGDFBVLG5FBSBSHCH6HJ0CQ6; B \u003d B.
If the browser returns other cookies, except the session identifier.

If the bouquet browser does not return - check whether cookies work at all.
Make sure the domain to which you appeal is to have a normal name (in which there is at least one point and does not contain prohibited characters, such as underlining) and clean the browser cache - these are two main reasons for Cookies may not work.

If an example works from here, and your own code is not, then the problem is obviously not in sessions, but in the algorithm. Look for where you lost the variable, over the steps endure an example from here, debug your script.

Another problem may occur if you use redirection via Header or navigation using JavaScript.
The fact is that RNR automatically adds the session identifier only to the references of the species
But does not make it for header-s, javascript, meta tags.
Therefore, you need to add the identifier with your hands, for example, as follows:
header ("Location: /Script.php?" Session_name (). "\u003d". session_id ());

Also, very rare, and completely incomprehensible, from where the emerging, the problem is that the session.save_handler setting has a value other than Files. If it is not so - correct.

Safety
Safety sessions - the topic is extensive. Therefore, I will stop at several main points.
The most hosted is not to transmit the identifier through the address bar. This is written even in php.ini, but it limits the functionality of the sessions. If you decide to follow this advice, except session.use_trans_sid \u003d 0 Do not forget to session.use_only_cookies \u003d 1
It is advisable to bind the session to the IP address: in this way, if the identifier is stolen, the villain will still not be able to use them in most cases.
It is recommended to use the session.save_path directive, with which to specify your own directory to save session files. This is more secure than when they are stored in the general temporary directory of the default server.

Additional Information:

  • In addition to Cook, the session mechanism also sends the headers that prohibit pages caching (the same Cache Limiter). For HTML it is correct and necessary. But when you are trying to give a script that verifies authorization, send the file, then the Internet Explorer refuses to download it. It is because of this header. Call
    session_cache_limiter ("Private");
    Before the start of the session should solve the problem.
  • Whatever it seems strange, but in the $ _session array you cannot use numeric indexes - $ _session, $ _session ["10"] - there will be no facilities.
  • Somewhere between versions 4.2 and 5.0, it was impossible to install session.use_trans_sid using ini_set (). Starting with 5.0, you can already again.
  • Prior to version 4.3.3 Cook PHP sent a bunch only if there was no identifier at the session at the request. Now the Cook is sent each time the session_start () call

    Example of authorization using sessions
    We will illustrate everything elected by a small example:
    Create a file auth.php:
    if (ISset ($ _ post ["auth_name"]))
    {
    $ SQL \u003d. "SELECT * from Users WHERE NAME \u003d? S";
    $ row \u003d $ db -\u003e getROW ($ sql, $ _post ["auth_name"]);
    if ($ Row && Password_Verify ($ _post ["auth_pass"], $ row ["pass"])) (
    $ _Session ["user_id"] \u003d $ row ["id"];
    }
    header ("Location: http: //". $ _Server ["http_host"]. $ _Server ["Request_uri"]);
    exit;
    }

    if (ISset ($ _ get ["Action"]) and $ _get ["action"] \u003d\u003d "logout") (
    session_start ();
    session_destroy ();
    header ("Location: http: //". $ _Server ["http_host"]. "/");
    exit;
    }

    if (! isset ($ _ session ["user_id"])) (
    ?>








    exit;
    }

    Now it's enough to write in all protected scripts
    require "auth.php";
    In this example, it is assumed that the session has already started and the connection with the database is created using a class for safe and convenient work with MySQL. It is also assumed that the password is hashized using the recommended function of Password_hash.
    Example of a protected file:

    session_start ();
    include "safemysql.class.php";
    $ db \u003d new safemysql (["db" \u003d\u003e "test"]);
    include "auth.php";
    ?>
    secret.

    logout.

    OPS! Very useful links:
    http://www.php.net/manual/ru/ref.session.php is the latest and latest information on the support of sessions in PHP in official documentation, plus numerous user comments. It is strongly recommended for reading.
    http://phpclub.ru/manrus/f/ref.session.html is a very obsolete translation of this chapter into Russian, from the documentation in the translation of Alexander Pyramidine.
    http://phpclub.ru/detail/article/sessions
    Article with the pathetic title "True on sessions." Dual impression leaves. Initially, the author very affordably talks about the mechanism of sessions, but the methods that he suggests by the end of the article are completely muddy.

    CHRESTOMENT article Dmitry Borodin from the site
    http://php.spb.ru/ is urgent not recommended.
    Guys, she is terribly outdated. It is not enough that there are actual inaccuracies in it, so with sessions in PHP for a long time they simply do not work.
    Thank you so much for her, it was the first article on sessions in Russian, I myself studied on it, but now it is necessary to send it to a well-deserved rest.
    Also, outdated unfortunately, and many other articles lying on the Internet and not renewed by years.

  • Session (from Lat. - Sessio - meeting, English - Session) - This is a period of time covering the user on the Internet from the moment of opening the first and to the last links. It is calculated as the time difference between the initial and final requests. However, the last page can be viewed by the user in different times, from which, therefore, the time measurement between two requests becomes more difficult.

    How is the session with the HTTP and Cookies Protocol

    What such a session can be explained by pushing out from the HTTP protocol. By itself, this protocol does not have a way to preserve the state between two operations. Those., Simply put, opening one page, and then, going from it to another, HTTP will not be able to establish that both requests belong to one user. And here the help of a special tracking method comes to the help - control of sessions (by our sessions).
    From here, answering the question what kind of session, we can say that this is an auxiliary logical object that promotes data transmission between sequential HTTP requests from one user.
    Cookies, like the session, store information about the user during its move on different pages and improve the operation of the protocol. But unlike the second, where data is stored in temporary files on the server, they store them on a user's computer in the form of small fragments.

    For what sessions need

    The use of sessions becomes indispensable when working with such sites as forums, bulletin boards and online stores, because in this case you need to save user data for several pages.

    Stages of the session

    All session can be divided into three stages:

    • opening session (when the user starts working with a specific site),
    • accounting for variable sessions (when moving to various pages),
    • completion of the session.

    Due to the fact that these sessions are stored on a third-party server, it is best not to keep large amounts of information in them, but to use cookies.

      TEXT / HTML 10/19/2017 7:51:00 Vector BCO. 0

      There are 13-15 customers who are sitting on the WS2012 terminal server. The terminal on the virtual is spinning. On a separate DNS, AD and DHCP virtual.

      Question number 1: How to configure the time limit of shutdown when an inactive session?

      In the GPedit.msc computer configuration -\u003e Windows components -\u003e Deleted Work Table Services -\u003e Remote Desktop Session Node -\u003e Restriction of Session Sessions. All parameters there are not specified. And at the same time, with a simple in the area of \u200b\u200b20-30 minutes. All throws away.

      In RuNet, there was a bunch of influe, I did not find anywhere for WS2012, there is only for WS2003

      Question number 2: How to make it so that after disconnecting the session, everything is open from the user - not closed?

      Those. For example, a user should throw out after 20 minutes, while its entire session is killed and when he reappears all its open programs and docks - closed. In fact, when there is a response to Question # 1 I will configure time, but still I would like to never open the user to re-out, after each miscarriage ... I understand that this is related to the life of the session, but still, whether there is a regime when Which session is dying, but its condition is saved? And if - yes, how to configure it?

      Question # 3: Is it possible to limit the rights to turn off the server in WS2012?

      And when users pick up the launch panel tile and there is a "POWER" button, i.e. Any user can mistake the server terminal by mistake and all work gets up.

      Moderator

      TEXT / HTML 10/19/2017 11:30:36 AvkSentyev Sergey. 1

      1 So in the properties of the collection there is a "Session" tab and see what you need to configure .. or what I do not understand?

      2 Looking at how the user closes the session .. If you turn off and configure not to close the disabled Senas, I will remain open programs .. But something seems to me that it is generally not a good idea ... I won heavy terminals rebuting at night constantly to just all This remaining open garbage closed.

      3 If you are not allowed users, then .. this is the default button only to turn off and exit ..

    • TEXT / HTML 10/23/2017 10:51:31 Ivan End Co. 0

      \u003e\u003e How did you configure the terminal server? If you are configured by the RDS role, and until the session is completely closed (with all user programs in this session).

      \u003e\u003e If you are configured RDS role

      I do not know where to see?

      \u003e\u003e In the configuration of the collections there is the lifetime of the session until the time of shutdown

      I do not know where to see?

      \u003e\u003e Do you have users on the server that administrators?

      Yes, admin.

      \u003e\u003e By default, regular users cannot turn off the server. But you can hide this button in politics.

    • TEXT / HTML 23.10.2017 11:00:12 Ivan End Co. 0

      \u003e\u003e So in the properties of the collection there is a "Session" tab and see what you need to configure .. or what I do not understand?

      Perhaps you understood correctly, only I do not know how to do it, on that I am writing here ... For some reason, in RuNet, I can't find a clear instruction for setting up the terminal server, on roles and sessions.

      You wrote in the properties of the collection - where is it?

      \u003e\u003e depending on how the user closes the session .. If you turn off and configure not to close the disabled session, I will stay open programs .. But something seems to me that it is generally not a good idea ... I'm won heavy terminals rebuting at night constantly to just All this remaining open garbage closed.

      I would simply have increased the life of the session, for a start ... I understand perfectly well, what you are talking about, which fossil sessions are not a matter. But it would be just known where exactly is all good configure ...?

      I have no experience in setting up the terminal server (previously worked in it only as a client), although in the IT structure for a long time, but it was not this task for a long time. And the question would not be here to write if I could find a detailed instruction in the internet ...

    • TEXT / HTML 10/23/2017 11:13:30 Vector BCO. 0

      \u003e\u003e How did you configure the terminal server? If you have configured the role of RDS in the configuration of the collections there is a lifetime of the session until it is turned off, and until the session is completely closed (with all user programs in this session).

      Favorite but very strange, for me, the question is how you set up? As I think from questions, it should be clear that I did not set up. Otherwise, it is very difficult to explain what I set up, and now I do not know how to change ... amnesia, etc.

      I was not configured again. And because I didn't do it, then the skills in these settings - obviously lacking. So I ask a question to professionals: how to do it, please tell me?

      \u003e\u003e If you are configured RDS role

      I do not know where to see?

      \u003e\u003e In the configuration of the collections there is the lifetime of the session until the time of shutdown

      I do not know where to see?

      \u003e\u003e Do you have users on the server that administrators?

      Yes, admin.

      \u003e\u003e By default, regular users cannot turn off the server. But you can hide this button in politics.

      How to remove admin rights from users? Is it tune in or elsewhere in the terminal server? How to make a policy with hiding the POWER button?

      Thank you in advance for understanding and waiting for answers ...

      You have a mega progressive tool on the server " Server Manager."It adds to the roles \\ feathers and there they are configured. Read the functionality of this tool. On the left there are settings for some roles (installed). If there is a RDS point - you are in it, and then in the settings of the collection. Google as The terminal server is configured to WS 2012 R2. You can search so Google -\u003e "Terminal Server 2012 R2 Step by Step Guide".

      On the server (and not only on the server) there is also a mega tool which is called Computer Management. (not to be confused with Server Manager) Find it can be adjusted with the right button for the launch.

      In Computer Management, go to the Local Users and Groups further in the group, then in administrators, and see who there and is sitting. Throw out all who do not need these rights. And reboot the server (make sure you have not selected the right, Bo will then get them back).

      How to hide Google -\u003e "Hide Shut Down Button GPO"

      The Opinion Expressed by Me Is Not An Outficial Position of Microsoft

      Moderator

      TEXT / HTML 25.10.2017 7:51:20 Ivan End Co. 0

      \u003e\u003e Guess what you do not know how to manage the server was difficult, as we usually come here at least goose first your question.

      The question is google and not once, wrote above. Only I went to Russian-speaking resources ... There are practically no intelligent articles. About English sources saw that there is, but technical English skills are not so good enough to correctly understand large articles about the system settings from scratch, which previously did not do when.

      >>You can search so Google -\u003e "Terminal Server 2012 R2 Step by Step Guide.Google -\u003e "Hide Shut Down Button GPO

      Google can use how to use the search engine - I do not need. Why not looking for English-speaking sources - wrote above ... If you are told that they do not know how to configure the terminal server, it does not mean that man does not know how to google. But you did not miss the opportunity as 99% of the IT, start with the morals and the teachings of a person google. As for me it has always been and is a problem in understanding people with IT infrastructure. Good Pont is more expensive than money. And not one IT Schnick does not miss this, as practice shows, even in communicating with colleagues, so to speak.

      A question was asked - how to pick up a terminal server? And explained in detail what and where you need to configure ... And you write requests for Google. I asked a man about mathematics, and he began about the weather ... so it turns out. Instead of everything you wrote above, it would be possible to briefly answer Russian and the point. Yes, you tell me what the googling of the question, the solution of which you need, these are more related items. And this is so, but if you read the first post carefully, then your term would not need.

      \u003e\u003e You have a mega progressive tool on the server called "Server Manager".

      Here is a moral tone, more wishing to measure the famous place, in front of a person. It's like prof. The boxer will show a novice how to do knockout, on his face and without preparation ... A very strange method, help a person and answer questions.

      Your shape here in Russian, the question was in Russian, and the answer wants to get in Russian.

      Without morals - and what you did not google? And there is such a trump button Google, etc.

      It is much more productive to work in style: the question is the answer.

      Question: How to set up that? Answer: Come there and do something.

    • TEXT / HTML 25.10.2017 8:25:04 Vector BCO. 0

      On the " question - how to pick up the terminal server"You can respond to 10-15 pages with articles - this is not a forum format. I gave you specific requests to the search engine that will lead you to a guaranteed result. In Russian-language resources, there is also a lot of information on the Russian-language resources, for example on Habré and similar sites, if not found it means to look for You turn out badly.

      In order to give a clear answer, you need to get a clear question. I asked you not moralizingthe question in the first message to which I received an answer in style " that you ask me stupidity, it's still clear that I xs what is happening".

      The Opinion Expressed by Me Is Not An Outficial Position of Microsoft