"this variant has no properties"?
am 18.02.2010 00:46:05 von zelnaga
$wscript = new COM('WScript.Shell');
while (true) {
$random = $wscript->RegRead('HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\ Cryptography\\RNG\\Seed');
var_dump($random->value);
sleep(1);
echo "\r\n";
}
?>
That gives me a "this variant has no properties" error. My question
is... how on earth does it not have any properties? As the following
VBscript is testament to, it clearly does have properties:
function bin2hex(values)
dim result
for each value in values
temp2 = hex(value)
select case len(temp2)
case 0: result = result & "00"
case 1: result = result & "0" & temp2
case 2: result = result & temp2
end select
next
bin2hex3 = result
end function
Set WshShell = createObject("WScript.Shell")
temp = WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryp tography\RNG\Seed")
MsgBox(bin2hex(temp))
Doing vartype on temp reveals that it's an array of variants (VT_ARRAY
| VT_VARIANT). Even variant_get_type agrees. But how do access the
elements of htat variant array? Can I?
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: "this variant has no properties"?
am 18.02.2010 01:01:36 von zelnaga
When it comes to doing things with the registry, PHP4 seems to be
better than PHP5:
$registry =3D new COM('winmgmts:root/DEFAULT:StdRegProv');
$values =3D new VARIANT();
echo $registry->getBinaryValue(0x80000002,
'SOFTWARE\\Microsoft\\Cryptography\\RNG', 'Seed', $values);
var_dump($values->value);
?>
That works as expected on PHP4. On PHP5, it gives yet another "this
variant has no properties" error.
On Wed, Feb 17, 2010 at 5:46 PM, Thomas Anderson wrote:
>
> $wscript =3D new COM('WScript.Shell');
> while (true) {
> =A0 =A0$random =3D $wscript->RegRead('HKEY_LOCAL_MACHINE\\SOFTWARE\\Micro=
soft\\Cryptography\\RNG\\Seed');
> =A0 =A0var_dump($random->value);
> =A0 =A0sleep(1);
> =A0 =A0echo "\r\n";
> }
> ?>
>
> That gives me a "this variant has no properties" error. =A0My question
> is... =A0how on earth does it not have any properties? =A0As the followin=
g
> VBscript is testament to, it clearly does have properties:
>
> function bin2hex(values)
> =A0 =A0 =A0 =A0dim result
> =A0 =A0 =A0 =A0for each value in values
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0temp2 =3D hex(value)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0select case len(temp2)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0case 0: result =3D result =
& "00"
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0case 1: result =3D result =
& "0" & temp2
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0case 2: result =3D result =
& temp2
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0end select
> =A0 =A0 =A0 =A0next
> =A0 =A0 =A0 =A0bin2hex3 =3D result
> end function
>
> Set WshShell =3D createObject("WScript.Shell")
>
> temp =3D WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryp togr=
aphy\RNG\Seed")
> MsgBox(bin2hex(temp))
>
> Doing vartype on temp reveals that it's an array of variants (VT_ARRAY
> | VT_VARIANT). =A0Even variant_get_type agrees. =A0But how do access the
> elements of htat variant array? =A0Can I?
>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Original Source
am 18.02.2010 16:16:03 von Harpreet
I installed my PHP app on a windows server 2008. The problem is when I
load my first login page it opens another browser instance and the login
page stays there with the word Original Source in its url. If I close
this page manully everything else works like it used to on my XP machine
with a single window.
Now sure why the first window wont get overwritten.
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php