Another small change which could happen in F21
Numeric prefix for configuration file.
Problem:
- in upstream PHP, extensions are load in any order with RTLD_LAZY (no
no symbol resolution required), then extensions are initialized in the
correct order (according to dependencies, included in extension
description internal structure).
- in our RPM, extension must be load in correct order (with RTLD_NOW,
all symbol must be satisfied at load time, for security reason).
For now, alphabetical order is used, but is sometime really messy...
Example:
mysqlnd.ini
mysqlnd_mysqli.ini
mysqlnd_mysql.ini
k-uopz.ini (to be loaded before opcache)
z-event.ini (after sockets)
z-mailparse.ini (after mbstring)
z-memcached.ini (after json, igbinary and msgpack)
etc
Proposal (default rule)
Main PHP, for zend extensions (only opcache)
10-foo.ini
Main PHP, for other extensions
20-foo.ini
Pecl extensions
30-foo.ini (if no dependency)
Notice : a pecl extension, without numerical prefix will be load after,
so should not raise any order issue.
Example:
05-uopz.ini (before opcache)
10-opcache.ini (default rule)
15-xdebug.ini (after opcache)
...
20-mbstring.ini (default)
20-sockets.ini (default)
30-event.ini (default pecl, after sockets)
30-igbinary.ini (default pecl)
30-mailparse.ini (default pecl, and after mbstring)
30-msgpack.ini (default pecl)
40-memcached.ini (after json, igbinary and msgpack)
...
How to Find dependencies
From sources:
$ grep ZEND_MOD_ *.c *.h
php_memcached.c: ZEND_MOD_REQUIRED("session")
php_memcached.c: ZEND_MOD_REQUIRED("igbinary")
php_memcached.c: ZEND_MOD_REQUIRED("msgpack")
php_memcached.c: ZEND_MOD_REQUIRED("spl")
And also checked in the minimal load test (the more reliant):
$ php -n -d extension=foo.so -m
Comments ?
Remi