-
Notifications
You must be signed in to change notification settings - Fork 59
Closed
Labels
Description
Extension Version
1.0.7
PHP Binary
Local PHP
Operating System
Windows
What happened?
The command issued by the extension to detect the PHP environment fails in Windows:
[info] Checking local PHP installation: php -r 'echo PHP_BINARY;'
[info] Falling back to system PHP installation
It's been found (see issue #145) that the culprit is this block of code in extensions,js:
options.set("local", {
check: "php -r 'echo PHP_BINARY;'",
command: `"{binaryPath}"`
});
The reason is that in Windows the single quotes are not a valid delimiter for the nested command.
But double quotes are valid in both Windows and Linux, so this can be fixed by replacing the line with:
check: 'php -r "echo PHP_BINARY;"'
This has been tested as a workaround as reported here.
Mimimal Code Sample
gpibarra, jcnevess, just-another-peter, faisal95bd, javdome and 3 more