Fix #79146: cscript can fail to run on some systems

In the buildconf and configure batch files, Windows' cscript utility was being
run without the /e:jscript flag. This works on systems that have not had the
default .js file association changed, but if .js has been re-associated to
(say) an IDE, the batch files fail with the error message:

Input Error: There is no script engine for file extension ".js".
This commit is contained in:
Deus Kane 2020-01-20 16:16:01 +00:00 committed by Christoph M. Becker
parent b67fc51859
commit 3046e35718
7 changed files with 7 additions and 6 deletions

1
NEWS
View File

@ -5,6 +5,7 @@ PHP NEWS
- Core:
. Fixed bug #71876 (Memory corruption htmlspecialchars(): charset `*' not
supported). (Nikita)
. Fixed bug ##79146 (cscript can fail to run on some systems). (clarodeus)
- CURL:
. Fixed bug #79078 (Hypothetical use-after-free in curl_multi_add_handle()).

View File

@ -1,5 +1,5 @@
@echo off
cscript /nologo win32\build\buildconf.js %*
cscript /nologo /e:jscript win32\build\buildconf.js %*
SET PHP_BUILDCONF_PATH=%~dp0
copy %PHP_BUILDCONF_PATH%\win32\build\configure.bat %PHP_BUILDCONF_PATH% > nul
SET PHP_SDK_SCRIPT_PATH=

View File

@ -258,4 +258,4 @@ C.WriteBlankLines(1);
C.Write(file_get_contents("win32/build/configure.tail"));
B.WriteLine("@echo off");
B.WriteLine("cscript /nologo configure.js %*");
B.WriteLine("cscript /nologo /e:jscript configure.js %*");

View File

@ -1,2 +1,2 @@
@echo off
cscript /nologo configure.js %*
cscript /nologo /e:jscript configure.js %*

View File

@ -352,7 +352,7 @@ function conf_process_args()
var i, j;
var configure_help_mode = false;
var analyzed = false;
var nice = "cscript /nologo configure.js ";
var nice = "cscript /nologo /e:jscript configure.js ";
var disable_all = false;
args = WScript.Arguments;

View File

@ -1,6 +1,6 @@
@echo off
SET PHP_BUILDCONF_PATH=%~dp0
cscript /nologo %PHP_BUILDCONF_PATH%\script\phpize.js %*
cscript /nologo /e:jscript %PHP_BUILDCONF_PATH%\script\phpize.js %*
IF NOT EXIST configure.bat (
echo Error generating configure script, configure script was not copied
exit /b 3

View File

@ -260,6 +260,6 @@ C.WriteBlankLines(1);
C.Write(file_get_contents(PHP_DIR + "\\script\\configure.tail"));
B.WriteLine("@echo off");
B.WriteLine("cscript /nologo configure.js %*");
B.WriteLine("cscript /nologo /e:jscript configure.js %*");
FSO.CopyFile(PHP_DIR + "\\script\\run-tests.php", "run-tests.php", true);