3

I have a small CodeIgniter 2.1.0 application that uses PHP-EWS to connect to an Exchange 2007 server and return a set of calendar items.

It works great on my local MAMP development machine. When I deploy to my staging server for testing (Bluehost shared host), I get the following error:

PHP Fatal error: Uncaught exception 'EWS_Exception' with message 'SOAP client returned status of 401'

Any ideas?

Kyle Noland
  • 4,788
  • 6
  • 30
  • 33
  • 1
    Sounds like your credentials aren't getting passed properly with the SOAP message. You should share your code so we can see the problem. – SliverNinja - MSFT Feb 07 '12 at 15:02
  • 1
    401 is an 'unauthorized' error code. Take a look at this: http://stackoverflow.com/questions/7664249/access-exchange-web-services-with-php-and-curl, read through my answer & comments. See if you can auth into exchange from your production server. – Maiiku Feb 08 '12 at 12:33
  • You might check that you are making the call with SSL. If memory serves me, Exchange has been known to give 401 error if the request isn't made securely. Your Bluehost account may not be set up to do that. – Dan Bowling Mar 04 '12 at 02:50

1 Answers1

0

Try using wfetch/fiddler or something similiar to recreate the request and submit so you can inspect response from EWS.

Depending on the library your using to submit the request try turning on higher granularity of logging.

Have all servers been configured with same cacert truststore to allows EWS requests?

cdugga
  • 3,849
  • 17
  • 81
  • 127