30.07.2012 Views

Reference Guide

Reference Guide

Reference Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Zend Server <strong>Reference</strong> Manual<br />

UNIX: Compiling PHP Extensions<br />

This procedure describes how to compile a PHP extension. Zend Server includes over 77 extensions<br />

however there still may be a PHP extension that you want to compile by yourself.<br />

Requirements:<br />

208<br />

PHP Tools:<br />

• PECL (PHP Extension Community Library): PECL is a repository for PHP extensions,<br />

providing a directory of all known extensions and hosting facilities for download and<br />

development of PHP extensions. - It is also a tool supplied in the form of a small shell<br />

script with PHP code behind it to retrieve extensions from the aforementioned repository.<br />

• phpize: a shell script to generate a configure script for PHP extensions<br />

Build Tools:<br />

While PHP can be built using many different tool chains, this article will focus on using the GNU<br />

tool chain. The main tools where PHP is concerned are:<br />

• autoconf: automatic configure script builder. This is called by the phpize script.<br />

• automake: a tool for generating GNU Standards-compliant Makefiles<br />

• libtool: Generic library support script. Libtool hides the complexity of generating special<br />

library types (such as shared libraries) behind a consistent (sort of :) ) interface.<br />

• GNU make: a GNU tool for controlling the generation of executables and other nonsource<br />

files of a program from the program's source files<br />

• GCC: PHP extensions are typically written in C. Hence, in order for them to compile, you<br />

would need a C compiler. While GCC now stands for GNU compiler Collection and is no<br />

longer just a GNU C Compiler, for our purposes we only need the C part of the collection.<br />

GNU's elf-binutils package: The programs in this package are used to assemble, link and<br />

manipulate binary and object files.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!