Author Topic: Autoupdater cause wierd problem  (Read 9575 times)

0 Members and 1 Guest are viewing this topic.

Autoupdater cause wierd problem
« on: September 03, 2019, 09:39:03 AM »
Hi,
Currently one of our server having weird problem after autoupdate.
The files inside /scripts/ become 0kb in size.
[root@main scripts]# ls -la
total 12
drwxr-xr-x 2 root root 4096 Sep  3 03:38 .
drwxr-xr-x 7 root root 4096 Aug  2 06:59 ..
-rwxr-xr-x 1 root root    0 Dec  1  2016 add_alert
-rwxr-xr-x 1 root root    0 Jan  7  2019 apache_mpm_calculator
-rwxr-xr-x 1 root root    0 May 13 16:44 apache_server-status
-rwxr-xr-x 1 root root    0 Sep 17  2018 autossl_fix_tmp_path
-rwxr-xr-x 1 root root    0 Dec 18  2018 autossl_generate_apache_conf
-rwxr-xr-x 1 root root    0 Aug 18 09:12 bandwidth_run
-rwxr-xr-x 1 root root    0 Mar 13  2018 check_api
-rwxr-xr-x 1 root root    0 Apr  5  2017 checkdb
-rwxr-xr-x 1 root root    0 Nov 17  2016 check_postqueue
-rwxr-xr-x 1 root root    0 Apr  2  2018 clamd_fix_100_cpu_usage
-rwxr-xr-x 1 root root    0 Aug 23 06:45 cpanel_addhandlers
-rwxr-xr-x 1 root root    0 Aug 16 16:52 cwp_api
-rwxr-xr-x 1 root root    0 Jun 28  2015 cwp_bruteforce_protection
-rwxr-xr-x 1 root root    0 Jun 28  2015 cwp_monitor
-rwxr-xr-x 1 root root    0 Aug  8 06:20 cwpsrv_rebuild_user_conf
-rwxr-xr-x 1 root root    0 Mar 22  2017 cwp_version
-rwxr-xr-x 1 root root    0 Oct 28  2016 disk_check
-rwxr-xr-x 1 root root    0 Jul 10 08:12 dns_sync_slave2
-rwxr-xr-x 1 root root    0 May 26  2018 dso_handler_remove
-rwxr-xr-x 1 root root    0 Nov 14  2016 freshclam
-rwxr-xr-x 1 root root    0 Aug 28 06:15 generate_hostname_ssl
-rwxr-xr-x 1 root root    0 Aug 28 06:36 image_rebuild_server_config
-rwxr-xr-x 1 root root    0 Sep 28  2018 install_acme
-rwxr-xr-x 1 root root    0 Aug 28 06:31 install_api
-rwxr-xr-x 1 root root    0 Jun 28  2015 install_imagick
-rwxr-xr-x 1 root root    0 Jun 28  2015 install_maldet
-rwxr-xr-x 1 root root    0 Apr 21  2016 install_net2ftp
-rwxr-xr-x 1 root root    0 Jun  3 16:29 install_netdata
-rwxr-xr-x 1 root root    0 Aug 28 05:58 install_pure-ftpd_tls


It is also same in the folder /usr/local/cwpsrv/htdocs/resources/admin/include/

[root@main include]# ls -la
total 92
drwxr-xr-x 11 root root  4096 Sep  3 03:38 .
drwxr-xr-x  7 root root  4096 Aug  2 06:59 ..
-rw-------  1 root root    87 Aug 13 02:34 3rdparty.php
drwxr-xr-x  4 root root  4096 Sep  3 03:38 ai_robot
-rw-r--r--  1 root root     0 May 17 08:26 alertandautorenewssl.php
drwxr-xr-x  2 root root  4096 Sep  3 03:38 api
-rw-------  1 root root     0 Aug 16 17:48 api.php
-rw-rw-r--  1 root root     0 Nov  9  2018 autossl.php
-rw-r--r--  1 root root     0 Oct 12  2018 autoupdate_3rdparty.php
drwxr-xr-x  2 root root  4096 Sep  3 03:38 cgi
-rw-------  1 root root     0 May  7 05:20 chk.php
drwxr-xr-x  2 root root  4096 Sep  3 03:38 common
drwxr-xr-x  2 root root  4096 Sep  3 03:38 config
-rw-r--r--  1 root root   870 Aug  5 00:04 configserver.php
-rw-r--r--  1 root root     0 Aug 30 11:07 cron_autossl_all_domains.php
-rw-r--r--  1 root root     0 May 17 05:08 cron_autossl_renew_all_domains.php
-rw-------  1 root root     0 Jun 23 02:14 cron_backup.php
-rw-r--r--  1 root root     0 Aug 31 22:48 cron_migration_cpanel.php
-rw-r--r--  1 root root     0 Aug 29 07:01 cron_migration_cpanelv2.php
-rw-r--r--  1 root root     0 May 17 05:05 cron_newbackup.php
-rw-r--r--  1 root root     0 May 17 05:07 cron_notificate_user.php
-rw-------  1 root root 26177 Sep  3 16:57 cron.php
-rw-r--r--  1 root root     0 Apr  2  2018 cron_rbl.php
-rw-r--r--  1 root root     0 Aug 31 22:50 cron_restore_acc_cpanel.php
-rw-r--r--  1 root root     0 May 18 22:57 cron_transfer_accounts.php
-rw-------  1 root root   345 Aug  9 13:13 db_conn.php
-rw-------  1 root root     0 Aug 30 16:40 functions.php


We don't know what cause the problem.


Offline
**
Re: Autoupdater cause wierd problem
« Reply #1 on: September 03, 2019, 10:32:32 AM »
Whats the version of cwp on your system?
Please run the command  - sh /scripts/update_cwp and post output here.

Re: Autoupdater cause wierd problem
« Reply #2 on: September 04, 2019, 02:15:24 AM »
Hi,
Actually nothing happen because of the file is 0kb in size(empty).

We do copy from working server and copy file '/usr/local/cwpsrv/htdocs/resources/admin/include/cron.php' from working server adb it produce ;

[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



This happen before but we manage to fix it because of existence of the file name 'cwp-el7_autoupdater.sh' inside /usr/local/src.

But it not the case now because the file is missing. We don't know how to reproduce the file back.

CWP version;

[root@main src]# cat /usr/local/cwpsrv/htdocs/resources/admin/include/version.php
[root@main src]# ls -lath /usr/local/cwpsrv/htdocs/resources/admin/include/version.php
-rw------- 1 root root 0 Sep  2 23:37 /usr/local/cwpsrv/htdocs/resources/admin/include/version.php
[root@main src]#



« Last Edit: September 04, 2019, 02:17:55 AM by sksatech »

Re: Autoupdater cause wierd problem
« Reply #3 on: September 05, 2019, 02:46:38 AM »
Can we just replace the files from working server?
We need to know which file can be replace which is not.

Re: Autoupdater cause wierd problem
« Reply #4 on: September 05, 2019, 03:09:06 AM »
We manage to get copy of the 'cwp-el7_autoupdater.sh' file.

An it fixed the issue.

Offline
*
Re: Autoupdater cause wierd problem
« Reply #5 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.





Offline
***
Re: Autoupdater cause wierd problem
« Reply #6 on: February 04, 2022, 10:01:33 AM »
Please stop replying to three years old threads....

I believe your specific issue is only solvable by contacting CWP support
https://control-webpanel.com/contact