I am the Moodle admin for a training institute. Yesterday, I configured Self Registration & Paypal Registration to out program and saved it. I saved the details and logged-out. Now when I click on Login link, instead of redirecting it to correct login URL which is given below;
It redirects to my website "https://www.mydomain.com/online",
Therefore, I am not able to access the login section. Could anyone advise how can I log in to the admin section in the absence of a login page?
Your help will be highly appreciated.
What's in the /ocen/ directory?
Do you have a WordPress or something else running at /online/?
Do you have a web service redirect setup? .htaccess or in main config file for web service?
In your browser, without trying to login go directly to https://yoursite/moodle/admin/settings.php?section=manageenrols
That's where you'll find PayPal settings link.
Could also turn it off there.
'spirit of sharing', Ken
Thank you very much for your kind response.
OCEN directory just has Moodle in it.
Wordpress runs online on the same domain.
I am not sure about redirect setup, could you please advise what would be the best way to see if Moodle redirection is active or not?
When I tried to go to the link you suggested, it again took me to the same redirected page.
I shall look forward to hearing from you.
In your first posting you said the url to login was site/ocen/moodle/ Is there a config.php file in /ocen/ or is there a moodle directory inside ocen and inside the 'moodle' directory there a config.php file?
Think WordPresses have plugins for redirects ... check WP config.
So I can do no more other than to point you to Apache Docs .... assuming you are running Apache:
rewrites from .htaccess .... the following from a hosting provider that may/may not fit your situation.
In the config of PayPal ... their end ... did you have to enter any 'call back url' that points back to your site?
there is a moodle directory inside ocen and inside the 'moodle' directory there a config.php file
to the best of my knowledge, I have not set-up any redirection, not I entered 'call back URL'.
Is there any way I can log in as the administrator to the login and disable the new plugins what apparently caused the issue?
I really appreciate your time in this regard.
That direct URL was an attempt to get you to the area where one could check setting or disable plugins.
So of that one got re-directed am thinking it has to be outside of Moodle.
Have you checked for .htaccess files present? Have you checked the main httpd.conf (you still haven't said if you are using Apache or not) for any redirect.
Have you checked apache/web service logs (error log) for clues?
Now we've said 'new plugins' ... so what new plugins? PayPal is one we know about ... others?
There is a script in moodlecode/admin/cli/ called cfg.php
ssh into server and su to root ... cd to above.
Then issue: php cfg.php --help
That script appears to have the ability to set/unset
--set=<value> Set the given variable to this value.
--unset Unset the given variable.
If you issue just: php cfg.php that displays all the settings - and am hoping paypal and other plugins show up.
Look for lines related to the plugins to get their names and if possible, try the unset.
'spirit of sharing', Ken
Hi Ken, thanks for your prompt response. I shall try to follow and instruction and see if it works and will update here.
Was the site http and you recently acquired a valid CA and you setup https on that server?
Reason I ask .... many folks do have a re-write rule to force all http:// traffic to https://. On CentOS 7 (sure would be nice to know what OS your machine runs) that redirect rule could be in the main config file for Apache (here again, you've not said what you are running) which is in /etc/httpd/conf/ and called httpd.conf
That setup of rewrite could also be in /etc/httpd/conf.d/ssl.conf - for https
Help yourself ... by providing information to those willing to help. No info ... then it's all guess and eventually those willing to help will tell you that you are on your own! :|
Sent you a PM with my addy and requested information. Please use and provide the info or I'll have end this conversation wishing you luck! :|