Configuration of php as an Apache module

From: Date: Sun, 02 Mar 2025 15:21:56 +0000
Subject: Configuration of php as an Apache module
Groups: php.install 
Request: Send a blank email to [email protected] to get a copy of this message
Hello all

There two categories of configuration files for php.

1) The file php.ini
2) The additional configuration files.

* The path to php.ini is set at compile time or it can be changed at runtime

    1) when using php from the command line by using -c or the PHPRC environment variable.
    2) when using php as an apache module by setting the Apache directive PHPIniDir.
* From my knowledge (based on the official doc) the path to the additional files can only be set through the environment variable PHP_INI_SCAN_DIR. So far, the only way that I've found (I mention that I consider myself a novice in configuring Apache and php) of setting this variable when php is run as a module by Apache was in the envvars file which is owned by the root. I have a configuration in which this is very frustrating because if I want to change the configuration of my php environment (when php is run as an apache module) I have to work with two types of files: the Apache configuration file and the envvars file. I can modify PHPIniDir in an Included apache configuration file, but to set the additional files folder I have to edit envvars. And I may not have easy access to it. I have two questions: Is there any possibility of setting the path to the additional files in the Apache configuration file? Is there any particular reason for which an Apache directive similar to PHPIniDir was not provided the additional files? An answer to this last question could clarify things that would make me understand and accept the current state of the art. Thank you Cristian

Thread (1 message)

« previous php.install (#20573) next »