{"action":"created","issue":{"url":"https://api.github.com/repos/jmcgettrick/MoodleDirectV2/issues/264","labels_url":"https://api.github.com/repos/jmcgettrick/MoodleDirectV2/issues/264/labels{/name}","comments_url":"https://api.github.com/repos/jmcgettrick/MoodleDirectV2/issues/264/comments","events_url":"https://api.github.com/repos/jmcgettrick/MoodleDirectV2/issues/264/events","html_url":"https://github.com/jmcgettrick/MoodleDirectV2/issues/264","id":58930449,"number":264,"title":"More informing error messages","user":{"login":"DaGhostman","id":2286949,"avatar_url":"https://avatars.githubusercontent.com/u/2286949?v=3","gravatar_id":"","url":"https://api.github.com/users/DaGhostman","html_url":"https://github.com/DaGhostman","followers_url":"https://api.github.com/users/DaGhostman/followers","following_url":"https://api.github.com/users/DaGhostman/following{/other_user}","gists_url":"https://api.github.com/users/DaGhostman/gists{/gist_id}","starred_url":"https://api.github.com/users/DaGhostman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DaGhostman/subscriptions","organizations_url":"https://api.github.com/users/DaGhostman/orgs","repos_url":"https://api.github.com/users/DaGhostman/repos","events_url":"https://api.github.com/users/DaGhostman/events{/privacy}","received_events_url":"https://api.github.com/users/DaGhostman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-25T16:44:31Z","updated_at":"2015-03-09T09:04:47Z","closed_at":null,"body":"A few days ago I was configuring the plugin with Moodle 2.8.x and experienced a big issue, which took me about a day to resolve.\r\n\r\nWhen entering the TII API URL, whenever I clicked the 'Test Turnitin Connection' button, to check if a connection could be made to the URL provided, I was receiving 'Unable to connect, check URL and/or credentials' (Excuse me, if I am mistaken the error message), which doesn't help at all, nor gives any idea on where to start troubleshooting.\r\n\r\nIt turned out, the issue was with my PHP configuration, there was no entry for the [curl.cainfo](http://php.net/manual/en/curl.configuration.php#ini.curl.cainfo).\r\n\r\nSolution 1:\r\n----\r\nIf you could add:\r\n`curl_setopt($ch, CURLOPT_CAINFO, 'path-to-ca-file.crt');`\r\n\r\nIt will fix the issues, but will require adding the [ca-bundle.crt from here](https://github.com/bagder/ca-bundle/) in the plugin directory.\r\n\r\nSolution 2\r\n----\r\nMake the call output more information, which mioght help trouble shoot configuration issues, `curl_error()` output might be helpful. If you are concerned about non-technical users seeing 'strange-voodoo-words' show the curl output if debugging is enabled. \r\n\r\nNOTE: The second solution might work with the error codes in [this comment](http://php.net/manual/en/function.curl-errno.php#103128), the one in question is [60]."},"comment":{"url":"https://api.github.com/repos/jmcgettrick/MoodleDirectV2/issues/comments/77819629","html_url":"https://github.com/jmcgettrick/MoodleDirectV2/issues/264#issuecomment-77819629","issue_url":"https://api.github.com/repos/jmcgettrick/MoodleDirectV2/issues/264","id":77819629,"user":{"login":"jmcgettrick","id":5583704,"avatar_url":"https://avatars.githubusercontent.com/u/5583704?v=3","gravatar_id":"","url":"https://api.github.com/users/jmcgettrick","html_url":"https://github.com/jmcgettrick","followers_url":"https://api.github.com/users/jmcgettrick/followers","following_url":"https://api.github.com/users/jmcgettrick/following{/other_user}","gists_url":"https://api.github.com/users/jmcgettrick/gists{/gist_id}","starred_url":"https://api.github.com/users/jmcgettrick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmcgettrick/subscriptions","organizations_url":"https://api.github.com/users/jmcgettrick/orgs","repos_url":"https://api.github.com/users/jmcgettrick/repos","events_url":"https://api.github.com/users/jmcgettrick/events{/privacy}","received_events_url":"https://api.github.com/users/jmcgettrick/received_events","type":"User","site_admin":false},"created_at":"2015-03-09T09:04:47Z","updated_at":"2015-03-09T09:04:47Z","body":"Hi, we'll look into this."}}