The Instructure Community will enter a read-only state on November 22, 2025 as we prepare to migrate to our new Community platform in early December.
Read our blog post for more info about this change.
Found this content helpful? Log in or sign up to leave a like!
I configured the template wizard and when I clicked the link to it, the authorization screen displayed. I was able to log in just fine. However, I'm seeing the errors shown near the top of the image below. I understand that this may be a configuration issue, but I have double-checked everything and can't seem to find what is causing the problem. Has anyone else experienced this problem. FYI, I was able to use the wizard to create a front page without any problem.
If you have any suggestions @kenneth_larsen , I would greatly appreciate any help you can provide.
- Elena
Solved! Go to Solution.
Thanks for the help Kenneth. I figured I would post how we fixed our problems just in case someone else runs into the same things.
It turns out everything was setup correctly in Canvas and in the config.php file. We ended up having 2 problems though.
We had a problem in step 3 where you mention if there is a token, controller.php runs a quick API call to make sure the call is valid. I noticed that the $course variable was null after the call. It turns out that the curl_exec function used to make API calls was returning false. I used curl_error after the curl_exec call and it returned the following error: “SSL certificate problem: unable to get local issuer certificate”. I did a little research on the Internet and found this fix: http://jesscoburn.com/archives/2013/06/26/getting-php-curl-to-call-https-urls-on-windows/.
After we implemented the CURL recommendations, we continued to receive the TrivialOauthDataStore.php declaration error but the modules and associated assignments, discussions, etc. were created after I clicked the Add Modules to Course button. This was great but unfortunately, the interface continued to hang on the Adding Modules message. When I viewed what was happening in the console, there was a syntax error related to https://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js and the TrivialOauthDataStore.php message:
I changed the TrivialOauthDataStore.php function declaration to eliminate the declaration warning. When I did, the syntax error went away and the interface quit hanging:
Hi Elena,
This seems to be creeping up in several peoples installations. These errors are connected with the IMS Global authentication process and are typically a configuration issue. Here are two other posts related to this issue. Take a look at the discussions around it. If none of the suggestions offered works. Please ping me again and we will figure out what is going on.
Kennethware 2.0 deployment testing errors
Kennethware 2.0 test deployment - error
As far as successfully creating a front page, that action doesn't require an OAuth token so will work despite the errors.
I looked at everything I could find including Tatiana’s posts and your user guide before I posted originally. I went through everything again. I feel like I have all of the configuration variables setup correctly and the XML. As I said previously, I saw the authorization screen when I first started the template wizard. I used var_dump and echo to see what was happening in the php on subsequent runs. It appears as if the query against the database is finding me when I start the wizard.
I can successfully create a primary template page even though I get undefined variables along the way:
When I try to create just one module using the wizard (no assignments, discussions, or quizzes), it just hangs. I have tried to do this with and without a primary template page and the results are the same.
The way that these tools create pages does not require an OAuth token or use of the API in any way. Canvas is kind enough that if you go to a page that doesn't exist, it will create that page for you. The buttons to create a front page or a template page are simply links to the current course with the desired page name. The issues you are experiencing are due to a configuration error where you are not able to make API calls.
One if the initial things that can cause this problem is that the tools must be loaded from a secure (https) server for the OAuth exchange to take place.
Here is an overview of the OAuth process (as it takes place in this tool):
Your error is happening somewhere in those six steps (specifically steps 4-6). Since almost all of that interaction is a matter of passing your developer credentials to Canvas, that is why that is the primary thing you want to check. The client_id should be a number (around 15 characters long?) and the clientSecret is a random string (around 64 characters in length?). You should have received this information after requesting developer tokens from Canvas. These tokens are connected to the server that you registered when you requested the token and will not work on a different server.
Once you have double/triple checked that you are passing the correct credentials you can move on to troubleshooting the response from Canvas.
To troubleshoot the response, replace the oauth2response.php file with the one that I have attached to this post. I have added some lines to output the responses from Canvas to help you identify if this is working. When it is working, revert to the original.
Once this process is complete, you should have an encrypted OAuth token in your database for the user ID you used to launch the LTI tool. With that token, you should go directly to the index page without needing to authorize again and all of the rest of the errors should disappear.
Thanks for the help Kenneth. I figured I would post how we fixed our problems just in case someone else runs into the same things.
It turns out everything was setup correctly in Canvas and in the config.php file. We ended up having 2 problems though.
We had a problem in step 3 where you mention if there is a token, controller.php runs a quick API call to make sure the call is valid. I noticed that the $course variable was null after the call. It turns out that the curl_exec function used to make API calls was returning false. I used curl_error after the curl_exec call and it returned the following error: “SSL certificate problem: unable to get local issuer certificate”. I did a little research on the Internet and found this fix: http://jesscoburn.com/archives/2013/06/26/getting-php-curl-to-call-https-urls-on-windows/.
After we implemented the CURL recommendations, we continued to receive the TrivialOauthDataStore.php declaration error but the modules and associated assignments, discussions, etc. were created after I clicked the Add Modules to Course button. This was great but unfortunately, the interface continued to hang on the Adding Modules message. When I viewed what was happening in the console, there was a syntax error related to https://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js and the TrivialOauthDataStore.php message:
I changed the TrivialOauthDataStore.php function declaration to eliminate the declaration warning. When I did, the syntax error went away and the interface quit hanging:
HI Elena,
Thanks for the info about how you solved the problem. I was able to use your solution to modify our code to get our instance up and running successfully. I'm not a programmer so it took a bit of trial and error. ![]()
I posted an issue on the github page for Kennethware to hopefully point others in the right direction. I attached the updated PHP file there under the issue that I filed.
TrivialOAuthDataStore.php Function Declaration Errors · Issue #29 · CIDI/kennethware-2.0 · GitHub
Joni
@enorthrup and @millerjm , you two are wonderful. Thank you for sharing what you discovered. Just for clarification, are you both using a PHP server hosted on a Windows environment? It looked like the issue with curl that Elena mentioned was specific to Windows. Our IT department uses Linux servers so that is not one I have encountered.
Hi Kenneth,
My server is ubuntu linux. I can get you specifics about versions/php/etc if you need it. Let me know. ![]()
Joni
Hi Kenneth,
I'm happy to contribute in some small way. I believe you deserve all the thanks though.
To clarify, our PHP server is windows based. @millerjm it sounds like the only problem you were having was the declaration. Is that correct?
Elena
I had two issues to work through:
variable declaration described above as well as not knowing that I needed to install the mcrypt dependencies for php On linux.
i will be reinstalling on a clean production server so I will document the steps and use screenshots And post for others.
That will be great, I work on a server supplied by our IT department that has been around longer than I have, so I am not sure what customizations have been made to it over the years.
Hello @enorthrup & @kenneth_larsen
I have run into a similar issue. Our Kennethware 2.0 deployment is on a Windows 2008 R2 server with Apache 2.4. I've enabled cURL in the PHP.ini file by adding the line:
[curl]
; A default value for the CURLOPT_CAINFO option. This is required to be an
; absolute path.
curl.cainfo = "cacert.pem"
However, I'm still receiving the following error:
I've updated the files TrivialOAuthDataStore.php and oauth2response.php listed in the errors reported at further up in this thread.(oauth2response.php.zip & TrivialOAuthDataStore.php Function Declaration Errors · Issue #29 · CIDI/kennethware-2.0 · GitHub)
Any help with resolving the errors found in lines 62 and 79 for the file /resources/wizard_pages.php would be tremendously appreciated!
Thanks in advance,
Jason
Hey Jason,
The CURL fix (http://jesscoburn.com/archives/2013/06/26/getting-php-curl-to-call-https-urls-on-windows/ ) says that the full path must be provided for the certificates:
"If you’re running PHP version 5.3.7 or later you can edit your PHP.INI file to include: curl.cainfo = “PATH_TO/cacert.pem” Where PATH_TO is your actual path (c:/windows for example)"
Elena
Hello @enorthrup
That was a simple fix! I followed your input and changed the curl.cainfo = “C:/PATH_TO/cacert.pem” and it worked perfectly.
Thank you so much, I really appreciate your assistance!!!
-Jason
You are all great! Thank you so much for all of your help. My server knowledge is extremely limited since our IT department handles all of that and I have just developed based on what I had access to. I means a lot to me that you are willing to chime in with your expertise and experience.
Community helpTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign inTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign in