Control Web Panel
WebPanel => CentOS-WebPanel Bugs => Topic started by: Hardoman on December 23, 2020, 08:02:40 AM
-
When going to the section "PHP Version Switcher v2" it shows errors:
Warning: parse_ini_file(/usr/local/cwpsrv/htdocs/resources/conf/el/php_switcher/versions.ini): failed to open stream: No such file or directory in /usr/local/cwpsrv/htdocs/resources/admin/modules/php_switch_v2.php on line 0
Warning: array_keys() expects parameter 1 to be array, boolean given in /usr/local/cwpsrv/htdocs/resources/admin/modules/php_switch_v2.php on line 0
Warning: rsort() expects parameter 1 to be array, null given in /usr/local/cwpsrv/htdocs/resources/admin/modules/php_switch_v2.php on line 0
Warning: Invalid argument supplied for foreach() in /usr/local/cwpsrv/htdocs/resources/admin/modules/php_switch_v2.php on line 0
This is expected because there is no /usr/local/cwpsrv/htdocs/resources/conf/el/ folder exist.
I checked on 2 servers installed at different times: there are only
/usr/local/cwpsrv/htdocs/resources/conf/el7/ and /usr/local/cwpsrv/htdocs/resources/conf/el8/
folders exist.
This is a bug in the CWP code
-
you have bug in OS try to send the output of "yum clean all"
-
Thank you, looks like my rpmdb broken.
-
This fixed the issue for me:
rm -f /var/lib/rpm/__db.[0-9][0-9]*
rpm --quiet -qa
rpm --rebuilddb
yum clean all
Hope it helps someone