php.net |  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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
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
Description:
------------
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:

https://github.com/php/php-src/pull/5101

Test script:
---------------
buildconf

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

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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-01-21 09:36 UTC] cmb@php.net
-Status: Open +Status: Verified -Assigned To: +Assigned To: cmb
 [2020-01-21 10:55 UTC] cmb@php.net
Automatic comment on behalf of deus.kane@claromentis.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=3046e35718e4980a8cf7785fa6ecea51d02ebee8
Log: Fix #79146: cscript can fail to run on some systems
 [2020-01-21 10:55 UTC] cmb@php.net
-Status: Verified +Status: Closed
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Mon May 25 18:01:26 2020 UTC