I've done a new install of Moodle in my test server.
Everything went well and when I entered http://predator/moodle/ I got http://predator/moodle/install.php, with is normal according to the installation procedures ... but that's the end of the good things. The page was blank.
After looking through the logs I spotted this error:
"Oct 26 02:58:07 predator httpd: PHP Fatal error: Call to undefined function session_name() in /home/httpd/html/moodle/install.php on line 33"
I made sure to enable sessions in PHP setting it to 1 (was 0 by default) but not joy.
Am I missing something? Is there a separate module I should add to my php installation? If so, where do I get it?
I noticed other people seem to have similar problems but so far non of the things they suggested in the logs works for me.
Any help will be appreciated.
Regards,
R.
In reply to R. Alvez
Re: New Install fails with Call to undefined function session_name()
โดย Richard Enison -
RA,
That is a very strange error, because session_name is a built-in php function. The session-handling functions in php are not supposed to require any external library, according to the php manual. They should be available unless you specifically disable them.
I only have a couple of questions:
- What setting were you referring to that you said you set to 1? It wasn't session.auto_start, was it? Because Moodle requires that to be 0. See http://docs.moodle.org/en/Installing_Moodle#Check_PHP_settings.
- What version of php are you running? The session-handling functions were added in version 4.0, and Moodle 1.6 and higher requires at least 4.3.0. Even Moodle 1.4 requires php 4.1.0 (http://docs.moodle.org/en/Installing_Moodle#Requirements).
RLE
In reply to Richard Enison
Re: New Install fails with Call to undefined function session_name()
โดย R. Alvez -
Richard,
Thanks for the reply. I figured it out.
The nature of the problem was that php 5 has sessions enabled by default and the module session.so is loaded automatically. However, I was using an older php.ini in my system which had no reference to the module. It seemed to me evident, after analyzing the code of install.php that the problem was a missing module so after a little research I found the latest version of php.ini (which is saved after an upgrade as php.ini.pacman -- that is in my system --) and now it works.
Thanks again.
Rick