Saltar al contenido principal

Windows Server

peligro

Antes de actualizar PHP, si Passwork está instalado en un entorno en la nube/virtual, cree una instantánea del estado del sistema operativo virtual para restaurar la funcionalidad en caso de una actualización incorrecta.

Descarga de PHP​

Abra un navegador web en el servidor donde está instalado Passwork y vaya al enlace para obtener PHP 8.3 — https://repos.passwork.pro/repository/windows_packages/php_build/83/php_latest.zip

info

Tenga en cuenta que este archivo incluye la versión x64 de PHP.

Extraiga el contenido del archivo en — C:\Program Files\:

Cambio de versión​

Vaya a — Server Manager → Tools → IIS Manager:

Searching password by browser extension

Expanda el sitio web de Passwork y vaya a — PHP Manager:

Example of opening PHP Manager

Registre la nueva versión de PHP especificando la ruta — C:\Program Files\php8.3\php-cgi.exe:

Location of php-cgi.exe

Vaya a — Turn On or Off Extensions y active los módulos adicionales:

Example of activated PHP extensions

Reinicie el sitio web de Passwork:

Restarting the Passwork website

Elimine las versiones obsoletas de PHP de la variable de entorno PATH usando PowerShell:

function Remove-OldPhpPaths($target) {
$envRecords = [System.Environment]::GetEnvironmentVariable("Path", $target) -split ";"
$phpPathsToRemove = $envRecords | Where-Object {
($_ -imatch "php") -and ((Split-Path $_ -Leaf) -imatch '^(?:v?(?:php)?)?(?<version>\d+\.\d+)$')
}

if ($phpPathsToRemove.Count -gt 0) {
$newPath = $envRecords | Where-Object { $phpPathsToRemove -notcontains $_ }
[System.Environment]::SetEnvironmentVariable("Path", ($newPath -join ";"), $target)
Write-Host "Outdated PHP version removed from the PATH environment variable" -ForegroundColor Green
} else {
Write-Host "Outdated PHP version not found in the PATH environment variable"
}
}

Remove-OldPhpPaths "User"
Remove-OldPhpPaths "Machine"

Agregue PHP a la variable de entorno PATH usando PowerShell:

[System.Environment]::SetEnvironmentVariable("PATH", [System.Environment]::GetEnvironmentVariable("PATH", [System.EnvironmentVariableTarget]::Machine) + ";C:\Program Files\php8.3", [System.EnvironmentVariableTarget]::Machine)
$env:Path = [System.Environment]::GetEnvironmentVariable("PATH", [System.EnvironmentVariableTarget]::Machine)