Blank page without error database module

Blank page without error database module

by Jürg Hoerner -
Number of replies: 3
I have two installation. In both if I like to view the module a blank page appears.

First I thougt it has to do with our update to ssl https for the whole site.

https://www.moodle.alte-kanti-aarau.ch/maksa/mod/data/view.php?id=994

if I change the same to edit
https://www.moodle.alte-kanti-aarau.ch/maksa/mod/data/edit.php?id=994

The page is visible.

I can't find any solution until now.

In quiz and chat it is the the same.



Average of ratings: -
In reply to Jürg Hoerner

Re: Blank page without error database module

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi,

Please could you try turning on debugging temporarily, as suggested in the blank page FAQ in Administration FAQ.
In reply to Helen Foster

Re: Blank page without error database module

by Jürg Hoerner -
Dear Helen thanks. I met you at Heidelberg.

Debugging no errors. But in the server error.log there were a lots of errors -> see below.

But I solved the problem and I hope this code will be added to the core module. smile
I made a lot of tests.

http://tracker.moodle.org/browse/MDL-5374

with this
Wen Hao Chuang added a comment - 12/Feb/10 06:38 AM - edited Here at SFSU we are using Moodle clustering. We have one load balancer running squid, and then 3 application servers behind it. So this https is important to us for squid server. Our solution is actually pretty simple - adding a site setting under the "Site policies" for "Force https" as a checkbox, and it would be up to system administrators to check (or uncheck) this checkbox for the Moodle instance. This has been working fine for us. Here is what you need to do:

(1)
In /admin/settings/security.php

At around line 63 (above // "httpsecurity" settingpage

Add the following line:

$temp->add(new admin_setting_configcheckbox('forcehttps', 'Force https', 'Force the application to always use https://linkext7.gif. If not enabled, the default will be http://linkext7.gif. This is commonly used with Squid server or SSL accelerator', 0));

(2)
In /lib/weblib.php

At around line 297 at the bottom of the function qualified_me(), add:

//squid hack to make it work
if (isset($CFG->forcehttps) && $CFG->forcehttps == true) { $protocol = 'https://'; }
else { $protocol = 'http://'; }

$url_prefix = $protocol.$hostname;
return $url_prefix . me();
}

This added code works on our server moodle 1.9.7+ very well and error before with an ssl https installation.

Before in the error.log from the server:
PHP Fatal error: Class name must be a valid object or a string in

/lib/pagelib.php on line 67, referer: https://www.xxx/moodle/course/view.php?id=239linkext7.gif

blank page quiz database and chat before.


Average of ratings: Useful (1)
In reply to Jürg Hoerner

Re: Blank page without error database module

by Jürg Hoerner -

2)
In /lib/weblib.php

At around line 297 at the bottom of the function qualified_me(), add:

//squid hack to make it work
if (isset($CFG->forcehttps) && $CFG->forcehttps == true) { $protocol = 'https://'; }
else { $protocol = 'http://'; }

$url_prefix = $protocol.$hostname;
return $url_prefix . me();
}

I used this patch again for the update to 1.9.10+. The bold part is old, you may not copy it.