Saturday, 23 April 2011

Configuration directives to work with the Sessions



Configuration directives to work with the Sessions


*session.auto_start: This directive is used to start the sessions when the request is started. The default value is 0.

*session.save_path: This directive is used to provide the path to save the sessions.

*session.save_handler: This directive is used to provide the location, when you want to save store the sessions in client system.

session.name: This directive is used to provide the name to store the sessions in client system. The default value is pgpsessid

session.use_cookies: This directive is used to, whether use cookies or not to store the sessions. The default value is 1.

session.cookie_lifetime: By using this directive we can change the lifetime of cookie to store the sessions. The default value is 0.

session.gc_maxlifetime : By using this directive we can provide the maximum lifetime to destroy the data of session files with the help of garbage collector.

*garbage collector: garbage collector is a tool used to check the unreferenced objects. The default value is 1440(24 minutes).

$_SERVER: By using this super global variable we can get the information of web server. Like software, server ip address, remote user ip address, server port numbers.

$_SERVER.[SERVER_SOFTWARE] : This element returns the complete information of web server.

$_SERVER[SERVER_NAME]:  By using this element we can get the name of the web server.

$_SERVER[SERVER_ADDR] : By using this element, we can get the ip address of web server.

$_SERVER[SERVER_PORT]: This element holds the port number of web server.

$_SERVER[REMOTE_ADDR] : By using this element we can find out the visitors ip address.

$_SERVER[SERVER_ADMIN] : This element holds the admin name along with the server name.
$_SERVER[SCRIPT_FILENAME]: This element holds the complete path of the executing file.

$_SERVER[REMOTE_PORT] : This element holds the port number of client system.

$_SERVER[SERVER_PROTOCAL] : This elect holds the information of protocol, what
we are using to transform the information.

$_SERVER[QUERY_STRING] : This element holds the information of a query string.

$_SERVER[REQUEST_URI] : This element holds the current file name along with the query string.

$_SERVER[SCRIPT_NAME] & $_SERVER[PHP-SELF] : By using these elements we can get the current script name.

$_ENV : By using this super global variable we can get the environment variable values.

*phpinfo : By using this function we can get the all php.ini configurations directives.

*phpinfo(16) : Returns the all environment variables.

0 comments:

Post a Comment