RFC extensions_path directive

php.internals

Wez Furlong

19 years ago
We have a need for a search path for extensions, so that we can have a system provided set of extensions and an optional location for per- application extensions that either augment or override the baseline extensions. To facilitate this, I propose that we create a new directive called extensions_path that allows the sysadmin to configure a search path for extensions. I see the usage as going something like this: extensions_path = "/local/extensions:$DEFAULT_EXTENSIONS_DIR" Where $DEFAULT_EXTENSIONS_DIR evaluates to the default value of extensions_dir. I think it's important to have a symbol for the default location, so that httpd.conf files don't have to have our API numbers encoded into them. I don't mind if the actual symbol we use for the default manifests differently, so long as it works from within httpd.conf... if extensions_dir works there. If it's php.ini only, I'm happy to use the existing constant expansion stuff we have for php.in... if that will work in a path string syntax. I also don't mind if we simply expand extensions_dir to behave in this manner. I just want to gather some feedback before writing some code. To be super clear, I don't propose changing anything other than the searching behavior for extensions. --Wez.

Marcus Börger

19 years ago
Hello Wez, +1 marcus Sunday, February 4, 2007, 8:12:07 PM, you wrote:
> We have a need for a search path for extensions, so that we can have > a system provided set of extensions and an optional location for per- > application extensions that either augment or override the baseline > extensions.
> To facilitate this, I propose that we create a new directive called > extensions_path that allows the sysadmin to configure a search path > for extensions. I see the usage as going something like this:
> extensions_path = "/local/extensions:$DEFAULT_EXTENSIONS_DIR"
> Where $DEFAULT_EXTENSIONS_DIR evaluates to the default value of > extensions_dir. > I think it's important to have a symbol for the default location, so > that httpd.conf files don't have to have our API numbers encoded into > them.
> I don't mind if the actual symbol we use for the default manifests > differently, so long as it works from within httpd.conf... if > extensions_dir works there. If it's php.ini only, I'm happy to use > the existing constant expansion stuff we have for php.in... if that > will work in a path string syntax.
> I also don't mind if we simply expand extensions_dir to behave in > this manner.
> I just want to gather some feedback before writing some code.
> To be super clear, I don't propose changing anything other than the > searching behavior for extensions.
> --Wez.
Best regards, Marcus

Pierre Joye

19 years ago
On 2/4/07, Wez Furlong <wez@omniti.com> wrote:
> extensions_path = "/local/extensions:$DEFAULT_EXTENSIONS_DIR"
+1 --Pierre

Sara Golemon

19 years ago
> To facilitate this, I propose that we create a new directive called > extensions_path that allows the sysadmin to configure a search path for > extensions. I see the usage as going something like this: > > extensions_path = "/local/extensions:$DEFAULT_EXTENSIONS_DIR" >
Seems very useful and a good tool for administrators to keep their installations organized. +1, but I'd rather see extension_dir expanded than add a new option which does much the same thing. -Sara

Brian Moon

19 years ago
+1 and a +1 on Sara's comment. Especially if we are talking about PHP6. I could see an argument for 5.x not getting this in extension_dir. But, I still think sticking with one setting is better. Sara Golemon wrote:
>> To facilitate this, I propose that we create a new directive called >> extensions_path that allows the sysadmin to configure a search path >> for extensions. I see the usage as going something like this: >> >> extensions_path = "/local/extensions:$DEFAULT_EXTENSIONS_DIR" >> > Seems very useful and a good tool for administrators to keep their > installations organized. > > +1, but I'd rather see extension_dir expanded than add a new option > which does much the same thing. > > -Sara >
-- Brian Moon ------------- http://dealnews.com/ It's good to be cheap =)

LAUPRETRE François (P)

19 years ago
I agree with Sara. +1 to extend 'extension_dir' :) Do you plan for adding a corresponding set_extension_path/dir() function or will we have to use ini_set() ? And, I certainly should know it, but could somebody explain why the default extensions directory contains this strange 'no-debug-non-zts-xxx' part ? I personnally remove it in my installations but I'd like to know. Francois