Help: Fatal Error: Call To Undefined Function Session_Name()

I keep getting this error message:

Fatal error: Call to undefined function session_name() in /var/www/yii-1.1.14/framework/web/CHttpSession.php on line 197

Whenever I try to access Yii::app()->session or Yii::app()->user.

This is whats written in main.php:

	'session' => array(


   	 	'sessionName' => 'Site Session',


    		'class' => 'CHttpSession',


    		'autoStart' => true,


               ),

If I’m deleting it from main.php I will get 200OK whenever I try to access these properties(user or session).

Please can someone tell me how to fix it, I’m about to loose my mind!

Something is wrong about your php installation.

Check php config. (I’m pretty sure that session support is visible through phpinfo() too)

Where is php config and what am I looking for?

When I tried calling phpinfo() I got this error:

phpinfo(): It is not safe to rely on the system’s timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone ‘UTC’ for now, but please set date.timezone to select your timezone.

Some update in PHP caused this problem. A simple ini_set() for timezone (I don’t remember the exact syntax, Google it) as the beginning of the index.php/bootstrap file will take care of this in you app. If you are calling phpinfo() from a separate file, then add it there too.

From the original post: I have a problem with


'sessionName' => 'Site Session',



it maybe a problem with the space. Change the sessionName to ‘SiteSession’ or ‘Site_Session’ or something without spaces. Not sure if it is the problem, but I have seen stranger stuff.