From 2d3750b36e0f300f8ae827395a6bb9a9232a9141 Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Wed, 18 Dec 2019 17:50:25 +0530 Subject: [PATCH] Install 64bit version of PHP on windows --- src/scripts/win32.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/scripts/win32.ps1 b/src/scripts/win32.ps1 index 28187395..4afaf75d 100644 --- a/src/scripts/win32.ps1 +++ b/src/scripts/win32.ps1 @@ -33,11 +33,13 @@ if (Test-Path -LiteralPath $php_dir -PathType Container) { } Step-Log "Setup PHP and Composer" if ($null -eq $installed -or -not("$($installed.Version).".StartsWith(($version -replace '^(\d+(\.\d+)*).*', '$1.')))) { + $arch='x64' if ($version -lt '7.0') { Install-Module -Name VcRedist -Force + $arch='x86' } - Install-Php -Version $version -Architecture x86 -ThreadSafe $true -InstallVC -Path $php_dir -TimeZone UTC -InitialPhpIni Production -Force >$null 2>&1 + Install-Php -Version $version -Architecture $arch -ThreadSafe $true -InstallVC -Path $php_dir -TimeZone UTC -InitialPhpIni Production -Force >$null 2>&1 $installed = Get-Php -Path $php_dir $status = "Installed PHP $($installed.FullVersion)" }