Unix/OpenBSD installs

This section contains notes and hints specific to installing PHP on OpenBSD.

Using Ports

This is the recommended method of installing PHP on OpenBSD, as it will have the latest patches and security fixes applied to it by the maintainers. To use this method, ensure that you have a recent ports tree. Then simply find out which flavors you wish to install, and issue the make install command. Below is an example of how to do this.

Example 2-3. OpenBSD Ports Install Example


$ cd /usr/ports/www/php4
$ make show VARNAME=FLAVORS
 (choose which flavors you want from the list)
$ env FLAVOR="imap gettext ldap mysql gd" make install
$ /usr/local/sbin/php4-enable
    

Using Packages

There are pre-compiled packages available for your release of OpenBSD. These integrate automatically with the version of Apache installed with the OS. However, since there are a large number of options (called flavors) available for this port, you may find it easier to compile it from source using the ports tree. Read the packages(7) manual page for more information in what packages are available.