If SAFE MODE is on in PHP, the owner ID of the PHP file needs to be same to any folder or file it tries to access. So if you try to use sessions and if your PHP is configured to use /tmp folder for saving session data it can cause error shown in title of this blog post.
To fix it check following directive is set as follows
session.save_path = /tmp
If yes create folder
/var/lib/php5/session
change owner of the above folder to same as that of the web server, so for e.g. you would say
chown www-data:www-data /var/lib/php5/session
now change /etc/php.ini or /etc/php5/apache2/php.ini
to use following setting
session.save_path = /var/lib/php5/session
now reload web server e.g.
service apache2 reload
or
/etc/init.d/apache reload
This should fix the problem