PHP packages finally released


Note : This page may contain outdated information and/or broken links; some of the formatting may be mangled due to the many different code-bases this site has been through in over 20 years; my opinions may have changed etc. etc.

Finally got them off to the mirrors. And of course, life being what it is, the moment I do that, PHP 4.4.1 source is released. Hey ho… Still, the official announcement is included in the full text of this post. Expect to see 4.4.1 packages in a few days… Oh, and PostgreSQL 8.1.0 packages as soon as the final release is announced. I’ve been building all the betas and RCs so am ready to get new packages out there as soon as it’s available. <blockquote> New PHP 4.4.0 packages are now available from the mirror sites. There are a number of changes with these packages over previous 4.3.x packages - please make sure you read the following to find out how this move will affect your installation.

  1. Changes in packaging

1.1 Modular extensions

The PHP packages now include a very minimal “core”. Many extensions are now built as shared libraries and have been split off into their own packages. The reasoning behind this is that a user can just grab what they need, instead of a huge monolithic build of PHP that eats up memory with things that they very probably don’t need - not to mention saving space and time by not downloading all the various dependencies that go with it.

Under this new system, if you just want PHP with, say MySQL and OpenSSL support, you would install the core PHP package (and optionally, the mod_php Apache extension) then php4_mysql and php4_openssl.

1.2 Multiple SAPIs, Apache 2 support, standalone CGI package

As a user may just want the CLI or CGI executables, these are now shipped in the core php4_cgi package, which all other PHP4 packages now depend on. This includes the binaries, PEAR libraries, and various headers. It also takes care of installing a php.ini, if none exists. This is also the package you’d use if you wanted to set up a FastCGI environment.

If you actually want mod_php for either Apache 1.3.x or 2.0.x, you’d install mod_php4_core (CSWmodphp4).

This includes a dependency on php4_cgi, so if you install this, you’ll also get the PEAR libraries and “foundations” needed for PHP to function etc. It now includes an Apache 2 module shipped alongside the standard Apache 1. These have both been relocated to /opt/csw/lib/php/sapi. The postinstall script will check for the presence of CSWapache or CSWapache2, and if found, will activate itself. As long as both servers are listening on different ports, you can even run both on the same machine.

The big caveat here is that if you are using Apache 2 and PHP, you should only ever use the prefork MPM.

There is also a “bundle” package, mod_php (CSWphp), which now doesn’t contain any files, but does contain dependencies for php4_cgi, mod_php4_core, apache 1.3.x, and all the extensions. This emulates the behavious of the old monolithic CSWphp build; for a full PHP4 installation, this is the package you’d install (pkg-get -i php).

  1. Upgrading a current installation

If you are using a current CSWphp installation, upgrade your catalog, and then upgrade the “mod_php” package. This will then upgrade your mod_php to the new dummy build, and install the core php4_cgi and mod_php4_core packages, along with all extensions.

This will however leave you with a full PHP installation, and you may then want to uninstall some of the PHP extensions you are not using. </blockquote>