Author Topic: Paython and CWP  (Read 2551 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Paython and CWP
« on: May 13, 2023, 08:35:13 AM »
have a big problem, I wanted to put python 3.11 on the server, at the end of the configuration (I also changed the openssl version from 2017 to 2023) and now nothing works anymore, I can't enter CWP I can no longer connect to the sites and I no longer receive emails. how can i restart everything?
A thousand thanks

Offline
*****
Re: Python and CWP
« Reply #1 on: May 13, 2023, 12:47:00 PM »
Can you login to the server via SSH and roll things back with yum?

Offline
*
Re: Paython and CWP
« Reply #2 on: May 13, 2023, 03:26:41 PM »
Thanks for the reply and sorry for the question in two places but I didn't know which folder was right.
could you explain better what I have to update with yum?
When I type ip_2087 address I get this pafina:


*****************
Warning: mysqli_connect(): (HY000/2002): No such file or directory in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0

Warning: mysqli_connect(): (HY000/2002): No such file or directory in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0

Warning: mysqli_connect(): (HY000/2002): No such file or directory in /usr/local/cwpsrv/htdocs/admin/admin/index.php on line 0

Warning: mysqli_connect(): (HY000/2002): No such file or directory in /usr/local/cwpsrv/htdocs/admin/admin/index.php on line 0


Trying to start mysql server, please wait!
Try to restart Control Web Panel with command: sh /scripts/restart_cwpsrv

**Check your MySQL root password in: /usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php and /root/.my.cnf
You can reset the MySQL root password fast with this command: /scripts/mysql_pwd_reset -q


Warning: mysqli_error() expects exactly 1 parameter, 0 given in /usr/local/cwpsrv/htdocs/admin/admin/index.php on line 0
Could not connect:

*****************

in any case it doesn't connect with any sites request, i can only connect with SSh
thanks for your kindness to help

Offline
**
Re: Paython and CWP
« Reply #3 on: May 13, 2023, 06:15:00 PM »
Try to connect to the database of CWP manually from terminal (SSH) using the command:

Code: [Select]
mysql -uDB_USER -pDB_PASS DB_NAME
DB_USER, DB_PASS, DB_NAME you can get from the file:
/usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php

If you get something like:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
then try to reset the password using the script:
Code: [Select]
/scripts/mysql_pwd_reset -qthen make sure the new password is listed in the files:
/usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php
/root/.my.cnf
restart CWP:
Code: [Select]
service cwpsrv restartand then try to access CWP from the web again.

Offline
*
Re: Paython and CWP
« Reply #4 on: May 14, 2023, 11:05:34 AM »
nothing to do, I did as you said but the result is always the same

Offline
**
Re: Paython and CWP
« Reply #5 on: May 14, 2023, 12:04:50 PM »
So you can connect to the database from the command line. Then connect to the database of the CWP again and make sure it isn't empty:

Code: [Select]
mysql -uDB_USER -pDB_PASS DB_NAME
show tables;

you should see something like:

Code: [Select]
MariaDB [root_cwp]> show tables;
+--------------------+
| Tables_in_root_cwp |
+--------------------+
| backups            |
| domains            |
| nameserver         |
| notifications      |
| packages           |
| settings           |
| subdomains         |
| user               |
+--------------------+
8 rows in set (0.000 sec)

If your result is the same then the db looks good.

I checked this forum and found another thread with the similar errors. Please review the thread:
https://forum.centos-webpanel.com/informations/mysqli_error()/
Hope it will help you to solve the problem.

Also, in case you decide to reinstall MySQL/MariaDB, don't forget to make backups of your databases.

Offline
*
Re: Paython and CWP
« Reply #6 on: May 14, 2023, 04:13:20 PM »
Thank you very much, I managed to restore the CWP, both as root and as users of the various domains.
but now you can't see the domains (domain.com) and you can't even receive mail (mail.server.com(
could you help me?
Thanks for your patience

Offline
**
Re: Paython and CWP
« Reply #7 on: May 15, 2023, 09:12:02 AM »
connect to the database of CWP, usually called root_cwp and run the following SQL request/query:

Code: [Select]
select * from user;
You should get a list of CWP users and main domain names associated with their accounts.

In case the you get nothing then restore the database from backup.