Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

php

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.

like image 994
ObiHill Avatar asked Nov 18 '11 20:11

ObiHill


People also ask

Where do I put Zend extension in PHP INI?

Go to your php. ini file and add the following line: extension=<extension_name>. dll. To verify that the extension was loaded properly, go to Setup | Extensions and locate the extension from the list.

What is a Zend extension?

A Zend extension hooks into "lower levels" of the language. A single extension can be both a PHP extension AND a Zend extension as well. Xdebug is both, for example, using the Zend extension component to hook into lower layers of the language to intercept calls for debugging.

Where is PHP-FPM config file?

The configuration file is /etc/php- fpm.


2 Answers

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 ;-)

like image 71
Gunah Avatar answered Oct 03 '22 02:10

Gunah


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

like image 36
danielrsmith Avatar answered Oct 03 '22 03:10

danielrsmith