frumbert / wp2moodle--wordpress-

Wordpress to Moodle pass through authentication plugin (wordpress end)
27 stars 23 forks source link

ShortCode Not working on wordpress. #28

Closed priyank21 closed 7 years ago

priyank21 commented 8 years ago

After Successful installation on WordPress and moodle i am trying to login to moodle by clicking the link. which is generated by Short code. but it is not working as it giving me ERROR 500. i am generating short code as [wp2moodle cohort='11' ]launch the course[/wp2moodle].

frumbert commented 8 years ago

The site http://wp2moodle.coursesuite.ninja/ is running Wordpress 4.5.3; when you are logged on, shortcodes are appearing. Shortcodes are written to the page like this:

[wp2moodle course="course3"]Open course 3[/wp2moodle]

What are you seeing / not seeing? What can you tell me about your deployment environment?

priyank21 commented 8 years ago

Thanks for your quick reply i am running it on same WordPress environment as you are having on http://wp2moodle.coursesuite.ninja/ is Course is your course id. It my be my /auth/wp2moodle/login.php page is not working. because when i tried to load the url without using Encrypted value it gives me a same error. as my login file location is this localhost/auth/wp2moodle/login.php.

priyank21 commented 8 years ago

Sir, as i am working on it. i found that inside my localhost/auth/wp2moodle/login.php page is not found. but it is in directory there.

frumbert commented 8 years ago

Can you provide the phpinfo for that server. If you have a functioning Moodle on the same server, you can access this information under site administration > server > php info

priyank21 commented 8 years ago

Hi thanks for your prompt reply i found the error in my error log file. Error is Fatal error: Cannot redeclare enrol_into_course() (previously declared in /var/www/moodle/auth/wp2moodle/login.php:84) in /var/www/moodle/lib/deprecatedlib.php on line 272 on funtion enrol_into_course($courseid, $userid, $roleid = 5) and on decrypt_string($base64, $key).

frumbert commented 8 years ago

Sure. Know what Moodle you're running and what the phpinfo says about what modules you are running sure would be helpful. You can find this out at site administration >notifications and site administration > server > php info

priyank21 commented 8 years ago

Thanks for your reply i am using Moodle 3.0.5+ (Build: 20160804) Version 2015111605.04 Stable version and my PHP Version 5.5.9-1ubuntu4.19. and thanks for replying me.

frumbert commented 8 years ago

aaaand the particular module list that php info reports that is loaded, that is the "Loaded Modules", and the web server version?

priyank21 commented 8 years ago

My web server is : Apache/2.4.7 (Ubuntu)

frumbert commented 8 years ago

Great. What mcrypt version is loaded by php?

priyank21 commented 8 years ago

My mcrypt Versionis : 2.5.8

frumbert commented 8 years ago

Initially, after setting up the same OS and environment as you have so far specified, I'm not finding the same error. The one in your log Fatal error: Cannot redeclare enrol_into_course() seems to indicate that a file is being included twice, which should not be happening unless there's some other condition in your Moodle. Do you have any other moodle plugins, particularly auth or local plugins, or run a customscripts folder?

mediaformat commented 7 years ago

edit created new issue #35

frumbert commented 7 years ago

Closing due to inactivity and inability to recreate. Try updating, try again ..