New in CWP Edge-LatestFree with every CWPpro licenceWebsites up to 300x faster

CWP now includes LSPHP, LSAPI-Cache and CWP Cage at no extra cost with all CWPpro licences. The LSAPI-Cache plugin is integrated into our WordPress and other script installers, and CWP Cage gives every user complete isolation. Available now in the CWP Edge-Latest version.

Get CWPpro ›

Paython and CWP

Started by luigi45, May 13, 2023, 08:35:13 AM

Previous topic - Next topic

luigi45

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

overseer

Can you login to the server via SSH and roll things back with yum?

luigi45

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

cyberspace

Try to connect to the database of CWP manually from terminal (SSH) using the command:

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:
/scripts/mysql_pwd_reset -q
then 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:
service cwpsrv restart
and then try to access CWP from the web again.

luigi45

nothing to do, I did as you said but the result is always the same

cyberspace

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:

mysql -uDB_USER -pDB_PASS DB_NAME
show tables;


you should see something like:

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.

luigi45

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

cyberspace

connect to the database of CWP, usually called root_cwp and run the following SQL request/query:

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.