Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - rafpelegri

Pages: [1]
1
Updates / Re: Autoupdater cause wierd problem
« on: February 04, 2022, 01:09:10 AM »
Hi.
I'm getting the same error:

[root@main ~]# sh /scripts/update_cwp


====================================================
============= CentOS Web Panel Cron ================
====================================================


###########################
Firewall Flush Daily Blocks
###########################


######################
Update Server Packages
######################
PHP Fatal error:  Uncaught Error: Call to undefined function mysql_countRows() in /usr/local/cwpsrv/htdocs/resources/admin/include/cron.php:0
Stack trace:
#0 {main}
  thrown in /usr/local/cwpsrv/htdocs/resources/admin/include/cron.php on line 0




I didn't find any files with 0 size, so I don't no if the problem is the same.





2
CentOS 7 Problems / Re: CWP admin login to white blank page
« on: February 04, 2022, 12:13:58 AM »
Hi.
I got the same error. The link above didn't help.

How did you fix it?

The admin page is blank.
When i try to update_cwp, got the same error of undefined function mysql_countRows()

3
PHP / Re: PHP Version Switcher
« on: February 02, 2021, 05:11:00 PM »
Hi.
I am trying to switch PHP version to 7.3.19, but got the error "tar: php-7.3.19.tar.gz: Cannot open: No such file or directory". Found the error in script /usr/local/src/php-rebuild.sh:

Code: [Select]

# PHP Sources
PHPDOWNLOADVERCWP=`wget -q -S --spider "http://dl1.centos-webpanel.com/files/php/php-$version.tar.gz" -O - 2>&1 | sed -ne '/Content-Length/{s/.*: //;p}'`
PHPDOWNLOADVERMUSEUM=`wget -q -S --spider "https://museum.php.net/php$majorversion/php-$version.tar.gz" -O - 2>&1 | sed -ne '/Content-Length/{s/.*: //;p}'`

# Check if on CWP source file exist (redirect gives code 200 always)
if [ -z "$PHPDOWNLOADVERCWP" ];then
        PHPDOWNLOADVERCWP=0
fi

# Check if file size is over 8MB
if [ $PHPDOWNLOADVERCWP -ge 8000000 ];then
        phpsource="http://dl1.centos-webpanel.com/files/php/php-$version.tar.gz"
elif [ $PHPDOWNLOADVERMUSEUM -ge 8000000 ];then
        phpsource="https://museum.php.net/php5/php-$version.tar.gz"
else
    echo "Failed to Download PHP version $version!"
        exit 1
fi

The file php-7.3.19.tar.gz is tested for the size of 8MB. Since it is bigger then 8MB, the secondary link is used. But there is a problem: to download file from secondary link, the link is for php5 fixed in the code. Should be a variable $majorversion in there.

The script is ganerated automatic. How can I fix that?

Pages: [1]