PHP - Void Linux Handbook (original) (raw)

  1. 1. About
    1. 1.1. History
    2. 1.2. About This Handbook
    3. 1.3. InfraDocs
  2. 2. Installation
    1. 2.1. Live Installers
      1. 2.1.1. Prepare Installation Media
        1. 2.1.2. Partitioning Notes
        2. 2.1.3. Installation Guide
    2. 2.2. Advanced Installation Guides
      1. 2.2.1. Installation via chroot (x86/x86_64/aarch64)
        1. 2.2.2. Full Disk Encryption
        2. 2.2.3. Root on ZFS
        3. 2.2.4. ARM Devices
          1. 2.2.4.1. Apple Silicon (Asahi)
            1. 2.2.4.2. Lenovo Thinkpad X13s
            2. 2.2.4.3. Pinebook Pro
            3. 2.2.4.4. Raspberry Pi
    3. 2.3. musl
  3. 3. Configuration
    1. 3.1. Package Documentation
      1. 3.1.1. Manual Pages
    2. 3.2. Firmware
    3. 3.3. Locales and Translations
    4. 3.4. Users and Groups
    5. 3.5. Services and Daemons - runit
      1. 3.5.1. Per-User Services
        1. 3.5.2. Logging
    6. 3.6. rc.conf, rc.local and rc.shutdown
    7. 3.7. Cron
    8. 3.8. Solid State Drives
    9. 3.9. Security
      1. 3.9.1. AppArmor
    10. 3.10. Date and Time
    11. 3.11. Kernel
    12. 3.12. Power Management
    13. 3.13. Network
      1. 3.13.1. Firewalls
      2. 3.13.2. wpa_supplicant
      3. 3.13.3. IWD
      4. 3.13.4. NetworkManager
      5. 3.13.5. ConnMan
    14. 3.14. Network Filesystems
    15. 3.15. Session and Seat Management
    16. 3.16. Graphical Session
      1. 3.16.1. Graphics Drivers
        1. 3.16.1.1. AMD or ATI
          1. 3.16.1.2. Intel
          2. 3.16.1.3. NVIDIA
          3. 3.16.1.4. NVIDIA Optimus
      2. 3.16.2. Xorg
      3. 3.16.3. Wayland
      4. 3.16.4. Fonts
      5. 3.16.5. Icons
      6. 3.16.6. XDG Desktop Portals
      7. 3.16.7. GNOME
      8. 3.16.8. KDE
    17. 3.17. Multimedia
      1. 3.17.1. ALSA
      2. 3.17.2. PipeWire
      3. 3.17.3. PulseAudio
    18. 3.18. Bluetooth
    19. 3.19. TeX Live
    20. 3.20. External Applications
    21. 3.21. Printing
    22. 3.22. Containers and Virtual Machines
      1. 3.22.1. Chroots and Containers
      2. 3.22.2. libvirt
      3. 3.22.3. LXC
    23. 3.23. OpenPGP
    24. 3.24. PHP
  4. 4. XBPS Package Manager
    1. 4.1. Advanced Usage
    2. 4.2. Repositories
      1. 4.2.1. Mirrors
          1. 4.2.1.1. Changing Mirrors
            1. 4.2.1.2. Using Tor Mirrors
        1. 4.2.2. Restricted Packages
        2. 4.2.3. Custom Repositories
        3. 4.2.4. Signing Repositories
    3. 4.3. Troubleshooting XBPS
      1. 4.3.1. Common Issues
        1. 4.3.2. Static XBPS
  5. 5. Contributing
    1. 5.1. Contributing To void-docs

PHP

There are two ways to install PHP packages with XBPS:

  1. Using the versioned packages (recommended).
  2. 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.