Author Topic: [SCRIPT] fix_500  (Read 9843 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!

Offline
*
Re: [SCRIPT] fix_500
« Reply #3 on: November 01, 2022, 02:12:34 PM »
Tested the above script as i am unable to use cpanel.domain and get 500 error page, but no luck.
The error from CWP logs is

Code: [Select]
FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Twig_Error_Loader: The "/usr/local/cwpsrv/var/services/users/cwp_theme/undefined" directory does not exist ("/usr/local/cwpsrv/var/services/users/cwp_theme/undefined"). in /usr/local/cwpsrv/var/services/twig/lib/Twig/Loader/Filesystem.php:101
Stack trace:

You need a reliable hosting company for your website or your eshop?
Need a cheap, reliable, fast and secure hosting?
You want fast support and action to every technical issue?
Freespirits is here for you :) - Don't look any further!

Offline
*
Re: [SCRIPT] fix_500
« Reply #4 on: December 23, 2023, 08:23:25 AM »
Fix is simple for me.

Login to CWP admin panel. Then go to Features, Theme, Languages > Themes and choose original as the user theme, then click Save Theme Default.