Overview
Envloom provides comprehensive PHP runtime management with support for multiple versions, per-version configuration, PHP-FPM process management, and Composer integration. All PHP installations are managed locally in thebin/php/ directory with automatic version detection and update checking.
Version Management
Installing PHP Versions
Envloom downloads PHP releases from the official Windows PHP distribution and manages them by major.minor version lines.Browse Available Versions
Navigate to the PHP page in the Envloom UI to see all available major.minor version lines (e.g., 8.3, 8.2, 8.1).
Install Latest Build
Click the install button next to any version line to download and install the latest build for that line.
Version Detection
On startup, Envloom:- Scans
bin/php/for existing installations - Detects installed versions from directory names (e.g.,
8.3,8.2) - Validates that
php.exeandphp-cgi.exeexist - Automatically recovers from corrupted installations
PHP versions are cached from
releases.json with a 1-hour TTL. Update checks run hourly in the background when autoUpdate is enabled.Setting the Current Version
The “current” PHP version is used globally for CLI commands and new sites.bin/php/current pointing to the active version, allowing the php.cmd shim to resolve automatically.
Uninstalling Versions
PHP-FPM Port Management
Port Assignment
Each PHP version runs on a unique port calculated from a configurable base port:Configuring Base Port
Change the base port in the PHP settings page. All version ports recalculate automatically:FPM Process Management
PHP-FPM processes are managed asphp-cgi.exe instances:
FPM services auto-start on app launch if
autoStartServices is enabled, and auto-stop on app exit.PHP Configuration (php.ini)
Configuration Structure
Envloom uses a hierarchical configuration system:- Base template (
config/php/php.ini) - Global defaults - Version overrides (
config/php/<version>.ini) - Per-version customization - Runtime logs - Automatically injected log paths
Managed Values
Envloom manages these values automatically in allphp.ini files:
Required Extensions
Envloom enforces required extensions for Laravel compatibility:Runtime Logging
Each PHP version logs errors to a dedicated file:Editing php.ini
Edit Base Configuration
Edit Base Configuration
- Navigate to PHP page
- Click “Open php.ini” in systray or settings
- Edit
config/php/php.ini - Changes apply to all versions on next reload
Edit Version-Specific Overrides
Edit Version-Specific Overrides
- Edit
config/php/<version>.ini(e.g.,8.3.ini) - Add custom directives
- Reload Envloom or run
loom reload
Composer Integration
Installation
Composer is automatically downloaded during bootstrap:- Downloaded to
bin/composer/composer.phar - Shim created at
bin/composer.cmd - Added to PATH automatically
Usage
Laravel Installer
Envloom tracks and manages the Laravel Installer:CLI Commands
Version Switching
Shims
Envloom creates version-specific shims for direct access:bin/php<major><minor>.cmd for all installed versions.
Site-Specific PHP Versions
Each site can use a different PHP version:fastcgi_pass port:
Update Checking
Envloom checks for PHP updates hourly (configurable viaautoUpdate setting):
Troubleshooting
FPM Not Starting
Checklogs/php/php-<version>.error.log for startup errors:
- Port already in use
- Missing extensions
- Syntax errors in php.ini
Corrupted Installation
Envloom automatically detects corrupted installations on startup:Port Conflicts
API Reference
src/features/runtimes/php-api.ts for complete TypeScript definitions.