-
Problem 1: Installing PHP VersionsInstallation fails with permission errors when trying to install a new PHP version. CauseInstalling PHP versions requires write access to the XAMPP directory ( SolutionRun PowerShell as Administrator before installing PHP versions. Problem 2: Switching PHP VersionsWhen switching versions with Causes
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
SolutionsSolution 1: Run as Administrator Run PowerShell as Administrator (see instructions below) and try again. Solution 2: Close All Programs
Solution 3: Manually Stop Processes Run this command in PowerShell: Get-Process php*, httpd -ErrorAction SilentlyContinue | Stop-Process -ForceThen wait 5 seconds and try switching again: phat use 8.2.27Solution 4: Use XAMPP Control Panel
Solution 5: Restart Computer If all else fails, restart your computer to release all file locks, then try again. How to Run PowerShell as AdministratorMethod 1: Start Menu
Method 2: Win + X Menu
Method 3: From File Explorer
After Opening as AdministratorOnce you have an administrator PowerShell window, run your install command: phat install 8.2.27Verifying Administrator AccessTo check if you're running as administrator, look for "Administrator" in the PowerShell window title: Or run this command: ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)This should return Alternative: Run Specific Command as AdminIf you don't want to open a new admin window, you can run a specific command with admin rights:
Common Permission Error MessagesYou might see errors like:
All of these indicate you need to run PowerShell as Administrator. |
Beta Was this translation helpful? Give feedback.
Solutions
Solution 1: Run as Administrator
Run PowerShell as Administrator (see instructions below) and try again.
Solution 2: Close All Programs
C:\xampp\php)Solution 3: Manually Stop Processes
Run this command in PowerShell:
Then wait 5 seconds and try switching again:
Solution 4: Use XAMPP Control Panel
phat use [version]Solution 5: Restart Computer
If …