Installing and upgrading help

Login screen does not open

 
Picture of Steve Gregory
Login screen does not open
 

I have migrated an instance to Ubuntu 16.04, php 7.0.22, and moodle 3.4. When I click on the login link on my home page, it is redirected back to my home page without displaying a login page.

DocumentRoot = /var/www/html/moodle

wwwroot = https://my.domain.name

The login link shows https://my.domain.name/login/index.php

I have changed all database references to wwwroot to the current one.

What should I look at next?


 
Average of ratings: -
Picture of Howard Miller
Re: Login screen does not open
Core developersDocumentation writersParticularly helpful MoodlersPlugin developers

Purge you caches (there's a command line script in Moodle to do it). Delete completely the 'cache/' folder in moodledata. 

Failing that, switch on debugging (in config.php - get the lines from config-dist.php), reproduce the problem and check for anything pertinent in the web server error log.

Have you any optional plugins/themes? Are they *deifinitely* 3.4 compatible?

Check for any other software running on the server that may have a configuration incompatible with Moodle - Wordpress is a common one. 

 
Average of ratings: -
Picture of Steve Gregory
Re: Login screen does not open
 

I had already cleared the cache.

When I turned on the debug, i got these three lines.

  • line 677 of /lib/pagelib.php: call to moodle_page->initialise_theme_and_output()
  • line 864 of /lib/pagelib.php: call to moodle_page->magic_get_theme()
  • line 116 of /index.php: call to moodle_page->get_renderer()
Maybe this will shed some light on what is going on. 
 
Average of ratings: -
Picture of Ken Task
Re: Login screen does not open
Particularly helpful Moodlers

It does ... but still a guess ... theme related ... two things to try:

1. manually remove any folders/files in your moodledata/localcache/ ... in there is a theme directory located there and it might have cached stuff from old site.

or

2. edit the config.php file of your site and add a line forcing the usage of a default theme that comes with the version of Moodle you have ... for version 3.4 those are 'boost' which is the default ... or 'clean' or 'more'.

$CFG->theme="clean';

or 'more' ...

No need to restart anything by adding that line to config.php, just crank up browser and hit the site.

Fingers crossed ...

'spirit of sharing', Ken


 
Average of ratings: -
Picture of Steve Gregory
Re: Login screen does not open
 

I'm getting closer. Adding $CFG->'clean'; gives me a listing of courses and the correct banner. The login link still redirects to the home screen instead of a login page.

When I click on one of the displayed courses I get redirected back to the home screen.


 
Average of ratings: -
Picture of Ken Task
Re: Login screen does not open
Particularly helpful Moodlers

Apologize ... typo on what I showed to add ... so double check your entry in config.php

$CFG->theme='clean';

The character that encloses the value must match ... not "...' like I had in the first posting.

So did you also remove all files/folders in moodledata/localcache/

Did you also do/check what Howard suggested?

Did you turn off debugging?

To get to debugging try going directly with browser URL line:

https://yoursite/admin/settings.php?section=debugging

That should prompt you to login and then redirect to the settings page for debugging.

Can you/did you search web server error logs?

'spirit of sharing', Ken

 
Average of ratings: -
Picture of Steve Gregory
Re: Login screen does not open
 

tried https://my.domain/admin/settings.php?section=debugging. Login screen never displayed, instead it went to the home screen. /var/www/html/moodle/login/index.php gets executed, but no login screen. I think something strange is happening in this file.

Error and access logs show nothing out of the ordinary.

 
Average of ratings: -
Picture of Ken Task
Re: Login screen does not open
Particularly helpful Moodlers

So we had turned off debugging and now we need to have debugging back on.

Check our your config-dist.php file Section 7

// 7. SETTINGS FOR DEVELOPMENT SERVERS - not intended for production use!!!

// Force a debugging mode regardless the settings in the site administration
* // @error_reporting(E_ALL | E_STRICT); // NOT FOR PRODUCTION SERVERS!
* // @ini_set('display_errors', '1');    // NOT FOR PRODUCTION SERVERS!
* // $CFG->debug = (E_ALL | E_STRICT);   // === DEBUG_DEVELOPER - NOT FOR PRODUCT$
* // $CFG->debugdisplay = 1;             // NOT FOR PRODUCTION SERVERS!

Copy the line indicated by the * above to config.php file.

Make sure those lines do NOT begin with * or //.

So the first line should look like:

@error_reporting(E_ALL | E_STRICT);

Ditto for the other lines.

No need to restart any service, just open browser, clear cache and cookies of the browser, then attempt to hit your site as if you were going to it for the first time.  Click Login. etc.

Let's see if moodle reports anything.

'spirit of sharing', Ken



 
Average of ratings: -
Picture of Steve Gregory
Re: Login screen does not open
 

Here is the section of the apache access log I got when I turned the debugging back on.


172.31.1.116 - - [11/Dec/2017:13:51:04 -0600] "GET /login/index.php HTTP/1.1" 303 1041 "https://ministrytraining.gcfa.org/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/62.0.3202.94 Chrome/62.0.3202.94 Safari/537.36"

172.31.1.116 - - [11/Dec/2017:13:51:04 -0600] "GET / HTTP/1.1" 200 8917 "https://ministrytraining.gcfa.org/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/62.0.3202.94 Chrome/62.0.3202.94 Safari/537.36"

172.31.1.116 - - [11/Dec/2017:13:51:04 -0600] "GET /theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.css HTTP/1.1" 200 1605 "https://ministrytraining.gcfa.org/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/62.0.3202.94 Chrome/62.0.3202.94 Safari/537.36"

172.31.1.116 - - [11/Dec/2017:13:51:04 -0600] "GET /lib/javascript.php/1511810624/lib/javascript-static.js HTTP/1.1" 200 7498 "https://ministrytraining.gcfa.org/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/62.0.3202.94 Chrome/62.0.3202.94 Safari/537.36"

172.31.1.116 - - [11/Dec/2017:13:51:04 -0600] "GET /theme/styles.php/clean/1511810624_1/all HTTP/1.1" 200 117935 "https://ministrytraining.gcfa.org/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/62.0.3202.94 Chrome/62.0.3202.94 Safari/537.36"

172.31.1.116 - - [11/Dec/2017:13:51:04 -0600] "GET /theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js HTTP/1.1" 200 85405 "https://ministrytraining.gcfa.org/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/62.0.3202.94 Chrome/62.0.3202.94 Safari/537.36"

172.31.1.116 - - [11/Dec/2017:13:51:04 -0600] "GET /lib/javascript.php/1511810624/lib/requirejs/require.min.js HTTP/1.1" 200 7128 "https://ministrytraining.gcfa.org/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/62.0.3202.94 Chrome/62.0.3202.94 Safari/537.36"

172.31.1.116 - - [11/Dec/2017:13:51:04 -0600] "GET /theme/javascript.php/clean/1511810624/footer HTTP/1.1" 200 1144 "https://ministrytraining.gcfa.org/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/62.0.3202.94 Chrome/62.0.3202.94 Safari/537.36"

172.31.1.116 - - [11/Dec/2017:13:51:05 -0600] "GET /theme/image.php/clean/core/1511810624/f/pdf-24 HTTP/1.1" 200 1851 "https://ministrytraining.gcfa.org/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/62.0.3202.94 Chrome/62.0.3202.94 Safari/537.36"

172.31.1.116 - - [11/Dec/2017:13:51:05 -0600] "GET /theme/image.php/clean/core/1511810624/moodlelogo HTTP/1.1" 200 2884 "https://ministrytraining.gcfa.org/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/62.0.3202.94 Chrome/62.0.3202.94 Safari/537.36"

172.31.1.116 - - [11/Dec/2017:13:51:07 -0600] "GET /theme/image.php/clean/core/1511810624/t/collapsed HTTP/1.1" 200 903 "https://ministrytraining.gcfa.org/theme/styles.php/clean/1511810624_1/all" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/62.0.3202.94 Chrome/62.0.3202.94 Safari/537.36"

172.31.1.116 - - [11/Dec/2017:13:51:07 -0600] "GET /pluginfile.php/1/theme_clean/logo/1511810624/TrainingMinistrySiteBanner.jpg HTTP/1.1" 200 43408 "https://ministrytraining.gcfa.org/theme/styles.php/clean/1511810624_1/all" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/62.0.3202.94 Chrome/62.0.3202.94 Safari/537.36"

172.31.1.116 - - [11/Dec/2017:13:51:07 -0600] "GET /theme/yui_combo.php?m/1511810624/core/dock/dock-loader-min.js HTTP/1.1" 200 1341 "https://ministrytraining.gcfa.org/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/62.0.3202.94 Chrome/62.0.3202.94 Safari/537.36"

172.31.1.116 - - [11/Dec/2017:13:51:07 -0600] "GET /lib/requirejs.php/1511810624/core/first.js HTTP/1.1" 200 127068 "https://ministrytraining.gcfa.org/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/62.0.3202.94 Chrome/62.0.3202.94 Safari/537.36"

172.31.1.116 - - [11/Dec/2017:13:51:07 -0600] "GET /theme/yui_combo.php?m/1511810624/core/event/event-min.js&m/1511810624/filter_mathjaxloader/loader/loader-min.js HTTP/1.1" 200 1398 "https://ministrytraining.gcfa.org/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/62.0.3202.94 Chrome/62.0.3202.94 Safari/537.36"

172.31.1.116 - - [11/Dec/2017:13:51:08 -0600] "GET /theme/yui_combo.php?3.17.2/cssbutton/cssbutton-min.css HTTP/1.1" 200 1680 "https://ministrytraining.gcfa.org/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/62.0.3202.94 Chrome/62.0.3202.94 Safari/537.36"

172.31.1.116 - - [11/Dec/2017:13:51:08 -0600] "GET /lib/javascript.php/1511810624/lib/jquery/jquery-3.2.1.min.js HTTP/1.1" 200 30847 "https://ministrytraining.gcfa.org/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/62.0.3202.94 Chrome/62.0.3202.94 Safari/537.36"

172.31.1.116 - - [11/Dec/2017:13:51:08 -0600] "GET /theme/yui_combo.php?m/1511810624/core/widget/widget-focusafterclose-min.js&3.17.2/plugin/plugin-min.js&m/1511810624/core/lockscroll/lockscroll-min.js&m/1511810624/core/notification/notification-dialogue-min.js&m/1511810624/core/tooltip/tooltip-min.js&m/1511810624/core/popuphelp/popuphelp-min.js HTTP/1.1" 200 5930 "https://ministrytraining.gcfa.org/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/62.0.3202.94 Chrome/62.0.3202.94 Safari/537.36"

172.31.1.116 - - [11/Dec/2017:13:51:08 -0600] "GET /theme/image.php/clean/core/1511810624/t/switch_plus HTTP/1.1" 200 997 "https://ministrytraining.gcfa.org/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/62.0.3202.94 Chrome/62.0.3202.94 Safari/537.36"

172.31.1.116 - - [11/Dec/2017:13:51:08 -0600] "GET /theme/image.php/clean/core/1511810624/t/switch_minus HTTP/1.1" 200 970 "https://ministrytraining.gcfa.org/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/62.0.3202.94 Chrome/62.0.3202.94 Safari/537.36"

172.31.1.116 - - [11/Dec/2017:13:51:08 -0600] "GET /theme/yui_combo.php?3.17.2/event-mousewheel/event-mousewheel-min.js&3.17.2/event-resize/event-resize-min.js&3.17.2/event-hover/event-hover-min.js&3.17.2/event-touch/event-touch-min.js&3.17.2/event-move/event-move-min.js&3.17.2/event-flick/event-flick-min.js&3.17.2/event-valuechange/event-valuechange-min.js&3.17.2/event-tap/event-tap-min.js HTTP/1.1" 200 5382 "https://ministrytraining.gcfa.org/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/62.0.3202.94 Chrome/62.0.3202.94 Safari/537.36"

172.31.1.116 - - [11/Dec/2017:13:51:08 -0600] "POST /lib/ajax/service.php?sesskey=EjoSHP2FRU&info=core_fetch_notifications HTTP/1.1" 200 1096 "https://ministrytraining.gcfa.org/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/62.0.3202.94 Chrome/62.0.3202.94 Safari/537.36"

The browse showed no errors.

 
Average of ratings: -
Picture of Ken Task
Re: Login screen does not open
Particularly helpful Moodlers

Thanks, but that's the access log ... not the error log.

Depending upon operating system and configuration of logging on server, there could be a error_log and/or an ssl_error_log.

The url shown in the access log you've shared doesn't show a moodle but something other.

Curl test of host indicates an issue with the SSL certificate.

and a wget test begets:

WARNING: cannot verify yourserver's certificate, issued by 'CN=dnsme':
  Self-signed certificate encountered.
    WARNING: certificate common name 'dnsme' doesn't match requested host name 'yourserver'.

Can't seem to navigate to http(or https)://yoursite/moodle/login/ at all - if that's what you have been reporting, yes ... can confirm that it's not a moodle issue (yet).

Suggest contacting your provider and inquire about the certificate for your server.

'spirit of sharing', Ken


 
Average of ratings: -
Picture of Steve Gregory
Re: Login screen does not open
 

There was nothing in the error log. I did not set up the ssl logs since port 80 is turned off and all traffic will be going through 443.

This server is in a private ip space accessible only by vpn from the outside, which is why you reached something else. The public ip has not been turned on yet. It will be once the instance is working. The ssl certificate is correct and installed properly.

I checked /etc/hosts and everything is correct there.


 
Average of ratings: -
Picture of Steve Gregory
Re: Login screen does not open
 

In digging a little further, I pointed the database and dataroot back to what I used to install moodle. I now get a login screen.

When I point everything back to the data I'm migrating, the login screen does not show up and I get redirected to the home page.

I did clear all caches between trials.

Hopefully this gives a bit more insight into what is going on.


 
Average of ratings: -
Picture of Ken Task
Re: Login screen does not open
Particularly helpful Moodlers

In addition to what Howard has suggested you check, is there a redirect in the config of the default site  related to ssl for your server? ... .htaccess or main config for the default web site to serve out?

'spirit of sharing', Ken


 
Average of ratings: Useful (1)