You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto-rotate occupied ports and fix Windows-only Apache/PHP issues
When the configured port for a service is in use, scan upward (up to +20)
for the next free one and bind there. Apache's httpd.conf and MySQL's
my.ini are regenerated each spawn so the actual bind matches what RAMP
probes for readiness; PHP's port is passed via CLI flag. The chosen port
is surfaced in the UI (yellow when remapped) and ramp.toml is left
untouched so user preferences persist across launches.
Along the way, fixed several latent issues that were combining with the
port-conflict path to produce a crash loop:
- check_port_available now uses TcpStream::connect rather than bind, so
TIME_WAIT zombies after a crash loop don't show as false conflicts.
- ProcessExit transitions now emit KillService so orphaned processes
from a readiness timeout don't accumulate across retries.
- Apache readiness probes /__ramp_health (a deliberate 404) instead of
/ so the check doesn't hang behind the FastCGI proxy when PHP is
still warming up; any Apache Server header counts as ready.
- httpd.conf's PHP handler switched from <FilesMatch>+SetHandler to
ProxyPassMatch with explicit script path — the SetHandler form
produces a malformed proxy URL on Windows ("fcgi://host:9000c:/...")
that mod_proxy_fcgi parses as a bad hostname.
- php.ini sets doc_root + cgi.fix_pathinfo so PHP-CGI resolves
scripts relative to htdocs without absolute drive-letter paths in
SCRIPT_FILENAME.
- fatal() now shows a MessageBoxW dialog so failures are visible under
windows_subsystem = "windows" instead of silently exiting.
- MySQL init non-fatal: surfaced via mysql.last_error in the UI;
initialize_mysql wipes any leftovers in data_dir before running
--initialize-insecure so a partially-initialized dir self-heals.
- Apache config drops mod_unixd (POSIX-only) and the deprecated
BindAddress; mod_authn_core added.
- Long error messages truncated to 40 chars in the UI with the full
text on hover so they don't push other rows' buttons off-screen.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
0 commit comments