Re: Allowing [SAPI=] entries in ini files.

From: Date: Wed, 20 Nov 2013 09:38:46 +0000
Subject: Re: Allowing [SAPI=] entries in ini files.
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-70217@lists.php.net to get a copy of this message
On 19 November 2013 18:51, Sebastian Krebs <krebs.seb@gmail.com> wrote: > > > > 2013/11/16 Richard Quadling <rquadling@gmail.com> > >> Hi. >> >> I created a patch https://github.com/php/php-src/pull/466 >> to allow ini >> files to have a SAPI section, just like they can have a HOST and PATH >> section. >> >> My use case is that the provider we are currently using does not allow us >> to have our own INI file, just the additional directory, and there is no >> way to differentiate between a CLI and a FAST-CGI setup in the additional >> directory. >> >> The patch allows [SAPI=xxx] sections and they operate in a very similar >> way >> to the [HOST] and [PATH] sections. >> >> Please can this be considered for inclusion into PHP at some stage. >> >> Regards, >> >> Richard Quadling. >> > > > Hi, > > Just my 2 cents, but that sounds more like an issue with your > provider/hoster and not with PHP. I always thought of the additional > php.ini as a way to change some details and not a way to set up the whole > runtime. Especially when a user has write access to that file it seems to > me also an security issue, when PHP allows to set/change critical settings > there. > > tl;dr: There is probably a reason, why your provider doesn't allow you to > change php.ini settings directly. > > Regards, > Sebastian > > They run a LOT of different security setups for each SAPI. Each with it's own chroot'd environment. And for us to be able to configure all the setups with the same settings that we supply via our repo, it was set to use the additional directory. But we have CLI (for crontab) and FastCGI setups. All extensions are loaded via a separate ini file (seems a consistent pattern I've seen before). But no mechanism to say xxx-cli.ini or xxx-fastcgi.ini (for example) in the additional directory. The patch allows ANY ini file to have [SAPI=xxxx] sections. This can act as an alternative to having separate ini files for each SAPI when only one or 2 settings may be different. Richard. -- Richard Quadling

« previous php.internals (#70217) next »