문제

I'm installing APCu on my vagrant box, but found that pecl didn't have my ini files set on it, so I've added it manually & PHP in apache is now wokring fine, however my CLI uses a different php.ini file. Is there an easy way to get installs to update both files at the same time?

도움이 되었습니까?

해결책

No, there is no out-of-the-box solution. pecl (which is pear -c pecl.php.net) only can update a single php.ini file.

What you could do is create one ini file and symlink it into the conf directories of each php version. (See "Scan for additional .ini files in" in php --ini).

다른 팁

I've recently learnt that you could use the following strategy:

echo "" > /etc/php5/mods-available/timezonedb.ini
pear config-set php_ini /etc/php5/mods-available/timezonedb.ini

pecl -q install -f timezonedb && php5enmod timezonedb

The php5enmod command will automatically link the configuration file to every SAPI (cli, fpm, ...).

php5enmod

usage: php5enmod [ -s ALL|sapi_name ] module_name [ module_name_2 ]
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top