Hi,
me again. I think i found something!
“Problem” is somewhere concering session handling.
In the last release the index.php only had this part:
if(ini_get('session.save_handler') == 'user')
{
@ini_set('session.save_handler', 'files');
@ini_set('session.save_path', '');
}
In the new release the actual session.save_path is being checked.
if(ini_get('session.save_handler') == 'user')
{
@ini_set('session.save_handler', 'files');
@ini_set('session.save_path', '');
}
if(ini_get('session.save_handler') == 'files')
{
if(!is_writable(ini_get('session.save_path')))
{
$sessionPath = PIWIK_USER_PATH . '/tmp/sessions';
@ini_set('session.save_path', $sessionPath);
if(!is_dir($sessionPath))
{
@mkdir($sessionPath, 0755, true);
}
}
}
I tried quoting the whole “if” that checks if the session.save_path is writeable and changes it if not and that lets piwik run again without any error. For now…
So that area looks like this now in my index.php:
if(ini_get('session.save_handler') == 'user')
{
@ini_set('session.save_handler', 'files');
@ini_set('session.save_path', '');
}
/*
if(ini_get('session.save_handler') == 'files')
{
if(!is_writable(ini_get('session.save_path')))
{
$sessionPath = PIWIK_USER_PATH . '/tmp/sessions';
@ini_set('session.save_path', $sessionPath);
if(!is_dir($sessionPath))
{
@mkdir($sessionPath, 0755, true);
}
}
}
*/
The reason why the whole error shows up is, as far as i can tell atm:
The function “is_writable” tries to check the “session.save_path” (which in my case is /var/lib/php5). But the server (php itself, or so) restricts (through the open_basedir) the user to the root folder of the page (httpdocs) and the /tmp folder…
Question is:
Is it really necessary to check if the session.save_path is writeable? It was not done in the old version of piwik (At least nowhere were i looked), so why now?
Hope this helps some people and doesn’t do something bad…style_emoticons/<#EMO_DIR#>/happy.gif o_O
greetz
MaNIaC
[EDIT]
After reading a little throuh the changelog i read that the function to check if save_path is writeable was inserted because of problems if it wasn’t.
So it kind of should be there if the server is really set that way.
But as far as i remember the Server is only set that way if safe_mode is active…normally it should always be writeable (without safe_mode)!
For now i’ll keep that “check” commented.
[/EDIT]