解决 THttpClient: Could not read xx bytes from sandbox.evernote.com:443//edam/user

PHP Lib – THttpClient: Could not read xx bytes from sandbox.evernote.com:443//edam/user
1#.
I’m having problem instantiating evernote cloud API client. I get the following exception dump (original lib and root path are replaced)
Uncaught TTransportException: exception ‘TTransportException’ with message ‘THttpClient: Could not read 1013476926 bytes from sandbox.evernote.com:443//edam/user’ in /php_lib_path/evernote/transport/THttpClient.php:156
Stack trace:

I have tested that the script works on my local environment. And in this testing environment, I have double checked that
1- OpenSSL is open and PHP support is enabled and supported
2- Trying to connect to evernote production environment (with sandbox => false) also failed

解决问题:
3#.
Hi, it appears that my production is running PHP 5.3 while my local environment runs 5.4, hence the user_agent could not be set correctly. Adding

solves the problem

0条留言