Running the following command:
cpcmd scope:set apache.system-directive '[BROTLI,STRICT,CACHE_MEMORY,STATUS]'
# this doesn't work any better
cpcmd scope:set apache.system-directive '["BROTLI","STRICT","CACHE_MEMORY","STATUS"]'
Results in a broken directive, as some array to string conversion occurs:
[root@web6 ~]# cpcmd scope:get apache.system-directive
- BROTLI
- STRICT
- CACHE_MEMORY
- Array
Error trace:
WARNING: Array to string conversion [/usr/local/apnscp/lib/Opcenter/Admin/Settings/Apache/SystemDirective.php:43]
0. Opcenter\Admin\Settings\Apache\SystemDirective->set(["BROTLI", "STRICT", "CACHE_MEMORY", "STATUS"])
[/usr/local/apnscp/lib/modules/scope.php:68]
1. Scope_Module->set("apache.system-directive", ["BROTLI", "STRICT", "CACHE_MEMORY", "STATUS"])
[/usr/local/apnscp/lib/Module/Skeleton/Standard.php:145]
2. Module\Skeleton\Standard->_invoke("set", ["apache.system-directive", [["BROTLI", "STRICT", "CACHE_MEMORY", "STATUS"]]])
[/usr/local/apnscp/lib/apnscpfunction.php:992]
3. apnscpFunctionInterceptor->call("scope_set", ["apache.system-directive", [["BROTLI", "STRICT", "CACHE_MEMORY", "STATUS"]]])
[/usr/local/apnscp/lib/CLI/cmd.php:62]
4. CLI\__call("scope_set", ["apache.system-directive", [["BROTLI", "STRICT", "CACHE_MEMORY", "STATUS"]]])
[/usr/local/apnscp/lib/CLI/cmd.php:581]
5. CLI\main()
[/usr/local/apnscp/bin/cmd:7]
Triage
- What version of apnscp are you running?
[root@web6 ~]# cpcmd misc_cp_version revision: b30a6a04b5eab1133a6fa2095ab7d16d0f223df7 timestamp: 1710360209 ver_maj: 3 ver_min: 2 ver_patch: 41 ver_pre: '' dirty: false debug: false
- Which version of RHEL or CentOS are you using?
[root@web6 ~]# cat /etc/redhat-release Red Hat Enterprise Linux release 8.9 (Ootpa)
- Can you reproduce this bug reliably?
Yes, reproduced on 2 nodes.