This document is a WORK IN PROGRESS.
This is just a quick personal cheat sheet: treat its contents with caution!
PHP¶
PHP is a widely used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML.
Warning
This cheat sheet only describe PHP maintaining on Gentoo.
Table of contents¶
Install¶
Config¶
To install extensions, first decide which versions of PHP to compile the extensions for. This is
done by setting the PHP_TARGETS
variable of your make.conf
file (e.g. with version 5.6):
Warning
After modifying the above USE flag configuration, it is necessary to update the system so the
changes take effect: # emerge --ask --update --changed-use --deep @world
Use¶
-
List versions of the PHP
cli
module: -
List versions of the PHP
fpm
module:
Minor update procedure¶
E.g. update from 7.3 to 7.4:
# rc-service php-fpm stop # stop any running php
# eselect php set cli php7.4
$ eselect php list cli
# eselect php set fpm php7.4
$ eselect php list fpm
$ vi /etc/portage/make.conf
> ...
> PHP_TARGETS="php7-4"
> ...
Warning
After modifying the above USE flag configuration, it is necessary to update the system so the
changes take effect: # emerge --ask --update --changed-use --deep @world
Then start the service:
Quick check that PHP doesn't throw any warnings or errors:
If the update seems stable, and that php:7.3
is in the world set, then you might
consider replacing php:7.3
by php:7.4
in the world set:
Major update procedure¶
TODO
If this cheat sheet has been useful to you, then please consider leaving a star here.