Turnitin and curl configuration for windows

Turnitin and curl configuration for windows

by Andrew Chapman -
Number of replies: 2
I am trying to get the Turnitin module to work from our windows server running apache, but without much success. I have read the topic at http://moodle.org/mod/forum/discuss.php?d=98199 and believe that the errors I am getting are related to curl not having an up to date certificate list. The thing I cannot figure out is how to fix this. I have read the curl topic at http://curl.haxx.se/docs/sslcerts.html, but can't figure out where any of this configuration is supposed to take place (I attempted to put some curl commands in the apache php.ini file, but only managed to kill Moodle completely).

Are there any windows/apache users out there who have solved this thing? Help!

This is the error generated when I try to submit the Turnitin configuration:

cURL request for "https://api.turnitin.com/api.asp?username=UserTurnitin&uem=turnitin@ourdomain.sa.edu.au&ufn=Pembroke&uln=School&uid=UserTurnitin&utp=2&cid=moodletest_&ctl=moodletest_&fcmd=2&fid=1&dis=1&encrypt=0&diagnostic=0&tem=turnitin@ourdomain.sa.edu.au&upw=&cpw=&ced=&dtdue=&dtstart=&newassign=&newupw=&oid=&pfn=&pln=&ptl=&ptype=&said=&assignid=&assign=&gmtime=20081105231&aid=33056&version=Moodle_19&md5=422e57bac2e6a830ee80ed9811b5e809&;" failed with: SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed (60)
Average of ratings: -
In reply to Andrew Chapman

Re: Turnitin and curl configuration for windows

by Andrew Chapman -
I can add a bit more information:

I have tried adding the following lines to the config.php file in the moodle folder:

$ch = curl_init();
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_exec($ch);

and, alternatively, using the cacert.pem file from the curl site mentioned above:

$ch = curl_init();
curl_setopt($ch, CURLOPT_CAINFO, 'E:/moodlebase/cacert.pem');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
curl_exec($ch);

But both produce the same outcome (in the post above), which seems odd, since the first bunch of commands should disable SSL checking, and the latter enable it. It's as if the commands are actually having no effect at all, yet if I stick an echo command in there, I can see that the config.php is being read. And I have full debugging turned on, but no error messages are being generated when I log onto the Moodle site.
In reply to Andrew Chapman

Re: Turnitin and curl configuration for windows

by Andrew Chapman -
More information:

If I paste the URL specified in the error message into a browser, I get:

<!-- Turnitin API Return Data -->

<returndata>
<rmessage>Successful!</rmessage>
<userid>14783408</userid>
<rcode>11</rcode>
</returndata>

And the user I have specified is created in the Turnitin database. But the save of the Turnitin settings still generates an error.