Skip to content

fix: enable common PHP extensions on fresh install - #5

Open
sanayasfp wants to merge 1 commit into
mainfrom
fix/php-fresh-install-extensions
Open

sanayasfp wants to merge 1 commit into
mainfrom
fix/php-fresh-install-extensions

Conversation

@sanayasfp

Copy link
Copy Markdown
Owner

Why

Fresh PHP installs from stack (projects, profiles, exec --with) left mbstring, zip, curl, gd, intl, mysqli, sqlite3 and exif disabled. Typical Laravel, Symfony, WordPress and Composer setups needed hand edits to php.ini.

What

  • Added curl, mbstring, zip, intl, gd, mysqli, exif and sqlite3 to PHP_FRESH_INSTALL_EXTENSIONS. Also added openssl, so stack enables it without relying on the vfox plugin.
  • An extension line is uncommented only when ext/php_<name>.dll exists, the same rule as the OPcache check. Builds that drop or merge an extension still start.
  • Lines are uncommented in place, so exif keeps loading after mbstring.

Tests

  • Updated patch_php_ini_content_enables_the_curated_extension_list. Extensions outside the list (snmp, soap, ffi) stay commented.
  • New tests: a missing DLL leaves the line commented, exif stays after mbstring, and an already-enabled openssl is not duplicated.
  • cargo build and cargo test pass (97 tests).

Not in this PR

The optional stack doctor --fix step for installs made before this change is left for a follow-up.

Closes #3

Beyond the extensions listed in #3, also enable openssl explicitly
(previously only enabled by the vfox plugin) and sqlite3.
Extensions are only uncommented when ext/php_<name>.dll exists.

This branch has not been deployed

No deployments
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.

Fresh PHP installs leave mbstring, zip, curl, gd, intl and other common extensions disabled

1 participant