PHP configuration files ini files

Is there any way to read the ini file of the module configuration file?

For example, I installed php-eaccelerator ( http://eaccelerator.net ) and it placed the eaccelerator.ini file in /etc/php.d My PHP installation does not read this INI file because the parameter "--with-config- file-scan-dir "was not used when compiling PHP . Is there a way to manually specify the path to the ini file. somewhere so php can read module settings?

+3
source share
3 answers

This is just a wild hunch, but try to add all the directives from eaccelerator.ini to php.ini. First create <?php phpinfo(); ?>and check where it is located.

For example, try the following:

[eAccelerator]
extension="eaccelerator.so"
eaccelerator.shm_size="32"
eaccelerator.cache_dir="/tmp"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"

, , - , ini_set(). , .:) eAccelerator, .

+3

- .ini php.ini. php.ini include.ini "include" file.ini.

, .

+1

Apache mod-php / php . htaccess file. - " " , . , php htaccess.

(thanks to the commentator for pointing out that this only works with mod-php)

0
source

Source: https://habr.com/ru/post/1697288/


All Articles