Adding Extensions
This section includes information for the following Operating Systems:
- Zend Server on UNIX/Linux
- Zend Server Community Edition on UNIX/Linux/Mac
- Zend Server for IBM i
Zend Server users can benefit from extension management capabilities for third party extensions as well as for Zend Extensions. This enables users to load and unload all extensions directly from the Zend Server Extensions page.
Important: The newly added extensions will be visible in the Administration Interface’s Extensions page however, the directive configuration option will not be active and directives belonging to the extension have to be configured directly from the php.ini file.
Zend Technologies does not provide support for third party products, including extensions. Therefore, if an issue for support arises, please remove all third party extensions by commenting out the reference to them in your php.ini before referring to the Support Center — http://www.zend.com/en/support-center/.
There are two types of extensions: PHP extensions and Zend extensions. The extension provider should supply information regarding the extension type (Zend or PHP). Make sure to also check the provider’s documentation for possible compatibility issues, PHP version compatibility and any other additional configurations that may be required.
- Download the extension
Note: — AIX Unix/Linux extensions end with the .so suffix. - Place the extension in your extensions directory.
To locate the extensions directory, open the Administration Interface to Monitor | PHP Info and check the value for the directive extension_dir=.
By default, your extensions directory is located in:
/zend/lib/php_extensions - Add the following line to your php.ini:
zend_extension= - Restart your server.
- To restart your server : Click Restart Server in the Administration Interface. Ensure that the extension is properly loaded by checking the output of PHPInfo in the Administration Interface.
If you try to load a PHP extension as a Zend extension, in Linux you may receive the following error message in your server’s error log: » doesn’t appear to be a valid Zend extension.»
If this occurs, remove it and add it as a PHP extension, following the instructions under «To Add PHP Extensions», below.
- Download the third party extension. Many third party extensions can be found at http://pecl.php.net.
Extensions are obtained directly from external web repositories. - Place the PHP extension in your extensions directory.
To locate the extensions directory, open your php.ini and check the value for the directive extension_dir=.
By default, your extensions directory is located in:
/lib/php_extensions - Add the following line to your php.ini:
extension=.so
Ensure that you replace with your extension’s name. - Restart your Web server.
Ensure that the extension is properly loaded by checking the Administration Interface: See Monitor | PHP Info for the output of PHP Info.
The extensions appear in your Administration Interface under the Extensions tab and you can use the Administration Interface to load and unload the extension.
Adding Extensions for Windows
The following procedure describes how to download compiled extensions for Wndows DLL files.
When downloading extensions for Windows from PECL, make sure to download the non thread-safe (NTS) version ONLY .
- Go to: http://www.php.net/downloads.php.
- In the Windows binaries section, select: » PECL Non-thread-safe Win32 binaries » (64-bit users can use this too).
- Click the package to start a download process. Follow the download instructions and extract the ZIP file.
- Select the .dll you want.
- To add the extension, go to the extension directory, \ZendServer\lib\phpext, and add the .dll file there.
- Go to your php.ini file and add the following line: extension=.dll.
- To verify that the extension was loaded properly, go to Setup | Extensions and locate the extension from the list.
When loading new extensions, also examine the log files.
For more information on these extensions, go to http://pecl4win.php.net/ .
Note: The extensions in this site are thread-safe and therefore should not be downloaded for use with Zend Server .
Some extensions need directives to change the Extension’s default configurations. These directives should be added added to your php.ini file manually. There is no way to predict which directives extensions may have: For each third party extension you want to add, make sure to go to the project’s source site to check for additional information related to the extension.
Compiling Extensions
Under Unix/Linux operating systems you can also create and compile your own extensions using the phpize command.
External extensions are not supported by Zend. If you encounter a problem, remove any additional extensions before contacting Zend Support.
Building PHP extensions from source requires basic UNIX skills as well as several build tools, among others:
- An ANSI C compiler
- flex: Version 2.5.4
- bison: Version 1.28 (recommended), 1.35, or 1.75
- Any specific components or libraries required by the extension being built (such as gd, pdf libs, etc.)
To compile extensions from source:
- Download and extract the extension’s source.
- Switch to the extension source directory (by default located in /Zend/ZendServer/lib/phpext) and run the following commands:
Ensure that you replace with your extension directory’s name.
- Run the ./configure command to prepare the source for compilation. You will need to include the «php-config» and «enable-shared» flags as follows:
Some extensions will need additional configuration flags. It is therefore advised to run «./configure —help» and review the possible flags before compiling.
Make install should install the new .so extension binary in Zend Server ‘s extension directory.
Replace with your extension’s binary name.
- Restart your Web server.
- Ensure that the extension is properly loaded by checking the output of PHP Info. This can be viewed in the Zend Server PHP Info page.
The extension appears in your Administration Interface under the Extensions page and you can use the Administration Interface to load and unload the extension.
Adding Extensions
This section includes information for the following Operating Systems:
Zend Server users can benefit from extension management capabilities for third party extensions as well as for Zend Extensions. This enables users to load and unload all extensions directly from the Zend Server Extensions page.
Important: The newly added extensions will be visible in the User Interface’s PHP page however, the directive configuration option will not be active and directives belonging to the extension have to be configured directly from the php.ini file.
Zend Technologies does not provide support for third party products, including extensions. Therefore, if an issue for support arises, please remove all third party extensions by commenting out the reference to them in your php.ini before referring to the Support Center.
There are two types of extensions: PHP extensions and Zend extensions. The extension provider should supply information regarding the extension type (Zend or PHP). Make sure to also check the provider’s documentation for possible compatibility issues, PHP version compatibility and any other additional configurations that may be required.
If you try to load a PHP extension as a Zend extension in Linux, you may receive the following error message in your server’s error log: » doesn’t appear to be a valid Zend extension.» If this occurs, remove it and add it as a PHP extension, following the instructions under To Add PHP Extensions, below.
- Download the third party extension. Many third party extensions can be found at http://pecl.php.net.
Extensions are obtained directly from external web repositories. - Place the PHP extension in your extensions directory.
To locate the extensions directory,go to PHP | Extensions , and check the value for the extension_dir directive.
By default, your extensions directory is located in:
/lib/php_extensions - Add the following line to your php.ini:
extension=.so
Ensure that you replace with your extension’s name. - Restart your Web server.
Ensure that the extension is properly loaded by checking the User Interface: See PHP | phpinfo() for the output of PHP Info.
The extensions appear in your User Interface under the Extensions tab and you can use the User Interface to load and unload the extension.
The following procedure describes how to download compiled extensions for Wndows DLL files.
When downloading extensions for Windows from PECL, make sure to download the non thread-safe (NTS) version ONLY .
- Go to: http://www.php.net/downloads.php.
- In the Windows binaries section, select: » PECL Non-thread-safe Win32 binaries » (64-bit users can use this too).
- Click the package to start a download process. Follow the download instructions and extract the ZIP file.
- Select the .dll you want.
- To add the extension, go to the extension directory, \ZendServer\lib\phpext, and add the .dll file there.
- Go to your php.ini file and add the following line: extension=.dll.
- To verify that the extension was loaded properly, go to PHP | Extensions and locate the extension from the list.
When loading new extensions, also examine the log files.
For more information on these extensions, go to https://pecl.php.net/ .
Note: The extensions in this site are thread-safe and therefore should not be downloaded for use with Zend Server .
Some extensions need directives to change the Extension’s default configurations. These directives should be added added to your php.ini file manually. There is no way to predict which directives extensions may have: For each third party extension you want to add, make sure to go to the project’s source site to check for additional information related to the extension.
Under Unix/Linux operating systems you can also create and compile your own extensions using the phpize command.
External extensions are not supported by Zend. If you encounter a problem, remove any additional extensions before contacting Zend Support.
Building PHP extensions from source requires basic UNIX skills as well as several build tools, among others:
- An ANSI C compiler
- flex: Version 2.5.4
- bison: Version 1.28 (recommended), 1.35, or 1.75
- Any specific components or libraries required by the extension being built (such as gd, pdf libs, etc.)
To compile extensions from source:
- Download and extract the extension’s source.
- Switch to the extension source directory (by default located in /Zend/ZendServer/lib/phpext) and run the following commands:
Ensure that you replace with your extension directory’s name.
- Run the ./configure command to prepare the source for compilation. You will need to include the «php-config» and «enable-shared» flags as follows:
Some extensions will need additional configuration flags. It is therefore advised to run «./configure —help» and review the possible flags before compiling.
Make install should install the new .so extension binary in Zend Server ‘s extension directory.
Replace with your extension’s binary name.
- Restart your Web server.
- Ensure that the extension is properly loaded by checking the output of PHP Info. This can be viewed in the Zend Server PHP Info page.
The extension appears in your User Interface under the Extensions page and you can use the User Interface to load and unload the extension.