-
Notifications
You must be signed in to change notification settings - Fork 7
submit.php returning blank page #3
Comments
OK, the blank page was due to a syntax error, which I fixed, so now I'm just getting this:
|
Are you still posting once? Sent from my Windows Phone From: Steven Buehlermailto:[email protected] OK, the blank page was due to a syntax error, which I fixed, so now I'm just getting this: OneNote Service API Result Something went wrong... Response <- Go back — |
I'm trying to run the routine once for each PDF file in the directory. It worked when I had it on the Mac, but when I set it up on IIS on my Windows 8.1 machine I'm getting this response again. Sent from Windows Mail |
Can you check the title of the page where you see "Something went wrong" ? Is there an informative message that explains what went wrong ? |
I ran it thru Fiddler and what you saw was what I got. No explanation. The relevant stuff (I know I'm giving away my 'secret' here; I can change that once this issue is resolved). index.php:
callback.php:
I have the following set up for the app: API Settings Mobile or desktop client app: Client ID: I have stevenbuehler.noip.me mapped to 127.0.0.1 in /etc/hosts and in the hosts file in Windows. |
Is the URL to your server (and the callback module relative path) reachable by just using the hostname from an external computer ? This is because the authentication process will try to do that in order to invoke the callback module. From: Steven Buehler [mailto:[email protected]] I ran it thru Fiddler and what you saw was what I got. No explanation. The relevant stuff (I know I'm giving away my 'secret' here; I can change that once this issue is resolved). index.php:
submit.php: // Update the following values define('CLIENTID', '0000000040137EAE'); define('CLIENTSECRET', 'XRzi0ttrCwGll4s3yRLy7SWytmjHlE9X'); // Make sure this is identical to the redirect_uri parameter passed in WL.init() call. define('CALLBACK', 'http://stevenbuehler.noip.me/OneNote/callback.php'); I have the following set up for the app: API Settings Mobile or desktop client app: Client ID: I have stevenbuehler.noip.me mapped to 127.0.0.1 in /etc/hosts and in the hosts file in Windows. — |
I never had to do that when it was on the Mac. I opened the port in the router and tried again. Same result:
|
Hi Steven, One last point to check on, can you check on what the line ending convention of your PHP files is ? I’d recommend using CR LF (the one that applies to Windows). Thanks, Manoj From: Steven Buehler [mailto:[email protected]] I never had to do that when it was on the Mac. I opened the port in the router and tried again. Same result: <- Go back<index.php> — |
I knew about the CRLF issue (in fact I was the one who suggested that note be included in the readme). |
Hi Steven, This means that the response to the request is neither a Success (201) nor an Auth issue (401). Unfortunately, I now need to know what response code is being received. Could you make a change to increase the verbosity of the error by printing out the response code in the submit.php module : We wish to change echo ' Something went wrong...';TO echo ' Something went wrong and the response code is : ' . $info['http_code'] . '';Thanks, Manoj From: Steven Buehler [mailto:[email protected]] I knew about the CRLF issue (in fact I was the one who suggested that note be included in the readme). — |
I posted my file versions at http://1drv.ms/122YRwP; maybe someone can tell me what's wrong. |
I’m looking and there isn’t anything obvious I can find. Could you share the response code you are seeing (either using Fiddler or by adding to the echo) ? From: Steven Buehler [mailto:[email protected]] I posted my file versions at http://1drv.ms/122YRwP; maybe someone can tell me what's wrong. — |
I actually cannot find any requests with your application’s identifier on our server’s logs. I am suspecting your requests are not reaching the API server, which could be due to multiple reasons. Do you have a firewall / similar service enabled that could be blocking requests from going out ? The response code should also answer if this is the case. From: Manoj Chandwani I’m looking and there isn’t anything obvious I can find. Could you share the response code you are seeing (either using Fiddler or by adding to the echo) ? From: Steven Buehler [mailto:[email protected]] I posted my file versions at http://1drv.ms/122YRwP; maybe someone can tell me what's wrong. — |
I pushed the files up to http://stevenwb.azurewebsites.net/onenote and changed the callback URL in the application settings; still the same result (HTTP return code 0). |
I finally got it working properly on OS X’s default web server without issue, so it must something on my Windows machine’s IIS that’s creating a choke somewhere. I now know my code works, at least. :-) SB= |
Great to hear that. I was pretty sure it must be a firewall or a similar agent that was blocking your requests from going out on the IIS. Hopefully that unblocks you for the time being ☺ Could you check Windows Firewall / an antivirus installation if enabled/applicable for allowing your application/port number. Thanks, From: Steven Buehler [mailto:[email protected]] I finally got it working properly on OS X’s default web server without issue, so it must something on my Windows machine’s IIS that’s creating a choke somewhere. I now know my code works, at least. :-) SB= — |
Another update: I uploaded the files to Azure Websites (stevenbuehler.azurewebsites.net/onenote), and I'm getting the blank return page again. It says "Something went wrong" with no response string. PHP error log has the following:
|
I modified the code to iterate through all the PDF files in the same directory to OneNote, but now submit.php is not working (it's giving me a blank page, no errors).
Ideas? The relevant code blocks are the
CreatePageWithFile($submittedFile)
and thefinish()
function.The text was updated successfully, but these errors were encountered: