Author Topic: [SCRIPT] fix_500  (Read 1093 times)

0 Members and 1 Guest are viewing this topic.

Offline
***
[SCRIPT] fix_500
« on: May 15, 2020, 02:11:14 AM »
The following script should work to fix the dreaded error 500 CWP issue on both CentOS 6 and 7 automatically

1) login as root
2) nano /scripts/fix_500
3) paste contents below
4) chmod 700 /scripts/fix_500
5) run /scripts/fix_500

Code: [Select]
#!/bin/bash
yum -y update cwpphp --enablerepo=cwp
cos=`uname -r | grep -oP "el\K(.)"`
ver=`grep "version" /usr/local/cwpsrv/htdocs/resources/admin/include/version.php | cut -d "\"" -f 2`
case $cos in
[6]*)
        echo "CentOs $cos running CWP $ver"
        chattr -i -R /usr/local/cwpsrv/htdocs
        cd /usr/local/cwpsrv/htdocs
        wget dl1.centos-webpanel.com/files/cwp/cwp2-$ver.zip
        unzip -o cwp2-$ver.zip
        rm -f cwp2-$ver.zip
;;
[7]*)
        echo "CentOs $cos running CWP $ver"
        chattr -i -R /usr/local/cwpsrv/htdocs
        cd /usr/local/cwpsrv/htdocs
        wget static.cdn-cwp.com/files/cwp/el7/cwp-el7-$ver.zip
        unzip -o -q cwp-el7-$ver.zip
        rm -f cwp-el7-$ver.zip
        ;;
*)
        echo "Not CentOs"
        ;;
esac
chattr -R -i /usr/local/cwpsrv/var/services/
cd /usr/local/cwpsrv/var/services/
wget static.cdn-cwp.com/files/cwp/el7/cwp-services.zip
unzip -o -q cwp-services.zip
rm -f cwp-services.zip
sed -i "s/ioncube_loader_lin_7.0/ioncube_loader_lin_7.2/g" /usr/local/cwp/php71/php.ini
sh /scripts/restart_cwpsrv
sh /scripts/update_cwp
Google Hangouts:  rcschaff82@gmail.com

Offline
*
Re: [SCRIPT] fix_500
« Reply #1 on: June 05, 2020, 03:37:41 PM »
Thank you for the fix.

Offline
*
Re: [SCRIPT] fix_500
« Reply #2 on: August 07, 2020, 06:28:14 PM »
Hi Guys,
Thanks for this information, but unfortunately do not solve my problem!