Re: The COM problem when converting from ASP to PHP

From: Date: Sat, 24 Apr 2004 01:19:10 +0000
Subject: Re: The COM problem when converting from ASP to PHP
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-184486@lists.php.net to get a copy of this message
Hello Steven, Saturday, April 24, 2004, 2:08:20 AM, you wrote: SK> Hi, SK> When I converting lines of ASP code: SK> <% SK> dim keysobjs SK> dim privkey SK> dim pubkey SK> dim seed SK> Set keysobj= CreateObject("wmrmobjs.WMRMKeys") SK> keysobj.GenerateSigningKeys privkey, pubkey SK> seed = keysobj.GenerateSeed() SK> Response.Write privkey SK> Response.Write "<br>" SK> Response.Write pubkey SK> Response.Write "<br>" SK> Response.Write seed %>> SK> To the PHP one: SK> <? SK> $com = new COM("wmrmobjs.WMRMKeys"); $com->>GenerateSigningKeys($privkey,$pubkey); $seed = $com->>GenerateSeed(); SK> echo "Private key=".$privkey; SK> echo "<br>"; SK> echo "Public key=".$pubkey; SK> echo "<br>"; SK> echo "Seed=".$seed; ?>> SK> In the ASP code everything works pretty well, SK> In the PHP code, although I can obtain the value of $seed, SK> the $privkey and $pubkey are null, SK> kindly check the code for me, thx... There is nothing wrong with your PHP code, it's just that you never set the values of $privkey or $pubkey anywhere. $com->GenerateSigningKeys($privkey,$pubkey); This is PASSING the values into the GenerateSigningKeys function, it is not setting them. Are you sure they are not set as the return values? Like: $com = new COM("wmrmobjs.WMRMKeys"); $privkey = $com->Privkey; (etc?) -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html

« previous php.general (#184486) next »