fattain-naime/cwp-superpowers/cwp-php
- community
Checking that the SKILL.md file is still in the repository.
This skill should be used when the user asks to "switch PHP version", "install PHP extensions", "configure PHP-FPM", "use PHP Selector", "compile PHP", "fix PHP errors", "disable PHP functions", "set up open_basedir", "configure PHP Defender", "rebuild PHP-FPM", "set PHP upload limit", "manage multiple PHP versions", or needs to manage PHP versions, extensions, or configurations on a CWP server.
Install
npx vskill@latest install fattain-naime/cwp-superpowers/cwp-phpSKILL.md
CWP PHP Management
Manage PHP versions, extensions, and configurations on CWP servers. Handle PHP Switcher, PHP Selector, PHP-FPM Selector, and security hardening for PHP.
PHP Version Management Tools
Use three distinct tools for PHP version management:
| Tool | Behavior | Versions | Use Case | |
|---|---|---|---|---|
| PHP Switcher | ONE default PHP for all users | 5.3-8.1+ | Simple setups | |
| PHP Selector | Multiple versions via .htaccess | 4.4-8.1 | Per-folder version | |
| PHP-FPM Selector | Per-domain via Domain Conf | 5.3-8.1+ | Per-domain (CWP Pro) |
PHP Switcher
Sets a single default PHP version compiled from source for the entire server.
PHP Selector
Allows multiple PHP versions simultaneously. Users select versions per folder via .htaccess.
PHP-FPM Selector (CWP Pro)
Per-domain PHP-FPM configuration via the Domain Conf panel.
Configuration Paths
| Component | Path | |
|---|---|---|
| Main PHP php.ini | /usr/local/php/php.ini | |
| Main PHP config dir | /usr/local/php/php.d/ | |
| Per-user php.ini | /home/USERNAME/php.ini | |
| Selector PHP binaries | /opt/alt/php{VERSION}/usr/bin/php | |
| Selector php.ini | /opt/alt/php{VERSION}/usr/php/php.ini | |
| FPM user configs | /opt/alt/php-fpm{VERSION}/usr/etc/php-fpm.d/users/USERNAME.conf | |
| PHP Switcher configs | /usr/local/cwpsrv/htdocs/resources/conf/el{7,8}/php_switcher/ | |
| Compile log | /var/log/php-rebuild.log | |
| PHP Defender rules | /usr/local/cwp/.conf/phpdefender/rules/ |
PHP Version Matrix
| PHP Version | Switcher | Selector | FPM Selector | |
|---|---|---|---|---|
| 5.3 - 5.6 | Yes | Yes | Yes | |
| 7.0 - 7.4 | Yes | Yes | Yes | |
| 8.0 - 8.1+ | Yes | Yes | Yes | |
| 4.4 | No | Yes | No |
Detect Installed PHP Versions
PHP versions vary by server. Detect what's actually installed:
Common Operations
Check Active PHP Version
Install PHP Extensions
Install extensions via:
- CWP Admin -> PHP Selector -> Toggle extensions
- Recompile PHP with desired flags
- Install from Remi repository
Rebuild PHP-FPM
Set Upload Limits
Or manually edit php.ini:
PHP Security
Disable Dangerous Functions
Disable functions that enable remote code execution:
PHP open_basedir
Restrict file access per user to prevent directory traversal. For detailed open_basedir configuration and security hardening, see the cwp-security skill.
PHP Defender (Snuffleupagus)
Use Snuffleupagus as the PHP security module:
| Component | Path | |
|---|---|---|
| Configuration | /usr/local/cwp/.conf/phpdefender/ | |
| Rules | /usr/local/cwp/.conf/phpdefender/rules/ | |
| Module | /opt/alt/php-fpm{VERSION}/usr/lib/php/extensions/no-debug-non-zts-*/snuffleupagus.so |
Troubleshooting
| Issue | Solution | |
|---|---|---|
| PHP installation failing | Need 1.5-2GB free RAM, verify DNS resolver | |
| "No Loader installed" | sh /scripts/update_ioncube | |
| intl extension missing | Recompile PHP with intl or install from Remi repo | |
| suPHP 500 error | Fix ownership: chown -R USER:USER /home/USER/public_html/* | |
| FPM socket errors | Rebuild configs: /scripts/phpfpm_rebuild_user_conf | |
| Compilation timeout | Increase swap space, ensure 2GB+ RAM available |
Diagnostic Commands
Additional Resources
references/php-switcher.md-- PHP Switcher compilation and version managementreferences/php-selector.md-- PHP Selector multi-version configurationreferences/php-security.md-- Complete PHP hardening guidereferences/php-fpm.md-- PHP-FPM pool configuration and tuning
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/cwp-php/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/fattain-naime/cwp-superpowers/cwp-php)