I am trying to set pear configuration to point to the correct php.ini file. The state is running, but when I use pear config-get php_ini to check if the value is set, I see
[Tue Aug 01 06:17:39] root@xxx:~# sudo pear config-get php_ini
[Tue Aug 01 06:17:43] root@xxx:~#
The first attempt
php-pear-config-set:
cmd.run:
- name: pear config-set php_ini /etc/php/7.0/apache2/php.ini
- unless: false
If I direct the output to a file, it shows that it was successful, but when I check the config, it is still empty.
The second attempt
php-pear-config-set:
cmd.run:
- name: pear config-set php_ini /etc/php/7.0/apache2/php.ini > /tmp/test.txt
- unless: false
The contents of the test.txt file
config-set succeeded
~
If I run pear config-show and look for the config file, I see the following
User Configuration File Filename /root/.pearrc
System Configuration File Filename /etc/pear.conf
When I look for /etc/pear.conf there is none.
If I run on the minion from the console
pear config-set php_ini /etc/php/7.0/apache2/php.ini
Then look at the file /etc/pear.conf, the file still doesn't exist.
But if I look at the file /root/.pearrc, the contents show.
#PEAR_Config 0.9
a:1:{s:7:"php_ini";s:28:"/etc/php/7.0/apache2/php.ini";}
The permissions of /root/.pearrc
-rw-r--r-- 1 root root 73 Aug 1 17:23 /root/.pearrc
I just read the following, "The pear.conf is used by PEAR applications to store their configuration. This file should not be edited." https://www.mankier.com/5/pear.conf