This script is driving me NUTS!!!!!!
Im stuck in the position where i must retrieve values out of the registry and check them against a new user that submitted signup because teh alias names are ONLY stored there. The problem is i cant get teh php code to work that would just display it let alone go further as to check a username against the values retrieved.
The error i get is this
Warning: Invalid argument supplied for foreach() in C:\Inetpub\wwwroot\Kubemail\WWW\asp\edit1.php on line 20
Now I have the exact same asp code (in asp ofcourse LOL) and it works fine.. so i MUST not be converting the information correctly.
IF your familliar with asp and PHP I am Posting BOTH ASP and PHP for reference. Thanks for ANY HELP and im GOING NUTS FAST!
Code Pasted Below
<?
$Reg = new COM("IISSample.RegistryAccess");
$Aliases="HKEY_LOCAL_MACHINE\SOFTWARE\Ipswitch\Imail\Domains\kubemail.com\Users_aliases";
?>
<?
function EchoValues($strKeyName){
echo "<h3>Get values of ".$strKeyName."</h3>";
$Values=$reg->Values[$strKeyName];
echo "<b># subkeys = ".$Values.$Count."</b><br>";
echo "<table>Values Collection";
echo "<TR><TH align=left>Name</TH>".
"<TH align=left>Value</TH></TR>";
foreach ($Values as $k){
echo "<TR><TD>".$Values."</TD>";
}
}
?>
<? EchoValues($Aliases); ?>
<%
Set Reg = Server.CreateObject("IISSample.RegistryAccess")
Aliases = "HKEY_LOCAL_MACHINE\SOFTWARE\Ipswitch\Imail\Domains\kubemail.com\Users_aliases"
%>
<% Sub EchoValues(strKeyName)
Response.Write "<h3>Get values of " & strKeyName & "</h3>"
Set Values = reg.Values(strKeyName)
Response.Write "<b># subkeys = " & Values.Count & "</b><br>"
Response.Write "<table>Values Collection"
Response.Write "<TR><TH align=left>Name</TH>"
For Each k in Values
Response.Write "<TR><TD>" & k.Name & "</TD>"
Next
End Sub
%>
<% EchoValues Aliases %>