Moodle

Blank Page when try update or insert a resource or activity

Details

  • Affected Branches:
    MOODLE_18_STABLE
  • Fixed Branches:
    MOODLE_18_STABLE

Description

I updated our Moodle from 1.7+ to 1.8.

Now, when I want to insert or update a resource or activity I only get a blank page.

After enabled debugging level to ALL, I get the following errors:

Update or Insert a label

php[6660]; PHP Warning: require_once(moodleform_mod.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in I:\Geral\Moodle8\mod\label\mod_form.php on line 2.
php[6660]; PHP Fatal error: require_once() [<a href='function.require'>function.require</a>]: Failed opening required 'moodleform_mod.php' (include_path='".') in I:\Geral\Moodle8\mod\label\mod_form.php on line 2.

Update or Insert web page

php[6660]; PHP Warning: require_once(moodleform_mod.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in I:\Geral\Moodle8\mod\resource\mod_form.php on line 2.
php[6660]; PHP Fatal error: require_once() [<a href='function.require'>function.require</a>]: Failed opening required 'moodleform_mod.php' (include_path='".') in I:\Geral\Moodle8\mod\resource\mod_form.php on line 2.

Update ot Insert a Forum

php[6660]; PHP Warning: require_once(moodleform_mod.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in I:\Geral\Moodle8\mod\forum\mod_form.php on line 2.
php[6660]; PHP Fatal error: require_once() [<a href='function.require'>function.require</a>]: Failed opening required 'moodleform_mod.php' (include_path='".') in I:\Geral\Moodle8\mod\forum\mod_form.php on line 2.

Update or Insert a Chat

php[6660]; PHP Warning: require_once(moodleform_mod.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in I:\Geral\Moodle8\mod\chat\mod_form.php on line 2.
php[6660]; PHP Fatal error: require_once() [<a href='function.require'>function.require</a>]: Failed opening required 'moodleform_mod.php' (include_path='".') in I:\Geral\Moodle8\mod\chat\mod_form.php on line 2.

Activity

Hide
Duarte Silvestre added a comment -

I tried many things to solve the problem.

The last one:

  • New MySQL Database;
  • New Moodle folder with the last Moodle version;
  • New Moodle Data folder;
  • New installation from scratch;
  • No data restore.

I did only one thing: Create a new simple course and tried to add a label.

I have exactly the same problem with the same error!!

My server environment: Moodle 1.8 + (2007021503); PHP 5.1.6; Apache 2.2; Windows 2003

I didn't have any problems with this environment with Moodle 1.6 and 1.7.

Only with 1.8....

Show
Duarte Silvestre added a comment - I tried many things to solve the problem. The last one:
  • New MySQL Database;
  • New Moodle folder with the last Moodle version;
  • New Moodle Data folder;
  • New installation from scratch;
  • No data restore.
I did only one thing: Create a new simple course and tried to add a label. I have exactly the same problem with the same error!! My server environment: Moodle 1.8 + (2007021503); PHP 5.1.6; Apache 2.2; Windows 2003 I didn't have any problems with this environment with Moodle 1.6 and 1.7. Only with 1.8....
Hide
Duarte Silvestre added a comment -

The strange path (include_path='".') , come from this line in php.ini:

include_path = ".;c:\pehpe\pear"

If I change this line to include_path = "I:\Geral\MoodleGeral\course;c:\pehpe\pear" then I get the follwoing error:

"php[4016]; PHP Fatal error: require_once() [<a href='function.require'>function.require</a>]: Failed opening required 'moodleform_mod.php' (include_path='"I:\Geral\MoodleGeral\course') in I:\Geral\MoodleGeral\mod\resource\mod_form.php on line 2."

From what I saw in "Installation Problems" and "General Problems" forúns there are other people with the same problem.

Show
Duarte Silvestre added a comment - The strange path (include_path='".') , come from this line in php.ini: include_path = ".;c:\pehpe\pear" If I change this line to include_path = "I:\Geral\MoodleGeral\course;c:\pehpe\pear" then I get the follwoing error: "php[4016]; PHP Fatal error: require_once() [<a href='function.require'>function.require</a>]: Failed opening required 'moodleform_mod.php' (include_path='"I:\Geral\MoodleGeral\course') in I:\Geral\MoodleGeral\mod\resource\mod_form.php on line 2." From what I saw in "Installation Problems" and "General Problems" forúns there are other people with the same problem.
Hide
Duarte Silvestre added a comment -

Hello,

Today I installed a new fresh copy of Moodle 1.8 in a different server (again Windows 2003 + Apache).

This is a small server where I'm doing some tests.

In this server I already run Moodle 1.6 and 1.7 without any problems.

After install Moodle 1.8 I tried to create a resource or activity and everything work fine.

Then I analyzed the php.ini for differences and I found the line include_path = ".;c:\php\pear" commented out.

---> IF I don't comment out this line I GET THE SAME PROBLEM!

A blank page with a URL similar to this: http://www.learning.org/course/modedit.php?add=label&type=&course=2&section=0&return=0 and the same php log error.

Then, for me is really a bug with Moodle 1.8 .

I found more people complaining here http://moodle.org/mod/forum/discuss.php?d=69136

Show
Duarte Silvestre added a comment - Hello, Today I installed a new fresh copy of Moodle 1.8 in a different server (again Windows 2003 + Apache). This is a small server where I'm doing some tests. In this server I already run Moodle 1.6 and 1.7 without any problems. After install Moodle 1.8 I tried to create a resource or activity and everything work fine. Then I analyzed the php.ini for differences and I found the line include_path = ".;c:\php\pear" commented out. ---> IF I don't comment out this line I GET THE SAME PROBLEM! A blank page with a URL similar to this: http://www.learning.org/course/modedit.php?add=label&type=&course=2&section=0&return=0 and the same php log error. Then, for me is really a bug with Moodle 1.8 . I found more people complaining here http://moodle.org/mod/forum/discuss.php?d=69136
Hide
Duarte Silvestre added a comment -

If I open mod/resource/mod_form.php and change at the beginning

require_once ('moodleform_mod.php');

to use path

require_once ($CFG->dirroot.'/course/moodleform_mod.php');

It works for resource module without any error messages.

I also tried the same for chat module without any errors.

Show
Duarte Silvestre added a comment - If I open mod/resource/mod_form.php and change at the beginning require_once ('moodleform_mod.php'); to use path require_once ($CFG->dirroot.'/course/moodleform_mod.php'); It works for resource module without any error messages. I also tried the same for chat module without any errors.
Hide
Duarte Silvestre added a comment -

Thanks to Mauno Korpelainen. See the last 23 messages: http://moodle.org/mod/forum/discuss.php?d=69176#p317144

Show
Duarte Silvestre added a comment - Thanks to Mauno Korpelainen. See the last 23 messages: http://moodle.org/mod/forum/discuss.php?d=69176#p317144
Hide
Duarte Silvestre added a comment -

This is only a problem when we try to add or update resources and activities or affects other things in Moodle 1.8?....

Show
Duarte Silvestre added a comment - This is only a problem when we try to add or update resources and activities or affects other things in Moodle 1.8?....
Hide
Petr Škoda (skodak) added a comment -

I guess it was caused by buggy PHP for Windows. The relative includes should be evaluated relative to the original fine that was opened in browser. If I remember it correctly this problem appeared several times before already.

All mod_form includes should now use absolute paths, thanks for the report.

Show
Petr Škoda (skodak) added a comment - I guess it was caused by buggy PHP for Windows. The relative includes should be evaluated relative to the original fine that was opened in browser. If I remember it correctly this problem appeared several times before already. All mod_form includes should now use absolute paths, thanks for the report.

People

Vote (1)
Watch (3)

Dates

  • Created:
    Updated:
    Resolved: