|  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
 [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-2024 The PHP Group
All rights reserved.
Last updated: Tue May 28 17:01:31 2024 UTC