Issue Details (XML | Word | Printable)

Key: MDL-9696
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Critical Critical
Assignee: Petr Skoda
Reporter: Duarte Silvestre
Votes: 1
Watchers: 3
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

Blank Page when try update or insert a resource or activity

Created: 03/May/07 09:51 PM   Updated: 11/Jun/07 07:33 AM
Return to search
Component/s: Calendar, Chat, Choice, Course, Forum, Journal, Lesson, Quiz, Resource, Survey, Wiki (1.x), Workshop
Affects Version/s: 1.8
Fix Version/s: 1.8.1

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

Participants: Duarte Silvestre and Petr Skoda
Security Level: None
Resolved date: 11/Jun/07
Affected Branches: MOODLE_18_STABLE
Fixed Branches: MOODLE_18_STABLE


 Description  « Hide
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.



 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Duarte Silvestre added a comment - 03/May/07 09:52 PM
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....


Duarte Silvestre added a comment - 03/May/07 09:54 PM
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.


Duarte Silvestre added a comment - 04/May/07 08:24 PM
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


Duarte Silvestre added a comment - 04/May/07 08:38 PM
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.


Duarte Silvestre added a comment - 04/May/07 11:17 PM
Thanks to Mauno Korpelainen. See the last 23 messages: http://moodle.org/mod/forum/discuss.php?d=69176#p317144

Duarte Silvestre added a comment - 04/May/07 11:18 PM
This is only a problem when we try to add or update resources and activities or affects other things in Moodle 1.8?....

Petr Skoda added a comment - 11/Jun/07 07:33 AM
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.