Moodle

I can't install Moodle, I tried 1.8+ that I downloaded yesterday..

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.8.8, 1.9.4
  • Fix Version/s: 1.8.9, 1.9.5
  • Component/s: Installation
  • Labels:
    None
  • Environment:
    hosted unix based server. moodle 1.8+ from yesterday may 12th

Description

It won't install.

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /var/www/vhosts/portallanguageservices.com/httpdocs/moodle/lib/environmentlib.php on line 406

Warning: Invalid argument supplied for foreach() in /var/www/vhosts/portallanguageservices.com/httpdocs/moodle/lib/environmentlib.php on line 147
Name Information Report Status
You must solve all the environmental problems (errors) found above before proceeding to install this Moodle version!

when I click on next again I get:

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /var/www/vhosts/portallanguageservices.com/httpdocs/moodle/lib/environmentlib.php on line 406

Moodle logo

Installation install.php

Checking your environment ...

We are checking if the various components of your system meet the system requirements

Warning: Invalid argument supplied for foreach() in /var/www/vhosts/portallanguageservices.com/httpdocs/moodle/lib/environmentlib.php on line 147
Name Information Report Status

subsequent nexts do nothing

Issue Links

Activity

Hide
Todd Lutton added a comment -

I observed same error:

PHP Warning: array_merge() [function.array-merge]: Argument #2 is not an array in C:\moodle\lib\environmentlib.php on line 406 PHP Warning: Invalid argument supplied for foreach() in C:\moodle\lib\environmentlib.php on line 147

Environment:
Win xp pro
IIS 5.1
PHP 5.1.5
MS SQL 2005 Express
Moodle 1.8+

Show
Todd Lutton added a comment - I observed same error: PHP Warning: array_merge() [function.array-merge]: Argument #2 is not an array in C:\moodle\lib\environmentlib.php on line 406 PHP Warning: Invalid argument supplied for foreach() in C:\moodle\lib\environmentlib.php on line 147 Environment: Win xp pro IIS 5.1 PHP 5.1.5 MS SQL 2005 Express Moodle 1.8+
Hide
norberto added a comment -

Hi Guys,
I was having this error with a webhost provider that I accidentally figured out what was happening.
I renamed the admin folder to moodleadmin so it would not conflict with the webhost providers folder.
Well I kept getting this error and I tried everything. Finally realized that it is not php or even the webhost.
I changed the name of the moodleadmin back to admin and suddenly it started working.
Wait till after you've installed moodle completely to go and adjust the name of the admin folder in the config.php file.
Hope this helps.

Show
norberto added a comment - Hi Guys, I was having this error with a webhost provider that I accidentally figured out what was happening. I renamed the admin folder to moodleadmin so it would not conflict with the webhost providers folder. Well I kept getting this error and I tried everything. Finally realized that it is not php or even the webhost. I changed the name of the moodleadmin back to admin and suddenly it started working. Wait till after you've installed moodle completely to go and adjust the name of the admin folder in the config.php file. Hope this helps.
Hide
Larry Crosswell added a comment -

I have the same error running MySQL v. 5. I haven't changed the names of any folders.

Show
Larry Crosswell added a comment - I have the same error running MySQL v. 5. I haven't changed the names of any folders.
Hide
Petr Škoda (skodak) added a comment -

I guess if this was caused by our php code (and not just server configuration) it was fixed long ago
closing, please reopen if you can replicate it in latest 1.9.x

thanks for thereport

Show
Petr Škoda (skodak) added a comment - I guess if this was caused by our php code (and not just server configuration) it was fixed long ago closing, please reopen if you can replicate it in latest 1.9.x thanks for thereport
Hide
Richard L. Enison added a comment -

PS,

This is what I was afraid of. What a gigantic waste of time – almost two years.

I can summarize my comment with one link: http://moodle.org/mod/forum/discuss.php?d=71387. As you can see, I tried to get CJ to give the Tracker # of this issue back in May of 2007 but he steadfastly refused. He didn't even reference his original forum post here, so you never got to see my take on the glitch in the PHP code. And no, it was not fixed long ago.

Replicated in 1.9.x? You bet! Just look at http://moodle.org/mod/forum/discuss.php?d=115803. As I said in that thread, I tried to reopen this issue, but I can't find the link for that. I guess it is because I am not CJ. Well, CJ has flown the coop. So now nobody can reopen it!

Crying shame.

RLE

Show
Richard L. Enison added a comment - PS, This is what I was afraid of. What a gigantic waste of time – almost two years. I can summarize my comment with one link: http://moodle.org/mod/forum/discuss.php?d=71387. As you can see, I tried to get CJ to give the Tracker # of this issue back in May of 2007 but he steadfastly refused. He didn't even reference his original forum post here, so you never got to see my take on the glitch in the PHP code. And no, it was not fixed long ago. Replicated in 1.9.x? You bet! Just look at http://moodle.org/mod/forum/discuss.php?d=115803. As I said in that thread, I tried to reopen this issue, but I can't find the link for that. I guess it is because I am not CJ. Well, CJ has flown the coop. So now nobody can reopen it! Crying shame. RLE
Hide
Iñaki Arenaza added a comment -

Reopening the bug on behalf of Richar L. Enison.

Saludos. Iñaki.

Show
Iñaki Arenaza added a comment - Reopening the bug on behalf of Richar L. Enison. Saludos. Iñaki.
Hide
Petr Škoda (skodak) added a comment -

Please write here exact steps needed to reproduce this problem in latest 1.9.x including PHP.ini file, thanks.

Show
Petr Škoda (skodak) added a comment - Please write here exact steps needed to reproduce this problem in latest 1.9.x including PHP.ini file, thanks.
Hide
Petr Škoda (skodak) added a comment -

I have fixed those error messages, but it DOES not the real problem in environment.xml file.

There are two possibilities:
1/ admin/environment.xml is broken - reinstall it, or better reinstall moodle completely
2/ file $CFG->dataroot/environment/environment.xml is broken - please note the file date first, copy the file somewhere and then delete it

Show
Petr Škoda (skodak) added a comment - I have fixed those error messages, but it DOES not the real problem in environment.xml file. There are two possibilities: 1/ admin/environment.xml is broken - reinstall it, or better reinstall moodle completely 2/ file $CFG->dataroot/environment/environment.xml is broken - please note the file date first, copy the file somewhere and then delete it
Hide
Eloy Lafuente (stronk7) added a comment -

Going to do this (after chat with Petr):

1) Under 1.8 and 1.9: Delete the dataroot env file. That will force to check against admin one.
2) Under 2.0: Refactor environmental stuff to use only admin env file at install/upgrade

Ciao

Show
Eloy Lafuente (stronk7) added a comment - Going to do this (after chat with Petr): 1) Under 1.8 and 1.9: Delete the dataroot env file. That will force to check against admin one. 2) Under 2.0: Refactor environmental stuff to use only admin env file at install/upgrade Ciao
Hide
Eloy Lafuente (stronk7) added a comment -

Step 1) Done. Now both Moodle 1.8 and Moodle 1.9 delete the downloaded dataroot/environment stuff, so checks on upgrade are always performed using release environmental xml info.

Going to fight with HEAD (2) now. Ciao

Show
Eloy Lafuente (stronk7) added a comment - Step 1) Done. Now both Moodle 1.8 and Moodle 1.9 delete the downloaded dataroot/environment stuff, so checks on upgrade are always performed using release environmental xml info. Going to fight with HEAD (2) now. Ciao
Hide
Eloy Lafuente (stronk7) added a comment -

Step 2) done. Now HEAD entry points support one new parameter ($env_select) to specify what xml to use (ENV_SELECT_NEWER, ENV_SELECT_DATAROOT, ENV_SELECT_RELEASE). Tested in web install, web upgrade and admin.

Resolving as fixed. Ciao

PS: When implementing this... I've created MDL-18252 about to improve current environment stuff for 2.0, wrapping current (complex) code into a class.

Show
Eloy Lafuente (stronk7) added a comment - Step 2) done. Now HEAD entry points support one new parameter ($env_select) to specify what xml to use (ENV_SELECT_NEWER, ENV_SELECT_DATAROOT, ENV_SELECT_RELEASE). Tested in web install, web upgrade and admin. Resolving as fixed. Ciao PS: When implementing this... I've created MDL-18252 about to improve current environment stuff for 2.0, wrapping current (complex) code into a class.
Hide
Petr Škoda (skodak) added a comment -

solves the problem with manually borked environemnt.xml file in dataroot, please post here if anybody can reproduce it, but first make sure the dataroot directory is writable

Show
Petr Škoda (skodak) added a comment - solves the problem with manually borked environemnt.xml file in dataroot, please post here if anybody can reproduce it, but first make sure the dataroot directory is writable

Dates

  • Created:
    Updated:
    Resolved: