Blank pages for ADMIN after upgrade from 1.9.6 to 1.9.7

Blank pages for ADMIN after upgrade from 1.9.6 to 1.9.7

Travis Rush發表於
Number of replies: 26
I have a few pages that are blank when I'm logged in as an ADMIN.

First of all I have to agree with many that have posted in these forums that the documentation leaves a little to be desired and the only time I've seen any admins responding to questions is if someone finally flips out because they are so frustrated.

However, I am new to Moodle and in the process of providing support to a co-location customer and also attempting to become a Moodle host on the west coast of the U.S., so I'm going to nicely ask for help and see what happens. If we decide to take on Moodle hosting, then I will definitely become very involved in rewriting these poorly written installation instructions with video tutorials and screenshots to help those that are less experienced like myself.

Now, on to my problem...

We installed the lastest and greatest Moodle, 1.9.7 and once the install, which had problems of it's own, was complete, we ran across a very strange problem. If I log in as a general user of the system all is well. As far as I can tell, I can access every page of the system as I should. However, if I log in as an ADMIN I can't access the root "index.php" or "admin/index.php" files. However, if I change it to "admin/user.php" or "course/index.php?categoryedit=on" no problem. Once I'm in the admin everything works perfectly with the exception of the "Notifications" link.

So, that's the best I can do at this point with an explanation. I hope to hear from someone within a reasonable period of time.
評比平均分數: -
In reply to Travis Rush

Re: Blank pages for ADMIN after upgrade from 1.9.6 to 1.9.7

James McLean發表於
I recently ran into the white screen of death issue similar to what you're seeing there, and in my case, I had installed a new module that was calling a non-existant function which will cause a fatal error in PHP, and if you have all error displays turned off or redirected to a log file then you will see the white screen. This is the desired response in a production environment, however in development or testing you will want to see these errors somehow.

Assuming you're not in a production environment the first thing I would try is enabling PHP error display in your php.ini file, and restart Apache (assuming that's your webserver) to make the changes take effect, then try the actions again that previously caused your white screen of death. You should see the exact error on your screen or in your logfile (depending on how the php.ini is configured).

Feel free to post any errors you don't understand and we can try to help. Keep in mind this is a free help resource; while there are plenty of professionals on the forums who are paid to work with/on Moodle, I believe no one here is paid to provide support on the forums so some days (especially weekends) may take longer than others to get a response. Having said that, there are companies that do provide commercial Moodle support which you may be able to look into if you require a quicker (and gaurenteed) response.
In reply to James McLean

Re: Blank pages for ADMIN after upgrade from 1.9.6 to 1.9.7

Travis Rush發表於
Thanks for the quick response James. And yes I can appreciate that the support is free. However, I might also add that that's not an excuse for poor documentation by the Moodle group. At least provide some basic troubleshooting. If a program is going to be built and offered for free with a "General Public License", but then still requires everyone to pay someone to help them use it, then just sell the program with solid documentation in the first place and save everyone the hassle.

Anyway, I'll stop complaining. Thanks for listening.

Okay... so... I'm running IIS and MySQL. I tried configuring PHP.INI to have the following:

error_reporting = E_ALL
;display_errors = "stderr"
display_errors = on
display_startup_errors = Off
log_errors = on
log_errors_max_len = 1024
ignore_repeated_errors = Off
ignore_repeated_source = Off
report_memleaks = On
;report_zend_debug = 0
track_errors = Off
;html_errors = Off
;docref_root = "/phpmanual/"
;docref_ext = .html
;error_prepend_string = ""
;error_append_string = "
"
error_log = "C:\Program Files\PHP\error_logs\"
;error_log = syslog

With this configuration no error logs are being generated. And yes, I restarted IIS, I'm editing the correct INI file and I gave the "error_logs" folder full write permissions for Everyone just in case. And I've tried it both with and without the trailing slash.

Thanks for any further assistance you or anyone else might be able to offer. It doesn't look to me like it's a PHP error. IE gives me a HTTP 500 Error (Page cannot be displayed), which makes me think that IIS is having trouble finding or parsing the index.php page.
In reply to Travis Rush

Re: Blank pages for ADMIN after upgrade from 1.9.6 to 1.9.7

John Langlois發表於
Visit the PHPINFO page in your admin screen and see where php thinks to put the error logs. Something may be overriding what you told it to do.

I don't use IIS anymore because XAMPP was so much better. If I remember IIS correctly, look under your www section and see if you have a parallel universe thing going.
In reply to John Langlois

Re: Blank pages for ADMIN after upgrade from 1.9.6 to 1.9.7

Travis Rush發表於
Thanks John.

I'm not familiar with "parallel universe thing". Can you explain?

Below is the configuration screen from my PHPINFO page...

Configuration

PHP Core

Directive Local Value Master Value
allow_call_time_pass_reference Off Off
allow_url_fopen On On
allow_url_include Off Off
always_populate_raw_post_data Off Off
arg_separator.input & &
arg_separator.output & &
asp_tags Off Off
auto_append_file no value no value
auto_globals_jit On On
auto_prepend_file no value no value
browscap no value no value
default_charset no value no value
default_mimetype text/html text/html
define_syslog_variables Off Off
disable_classes no value no value
disable_functions no value no value
display_errors Off On
display_startup_errors Off Off
doc_root no value no value
docref_ext no value no value
docref_root no value no value
enable_dl On On
error_append_string no value no value
error_log C:\Program Files\PHP\error_logs\ C:\Program Files\PHP\error_logs\
error_prepend_string no value no value
error_reporting 0 6143

expose_php On On
extension_dir C:\Program Files\PHP\ext C:\Program Files\PHP\ext
file_uploads On On
highlight.bg #FFFFFF #FFFFFF
highlight.comment #FF8000 #FF8000
highlight.default #0000BB #0000BB
highlight.html #000000 #000000
highlight.keyword #007700 #007700
highlight.string #DD0000 #DD0000
html_errors On On
ignore_repeated_errors Off Off
ignore_repeated_source Off Off
ignore_user_abort Off Off
implicit_flush Off Off
include_path F:\www\home\default\web\Moodle\server\moodle/lib/pear;.;C:\php5\pear .;C:\php5\pear
log_errors On On
log_errors_max_len 1024 1024
magic_quotes_gpc Off Off
magic_quotes_runtime Off Off
magic_quotes_sybase Off Off
mail.force_extra_parameters no value no value
max_execution_time 30 30
max_input_nesting_level 64 64
max_input_time 60 60
memory_limit 128M 128M
open_basedir no value no value
output_buffering 4096 4096
output_handler no value no value
post_max_size 8M 8M
precision 14 14
realpath_cache_size 16K 16K
realpath_cache_ttl 120 120
register_argc_argv Off Off
register_globals Off Off
register_long_arrays Off Off
report_memleaks On On
report_zend_debug On On
safe_mode Off Off
safe_mode_exec_dir no value no value
safe_mode_gid Off Off
safe_mode_include_dir no value no value
sendmail_from no value no value
sendmail_path no value no value
serialize_precision 100 100
short_open_tag Off Off
SMTP localhost localhost
smtp_port 25 25
sql.safe_mode Off Off
track_errors Off Off
unserialize_callback_func no value no value
upload_max_filesize 2M 2M
upload_tmp_dir C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\php\upload C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\php\upload
user_dir no value no value
variables_order GPCS GPCS
xmlrpc_error_number 0 0
xmlrpc_errors Off Off
y2k_compliance On On
zend.ze1_compatibility_mode Off Off
In reply to Travis Rush

Re: Blank pages for ADMIN after upgrade from 1.9.6 to 1.9.7

James McLean發表於
For the "error_log" PHP directive you need to give it a specific log file in that directory to write to rather than just a directory to write into, because PHP doesn't generate a log file for you.
See http://au.php.net/manual/en/errorfunc.configuration.php#ini.error-log

Don't forget Moodle is open source, code is the best documentation you can get 微笑
In reply to James McLean

Re: Blank pages for ADMIN after upgrade from 1.9.6 to 1.9.7

Travis Rush發表於
Thanks for the info the php error logs.

The error log says:
[09-Dec-2009 12:23:46] PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files\PHP\ext\php_exif.dll' - The specified module could not be found.

in Unknown on line 0

However, 'C:\Program Files\PHP\ext\php_exif.dll' does exist, I see it. I've attached a screenshot of the folder to show that it does in fact exist.

I also then just commented out that item in the PHPINI, restarted IIS and then proceeded to the site. Again, only when logged in as an admin, all index.php pages are blank and no errors are being reported in the PHP error logs any more.

Any more suggestions?
附件 php_error.jpg
In reply to Travis Rush

Re: Blank pages for ADMIN after upgrade from 1.9.6 to 1.9.7

James McLean發表於
A missing PHP module like that will not have caused the issues you have seen (unless it was directly required, and in this case it isn't). It may not have loaded because it is possible it was missing another library on the system.

As for the white screen of death issue it's possible that you could have a setting in your config.php or defined in your Moodle configuration that is overwriting the error log and level settings you have defined in your php.ini.

In Moodle, Check in 'Administration -> Server -> Debugging' and see what your setting are set to. Enable Developer debugging, but keep in mind users may see these error messages if you do this on a production machine.

You can also try these settings in your config.php file:

ini_set ('display_errors', 'On');
ini_set ('log_errors', 'on');
ini_set ('display_startup_errors', 'on');
ini_set ('error_reporting', E_ALL);
ini_set ('error_log', '/path/to/your/error/log/php_error.log');
$CFG->debug = DEBUG_DEVELOPER;
$CFG->debugdisplay = TRUE;

anywhere after the setup.php file is included. It will overwrite some of the configuration set in Moodle. Update the path to error_log and make sure you remove these settings when you're done.

I still believe an issue with a broken Moodle block or module may be causing your white screen of death issue, and that the error level setting may still be getting in the way of viewing those errors.
In reply to James McLean

Re: Blank pages for ADMIN after upgrade from 1.9.6 to 1.9.7

Travis Rush發表於
Well... I tried this and it showed me that a mod was outdated and the upgrade didn't like it. So I removed it and then removed this logging information. I restarted IIS and then returned to the site and now I can't get to anything. I get the following screen and no error logs are being generated even though I tried putting your code above back into the config file.

Any more ideas?
附件 moodle_error.jpg
In reply to Travis Rush

Re: Blank pages for ADMIN after upgrade from 1.9.6 to 1.9.7

Travis Rush發表於
Okay now I logged out as an admin and logged back in as a user and I get a php_error.log. It says:

[16-Dec-2009 19:25:01] PHP Notice: MagpieRSS [debug] MagpieRSS: Cache HIT in F:\www\home\default\web\Moodle\server\moodle\lib\magpie\rss_fetch.inc on line 254

And I get the same error on the screen as above, but the error is different.

Anyone???
附件 moodle_error_user.jpg
In reply to Travis Rush

Re: Blank pages for ADMIN after upgrade from 1.9.6 to 1.9.7

James McLean發表於
Which module did you remove that was causing it to fail previously?

To me in this instance it sounds like it's trying to fetch some RSS feeds, and perhaps either failing or not parsing the XML it downloads.

Have you tried temporarily disabling any RSS feed reading?

Those errors are foreign to me, I have never seen them before. Can you perhaps try in Firefox or IE also and see if that gives a more descriptive error message?
In reply to James McLean

Re: Blank pages for ADMIN after upgrade from 1.9.6 to 1.9.7

Travis Rush發表於
Thanks James. Okay in Firefox it explains a little bit more. The culprit seems to be sloppy programming by someone.

XML Parsing Error: not well-formed
Location: http://moodle.jeffersonbaptistchurch.org/index.php
Line Number 13, Column 136: YAHOO.util.Connect.asyncRequest('GET','http://moodle.jeffersonbaptistchurch.org/login/environment.php?sesskey=NmJd5LDASD&flashversion='+flashversion.major+'.'+flashversion.minor+'.'+flashversion.release);


And yes to get past the original white screen of death the "Assignments" module had to be removed. It's apparently not compatible with this new version of Moodle. Also, the "Workshop" module doesn't work either and the link to download it is broken in the modules area of the moodle site and the guy who built it doesn't seem to be responding to anyone's posts.

Thanks again James. You've been a huge help up to this point and it is appreciated.
In reply to Travis Rush

Re: Blank pages for ADMIN after upgrade from 1.9.6 to 1.9.7

Mauno Korpelainen發表於

Travis,

I don't think those guys have written bad code...

You should probably turn the level of debugging to ALL instead of DEVELOPER for example with

$CFG->debug = DEBUG_ALL;

Developer debugging itself breaks some things on pages, particularly on IE because IE can't handle XML.

Starting from the first errors I suspect that the whole process might have started from one single missing or corrupted file when you upgraded and in such cases it is usually easiest to re-upload all files. In all cases it's good to test upgrading first with local PC etc, have backups for cases where something goes wrong and if something really goes wrong changes can be reverted.

With fresh (original and unedited) files and default settings it is easier to find possible typo errors (some ';' missing or extra somewhere...in php.ini, config.php etc)

And if only particular pages are blank for particular user (admin) it is good to start from docs http://docs.moodle.org/en/Installation_FAQ#Why_is_a_particular_page_blank_or_incomplete.3F

and start checking each page separately (+settings of php for memory, timeout etc)

評比平均分數:Useful (1)
In reply to Mauno Korpelainen

Re: Blank pages for ADMIN after upgrade from 1.9.6 to 1.9.7

Mauno Korpelainen發表於

For example large sites may need more than 128M value in php.ini for memory_limit although recommended value in docs is about 40M.

Upgrading needs some extra resources (memory) and even if low value might be otherwise enough blank pages may occur when administrators use "heavy tools".

In any case you should be able to either press Notifications link or visit http://yoursite/admin/index.php successfully to be sure that upgrading has finished setting up new data for database and in this case you may need to temporarely change permissions of config.php (make it temporarely writable) to allow moodle to add new settings for salting passwords.

Debugging can be set to none as well for now (taken away from config.php) - try to download and upload the latest package again, check settings of php.ini and if you change them restart your server, go to your site, login as admin and try to visit again http://yoursite/admin/index.php

In reply to Mauno Korpelainen

Re: Blank pages for ADMIN after upgrade from 1.9.6 to 1.9.7

emerson loustau發表於
I've been following along because I'm having the exact same white screen of death issue...

The only difference is that I am trying a new installation on a host server (Namecheap). I had to do some tinkering with php.ini to get the install to finish, but afterwards I get the white screen of death! I can't get any moodle pages to load. Nothin!

Also, I get no errors in my error_log. So I'm a little stumped. Could anyone answer two sidenote questions, as we're troubleshooting this issue?

Question 1: Besides setting up error reporting in the config.php, and php.ini is there something else I must do to find the errors?

Question 2: There was mention of deleting certain problematic modules. Does this need to happen before or after running the install script? I've deleted them since getting the white screen of death (henceforth WSD), and I still get the WSD.

ps: Go team!
In reply to emerson loustau

Re: Blank pages for ADMIN after upgrade from 1.9.6 to 1.9.7

Mauno Korpelainen發表於

Does it happen to admin only or for all pages?

There are several possible reasons for blank pages starting from

http://docs.moodle.org/en/Installation_FAQ#Why_are_all_my_pages_blank.3F

(usually wrong $CFG->dirroot)

http://docs.moodle.org/en/PHP_settings_by_Moodle_version

but if this happens to admin only it might be a new bug in the latest version of moodle 1.9.7+

Answer 2: - no - there are definitely not problematic modules in core moodle - those previous errors are probably caused by something else and debugging should be set to ALL - mode DEVELOPER is suitable only for developer use, it breaks some normal html using xml...

In reply to Mauno Korpelainen

Re: Blank pages for ADMIN after upgrade from 1.9.6 to 1.9.7

Travis Rush發表於
Okay I switched to DEBUG_ALL and the error is still the same...

XML Parsing Error: not well-formed
Location: http://moodle.jeffersonbaptistchurch.org/index.php
Line Number 13, Column 136: YAHOO.util.Connect.asyncRequest('GET','http://moodle.jeffersonbaptistchurch.org/login/environment.php?sesskey=nkXUgvIp9R&flashversion='+flashversion.major+'.'+flashversion.minor+'.'+flashversion.release);
---------------------------------------------------------------------------------------------------------------------------------------^
In reply to Travis Rush

Re: Blank pages for ADMIN after upgrade from 1.9.6 to 1.9.7

Mauno Korpelainen發表於

In firefox your site is still using DEVELOPER debugging and shows XML in source:

<?xml version='1.0' encoding='utf-8'?> <!-- DEBUG: Content-Type: application/xhtml+xml -->
and so on.

Or did you edit wrong config.php?

You could as well delete the lines from config.php and set debugging mode from administration menu (Debugging) to ALL that shows normal XHTML and all necessary error messages.

And did you re-upload the files of moodle 1.9.7+ package & refresh your browser?

In reply to Travis Rush

Re: Blank pages for ADMIN after upgrade from 1.9.6 to 1.9.7

Mauno Korpelainen發表於
Administration > Server > Debugging > Debug messages > XML strict headers

should usually be disabled or you could use in config.php

$CFG->xmlstrictheaders = FALSE;

If you are sure that config.php is the only file that you have edited and no files of moodle package are missing... what text editor did you use in editing config.php and have you checked that config.php is saved using ANSI coding (in save as option)?
評比平均分數:Useful (2)
In reply to Mauno Korpelainen

Re: Blank pages for ADMIN after upgrade from 1.9.6 to 1.9.7

Travis Rush發表於
YOU ARE THE MAN MAUNO!!!!!!!!!!!!

Adding that line to the config.php fixed it.

So, how can I figure out why this was happening. We obviously have just bypassed the problem by turning some of the XML parsing off. Correct?

I'm not comfortable that the problem isn't actually fixed. Thanks so much for the help.
In reply to Travis Rush

Re: Blank pages for ADMIN after upgrade from 1.9.6 to 1.9.7

Mauno Korpelainen發表於
Some settings might still need checking...have you tested Notifications yet...but


You'll Find Your Way

- “You don't get paid for the hour. You get paid for the value you bring to the hour.”
- “Success is doing ordinary things extraordinarily well.”

(Jim Rohn)

I really like Your song. wink

In reply to Mauno Korpelainen

Re: Blank pages for ADMIN after upgrade from 1.9.6 to 1.9.7

Travis Rush發表於
That's funny you found that.

Appreciate the help. And I like the quotes.

In reply to Travis Rush

Re: Blank pages for ADMIN after upgrade from 1.9.6 to 1.9.7

Martin Dougiamas發表於
Core developers的相片 Documentation writers的相片 Moodle HQ的相片 Particularly helpful Moodlers的相片 Plugin developers的相片 Testers的相片
The XHTML Strict issue was fixed on December 3.

http://cvs.moodle.org/moodle/lib/weblib.php?r1=1.970.2.153&r2=1.970.2.154

See MDL-20841 for the history.

Note that this problem only occurs when you enable the XHTML Strict debug setting for developers, and should not normally be on for production sites.
In reply to Mauno Korpelainen

Re: Blank pages for ADMIN after upgrade from 1.9.6 to 1.9.7

James McLean發表於
Thanks for that tip re: the debug levels Mauno; I wasn't aware of that and will keep it in mind for the future 微笑
In reply to Travis Rush

Re: Blank pages for ADMIN after upgrade from 1.9.6 to 1.9.7

Luis de Vasconcelos發表於
Particularly helpful Moodlers的相片

If the php_exif.dll file is in the \ext folder then the cause of the "Unable to load dynamic library" error could be that you have the wrong version of php_exif.dll. If you are running the thread-safe version of PHP but you have the non-thread-safe version of php_exif.dll then php won't be able to load the extension and you'll see an error like the one you're getting.

So, check which version of PHP you have (PHPInfo() will help) and then check which version of php_exif.dll you have. Make sure that the thread safety corresponds and also make sure that you have the correct version of php_exif.dll for your version of PHP.

In reply to Travis Rush

Re: Blank pages for ADMIN after upgrade from 1.9.6 to 1.9.7

Travis Rush發表於
HUGE THANK YOU TO Mauno Korpelainen for helping me on this issue. He suggested adding:

$CFG->xmlstrictheaders = FALSE;

to the config.php file.

So, the problem still has yet to be fixed by someone who knows more about the upgrade process of Moodle's core system, but at least I can bypass whatever it is and keep this system up.

Thanks again to Mauno and James and everyone else for all the help and input.

And by the way, I still think that someone needs to do an ethics-check on ClassroomRevolution.com. $400 an hour for telephone support is absurd.

HAPPY HOLIDAYS TO EVERYONE.
In reply to Travis Rush

Re: Blank pages for ADMIN after upgrade from 1.9.6 to 1.9.7

emerson loustau發表於
(Sorry, I accidentally posted this in the $400... discussion.)

For anyone else who is battling the white screen of death, I was able to get an error message by following both of Mauno's suggestions (find them above), which include adding to the config.php file and executing some mySQL commands:

UPDATE mdl_config SET value = 2047 WHERE name = 'debug';
UPDATE mdl_config SET value = 1 WHERE name = 'debugdisplay';

This allowed me for the first time to get an error message instead of a white screen of death:

Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate 71 bytes) in /home/clefr/public_html/emersonloustau.com/moodle/admin/mnet/MethodTable.php on line 77

Without knowing for certain, I took a wild guess at interpreting the error message, and increased the maximum memory in the php.ini file. This allowed the admin screen to appear! (Hooray!) After completing that form, I got another message, and fixed it by removing php.ini in subfolders, and just increasing the maximum memory of the main php.ini file to 100MB (I have no idea why this needs to be so high). After completing all the administrative set-ups, I see the following message on my site root screen:

Notice: Undefined property: stdClass::$frontpage in /home/clefr/public_html/emersonloustau.com/moodle/index.php on line 187

When I click Notifications, I get this:

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 7680 bytes) in /home/clefr/public_html/emersonloustau.com/moodle/blocks/messages/block_messages.php on line 4

Can anyone tell me what is going on? Could it be that I need MORE memory allowed? Perhaps someone could explain for us newbies what dictates this setting.