RE: Payflow Pro used as a COM object

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,
I've had very bad experience with COM objects in PHP too. 
It was 2 years agi, and I though the 5.1 did solved some of the problems...

Note that it is very difficult to know wher ethe problem is located : the PHP handler or the COM itself...
Do you have any opportunity to use something other, as a XMLRPC, Webservices, etc?

I noticed a problem was loading the COM on every need. Maybe one solution could be to try to re-use the COM object when it as been created ... For example, if you need multiple call for each user, try to reusser the COM.
Or even try to store the trasactions into a DB and process them by block of 50 or 100 in a loop.
I don't know your project, so it is a bit difficult to see how to do things...but try to reuse to limit the number of instances / garbage...

Is it the part inside the try/catch that takes so long??

vincent


-----Original Message-----
From: Vandegrift, Ken [mailto:kvandegrift@xxxxxxxxxx]
Sent: Wed 29/11/2006 22:06
To: php-windows@xxxxxxxxxxxxx
Subject:  Payflow Pro used as a COM object
 
Good Day,
I have a situation with our ecommerce site where the the payment
processing script will hang forever while waiting for the Payflow Pro
gateway client to be initialized through COM.  This does not happen
everytime, but is happening frequently enough to cause frustration with
our customers.  The fix has been a server reboot and then transactions
flow again (until this happens again - lately every 24-48 hours).  There
is no indication in the Windows event viewer of any issue - the script
does not time out (script timeout is set to 60 seconds), but I assume
the no timeout is due to PHP not factoring external resource
initialization as part of the script timer.  Anyway, If anybody has any
ideas where in windows I can glean more info on what is happening or if
this is a PHP issue - please chime in.  My application logs are not
written to because no error is being detected.
 
Environment:
Windows Server 2003
IIS 6
PHP 5.1.4
 
Code Snippet (from my PayflowPro class):
try
{
   $this->pfpro = new COM("PFProCOMControl.PFProCOMControl.1");
}
catch (COM_Exception $e)
{
   throw $e;
}
 
// Initialize transaction parameters...
 
// INITIALIZE CONNECTION WITH VERISIGN
$pfproContext = $this->pfpro->CreateContext("{$this->hostAddress}",
                                             $this->hostPort,
                                             $this->timeout,
                                             "{$this->proxyAddress}",
                                             $this->proxyPort,
                                             "{$this->proxyUser}",
                                             "{$this->proxyPwd}");
 
 // SUBMIT TRANSACTION REQUEST
 $response = $this->pfpro->SubmitTransaction($pfproContext, $params,
strlen($params));
 $this->responseToArray($response);
 
 // CLOSE CONNECTION WITH VERISIGN
 $this->pfpro->DestroyContext($pfproContext);
 
Ken Vandegrift
kvandegrift@xxxxxxxxxx <mailto:kvandegrift@xxxxxxxxxx> 
Web Administrator
Sharis Mgmt. Corp
 

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux