30.07.2012 Views

Reference Guide

Reference Guide

Reference Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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

Compiling Extensions<br />

Under Unix/Linux operating systems you can also create and compile your own extensions using the<br />

phpize command.<br />

Disclaimer:<br />

External extensions are not supported by Zend. If you encounter a problem, remove any additional<br />

extensions before contacting Zend Support.<br />

Building PHP extensions from source requires basic UNIX skills as well as several build tools, among<br />

others:<br />

206<br />

An ANSI C compiler<br />

flex: Version 2.5.4<br />

bison: Version 1.28 (recommended), 1.35, or 1.75<br />

Any specific components or libraries required by the extension being built (such as gd, pdf libs,<br />

etc.)<br />

To compile extensions from source:<br />

1. Download and extract the extension's source.<br />

2. Switch to the extension source directory (by default located in<br />

/Zend/ZendServer/lib/phpext) and run the following commands:<br />

cd <br />

/bin/phpize<br />

Ensure that you replace with your extension directory's name.<br />

3. Run the ./configure command to prepare the source for compilation. You will need to include<br />

the "php-config" and "enable-shared" flags as follows:<br />

./configure --with-php-config=/bin/php-config\<br />

--enable-shared<br />

Note:<br />

Some extensions will need additional configuration flags. It is therefore advised to run<br />

"./configure --help" and review the possible flags before compiling.<br />

4. Compile and install the extension binaries by running the following commands:<br />

make<br />

make install<br />

Make install should install the new .so extension binary in Zend Server's extension directory.<br />

5. Add the following line to your php.ini to load your new extension:<br />

extension=.so

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

Saved successfully!

Ooh no, something went wrong!