|
|
PHP SessionsNetregistry supports two methods of PHP session handling. - File based session handling. File Based Session HandlingFor File Based session handling, you will be required to change the session save path from /tmp to your home directory. Your home directory is the absolute server path to your hosting space on our servers. Note: To get the full server path to your domain, use the syntax: /clientdata/clients/first-letter-of-your-domain/e.g. domain netregistry.com.au will have a server path: /clientdata/clients/n/e/netregistry.com.au/www/Alternatively you can check the path in the Virtualhost section of TheConsole, in the FTP details section Also, note that by default, session.save_handler is set to "user", this needs to be changed to "files". This needs to be changed in your code. For further information, view: http://au.php.net/manual/en/function.ini-set.php If the session.save_handler is set to "user", you will see an error on the screen, which will look something like this: Fatal error: session_start(): Failed to initialize storage module: user (path: /clientdata/clients/e/x/example.com/www) in /clientdata/clients/e/x/example.com/www/file.php on line XXThis is because you are trying to use "user" mode, rather than "files". The below should be added to your file: ini_set("session.save_handler", "files");Where path_to_temp_dir/ is the full server path mentioned earlier. Database session handlingTo use Database session handling, utilise database session handler instead. To implement database storage, you will need to use session_set_save_handler() For further infrmation regarding PHP commands, please visit www.phpbuilder.com |