[PHP] Re: Re: The COM problem when converting from ASP to PHP [works now!!]

2004-04-24 Thread Steven Kidd
Hi,

Thx ur help Richard , but ur method doesn't work.

However, when I switch to the PHP5 RC1, it works!~~
I use the recommonded php.ini setting.
my previous version is 4.3.6.
I really love PHP 5! :)

Strongly suggest anyone who uses COM switch to PHP 5.





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 ""
SK> Response.Write pubkey
SK> Response.Write ""
SK> Response.Write seed
%>>
SK> To the PHP one:

SK>  $com = new COM("wmrmobjs.WMRMKeys");
$com->>GenerateSigningKeys($privkey,$pubkey);
$seed = $com->>GenerateSeed();
SK> echo "Private key=".$privkey;
SK> echo "";
SK> echo "Public key=".$pubkey;
SK> echo "";
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?)


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


[PHP] The COM problem when converting from ASP to PHP

2004-04-23 Thread Steven Kidd
Hi,

When I converting lines of ASP code:

<%
dim keysobjs
dim privkey
dim pubkey
dim seed
Set keysobj= CreateObject("wmrmobjs.WMRMKeys")
keysobj.GenerateSigningKeys privkey, pubkey
seed = keysobj.GenerateSeed()
Response.Write privkey
Response.Write ""
Response.Write pubkey
Response.Write ""
Response.Write seed
%>
To the PHP one:

GenerateSigningKeys($privkey,$pubkey);
$seed = $com->GenerateSeed();
echo "Private key=".$privkey;
echo "";
echo "Public key=".$pubkey;
echo "";
echo "Seed=".$seed;
?>
In the ASP code everything works pretty well,
In the PHP code, although I can obtain the value of $seed,
the $privkey and $pubkey are null,
kindly check the code for me, thx...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php