From:             [EMAIL PROTECTED]
Operating system: Windows 2000 Professional
PHP version:      4.1.2
PHP Bug Type:     COM related
Bug description:  php_OLECHAR_to_char() error in IIS

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 
----

-- 
Edit bug report at http://bugs.php.net/?id=16323&edit=1
-- 
Fixed in CVS:        http://bugs.php.net/fix.php?id=16323&r=fixedcvs
Fixed in release:    http://bugs.php.net/fix.php?id=16323&r=alreadyfixed
Need backtrace:      http://bugs.php.net/fix.php?id=16323&r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16323&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16323&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16323&r=notwrong
Not enough info:     http://bugs.php.net/fix.php?id=16323&r=notenoughinfo
Submitted twice:     http://bugs.php.net/fix.php?id=16323&r=submittedtwice

Reply via email to