mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-23 04:11:06 +07:00
Update to latest version on windows. Fixes #132
This commit is contained in:
parent
7d026bfa6b
commit
dd4f0db7bf
@ -144,13 +144,12 @@ if ($null -eq $installed -or -not("$($installed.Version).".StartsWith(($version
|
|||||||
}
|
}
|
||||||
|
|
||||||
Install-Php -Version $version -Architecture $arch -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)"
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$status = "PHP $($installed.FullVersion) Found"
|
Update-Php $php_dir >$null 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$installed = Get-Php -Path $php_dir
|
||||||
Set-PhpIniKey -Key 'date.timezone' -Value 'UTC' -Path $php_dir
|
Set-PhpIniKey -Key 'date.timezone' -Value 'UTC' -Path $php_dir
|
||||||
Enable-PhpExtension -Extension openssl, curl, opcache -Path $php_dir
|
Enable-PhpExtension -Extension openssl, curl, opcache -Path $php_dir
|
||||||
Update-PhpCAInfo -Path $php_dir -Source CurrentUser
|
Update-PhpCAInfo -Path $php_dir -Source CurrentUser
|
||||||
@ -159,4 +158,4 @@ if ($version -eq 'master') {
|
|||||||
Set-PhpIniKey -Key 'opcache.jit_buffer_size' -Value '256M' -Path $php_dir
|
Set-PhpIniKey -Key 'opcache.jit_buffer_size' -Value '256M' -Path $php_dir
|
||||||
Set-PhpIniKey -Key 'opcache.jit' -Value '1235' -Path $php_dir
|
Set-PhpIniKey -Key 'opcache.jit' -Value '1235' -Path $php_dir
|
||||||
}
|
}
|
||||||
Add-Log $tick "PHP" $status
|
Add-Log $tick "PHP" "Installed PHP $($installed.FullVersion)"
|
||||||
|
Loading…
Reference in New Issue
Block a user