Enable geoip & imagemagick in PHP

#1
OK... I've tried the process of /usr/local/lsws/lsphp5/bin/pecl install imagick to install imagemagick and the same for geoip. The .so files get written to the /usr/local/lsws/lsphp5/lib/php/extensions/no-debug-non-zts-20121212 location but when I place the extenstion=geoip.so (and the one for imagemagick) in the php.ini file I get the following error.
Code:
root@marge:/usr/local/lsws/lsphp5/lib# /usr/local/lsws/fcgi-bin/lsphp5 -i >/home/tracy/inf.txt
PHP Warning:  PHP Startup: Unable to load dynamic library './imagick.so' - ./imagick.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library './geoip.so' - ./geoip.so: cannot open shared object file: No such file or directory in Unknown on line 0
Can this be compiled into php at compile time? And if so, what extra arguments are used?

This is being installed (and compiled) on a Debian system. I've got to get at least this (and password protection) working before I can move from nginx over.
 
Last edited:
#2
OK... think I found the problem. In the generated php.ini the extension_dir is set at
Code:
extension_dir = ./
and it needs to be set at
Code:
extension_dir = /usr/local/lsws/lsphp5/lib/php/extensions/no-debug-non-zts-20121212/
.
One problem now is that the PHP 5.5.x opcode cache is not enabled (and I configured it with it enabled during php compile time) and included the extension. It does not show up on the php info page.
 
#4
php.net/manual/en/opcache.installation.php
so it's
Code:
zend_extension=/usr/local/lsws/lsphp5/lib/php/extensions/no-debug-non-zts-20121212/opcache.so
Yep.... found it after a lengthy Google search - so it's all working now. Still trying to get the admin.php password protected (got the /install done). Not THAT worried about it since they are protected (the XenForo sites) by Google authenticator.
 
Top