Fatal error: Cannot redeclare class moodle_recordset in /var/www/moodle/lib/dml/moodle_recordset.php on line 37

Fatal error: Cannot redeclare class moodle_recordset in /var/www/moodle/lib/dml/moodle_recordset.php on line 37

by Maxim Khvorostov -
Number of replies: 1

Greetings!

Currently I'm trying to install Moodle 3.1.9+, and face one problem.

After I select installation language and directory I got this message "Fatal error: Cannot redeclare class moodle_recordset in /var/www/moodle/lib/dml/moodle_recordset.php on line 37"

Server info:

MySQL: 5.5.57-0+deb8u1 - (Debian)

nginx 1.8.0

PHP Version 5.6.30-0+deb8u1

The thing is, that Moodle was installed on this machine before, but as I face few problem with a previous version, I decided to install new-one and start configure it from the very beginning. Moodle 3.1.9 is the highest I can Download and install on this server. I cleared moodle database, deleted moodledate, checked if all folder have the correct access rights. And still got this error. 

Upgrading MySQL or PHP is not an option. because few other resources could be broken. 
What am I missing?  




Average of ratings: -
In reply to Maxim Khvorostov

Re: Fatal error: Cannot redeclare class moodle_recordset in /var/www/moodle/lib/dml/moodle_recordset.php on line 37

by Ken Task -
Picture of Particularly helpful Moodlers

First, don't run what you run ... did some googling, however ... that could be dangerous ... and found a StackOverFlow discussion about Ubuntu:

https://stackoverflow.com/questions/708140/php-fatal-error-cannot-redeclare-class

While the above isn't specific to Moodle, there was one responder in the above discussion that suggested restarting fastcgi.   Since you are running nginx, didn't mention what running for PHP under nginx.

service php-fastcgi restart
Maybe???

The discussion also said that wasn't really a fix as the error might occur again later, but ....

Good luck!

'spirit of sharing', Ken