PHP Imlib2 Extension (php_imlib) ================================ Dependency Libraries -------------------- Before building this extension, Imlib2 will need to be installed somewhere on the system. Imlib2 itself depends on freetype for rendering text and the relevant underlying image libraries for the desired image formats. At the very least Imlib2 needs libpng and libjpeg. Lastly, Imlib2 needs a DB loader, edb. Sources for these libraries can be found at: Imlib2, edb: http://download.sourceforge.net/enlightenment/ freetype: http://freetype.sourceforge.net libjpeg: http://www.ijg.org libpng: http://www.libpng.org/pub/png/libpng.html You may want to look first on your distribution CD/FTP or http://rpmfind.net for binary packages. Please note that you will also need -devel packages! Standalone Installation ----------------------- To avoid recompiling PHP itself, build php_imlib as a self-contained extension (imlib.so) and reference it via the extensions directive in php.ini. Use of the dl() function is discouraged! tar -zxvf php_imlib-0.4pre1.tar.gz cd imlib phpize ./configure [--with-imlib=/path/to/Imlib2] [other args] make make install Built-in Extension Installation ------------------------------- To build php_imlib into PHP, extract the extension into the ext/ subdirectory of the PHP source tree, run buildconf, and recompile. tar -C /path/to/php_src/ext -zxvf php_imlib-0.4pre1.tar.gz cd /path/to/php_src ./buildconf ./configure --with-imlib[=/path/to/Imlib2] [other args] make make install Configuration ------------- The only relevant configuration parameter that php_imlib recognizes is imlib.font_path, used to define which directories are automatically checked for fonts. It can be set at a system or directory level, or if it isn't defined, the default value is /usr/local/share/fonts. php.ini example: [Imlib] imlib.font_path = /usr/local/share/fonts:/web/www.domain.com/fonts httpd.conf example: php_value imlib.font_path /web/www.domain.com/fonts Troubleshooting --------------- * phpinfo() does not show any filters - upgrade Imlib2 to version 1.0.5 or later * PHP segfaults while trying to use filters - try to apply this patch: http://pp.siedziba.pl/PLD/imlib2-filters-bugfix.patch * TGA loader does not work - apply this patch: http://pp.siedziba.pl/PLD/imlib2-loader_tga-bugfix.patch