-
Notifications
You must be signed in to change notification settings - Fork 7
PHP error in callback.php #5
Comments
Hi swbuehler- For the first set of log lines, this implies that something went wrong when trying to auth with the auth server. Are you able to reproduce this error? Can you tell us the full URL you're redirected to (callback.php?...) ? Sometimes there's useful information in the query string. The easiest way to see what's going on is by watching the requests with Fiddler. Some easy things to double check: make sure you've set all the config variables per the instructions under the Set up the sample in the readme -- for both callback.php and index.php. Also note that you must have cURL installed for this code sample to work. For the second notice you posted -- this notice can be safely ignored -- it's not an error, only a warning. To make it go away, change line 222 from: setrawcookie(AUTHCOOKIE, buildQueryString($cookieValues), 0, '/', $_SERVER[SERVER_NAME]); to (notice the quotes around SERVER_NAME) setrawcookie(AUTHCOOKIE, buildQueryString($cookieValues), 0, '/', $_SERVER["SERVER_NAME"]); |
I got authentication to work, and got this back:
When I did one of the submit buttons, I got back:
Nothing. Looks like sign-in worked, but submitting the page gave me back nothing. From: CompMan86 [mailto:[email protected]] Hi swbuehler- For the first set of log lines, this implies that something went wrong when trying to auth with the auth server. Are you able to reproduce this error? Can you tell us the full URL you're redirected to (callback.php?...) ? Sometimes there's useful information in the query string. The easiest way to see what's going on is by watching the requests with Fiddler. Some easy things to double check: make sure you've set all the config variables per the instructions under the Set up the sample https://github.com/OneNoteDev/OneNoteAPISamplePHP#set-up-the-sample in the readme -- for both callback.php and index.php. Also note that you must have cURL installed for this code sample to work. For the second notice you posted -- this notice can be safely ignored -- it's not an error, only a warning. To make it go away, change line 222 from: setrawcookie(AUTHCOOKIE, buildQueryString($cookieValues), 0, '/', $_SERVER[SERVER_NAME]); to (notice the quotes around SERVER_NAME) setrawcookie(AUTHCOOKIE, buildQueryString($cookieValues), 0, '/', $_SERVER["SERVER_NAME"]); — |
Hi Steven, Can you check the title of the page where you see “Something went wrong”. I suspect the authentication request did not succeed, based on what you are seeing. If so, the title of the page will contain more details. A common reason is that the redirect URL in the application’s registration page does not match the URL to reach the callback module on the server on which your application is hosted. Thanks, From: Steven Buehler [mailto:[email protected]] I got authentication to work, and got this back:
When I did one of the submit buttons, I got back:
Nothing. Looks like sign-in worked, but submitting the page gave me back nothing. From: CompMan86 [mailto:[email protected]] Hi swbuehler- For the first set of log lines, this implies that something went wrong when trying to auth with the auth server. Are you able to reproduce this error? Can you tell us the full URL you're redirected to (callback.php?...) ? Sometimes there's useful information in the query string. The easiest way to see what's going on is by watching the requests with Fiddler. Some easy things to double check: make sure you've set all the config variables per the instructions under the Set up the sample https://github.com/OneNoteDev/OneNoteAPISamplePHP#set-up-the-sample in the readme -- for both callback.php and index.php. Also note that you must have cURL installed for this code sample to work. For the second notice you posted -- this notice can be safely ignored -- it's not an error, only a warning. To make it go away, change line 222 from: setrawcookie(AUTHCOOKIE, buildQueryString($cookieValues), 0, '/', $_SERVER[SERVER_NAME]); to (notice the quotes around SERVER_NAME) setrawcookie(AUTHCOOKIE, buildQueryString($cookieValues), 0, '/', $_SERVER["SERVER_NAME"]); — — |
When trying to use the PDF posting button, the post fails, and the PHP log shows the following:
I logged out from Live and back in, and tried the post again, this time getting the following PHP error:
I'm using PHP 5.6.0 on an IIS 8.5 install.
The text was updated successfully, but these errors were encountered: