|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57696 Interpreter loses all variables
Submitted: 2007-06-08 15:55 UTC Modified: 2017-04-01 21:26 UTC
From: info at silvermoon-software dot de Assigned:
Status: Wont fix Package: PHPScript (PECL)
PHP Version: 5.2.1 OS: Windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: info at silvermoon-software dot de
New email:
PHP Version: OS:


 [2007-06-08 15:55 UTC] info at silvermoon-software dot de
Like in #9406 reported, the interpretet loses the variables and includes after the host adds the script by AddCode(BSTR).

After AddCode, the script will be executed and the interpreter seems to be ended.

If the host calls an procedure with ->Run("prodecure","parameters") the variables and includes outside the procedure are empty

Reproduce code:
This Code in for Visual Basic (5/6)
  Set script = CreateObject("MSScriptControl.ScriptControl.1")
  script.Language = "PHPScript"
  script.AddObject "WScript", CreateObject("WScript.Shell")
  script.AllowUI = True
  script.UseSafeSubset = False
  script.AddCode "$a = 0; $b = 1; $c = 'a'; function abc() { global $b; $WScript->Popup($b); } $WScript->Popup($b);" "abc"

Expected result:
Windows Script Host

An dialog showing the content of $b (which is 1) - the dialog should be shown 2 times

Actual result:
The dialog appears online 1 time, the call of "abc" results in an error

Uncaught exception 'com_exception' with message 'Parameter 0: Typkonflikt.
' in fragment:1
Stack trace:
#0 fragment(1): variant->Popup(NULL)
#1 [internal function]: abc()
#2 {main}

As you can see.. $b is NULL


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-04-01 21:26 UTC]
-Status: Open +Status: Wont fix
 [2017-04-01 21:26 UTC]
Due to this extension not seeing any activity since 2009, this issue will not be fixed. We are therefore closing this now.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sat Dec 03 21:03:42 2022 UTC