Fatal error: Call to undefined function: session_name() in /srv/www/htdocs/moodle/lib/setup.php on line 201

Fatal error: Call to undefined function: session_name() in /srv/www/htdocs/moodle/lib/setup.php on line 201

by Derek Harding -
Number of replies: 3
I have tried both 1.4.2 and latest-14 on a SuSE 9.1 installation. The database is present and accessible to the user, I haven't edited files I shouldn't - so why does the error in the subject bar occur in both versions? I have even cleared it all and started again!

Deleting the config.php file and running install.php just led to the same error at line 29 of install.php. The path dirroot is correct.

Here are the only changes I made to config.php (and some unchanged):

$CFG->dbtype = 'mysql';
$CFG->dbhost = 'localhost';
$CFG->dbname = 'moodle';
$CFG->dbuser = '******';
$CFG->dbpass = '******';
$CFG->prefix = 'mdl_';

$CFG->dbpersist = false;

$CFG->wwwroot = 'http://beauxbatons.etsifr.net/moodle';

$CFG->dirroot = '/srv/www/htdocs/moodle';

$CFG->dataroot = '/home/moodledata';

PHP works fine for phpMyAdmin and a couple of other apps, the database works fine for other web-delivered apps and apache2 seems OK.

Thanks in anticipation.

Derek
Average of ratings: -
In reply to Derek Harding

Re: Fatal error: Call to undefined function: session_name() in /srv/www/htdocs/moodle/lib/setup.php on line 201

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
It is just possible that your PHP was built with session support switched off but as the default is for it to be on someone would know! Best bet is to let us have a look at your phpinfo() output if possible.

However, I run Moodle on SuSE 9.1 using the build of PHP that came with it and have had no problems at all. It may just be worth running Yast and doing a search for PHP stuff. Make sure you have all the likely packages installed.
In reply to Howard Miller

Re: Fatal error: Call to undefined function: session_name() in /srv/www/htdocs/moodle/lib/setup.php on line 201

by Derek Harding -
Thanks Howard;

phpinfo showed that Session was not enabled, a spin through the distribution showed that the mod_session was not loaded. Installed that and voila!

smile