PHP - Void Linux Handbook (original) (raw)
- 1. About
- 2. Installation
- 3. Configuration
- 3.1. Package Documentation
- 3.2. Firmware
- 3.3. Locales and Translations
- 3.4. Users and Groups
- 3.5. Services and Daemons - runit
- 3.6. rc.conf, rc.local and rc.shutdown
- 3.7. Cron
- 3.8. Solid State Drives
- 3.9. Security
- 3.10. Date and Time
- 3.11. Kernel
- 3.12. Power Management
- 3.13. Network
- 3.14. Network Filesystems
- 3.15. Session and Seat Management
- 3.16. Graphical Session
- 3.17. Multimedia
- 3.18. Bluetooth
- 3.19. TeX Live
- 3.20. External Applications
- 3.21. Printing
- 3.22. Containers and Virtual Machines
- 3.23. OpenPGP
- 3.24. PHP
- 4. XBPS Package Manager
- 5. Contributing
PHP
There are two ways to install PHP packages with XBPS:
- Using the versioned packages (recommended).
- Using the meta-packages.
Versioned PHP Packages
It is generally recommended to use versioned PHP packages (e.g. php8.1
,php8.1-apcu
, etc.) for most use cases as this ensures a consistent environment on updates with minimal or no intervention required.
In Void, the php
package is a meta-package that points to the latest upstream PHP version. This convention is followed by all packages prefixed with php-
, such as php-fpm
, as well as xdebug
and composer
. See the phptemplatefor a complete list. It is recommended to only use these meta-packages for development purposes.
When using a PHP meta-package, be warned that updating may require manual intervention if a new major PHP version has been added to the repository. As a part of the version change, the configuration location will change to reflect the new version. For example, upgrading from 8.0 to 8.1 would result in the configuration path changing from /etc/php8.0
to /etc/php8.1
. Any customizations that have been made need to be manually applied to the new configuration directory.
php-fpm
updates require special care since they include a runit service. In this case, ensure that the new runit service is started and that applications using the previous version of php-fpm
can access the new php-fpm
instance. In particular, make sure any applications accessing the FPM instance have the correct TCP/unix socket address.