fb

Ads

Pages

Packaging PHP

The packaging rules for handling mod_php and any dependent libraries it has are similar to the Apache guidelines. Make a single master distribution that reflects the features and build requirements that every machine you run needs.Then bundle additional packages that provide custom or nonstandard functionality. Remember that you can also load PHP extensions dynamically by building them shared and loading them with the following simple php.ini line:

extension = my_extension.so 


An interesting (and oft-overlooked) configuration feature in PHP is config-dir support. If you build a PHP installation with the configure option
--with-config-file-scan-dir , as shown here:
./configure [ options ] --with-config-file-scan-dir=/path/to/configdir

 
then at startup, after your main php.ini file is parsed, PHP will scan the specified directory and automatically load any files that end with the extension .ini (in alphabetical order). In practical terms, this means that if you have standard configurations that go
with an extension, you can write a config file specifically for that extension and bundle.



it with the extension itself.This provides an extremely easy way of keeping extension configuration with its extension and not scattered throughout the environment.

0 comments:

Post a Comment