Author Topic: CWP 7 generates PHP errors  (Read 9338 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
CWP 7 generates PHP errors
« on: April 17, 2020, 10:20:37 AM »
On many pages on CWP admin panel I see multiple similar errors
the same I see in /usr/local/cwpsrv/logs/error_log

Some relate to WebServers_conf_editor.php
Code: [Select]
2020/04/17 11:02:35 [error] 31259#0: *459 FastCGI sent in stderr: "PHP message: PHP Warning:  Invalid argument supplied for foreach() in /usr/local/cwpsrv/htdocs/resources/admin/modules/WebServers_conf_editor.php on line 0" while reading upstream, client: 93.92.199.232, server: localhost, request: "GET /cwp_33098c336383410db4086d05640a0e26/admin/index.php?module=WebServers_conf_editor HTTP/1.1", upstream: "fastcgi://unix:/usr/local/cwp/php71/var/sockets/cwpsrv.sock:", host: "ipnets.ru:2031", referrer: "https://ipnets.ru:2031/cwp_33098c336383410db4086d05640a0e26/admin/index.php?module=httpd_fullstatus"

Other relate to ajax_ssl_certificate.php
Code: [Select]
2020/04/17 11:17:53 [error] 31260#0: *975 FastCGI sent in stderr: "PHP message: PHP Notice:  Undefined variable: keeke in /usr/local/cwpsrv/htdocs/resources/admin/addons/ajax/ajax_ssl_certificate.php on line 0
PHP message: PHP Warning:  in_array() expects parameter 2 to be array, string given in /usr/local/cwpsrv/htdocs/resources/admin/addons/ajax/ajax_ssl_certificate.php on line 0" while reading response header from upstream, client: 93.92.199.232, server: localhost, request: "POST /cwp_33098c336383410db4086d05640a0e26/admin/loader_ajax.php?ajax=ssl_certificate&acc=config HTTP/1.1", upstream: "fastcgi://unix:/usr/local/cwp/php71/var/sockets/cwpsrv.sock:", host: "ipnets.ru:2031", referrer: "https://ipnets.ru:2031/cwp_33098c336383410db4086d05640a0e26/admin/index.php?module=ssl_certificate"


Others relate to array multiple errors when working with SQL

Code: [Select]
2020/04/17 11:34:03 [error] 31260#0: *1618 FastCGI sent in stderr: "PHP message: PHP Warning:  mysqli_error() expects exactly 1 parameter, 0 given in /usr/local/cwpsrv/htdocs/resources/admin/include/functions/func_mysql.php on line 0
PHP message: PHP Warning:  mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in /usr/local/cwpsrv/htdocs/resources/admin/include/functions/func_mysql.php on line 0
PHP message: PHP Warning:  mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given in /usr/local/cwpsrv/htdocs/resources/admin/include/functions/func_mysql.php on line 0" while reading upstream, client: 93.92.199.232, server: localhost, request: "POST /cwp_33098c336383410db4086d05640a0e26/admin/index.php?module=list_subdomains HTTP/1.1", upstream: "fastcgi://unix:/usr/local/cwp/php71/var/sockets/cwpsrv.sock:", host: "ipnets.ru:2031", referrer: "https://ipnets.ru:2031/cwp_33098c336383410db4086d05640a0e26/admin/index.php?module=list_subdomains"

2020/04/17 11:05:04 [error] 31260#0: *551 FastCGI sent in stderr: "PHP message: PHP Warning:  Error while sending QUERY packet. PID=5745 in /usr/local/cwpsrv/htdocs/resources/admin/include/functions/func_mysql.php on line 0
PHP message: PHP Warning:  mysqli_error() expects exactly 1 parameter, 0 given in /usr/local/cwpsrv/htdocs/resources/admin/include/functions/func_mysql.php on line 0
PHP message: PHP Warning:  mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in /usr/local/cwpsrv/htdocs/resources/admin/include/functions/func_mysql.php on line 0
PHP message: PHP Warning:  mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given in /usr/local/cwpsrv/htdocs/resources/admin/include/functions/func_mysql.php on line 0
PHP message: PHP Warning:  mysqli_error() expects exactly 1 parameter, 0 given in /usr/local/cwpsrv/htdocs/resources/admin/include/functions/func_mysql.php on line 0
PHP message: PHP Warning:  mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in /usr/local/cwpsrv/htdocs/resources/admin/include/functions/func_mysql.php on line 0
PHP message: PHP Warning:  mysqli_fre" while reading upstream, client: 93.92.199.232, server: localhost, request: "POST /cwp_33098c336383410db4086d05640a0e26/admin/index.php?module=add_subdomain HTTP/1.1", upstream: "fastcgi://unix:/usr/local/cwp/php71/var/sockets/cwpsrv.sock:", host: "ipnets.ru:2031", referrer: "https://ipnets.ru:2031/cwp_33098c336383410db4086d05640a0e26/admin/index.php?module=add_subdomain"


All of them relate to the issues in CWP code.
At least array issue was noted many times in the Internet and could be resolved by modifying the code.
but here php code pages are base64 encoded and I can't modify them.

What can we done?

Offline
**
Re: CWP 7 generates PHP errors
« Reply #1 on: April 17, 2020, 08:39:43 PM »
sh /scripts/update_cwp

Offline
*
Re: CWP 7 generates PHP errors
« Reply #2 on: April 20, 2020, 06:38:28 PM »
Code: [Select]
######################
Update Server Packages
######################
chmod: cannot access ‘/opt/alt/php*/usr/sbin/*’: No such file or directory
chmod: cannot access ‘/opt/alt/php*/usr/bin/*’: No such file or directory
https://mirror.oxilion.nl/remi/enterprise/7/remi/x86_64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2a00:d10:1141:8::7: Network is unreachable"
Trying other mirror.
https://mirror.oxilion.nl/remi/enterprise/7/remi/x86_64/repodata/6e82cab09585dae6d790f2874ddb9d432775018288186503706c82648d55b5ca-primary.sqlite.bz2: [Errno 14] curl#7 - "Failed to connect to 2a00:d10:1141:8::7: Network is unreachable"
Trying other mirror.
Redirecting to /bin/systemctl restart cwpsrv.service
PHP Warning:  Error while sending QUERY packet. PID=21021 in /usr/local/cwpsrv/htdocs/resources/admin/include/functions/func_mysql.php on line 0
PHP Warning:  mysqli_error() expects exactly 1 parameter, 0 given in /usr/local/cwpsrv/htdocs/resources/admin/include/functions/func_mysql.php on line 0
PHP Warning:  mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in /usr/local/cwpsrv/htdocs/resources/admin/include/functions/func_mysql.php on line 0
PHP Warning:  mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given in /usr/local/cwpsrv/htdocs/resources/admin/include/functions/func_mysql.php on line 0
Redirecting to /bin/systemctl restart httpd.service
PHP Warning:  Error while sending QUERY packet. PID=21021 in /usr/local/cwpsrv/htdocs/resources/admin/include/cron.php on line 0
Redirecting to /bin/systemctl reload httpd.service
--2020-04-20 21:11:47--  http://static.cdn-cwp.com/files/mail/vacation.zip
Resolving static.cdn-cwp.com (static.cdn-cwp.com)... 167.114.21.226, 151.80.90.199, 137.74.148.116, ...
Connecting to static.cdn-cwp.com (static.cdn-cwp.com)|167.114.21.226|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2390 (2.3K) [application/zip]
Saving to: ‘vacation.zip’

100%[========================================================================================================================>] 2,390       --.-K/s   in 0s

2020-04-20 21:11:47 (123 MB/s) - ‘vacation.zip’ saved [2390/2390]

Now i see many different issues but of another but also related to mysql permisions (of course mysql root password was checked and it is correct and has permissions on the tables):

Code: [Select]
2020/04/20 21:14:49 [error] 21534#0: *17 FastCGI sent in stderr: "PHP message: PHP Notice:  Undefined index: senders in /usr/local/cwpsrv/htdocs/resources/admin/modules/mail_queue.php on line 0
PHP message: PHP Warning:  Invalid argument supplied for foreach() in /usr/local/cwpsrv/htdocs/resources/admin/modules/mail_queue.php on line 0
PHP message: PHP Notice:  Undefined index: involved in /usr/local/cwpsrv/htdocs/resources/admin/modules/mail_queue.php on line 0
PHP message: PHP Warning:  Invalid argument supplied for foreach() in /usr/local/cwpsrv/htdocs/resources/admin/modules/mail_queue.php on line 0" while reading upstream, client: 93.92.199.232, server: localhost, request: "GET /cwp_9453a33e2e748521667b72ab9b6c17da/admin/index.php?module=mail_queue HTTP/1.1", upstream: "fastcgi://unix:/usr/local/cwp/php71/var/sockets/cwpsrv.sock:", host: "cwp.ipnets.ru:2031", referrer: "https://cwp.ipnets.ru:2031/cwp_9453a33e2e748521667b72ab9b6c17da/admin/index.php?module=mx_routing"
2020/04/20 21:17:45 [error] 21534#0: *123 FastCGI sent in stderr: "PHP message: PHP Warning:  mysqli::__construct(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: YES) in /usr/local/cwpsrv/var/services/oauth/v2/server/server.php on line 25
PHP message: PHP Warning:  mysqli::__construct(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: YES) in /usr/local/cwpsrv/var/services/oauth/v2/server/server.php on line 27
PHP message: PHP Warning:  mysqli::query(): Couldn't fetch mysqli in /usr/local/cwpsrv/var/services/oauth/v2/server/server.php on line 29
PHP message: PHP Warning:  mysqli::query(): Couldn't fetch mysqli in /usr/local/cwpsrv/var/services/oauth/v2/server/server.php on line 95
PHP message: PHP Warning:  mysqli::query(): Couldn't fetch mysqli in /usr/local/cwpsrv/var/services/oauth/v2/server/server.php on line 95
PHP message: PHP Warning:  mysqli::query(): Couldn't fetch mysqli in /usr/local/cwpsrv/var/services/oauth/v2/server/server.php on line 95
PHP message: PHP Warning:  mysqli::query(): Couldn't fetch mysqli in /usr/local/cwpsrv/var/services/oauth/v2/server/server.php on line 95
PHP message: PHP Warning:  mysqli::query(): Couldn't fetch mysqli in /usr/local/cwpsrv/var/services/oauth/v2/server/server.php on line 95
PHP message: PHP Warning:  mysqli::query(): Couldn't fetch mysqli in /usr/local/cwpsrv/var/services/oauth/v2/server/server.php on line 95
PHP message: PHP Warning:  mysqli::query(): Couldn't fetch mysqli in /usr/local/cwpsrv/var/services/oauth/v2/server/server.php on line 95
PHP message: PHP Fatal error:  Uncaught PDOException: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) in /usr/local/cwpsrv/var/services/oauth/v2/server/OAuth2/Storage/Pdo.php:67
Stack trace:
#0 /usr/local/cwpsrv/var/services/oauth/v2/server/OAuth2/Storage/Pdo.php(67): PDO->__construct('mysql:dbname=oa...', 'root', ''4IzqYr9Ddp'', Array)
#1 /usr/local/cwpsrv/var/services/oauth/v2/server/server.php(187): OAuth2\Storage\Pdo->__construct
2020/04/20 21:17:45 [info] 21534#0: *123 client 127.0.0.1 closed keepalive connection
2020/04/20 21:35:48 [error] 21533#0: *441 FastCGI sent in stderr: "PHP message: PHP Warning:  mysqli::__construct(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: YES) in /usr/local/cwpsrv/htdocs/resources/admin/addons/ajax/ajax_list_accounts.php on line 0
PHP message: PHP Warning:  mysqli_query(): Couldn't fetch mysqli in /usr/local/cwpsrv/htdocs/resources/admin/addons/ajax/ajax_list_accounts.php on line 0
PHP message: PHP Notice:  Trying to get property of non-object in /usr/local/cwpsrv/htdocs/resources/admin/addons/ajax/ajax_list_accounts.php on line 0" while reading response header from upstream, client: 93.92.199.232, server: localhost, request: "POST /cwp_54b40ca053082a745925cb61699eb281/admin/loader_ajax.php?ajax=list_accounts HTTP/1.1", upstream: "fastcgi://unix:/usr/local/cwp/php71/var/sockets/cwpsrv.sock:", host: "cwp.ipnets.ru:2031", referrer: "https://cwp.ipnets.ru:2031/cwp_54b40ca053082a745925cb61699eb281/admin/index.php?module=list_accounts"

Offline
*****
Re: CWP 7 generates PHP errors
« Reply #3 on: April 21, 2020, 10:02:52 AM »
contact support for the checks.