packages: php/php.spec - rel 0.15 - move per-SAPI additional ini files to p...

Elan Ruusamäe glen at pld-linux.org
Mon Mar 15 02:09:58 CET 2010


On Monday 15 March 2010 01:37:35 Jan Rękorajski wrote:
> On Mon, 15 Mar 2010, Elan Ruusamäe wrote:
> > On Thursday 11 March 2010 00:51:21 baggins wrote:
> > > Author: baggins                      Date: Wed Mar 10 22:51:21 2010 GMT
> > > Module: packages                      Tag: HEAD
> > > ---- Log message:
> > > - rel 0.15
> > > - move per-SAPI additional ini files to per-SAPI config dirs
> > > - added triggers to move configs on upgrade (should apache* triggers be
> > > merged?)
> >
> > no-no no!
> >
> > fix the damn patch to process ini files in old way (ini file(s) and then
> > ini dir(s))
>
> Why? What's the point?
> What's the problem with using a solution that's already there?
> Why reinvent the wheel?
reinvent?

it's pld patch to load extra dir for sapi as well it is pld patch to load sapi 
configs from extra ini file.

it's just bad patch to update to 5.3 not intentional change -- i'm 100% sure 
of it, arekm said he'll check it later to fix, but apparently never got 
around.

likely it will cause problems for sysadmins who have to switch back/forth 
between 5.2/5.3 due some incompatabilities they have to solve in apps. (php 
is very fragile with upgrades, even in 5.2 each minor upgrade breaks xml or 
soap related apps and the bugs do not came up immediately)

also in *.d dirs should be mostly extension load lines, so the common 
configuration would be in "main" config which is loaded before .d scan

additionaly i foresee a load order problem, you want main cli.ini be loaded 
after/before .d scan, not in middle of extension based .ini files (in .d) and 
only due that the main cli.ini should be outside cli.d dir.

> > and update spec todo when done:
> > # - php CLI has safe mode enabled in default config (!!!), recheck
> > default .ini configs?
>
> That's just not true.

it is true if the previous assumptions are still intact,  safe mode was 
enabled by default as .ini was not loaded.

> [baggins at home ~]$ grep -i safe_mode /etc/php/{*,}/*.ini
> /etc/php//php.ini:safe_mode = Off
> /etc/php//php.ini:; then turn on safe_mode_gid.
> /etc/php//php.ini:safe_mode_gid = Off
> /etc/php//php.ini:; When safe_mode is on, UID/GID checks are bypassed when
> /etc/php//php.ini:safe_mode_include_dir =
> /etc/php//php.ini:; When safe_mode is on, only executables located in the
> safe_mode_exec_dir /etc/php//php.ini:safe_mode_exec_dir =
> /etc/php//php.ini:safe_mode_allowed_env_vars = PHP_
> /etc/php//php.ini:; protected even if safe_mode_allowed_env_vars is set to
> allow to change them. /etc/php//php.ini:safe_mode_protected_env_vars =
> LD_LIBRARY_PATH
> /etc/php//php.ini:sql.safe_mode = Off
>
> > #   main php.ini is not loaded at all (at least for cli):
> > #   strace -efile php -m 2>&1 | grep /etc/php/php.ini
>
> Neither this is.
>
> [baggins at home ~]$ strace -efile php.cli -m 2>&1 | grep /etc/php/php.ini
> lstat("/etc/php/php.ini", {st_mode=S_IFREG|0644, st_size=65441, ...}) = 0
> open("/etc/php/php.ini", O_RDONLY)      = 3
> lstat("/etc/php/php.ini", {st_mode=S_IFREG|0644, st_size=65441, ...}) = 0
> [baggins at home ~]$ strace -efile php.cgi -m 2>&1 | grep /etc/php/php.ini
> lstat("/etc/php/php.ini", {st_mode=S_IFREG|0644, st_size=65441, ...}) = 0
> open("/etc/php/php.ini", O_RDONLY)      = 3
> lstat("/etc/php/php.ini", {st_mode=S_IFREG|0644, st_size=65441, ...}) = 0
> [baggins at home ~]$ strace -efile php.fcgi -m 2>&1 | grep /etc/php/php.ini
> lstat("/etc/php/php.ini", {st_mode=S_IFREG|0644, st_size=65441, ...}) = 0
> open("/etc/php/php.ini", O_RDONLY)      = 3
> lstat("/etc/php/php.ini", {st_mode=S_IFREG|0644, st_size=65441, ...}) = 0
> [baggins at home ~]$ rpm -q php-common
> php-common-5.3.2-0.15.x86_64

no match for php-cli sapi loading

-- 
glen


More information about the pld-devel-en mailing list