ID: 16075 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Closed Bug Type: COM related Operating System: WinNT 4 PHP Version: 4.1.2 New Comment:
Right ! running Apache in console, and it works ! Before, it just runned as a service. I don't know who is the user that runs apache as service. I supposed it is Admin. So no. This 'security issue' force me to keep server logged as Admin, to run apache in console... Previous Comments: ------------------------------------------------------------------------ [2002-03-15 12:31:41] [EMAIL PROTECTED] this seems to be a security issue. i suppose your apache server runs under a different user than you are running the cgi executeable. check if the user has enough rights to access the exchange server. ------------------------------------------------------------------------ [2002-03-14 10:59:30] [EMAIL PROTECTED] 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 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=16075&edit=1