From:             [EMAIL PROTECTED]
Operating system: WinNT 4
PHP version:      4.1.2
PHP Bug Type:     COM related
Bug description:  Logon fonction (usiong invoke) doesn't work in CGI, but in standalone

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 bug report at http://bugs.php.net/?id=16075&edit=1
-- 
Fixed in CVS:        http://bugs.php.net/fix.php?id=16075&r=fixedcvs
Fixed in release:    http://bugs.php.net/fix.php?id=16075&r=alreadyfixed
Need backtrace:      http://bugs.php.net/fix.php?id=16075&r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16075&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16075&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16075&r=notwrong
Not enough info:     http://bugs.php.net/fix.php?id=16075&r=notenoughinfo
Submitted twice:     http://bugs.php.net/fix.php?id=16075&r=submittedtwice

Reply via email to