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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 09:01:32 2024 UTC