Skip to content

feat: home-directory install path, offline mode, caching, and fixes#4

Open
DaFa66 wants to merge 17 commits into
getphporg:mainfrom
DaFa66:main
Open

feat: home-directory install path, offline mode, caching, and fixes#4
DaFa66 wants to merge 17 commits into
getphporg:mainfrom
DaFa66:main

Conversation

@DaFa66

@DaFa66 DaFa66 commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

*NIX script alignment

  • Install path moved from c:\webstack to %USERPROFILE%\getphp (e.g. C:\Users<you>\getphp) — aligns with the Unix/Mac getphp.sh convention of ~/getphp
  • Log files centralised to %USERPROFILE%\getphp\logs\ — Apache, PHP, and MariaDB logs now share a single directory

Features

  • Offline mode — .\getphp.ps1 -Offline skips URL resolution and downloading, uses pre-cached zips from %TEMP%\webstack_downloads- Sodium PHP extension enabled by default — required by phpMyAdmin v6.0.0 when installed via offline mode
  • Download caching — component zips, SQLite3 DLL, and VC++ Redistributable installer persist in %TEMP%\webstack_downloads\ and are reused when the version hasn't changed

Fixes

  • Offline phpMyAdmin — zip was identified but never extracted; now handled alongside Apache, PHP, and MariaDB
  • Offline Apache flattening — Invoke-ExtractZip now handles multi-file zips
  • Log cleanup on delete — logs/ directory now removed when stack is deleted
  • MariaDB logging — my.ini written with log-error path before initialization

Refactoring

  • Service registration deduplicated — identical Apache + MariaDB service install code appeared in 3 places; now routes through Install-AsServices (20+ lines removed, single source of truth)

DaFa66 added 17 commits June 13, 2026 12:19
- Add pinned fallback URLs for Apache Lounge & phpMyAdmin when live
  HTML scraping fails (page restructures, server downtime)
- Replace MariaDB HttpWebRequest redirect chain with native
  Invoke-WebRequest -MaximumRedirection 0 (no namespace risk)
- Add 3x retry loop to VC++ Redistributable direct download
- Add -Offline switch: skip URL resolution and use pre-downloaded
  zips from $TEMP_DOWNLOADS
- New Invoke-ExtractZip helper for offline extraction

— assisted by Hymie (DaFa's AI)
- MariaDB: construct direct archive URL instead of REST API redirector
- MariaDB: add fallback to FALLBACK_URLS when REST API resolution fails
- MariaDB: write my.ini with log-error path to logs/ directory
- MariaDB: fix --log-error not taking effect (remove --console from Start-Process)
- Download: remove broken manual redirect loop; use standard Invoke-WebRequest
- Install: skip re-download when components already at latest version
- Install: change default path from %APPDATA% to %USERPROFILE%
- Install: move 'Installation Complete!' banner after services + phpMyAdmin storage
- Logs: consolidate Apache/PHP/MariaDB logs into logs/ directory
- UX: add getPHP ASCII banner at script start (shared with dashboard)
- UX: add completion banner to delete flow
- UX: spacing and progress message improvements
- Docs: update README_Win.md with new paths, logs, and MariaDB changes
- Keep zips after extraction instead of deleting them
- Check for matching cached zip before downloading (version-specific filenames)
- Benefits offline mode and speeds up re-installs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant