Installation help

 
 
Picture of Joao Ferraz
Error Installing Moodle 2.3
 
I'm trying to install Moodle for the first time and am having this error on the first screen:
 
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /home/rs32853/public_html/moodle/lib/dml/moodle_database.php on line 27

Warning: require_once(__DIR__/database_column_info.php) [function.require-once]: failed to open stream: No such file or directory in /home/rs32853/public_html/moodle/lib/dml/moodle_database.php on line 27

Fatal error: require_once() [function.require]: Failed opening required '__DIR__/database_column_info.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/rs32853/public_html/moodle/lib/dml/moodle_database.php on line 27
 
 
Can anyone help me?
Thanks!

 
Average of ratings: -
Picture of Elroy Chops
Re: Error Installing Moodle 2.3
 

Hi,  I ran into the same problem.  In my case it was due to using an incompatible version of PHP.  Moodle 2.3 requires PHP 5.3.2

 
Average of ratings:Useful (1)
Picture of Joao Ferraz
Re: Error Installing Moodle 2.3
 

My PHP version is 5.2.17

Is there some way to run this version?

Thanks!

 
Average of ratings: -
Picture of Helen Foster
Re: Error Installing Moodle 2.3
Group DevelopersGroup Documentation writersGroup Moodle HQGroup Particularly helpful MoodlersGroup Testers

As Elroy mentions, the minimum PHP version for Moodle 2.3 is 5.3.2. There is no way around this requirement.

 
Average of ratings: -
Picture of Sobirjon Mengliyev
Re: Error Installing Moodle 2.3
 

Hi,

I've got the same problem! My PHP version is 5.2.17 too. If you did progress in solving the problem, please help me too!

Thanks! 

 
Average of ratings: -
Picture of Elroy Chops
Re: Error Installing Moodle 2.3
 

There is no way around this.  Moodle versions 2+ require PHP 5.3.2.  From what I can tell, this is because these versions of moodle are using PHP's MySQL Native Driver which is included in PHP versions from 5.3.

You can either:

1. use moodle 1.9 instead. or,

2. upgrade to PHP 5.3 or above. 

Those of you that are installing on windows, and are using PHP 5.2.17 because that was the last VC6 binary available on php.net, do a web search for PHP vc6, you will find some 3rd party sites have compiled and made available vc6 binaries of php 5.3. (Note, make sure its from a reliable site)

 
Average of ratings: -
Picture of Sobirjon Mengliyev
Re: Error Installing Moodle 2.3
 

thanks a lot! I will try it

 
Average of ratings: -
Picture of Chris Davis
Re: Error Installing Moodle 2.3
 

upgrading to php 5.3.= solved the issue for me. I host with HostGator and currently you can upgrade it from 5.2.17 yourself by adding the following to the top of your .htacess file

# Use PHP 5.3

AddType application/x-httpd-php53 .php

 
Average of ratings:Useful (1)
Picture of zedekiah julius
Re: Error Installing Moodle 2.3
 

Chris D

Tell me more how to do these am newbie,thanx

 
Average of ratings: -
Picture of Cristobal Pino
Re: Error Installing Moodle 2.3
 

Connect via FTP to your public_html folder

look for .htaccess

Download it

create a copy for backup (rename the original)

open it and edit it with a text editor (like notepad , gedit, wordpad, etc)

add the line:

# Use PHP 5.3

AddType application/x-httpd-php53 .php

at the end of the file. save, upload it again

 

This worked for me (thanks Chris). Cheers

 
Average of ratings: -
Picture of Fabianna Molinares
Re: Error Installing Moodle 2.3
 

Cristobal me puedes ayudar? me pasa lo mismo, es primera vez que instalo Moodle, estoy buscando el archivo .htaccess y no lo encuentro.

 
Average of ratings: -
Picture of Rick Jerz
Re: Error Installing Moodle 2.3
Group Particularly helpful Moodlers

It might be that you do not have one.  On my servers (virtual servers) I had to create one myself.  This is not very difficult, just use a text editor.

I am not at expert at these .htacess files, but I understand that they can get very complex.  I think mine is rather simple.  It contains the following 2 lines.  I think that my first line prevents files from being shown if someone types http://domain.com/any_folder, and the second line tells my server which file to show when a user types an invalid URL.

Options -Indexes
ErrorDocument 404 /errors/notfound.html

 
Average of ratings: -
Picture of Leandro Guiraldeli
Re: Error Installing Moodle 2.3
 

Dear Chris Davis,

I didn´t know it could be set the php version inside file .htacess

I use Hostgator too, and my php version wasn´t updated.

This instruction force an upgrade or just by pass?? The actualy version is 5.2.17....

Now, it works fine!!


Thank you very much for your help.

Cheers,
Leandro Guiraldeli
Brazil

 
Average of ratings: -
Picture of Mohan Kumar
Re: Error Installing Moodle 2.3
 

<?php if ( !defined('__DIR__') ) define('__DIR__', dirname(__FILE__)); ?>

 
Average of ratings: -
Picture of Toshendra Sharma
Re: Error Installing Moodle 2.3
 

I am using Moodle 2.4.3+ (Build: 20130425) with PHP 5.4.17 but still having this problem...

Error Log says: PHP Notice:  Use of undefined constant __DIR__ - assumed '__DIR__' 

It was working earlier with same configuration.

 
Average of ratings: -