Skip to content
Discussion options

You must be logged in to vote

Solutions

Solution 1: Run as Administrator

Run PowerShell as Administrator (see instructions below) and try again.

Solution 2: Close All Programs

  1. Close all File Explorer windows (especially if browsing C:\xampp\php)
  2. Close your IDE (VS Code, PhpStorm, etc.)
  3. Close any terminal windows running PHP scripts
  4. Try the switch command again

Solution 3: Manually Stop Processes

Run this command in PowerShell:

Get-Process php*, httpd -ErrorAction SilentlyContinue | Stop-Process -Force

Then wait 5 seconds and try switching again:

phat use 8.2.27

Solution 4: Use XAMPP Control Panel

  1. Open XAMPP Control Panel
  2. Click "Stop" for Apache
  3. Wait 5 seconds
  4. Run phat use [version]

Solution 5: Restart Computer

If …

Replies: 1 comment

Comment options

pphatdev
Feb 26, 2026
Maintainer Author

You must be logged in to vote
0 replies
Answer selected by pphatdev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant