turnitintooltwo/Turnitin Class creation failed

turnitintooltwo/Turnitin Class creation failed

Abu Ali發表於
Number of replies: 10

hi all


i want to congifure turnitintooltwo with moodle 3.0.2. i have downloaded the folder of turnitintool2 and pasted into the mod folder. after this i log in moodle with admin password and clikc on notification to get new updation in database. when i click on module activity and select turnitin assignment 2 then i found this error


turnitintooltwo/Turnitin Class creation failed

Fault Code: Curl Error | File: [dirroot]\mod\turnitintooltwo\sdk\soap.class.php | Line: 342 | Message: SSL certificate problem: unable to get local issuer certificate | Code: 0


please help me and thanks in advance




評比平均分數: -
In reply to Abu Ali

Re: turnitintooltwo/Turnitin Class creation failed

Marcus Green發表於
Core developers的相片 Particularly helpful Moodlers的相片 Plugin developers的相片 Testers的相片

Have you created an account with Turnitin?

In reply to Marcus Green

Re: turnitintooltwo/Turnitin Class creation failed

Abu Ali發表於

Thanks dear Marcus Green for kind reply.

yes i have created already but still problem is same.


thanks dear! 

In reply to Abu Ali

Re: turnitintooltwo/Turnitin Class creation failed

Ken Task發表於
Particularly helpful Moodlers的相片

Qualification for this response: don't run turnitintwo but can Google! ;)

turnitintwo plugin wants to communicate with tunitin site(s) over https via curl.
Your server, however, isn't talking https thus has to use a cacert.pem file that
contains Certificate of Authorities.

The following clipped from responses found in Google search related to the issue.

Download the latest cacert.pem from http://curl.haxx.se/ca/cacert.pem

If curl.cainfo line in php.ini is commented out ... i.e., has a ';' in front of it,
make it active ... remote the ';' and then add the path to the caret.pem file you downloaded.

curl.cainfo=/path/to/downloaded/cacert.pem

To take affect, web service must be restarted.

'spirit of sharing', Ken

In reply to Ken Task

Re: turnitintooltwo/Turnitin Class creation failed

Abu Ali發表於


thanks dear Ken Task


 i have downloaded the latest cacerts.pem file from the internet. now plz tell me where that file i have to put.


thanks for your kind response.

In reply to Abu Ali

Re: turnitintooltwo/Turnitin Class creation failed

Abu Ali發表於

thanks dear Ken Task


 i have downloaded the latest cacerts.pem file from the internet. i have pasted that file in php folder and i have added this line  of code in php.ini at the end.

curl.cainfo=D:\Moodle3.0.1+\server\php\cacert.pem

after it restrart the server.  after login as a admin i want to create an assignment but still error is there with different message.

turnitintooltwo/Turnitin Class creation failed

Fault Code: Curl Error | File: [dirroot]\mod\turnitintooltwo\sdk\soap.class.php | Line: 342 | Message: error setting certificate verify locations: CAfile: D:\Moodle3.0.1+\server\php\cacert.pem CApath: none | Code: 0

please help and thanks in advance.

In reply to Abu Ali

Re: turnitintooltwo/Turnitin Class creation failed

Ken Task發表於
Particularly helpful Moodlers的相片

I don't run Windows.  I don't have nor will I purchase said product.

Am attempting to help you work through it.

Error indicates (from what I can find googling) that it's a permissions error related to the pem file itself OR the path to the .pem file.  Everything in the path to that file needs to allow curl/web service the ability to read the .pem file.

Have checked their web site at https://turnitin.com/ and can find no FAQ/Customer doc, etc. that mentions the issue.    Uhhhh, you could do the same.

Please see/use: https://turnitin.com/help/helpdesk.asp

'spirit of sharing', Ken

In reply to Abu Ali

Re: turnitintooltwo/Turnitin Class creation failed

Ken Task發表於
Particularly helpful Moodlers的相片

Don't run Windows ... but ... would think that file needs to be in a location where curl can find it (which is the setting in php.ini) and in a directory related to web server/moodle code.   And, if you ever backup your Moodle code directory (recommended), you'll want to have that file as long as you run TurnitinTwo.   So ... trying to think 'logcially' here ...

Example:  moodle code is in C:\Inetpub\moodle\

Put the .pem file in C:\Inetpub\moodle\.

The path in the php.ini to the file then would be: C:\inetpub\moodle\cacert.pem

File should be at least readable by all users (I would think).

'spirit of sharing', Ken

In reply to Ken Task

Re: turnitintooltwo/Turnitin Class creation failed

Muhammad Shahzad發表於

thanks dear ken Task

 i did the same as you mentioned above now its working fine. 

thanks to all of you for this help. 

In reply to Ken Task

Re: turnitintooltwo/Turnitin Class creation failed

Rebecca Trynes發表於

You sir, are a legend!

I was having this exact same issue and your steps made it work for me 微笑

Very happy!


Bec