php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16075 Logon fonction (usiong invoke) doesn't work in CGI, but in standalone
Submitted: 2002-03-14 10:59 UTC Modified: 2002-03-15 12:31 UTC
From: Pascal dot Guimier at culture-alsace dot org Assigned:
Status: Closed Package: COM related
PHP Version: 4.1.2 OS: WinNT 4
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: Pascal dot Guimier at culture-alsace dot org
New email:
PHP Version: OS:

 

 [2002-03-14 10:59 UTC] Pascal dot Guimier at culture-alsace dot org
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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-15 12:31 UTC] phanto@php.net
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-18 04:25 UTC] Pascal dot Guimier at culture-alsace dot org
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...
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 15:01:29 2024 UTC