• Announcements

    • Shane D.

      Evernote Business Beta - Spaces   12/20/2017

      We're very excited to announce the public beta of an upcoming rework for Evernote Business! To learn more, go Here
    • Shane D.

      2018 Evernote Webinars   01/04/2018

      To kick off the new year, we're excited to announce our  updated schedule for our series of webinars! Please check the events calendar to see which one works best for you!
    • Shane D.

      Upcoming Forum Change Announcement   02/14/2018

      Hi All! You may be seeing some changes with overall organization and layout of the discussion forums. You can learn more by going to the 'Upcoming Forum Change Announcement' in the 'Community Announcements' sub-forum!  

Recommended Posts

Hi all,

I'm trying the PHP single authentication example, and I'm getting the following error:

Fatal error: Uncaught exception 'TTransportException' with message 'THttpClient: Could not connect to sandbox.evernote.com:443/edam/user' in /opt/www/path/web/site/transport/THttpClient.php:196 Stack trace: #0 /opt/www/path/web/site/packages/UserStore/UserStore.php(55): THttpClient->flush() #1 /opt/www/path/web/site/packages/UserStore/UserStore.php(35): UserStoreClient->send_checkVersion('PHP EDAMTest', 1, 21) #2 /opt/www/path/web/site/index.php(62): UserStoreClient->checkVersion('PHP EDAMTest', 1, 21) #3 {main} thrown in /opt/www/path/web/site/transport/THttpClient.php on line 196

I've doublechecked the credentials and they seem correct.

I have no clue what could be the reason.

Perhaps because I'm running the script from the browser and not from the console?

Any idea's are welcome.

Thank you.


running it from the console works.

How can I make it run from the browser?


Edited by vampie

Share this post

Link to post

That's a networking error (Thrift's TTransportException thrown by the HTTP client), so you're having a problem connecting to our sandbox server. Since it works when you run the script from the command line, I'm assuming that there's some difference in the PHP environment when you run in the browser (presumably via Apache). The most common problem is the SSL configuration of your server - our script is making an outbound HTTPS request, and it may be the case that your SSL client environment isn't trusting our server certificate.

Share this post

Link to post

Thank you for the answer.

So I'm gonne have to check with my host then?

and it may be the case that your SSL client environment isn't trusting our server certificate.

What do you mean with SSL environment?

Is that my browser or is that the apache server?

thank you

Share this post

Link to post


I've changes this:

$evernoteHost = "sandbox.evernote.com";
$evernotePort = "443";
$evernoteScheme = "https";

to that:

$evernoteHost = "sandbox.evernote.com";
$evernotePort = "80";
$evernoteScheme = "http";

And I get the same error:

THttpClient: Could not connect to sandbox.evernote.com/edam/user

:( :( :( :(

Share this post

Link to post

Ok, so it's not an SSL problem. Can you make an outbound connection to sandbox at all from that host? E.g., curl from the command line?

Share this post

Link to post


a curl works perfectly even from the site:

I've created a test.php and this shows the index page.

// create a new cURL resource
$ch = curl_init();
// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, "https://sandbox.evernote.com/");
curl_setopt($ch, CURLOPT_HEADER, 0);
// grab URL and pass it to the browser
// close cURL resource, and free up system resources

Share this post

Link to post

I solved the problem:

the setting "allow_url_fopen" was not enabled.

I enabled this for my subdomain and it worked immediately :-)

  • Like 1

Share this post

Link to post