ObiHill
ObiHill

Reputation: 11876

What is the right way to load a zend extension in the php-fpm.conf?

I'm trying to load the ioncube loader via the php-fpm.conf file.

I know you're probably wondering why I didn't use the php.ini, but it's a little complicated and you can see more of why here (Does each PHP-FPM Worker individually load php.ini?).

Anyway, I am loading my other extensions from this file (php-fpm.conf) using the following directive in the php-fpm.conf:

php_admin_value[extension]=<extension_name>.so

So for example, php_admin_value[extension]=apc.so loads APC from the extension_dir (which is defined in my php.ini). It works ok and solves a few issues I was having with defining extensions via the php.ini.

However, using the zend_extension directive does not work. So the following doesn't seem to work

php_admin_value[zend_extension]=/usr/lib/php5/20090626/ioncube_loader_lin_5.3.so

Is there something I'm missing? I'd appreciate some help.

Thanks in advance.

Upvotes: 7

Views: 11121

Answers (2)

Gunah
Gunah

Reputation: 61

you can only define a php file with php-fpm command

# copy php.ini, and enable all extensions here
cp /etc/php5/php.ini /etc/php5/my-php.ini
# copy fpm config and set a new pool dir
cp /etc/php5/fpm/php-fpm.conf /etc/php5/fpm/php-fpm-my-config.conf
# create a new pool conf and create a new start script
php-fpm -c /etc/php5/my-php.ini --fpm-config /etc/php5/fpm/php-fpm-my-config.conf

thats all :)

had the same question, thats why i answered here ;-)

Upvotes: 3

danielrsmith
danielrsmith

Reputation: 4060

I think Zend Extensions can only be loaded in the php.ini

Upvotes: 2

Related Questions