|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79146 cscript can fail to run on some systems
Submitted: 2020-01-21 08:53 UTC Modified: 2020-01-21 09:36 UTC
From: deus dot kane at claromentis dot com Assigned: cmb (profile)
Status: Closed Package: *Compile Issues
PHP Version: master-Git-2020-01-21 (Git) 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: deus dot kane at claromentis dot com
New email:
PHP Version: OS:


 [2020-01-21 08:53 UTC] deus dot kane at claromentis dot com
Running "buildconf" or "configure" on Windows runs a batch file, whose only purpose is to call cscript in order to run a .js file that contins the actual configure scripts.

By default, the file association for .js is set up in such a way that cscript can tell which script engine (jscript) to use without further instruction. However, if the file association has been changed from the default (imagine an IDE has been set up that can edit .js files) then cscript will fail to execute the script.

The solution is to put an explicit "/e:jscript" flag in all calls to cscript, which will ensure that the script will always be executed successfully.

I have a pull request that implements this change:

Test script:

Expected result:
Rebuilding configure.js
Now run 'configure --help'

Actual result:
Input Error: There is no script engine for file extension ".js".


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-01-21 09:36 UTC]
-Status: Open +Status: Verified -Assigned To: +Assigned To: cmb
 [2020-01-21 10:55 UTC]
Automatic comment on behalf of
Log: Fix #79146: cscript can fail to run on some systems
 [2020-01-21 10:55 UTC]
-Status: Verified +Status: Closed
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Mon May 25 18:01:26 2020 UTC