Moodle single login ("Incorrect access detected, this server may be accessed only through http://mydomain/moodle")

Moodle single login ("Incorrect access detected, this server may be accessed only through http://mydomain/moodle")

by Rafael Reis -
Number of replies: 1

Hello everyone, i'm new in this forum and i'm having a problem with moodle login integration, i'm trying to login users at moodle at the same time people login at my website. For this i tried to include the config.php from moodle directory and use the authenticate_user_login() and complete_user_login() functions to complete the users authentication, but i got this error when in include the config.php file: "Incorrect access detected, this server may be accessed only through http://mydomain/moodle". Does anyone knows how can i give permissions to other directories acess this file.

Thank you very much!

Average of ratings: -
In reply to Rafael Reis

Re: Moodle single login ("Incorrect access detected, this server may be accessed only through http://mydomain/moodle")

by Rafael Reis -

I also tried to complete the login using curl calling "http://mydomain/moodle/login/index.php" and what happens is that the login is completed but the session expires.