New in CWP Edge-LatestFree with every CWPpro licenceWebsites up to 300x faster

CWP now includes LSPHP, LSAPI-Cache and CWP Cage at no extra cost with all CWPpro licences. The LSAPI-Cache plugin is integrated into our WordPress and other script installers, and CWP Cage gives every user complete isolation. Available now in the CWP Edge-Latest version.

Get CWPpro ›

PHP Version Switcher v2 bug in config files

Started by Hardoman, December 23, 2020, 08:02:40 AM

Previous topic - Next topic

Hardoman

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

Sandeep

you have bug in OS try to send the output of "yum clean all"

Hardoman


Hardoman

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