Req #33728 [Com]: Allow to include files in php.ini

From: Date: Tue, 22 Aug 2023 09:04:25 +0000
Subject: Req #33728 [Com]: Allow to include files in php.ini
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-245218@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=33728&edit=1

 ID:                 33728
 Comment by:         beertigerfive021 at gmail dot com
 Reported by:        phpbugs at thequod dot de
 Summary:            Allow to include files in php.ini
 Status:             Open
 Type:               Feature/Change Request
 Package:            *General Issues
 Operating System:   *
 PHP Version:        *
 Block user comment: N
 Private report:     N

 New Comment:

)thanks for the info.... (http://github.com)(https://www.paybyplatema.me/)


Previous Comments:
------------------------------------------------------------------------
[2011-04-14 23:37:51] butesa at freenet dot de

There seems to be a patch: http://tekrat.com/php/php-ini-includes/

------------------------------------------------------------------------
[2006-06-24 16:05:54] dennis at 28studios dot com

I second this feature request.  I am doing a FastCGI install of PHP and have exactly this need.  

I have multiple virtual hosts, each of which may need specific php.ini parameters set, but I would
like to have a global php.ini file that I include from the vhost specific one.

A temporary work around I am looking at is recompiling PHP with my gloabl options set as the
defaults, although I do not know yet if this is possible, and it is highly undesirable as changes in
the global options require a recompile.

------------------------------------------------------------------------
[2006-01-04 21:30:23] phpbugs at thequod dot de

I don't see what it would help in the situation where you  
want to have a common main php.ini for all vhosts or  
subgroups thereof and just override some values on a  
per-host basis..  
 
--with-config-file-scan-dir would be a static path, 
wouldn't it? 
 
The only solution I could imagine to use 
--with-config-file-scan-dir=\$CONF_PHP so that $CONF_DIR 
could be set in the fastcgi starter/wrapper script. But I 
don't think that it's supposed to work like that. 
 
As it seems, what I'll have to do is write a script that 
scans for files like php_override.ini in the vhost 
directories and merges them into a single php.ini file.

------------------------------------------------------------------------
[2006-01-04 02:46:52] sniper@php.net

There's already this which can be used to accomplish pretty much same thing:

  --with-config-file-scan-dir=PATH
                          Set the path where to scan for                                            
                                               
                          configuration files


------------------------------------------------------------------------
[2005-07-16 20:35:35] phpbugs at thequod dot de

Description:
------------
It would be very helpful in a CGI (or FastCGI) setup to have an include directive for php.ini that
includes a file where the directive occurs.

This way you could have a central php.ini for all virtual hosts and include this in each virtual
host's php.ini.

I know that with mod_php you can put most of the directives into Apache's VirtualHost
directives, but with mod_fastcgi/mod_cgi this is not possible.



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=33728&edit=1


Thread (6 messages)

« previous php.bugs (#245218) next »