Moodle 3.1.1+ enabled Web Services but still no joy?
Site is vle.wilberforce.ac.uk (no https at the moment), not even prompted for username and password.
All help appreciated
Thanks
Chris
Hi Chris,
the mobile app performs a request to login/token.php with fake credentials just to validate it's a valid Moodle site. The usual response to this request is:
Status Code 200 OK
{"error":"Invalid login, please try again","stacktrace":"* line 110 of \/login\/token.php: moodle_exception thrown\n","debuginfo":"\nError code: invalidlogin"}
But in your site it's returning the following:
Status Code 500 Internal Server Error
Default exception handler: Invalid login, please try again Debug:
Error code: invalidlogin
* line 208 of \login\token.php: moodle_exception thrown
Have you modified the login/token.php script? Are you using some kind of proxy to authenticate? Also, do you know where is your Moodle hosted?
The request done by the app is the following:
http://vle.wilberforce.ac.uk/login/token.php?username=a&password=b&service=c
Kind regards,
Dani
I've been talking with Dani and your token.php script seems fine, but there is something in your Moodle installation that is making the site to return exceptions in a different format.
Are you sure that you are using a standard Moodle installation? Do you have any plugin installed that could be replacing the default exception handler in Moodle?
I remember a similar issue, see https://moodle.org/mod/forum/discuss.php?d=261992&parent=1137317 in this case, the source code had modifications to when a moodle_exception is thrown a '500 Internal Server Error' status code is returned
Regards, Juan
Hi Juan
Our server was upgraded last week to the latest version of Moodle (3.1.1+ Build: 20160804) by our support company. The only things different to a standard install that I can see on the installed plugins list is the Essential theme, Grade Me plugin, Poll plugin, Progress Bar plugin, Grid Format and some ATTO plugins.
Web server is IIS on Windows 2008 R2 64bit, MySQL, PHP 7.0.9. Authentication is done via NTLM and LDAP onsite and normal form login offsite. URL Rewrite 2.0 is installed.
This is from the log
2017/04/12 15:19:47 [error] 15634#15634: *9028 FastCGI sent in stderr: "PHP message: Debugging: The authentication method db is not configured. in
* line 62 of /auth/db/auth.php: call to debugging()
* line 4301 of /lib/moodlelib.php: call to auth_plugin_db->user_login()
* line 52 of /login/token.php: call to authenticate_user_login()
PHP message: PHP Notice: Undefined property: stdClass::$proxycas in .com/ProductPage/csa/auth/cas/auth.php on line 191
PHP message: PHP Notice: Undefined property: stdClass::$casversion in .com/ProductPage/csa/auth/cas/auth.php on line 194
PHP message: PHP Notice: Undefined property: stdClass::$hostname in .com/ProductPage/csa/auth/cas/auth.php on line 194
PHP message: PHP Notice: Undefined property: stdClass::$port in .com/ProductPage/csa/auth/cas/auth.php on line 194
PHP message: PHP Notice: Undefined property: stdClass::$baseuri in .com/ProductPage/csa/auth/cas/auth.php on line 194" while reading response header from upstream
Hi,
please, check the FAQ: https://docs.moodle.org/32/en/Moodle_Mobile_FAQ#I_can.27t_get_the_app_to_work._What_can_I_do.3F
Maybe you shoul disable the AdoDB logging
Juan