|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-03-29 04:52 UTC] Vladimir dot Michl at hlubocky dot del dot cz
[2002-04-06 19:15 UTC] phanto@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 16:00:02 2025 UTC |
The following example PHP script works fine when run from the command line, but fails when run via IIS. <?php $wsh = @new COM('WScript.Shell') or die("Cannot create instance of Windows Scripting Host!"); $key = 'HKLM\foo'; $v = $wsh->RegRead($key); echo "<br> Got $key = $v\n"; $v = $v + 1; $wsh->RegWrite($key,$v); echo "<br> Set $key to $v\n"; ?> The error returned references the line containing RegWrite. ---- Got HKLM\foo = 2 Warning: Error in php_OLECHAR_to_char() in c:\asg\webmanager\test\x4.php on line 7 Warning: Error in php_OLECHAR_to_char() in c:\asg\webmanager\test\x4.php on line 7 Warning: Invoke() failed: Exception occurred. Source: Description: in c:\asg\webmanager\test\x4.php on line 7 Set HKLM\foo to 3 ----