home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  

Programming PHPProgramming PHPSearch this book

Appendix B. Extension Overview

In addition to the functions from the standard extensions described in Appendix A, a number of optional extensions provide PHP with additional functionality. Generally, these optional extensions are interfaces to third-party code libraries. To use these functions, you need to install the libraries they depend on and recompile PHP with the appropriate compile-time directives.

This chapter is intended as a complete tour of the extensions provided with the PHP distribution, but not as a definitive reference to the functions provided by those extensions. Additional documentation for these extensions is available from the PHP web site http://www.php.net.

B.1. Optional Extensions Listing

The extensions are listed in this appendix in alphabetical order by extension name. Where necessary, the appropriate PHP compile-time directive is given for adding the extension to your PHP installation. Due to the fluid nature of the Web, locations are not given for downloading third-party libraries necessary to run the extensions; check the PHP web site for current download locations.


clibpdf provides functions to create documents in Adobe's PDF format on the fly. Unlike the free pdflib (see pdflib later in this appendix), clibpdf can create PDF files wholly in memory, without the use of temporary files, and can edit arbitrary pages within a multi-page document. See Chapter 10 for a detailed discussion of creating PDF documents.

To use the clibpdf functions, you must install clibpdf and compile PHP with the --with-clibpdf directive.


The DOM XML library uses GNOME's libxml to create DOM-compliant object trees from XML files (and the reverse). DOM XML parsers differ from event-based parsers in that you point them at a file, and they give you a tree of various nodes. See Chapter 11 for a detailed discussion of using XML in PHP.

To enable the DOM XML extension, you must install GNOME libxml, Version 2.2.7 or later, and compile PHP with the --with-dom[=DIR] directive.


pdflib provides support for creating PDF documents on the fly. See Chapter 10 for a detailed discussion of creating PDF documents.

To enable this extension, you must install pdflib, the JPEG library, and the TIFF library and compile PHP with the --with-pdflib[=DIR] option. You will also need to specify directories for the zlib library using --with-zlib-dir[=DIR], the JPEG library using --with-jpeg-dir[=DIR], the PNG library using --with-png-dir[=DIR], and the TIFF library using --with-tiff-dir[=DIR].


These functions are intended for work with WDDX, an XML-based standard for exchanging data between applications. See Chapter 11 for a detailed discussion of using XML in PHP.

The WDDX library is not enabled by default. To use it, you must install the expat library and compile PHP with the --with-xml[=DIR] and --enable-wddx directives.

Library Navigation Links

Copyright © 2003 O'Reilly & Associates. All rights reserved.