|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-03-15 12:31 UTC] phanto@php.net
[2002-03-18 04:25 UTC] Pascal dot Guimier at culture-alsace dot org
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 07 21:00:01 2025 UTC |
Trying to access Exchange datas using COM objects, something matters, even if the code is well : impossible to logon on a MAPI Session. Configuration : NT 4, Apache 1.3.23, PHP 4.1.2 (but before too) in cgi mode. the code is : <? $instance = new COM("Mapi.Session") or die("Unable to instantiate Mapi.Session"); echo "Loaded Exchange, version ".$instance->Version."<br>"; $err=$instance->Logon("Pascal Guimier","",true,false); $inbox=$instance->Inbox; $collmsg=$inbox->Messages; $msg=$collmsg->GetFirst(); while ($msg) { print "Subject : ". $msg->Subject . "<br>"; $msg=$collmsg->GetNext(); } ?> And there is always an error message : "Warning: Invoke() failed: Une exception s'est produite. Source: Collaboration Data Objects Description: [Collaboration Data Objects - [MAPI_E_LOGON_FAILED(80040111)]] in d:\users\group\www\essais\com\mboxlist.php on line 5" "Une exception s'est produite" means there was an exception. So I tried in several manners, and what is troubling is that launching the script at command line (>php d:\users\group\www\essais\com\mboxlist.php) works well ! That's why I think the bug can be in COM invoke() function, that doesn't work the shame in two cases. But it's only a supposition. So now I only can use my scripts in cron to make a chache in order to fetch Exchange datas :o) Thanks Pascal