Page 1 of 1

[SOLVED] 1.8 - session not working?

Posted: Mon Jul 12, 2010 2:33 am
by admsh
i'm trying to install a brand new 1.8 on the rackspace cloud. i'm getting an error right at the beginning, which reads:

Code: Select all

Session not working, you have problem with some modules and functionality! Ask your provider, exiting!
this of course doesn't mean much... here is some system info. i have no problem with 1.7.1:

Code: Select all

Current PHP Version (phpversion): 5.2.13	 
md5 function (md5_function): On	(True)	
GD version (gd_version): 2	 
tempnam function (tempnam_function): On	(True)	
Magic quotes in runtime (magic_quotes_runtime): Off	(False)	
Is E_STRICT disabled in error_reporting (E_STRICT):

PHP Effective Memory Limit (memory_limit): 64M	 
Maximum Execution Time (max_execution_time): 800	 
PHP Safe Mode (safe_mode): Off	(False)	
Session Save Path (session_save_path): /var/lib/php/session	(1733)	
Sessions are allowed to use Cookies (session_use_cookies): On	(True)	
Checking if the httpd process can create a file inside of a directory it created (create_dir_and_file):

PHP register_globals (register_globals): Off	(False)	
PHP output_buffering (output_buffering): On	 
disable_functions in PHP (disable_functions): leak, posix_getpwuid, posix_getpwnam, posix_getgrid, posix_getgrnam, posix_getgroups	 	
PHP Open Basedir (open_basedir): 	 
Test for remote URL (test_remote_url):
	
fsockopen: Connection ok!  
fopen: Connection ok! 
File uploads (file_uploads): On	(True)	
Maximum Post Size (post_max_size): 16M	 
Maximum Upload Size (upload_max_filesize): 10M	 
Basic XML (expat) support (xml_function): On	(True)	
Test file_get_contents (file_get_contents): On	(True)	
Test ini_set (check_ini_set): On	(True)

[SOLVED] Re: 1.8 - session not working?

Posted: Thu Jul 15, 2010 6:39 pm
by admsh
to anyone searching for the solution to this, on the rackspace cloud sessions are saved in a default location with the wrong permissions. one needs to manually set session behaviour in a .htaccess file. here are the instructions, thanks to Ted on the #cms IRC channel:
You can change how your PHP sessions are handled by using a .htaccess file containing the following directives:

Code: Select all

php_value session.gc_probability 1
php_value session.gc_divisor 100
php_value session.gc_maxlifetime 3600
php_value session.save_path /mnt/stor1-wc1-dfw1/123456/www.domain.com/web/sessions
This changes the life time of the session and sets your application to save the session in a place of your choosing.

You will want to change the path of the last line in the example above to use your website's absolute path. Please see this article to locate your website's absolute path.

Your website's absolute path should resemble this:
/mnt/stor1-wc1-dfw1/123456/www.domain.com/web/content


Where should I store my sessions?

We recommend storing your sessions in a directory above the public-facing content directory, such as the web directory. The recommended practice is to login to your FTP and create a sessions directory within your web directory. At this point your session save path should be:
/mnt/stor1-wc1-dfw1/123456/www.domain.com/web/sessions

So the last line in your .htaccess file would resemble the following:

Code: Select all

php_value session.save_path /mnt/stor1-wc1-dfw1/123456/www.domain.com/web/sessions

Re: [SOLVED] 1.8 - session not working?

Posted: Wed Jul 21, 2010 8:18 am
by alby
For info only.
what is strange is that you say that worked with 1.7.1 or was in other system?

Alby

Re: [SOLVED] 1.8 - session not working?

Posted: Tue Aug 03, 2010 3:41 am
by admsh
i had no problem until 1.8 came out. everything was working fine.