php ews curl linux

webdeveloping, design, php development
Post Reply
User avatar
Posts: 81
Joined: Thu Jan 15, 2009 2:36 pm

php ews curl linux

Post by vst » Thu Apr 26, 2012 12:36 pm

As it's a great new way to communicate with an ms exchange server, there are a little problem when you intent to do this using an Linux machine as client.
For our business web application i needed to write calender objects into an exchange calender but struggled from the beginning.
I'm using the php-ews library. The problem was a http 401 error which says Unauthorized.
A lot of internet research led me to an curl issue. Basically it's an version issue as ms exchange is using NTLMv2 what wont work with v1 which commonly linux installed curl versions are using.
The only solution is to manually compile and install the latest curl version which is at the time 7.25, available here.

I've found an great article by ityndall ... and-linux/ where he describes the installation process
1. mkdir curlbuild && cd curlbuild
2. Pull the latest copy from
3. tar -zxvf curl-7.25.0.tar.gz
4. cd curl-7.25.0
5. Install OpenSSL dev
– Redhat yum install openssl-devel
– Ubuntu apt-get install libcurl4-openssl-dev
6. ./configure -with-ssl
7. make
8. make install
9. Remove old link
– Redhat rm /usr/lib/
– Ubuntu rm /usr/lib/i386-linux-gnu/ OR rm /usr/lib/
10. Create new link
– Redhat ln -s /usr/local/lib/ /usr/lib/
– Ubuntu ln -s /usr/local/lib/ /usr/lib/i386-linux-gnu/ OR ln -s /usr/local/lib/ /usr/lib/
11. Check version, should be the newly installed version
– PHP $version = curl_version();
– Curl curl -V
12. Remove/delete curlbuild install directory
so long and thank you for the fish

Post Reply