[ Team LiB ] |
![]() ![]() |
Some configure OptionsWhen we ran the configure script, we included some command-line arguments that determined the features the PHP engine will include. The configure script itself gives you a list of available options. From the PHP distribution directory, type the following:
./configure --help
The list produced is long, so you might want to add it to a file for reading at leisure: ./configure --help > configoptions.txt Although the output from this command is very descriptive, we will look at a few useful options—especially those that might be needed to follow this book. --with-gdbmThe --with-gdbm option includes support for the Gnu Database Manager. This or another DBM-type library needs to be supported for you to work with the DBA functions discussed in Hour 11, "Working with Files." If you are running Linux, this library is probably present, but see Hour 12, "Working with the DBA Functions," for alternatives. If your DBM library is in a nonstandard location, you might need to specify a path, as shown here: --with-gdbm=/path/to/dir --with-gd--with-gd enables support for the GD library, which, if installed on your system, allows you to create dynamic GIF or PNG images from your scripts. You can read more about creating dynamic images in Hour 15, "Images On-the-Fly." You can optionally specify a path to your GD library's install directory: --with-gd=/path/to/dir If your compile fails, you should try explicitly setting the path when using this option. Successful option combinations for compiling with GD support are subject to occasional change, so you should check the manual at http://www.php.net/gd for the latest information. At the time of writing, it is also necessary to specify a path to the zlib compression library (http://www.gzip.org/zlib/) to install GD successfully. We specified the path for the standard location like so: --with-zlib-dir=/usr/include We also want to use the GD library to work with JPEG files, so we have compiled in support for this as well: --with-jpeg-dir=/usr/lib This path points to the standard install directory for the jpeg-6b library that can be downloaded from ftp://ftp.uu.net/graphics/jpeg/. --with-freetype--with-freetype provides support for the FreeType 1 library that enables you to include fonts in any dynamic image you create. To enable this option, you must have the FreeType 1 library installed. You can find out more about FreeType at http://www.freetype.org. As with many other directives, if you run into problems you should try specifying a path: --with-freetype=/path/to/dir --with-mysql--with-mysql enables support for the MySQL database: --with-mysql=/path/to/dir MySQL is no longer bundled with PHP 5, so you should include this option if you intend to work with MySQL. As you know, PHP provides support for other databases. Table 2.1 lists some of them and the configure options you will need to use them.
--with-xsltThis book explores a number of XML features in Hour 22, "XML." All PHP functions now use the same library—libxml2, which is available from http://www.xmlsoft.org/. At the time of writing, of the standard sets of XML functions, only XSLT needs to be explicitly referenced when you run the configure script. Include this option to ensure that you can run all the examples in Hour 22. ![]() |
[ Team LiB ] |
![]() ![]() |