The following settings files in the project codebase can be used to override default PHP settings:
.docksal/etc/php/php.ini- global PHP (web and cli) settings overrides
.docksal/etc/php/php-fpm.conf- PHP-FPM (web) overrides on top of what’s set globally
Some PHP-FPM (web) settings set by default in the cli container cannot be overridden via
The following settings have to be overridden using the
php_admin_value directive in
It is recommended to add PHP settings overrides in both
php-fpm.conf at the same time.
Once settings are in place, apply changes with
fin project restart (
fin p restart).
Different PHP versions are handled via using different
cli service images.
When using the default stack (a custom project stack is not defined in
.docksal/docksal.yml), switching can be done
CLI_IMAGE variable in
This can also be set with
fin config set.
fin config set CLI_IMAGE='docksal/cli:php8.1-3.2'
fin project reset cli (
fin p reset cli) to properly reset and update the
Available PHP versions: 7.4, 8.0, 8.1 supported, and 7.3, 7.2, 7.1, 7.0, 5.6 deprecated. Check the list of the available CLI images for the full list.
There are also “edge” versions available that contain code from ongoing updates, but may not be stable. Don’t switch to an edge image unless directed to do so by the Docksal team for testing purposes only.
See documentation for projects using a custom stack configuration.
Was this page helpful?
Thanks for the feedback. If you have a specific, answerable question about how to use Docksal, ask it in Discussions on GitHub. Open an issue if you want to report a problem or suggest an improvement. You can also contribute changes to this page using the link in the top right corner.