views:

36

answers:

3

I'm trying to install berta (v 0.6.3b) a cms.

and I get this error. The error seems to happen on line 75 of class.bertasecurity.php (view source code)

What is wrong and how can I fix it?
Thank you so much!

Answer I added this to the class.bertasecurity.php file

session_save_path($_SERVER['DOCUMENT_ROOT'] . '/randomfolder/sessions');
ini_set('session.gc_probability', 1);

noteworthy; I made the sessions folder CHMOD to 775.

A: 

I think the folder containing the session data cannot be accessed by the PHP process.

If you have not touched your php.ini, the default session.save_handler should be files (which means that session data will be stored in a folder on your file system). The value of session.save_path contains that folder, you should check that it exists and its permissions for your php process.

soulmerge
thank you i'll do that now : )
Mohammad
would something like `echo session.save_path;` do it?
Mohammad
These are ini-values (configuration values for the PHP process) You can modify them using `ini_set()`. Have a look at the official explanation (and the links I provided in the answer): http://de.php.net/manual/en/configuration.changes.modes.php
soulmerge
i just checked and the value for `session_save_path()` is`/var/php_sessions/`
Mohammad
so i suppose i don't have write permissions in that folder.
Mohammad
A: 

Sessions are saved on the harddisk of your server. Most likely your session save path does not exist. Try setting it to a directory that does exist or that you have read/write rights to.

Tjirp
A: 

Make sure that session directory is writable or you can set a path yourself with:

session_save_path

This comment is also useful if you are using above function.

Sarfraz
thank you, could you provide more detailed code on how that would be set to an example directory?
Mohammad
@Mohammad: You can visit the link i have provided for comprehensive docs and more useful comments by different people :)
Sarfraz
Thank you, the links you provided solved the problem.
Mohammad
@Mohammad: That is good news :)
Sarfraz
I've also updated the question with the code i used : )
Mohammad