dependency tracking between php modules

Adam Golebiowski adamg at pld-linux.org
Mon Jun 28 13:33:34 CEST 2010


Hi,

There's a problem with dependency tracking between php modules, both
internal and external (e.g. pecl's packages).

You can easily test the situation - with a recent environment
(where session support is separated) install php-pecl-http and try to run
php interpreter (/usr/bin/php), it will complain about missing
ps_globals_id symbol:

"PHP Warning:  PHP Startup: Unable to load dynamic library
'/usr/lib/php/http.so' - /usr/lib/php/http.so: undefined symbol:
ps_globals_id in Unknown on line 0"

A workaround is to rename http.ini to be called after session.ini, but
this does not solve real problem. We already use this kind of workaround
to solve dependency between core php modules - see packages/php/php.spec
(generate_inifiles) for details. 

Since it's not a common situation, I thought about using SysVinit's
style and apply following scheme:
00-09 - core php stuff (spl, pcre)
10-49 - standard php modules (e.g. pdo)
50-99 - additional php modules (e.g. pecl packages)

This shouldn't break anything, and it would be sufficient to apply this
to php.spec only to solve issue with php-pecl-http (00_pcre.ini,
01_spl.ini, 10_session.ini, http.ini).

Any objections?

-- 
adamg


More information about the pld-devel-en mailing list