Skip to content

Commit 0458177

Browse files
committed
feat: Add troubleshooting guide for common issues with Phat
- Include sections on security, installation, operation issues, and diagnostic commands - Provide quick fixes and links to detailed documentation for each issue
1 parent 9e8c63a commit 0458177

1 file changed

Lines changed: 105 additions & 0 deletions

File tree

docs/TROUBLESHOOTING.md

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# Troubleshooting Guide
2+
3+
This guide covers common issues you might encounter when using Phat. Each issue has its own detailed documentation page.
4+
5+
## Quick Navigation
6+
7+
### 🔒 Security & Permissions
8+
- **[PowerShell Execution Policy Error](powershell-execution-policy.md)** - "File cannot be loaded. The file is not digitally signed"
9+
- **[Permission Denied When Installing](permission-denied.md)** - Access denied errors during installation
10+
11+
### ⚙️ Installation & Setup
12+
- **[Download Fails](download-fails.md)** - Issues downloading PHP versions
13+
- **[Git Bash / MINGW64 Compatibility](git-bash-compatibility.md)** - "command not found" in bash terminals
14+
15+
### 🔧 Operation Issues
16+
- **[Apache Won't Start After Switching](apache-wont-start.md)** - Apache fails to start after changing PHP versions
17+
- **[PHP Version Not Found](php-version-not-found.md)** - Version not detected even though it's installed
18+
19+
---
20+
21+
## Most Common Issues
22+
23+
### 1. PowerShell Execution Policy Error
24+
25+
**Symptoms:**
26+
```
27+
phat : File C:\Program Files (x86)\Phat\phat.ps1 cannot be loaded. The file is not digitally signed.
28+
```
29+
30+
**Quick Fix:**
31+
```powershell
32+
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
33+
Unblock-File "C:\Program Files (x86)\Phat\phat.ps1"
34+
```
35+
36+
➡️ **[Full solution guide](powershell-execution-policy.md)**
37+
38+
---
39+
40+
### 2. Command Not Found in Git Bash
41+
42+
**Symptoms:**
43+
```bash
44+
$ phat
45+
bash: phat: command not found
46+
```
47+
48+
**Quick Fix:** Use PowerShell or CMD instead, or add bash alias:
49+
```bash
50+
phat() {
51+
powershell.exe -ExecutionPolicy Bypass -File "C:/Program Files (x86)/Phat/phat.ps1" "$@"
52+
}
53+
```
54+
55+
➡️ **[Full solution guide](git-bash-compatibility.md)**
56+
57+
---
58+
59+
### 3. Permission Denied When Installing
60+
61+
**Symptoms:** Access denied errors during `phat install`
62+
63+
**Quick Fix:** Run PowerShell as Administrator
64+
65+
➡️ **[Full solution guide](permission-denied.md)**
66+
67+
---
68+
69+
## Getting Help
70+
71+
If you're still experiencing issues after checking the guides above:
72+
73+
1. Check the [README.md](../README.md) for usage instructions
74+
2. Verify your XAMPP installation is at `C:\xampp`
75+
3. Run `phat whereami` to verify installation paths
76+
4. Open an issue on GitHub with:
77+
- The exact error message
78+
- Output of `phat whereami`
79+
- Output of `Get-ExecutionPolicy -List` (if PowerShell issue)
80+
- Your Windows version
81+
82+
## Diagnostic Commands
83+
84+
Run these commands to gather diagnostic information:
85+
86+
```powershell
87+
# Check Phat installation
88+
phat whereami
89+
90+
# Check PHP versions
91+
phat list
92+
93+
# Check PowerShell execution policy
94+
Get-ExecutionPolicy -List
95+
96+
# Check if running as administrator
97+
([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
98+
```
99+
100+
## Related Resources
101+
102+
- [PowerShell Execution Policies Documentation](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies)
103+
- [XAMPP Documentation](https://www.apachefriends.org/docs/)
104+
- [PHP Windows Downloads](https://windows.php.net/download/)
105+

0 commit comments

Comments
 (0)