Author Topic: Php errros in CWP panel  (Read 1490 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Php errros in CWP panel
« on: July 17, 2018, 10:28:44 AM »
Hi sir,

I have installed CWP on both CentOs 6 64bits and CentOs 7 64bits, both generate php errors in CWP panel. I can confirm that the installation went well without errors, and I managed to create DNS records, a Database, username with password for an application in PhpMyAdmin.

However, these errors are shown in CWP panel for some reasons:

Warning: mysqli::__construct(): (HY000/1049): Unknown database 'oauthv2' in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0
Notice: Trying to get property of non-object in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0


I also can confirm that I have checked the password in these two files:

$ cat /usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php
$ cat /root/.my.cnf

they are the same and the same as root mysql password generated by CWP after the installation is complete.

Can you please help guide me how to fix that?

Cheers
Thon

Offline
****
Re: Php errros in CWP panel
« Reply #1 on: July 17, 2018, 10:56:07 AM »
navigate to /var/lib/mysql and see if oauthv2 exist or not. The error shows that this database doesnt exist.

Offline
*
Re: Php errros in CWP panel
« Reply #2 on: July 17, 2018, 11:07:20 AM »
hi,

Thank you for your help.

There is no such a file:

/var/lib/mysql

on my server. What it could be?

Cheers
Thon

Offline
****
Re: Php errros in CWP panel
« Reply #3 on: July 17, 2018, 11:20:05 AM »
what is output of this command

Code: [Select]
ls -la /var/lib/mysql
Also this command

Code: [Select]
mysql
SHOW VARIABLES LIKE 'datadir';

Offline
*
Re: Php errros in CWP panel
« Reply #4 on: July 17, 2018, 11:26:05 AM »
Hi,

Here are the inputs:

[root@vps69091 include]# ls -la /var/lib/mysql
total 110672
drwxr-xr-x   8 mysql mysql     4096 Jul 17 06:15 .
drwxr-xr-x. 34 root  root      4096 Jul 17 05:04 ..
-rw-rw----   1 mysql mysql    16384 Jul 17 06:15 aria_log.00000001
-rw-rw----   1 mysql mysql       52 Jul 17 06:15 aria_log_control
-rw-rw----   1 mysql mysql 12582912 Jul 17 06:15 ibdata1
-rw-rw----   1 mysql mysql 50331648 Jul 17 06:15 ib_logfile0
-rw-rw----   1 mysql mysql 50331648 Jul 17 05:00 ib_logfile1
drwx------   2 mysql mysql     4096 Jul 17 05:19 mailwizz
-rw-rw----   1 mysql mysql        0 Jul 17 05:01 multi-master.info
drwx--x--x   2 mysql mysql     4096 Jul 17 05:00 mysql
srwxrwxrwx   1 mysql mysql        0 Jul 17 06:15 mysql.sock
drwx------   2 mysql mysql     4096 Jul 17 05:00 performance_schema
drwx------   2 mysql mysql     4096 Jul 17 05:02 postfix
drwx------   2 mysql mysql     4096 Jul 17 05:02 root_cwp
drwx------   2 mysql mysql     4096 Jul 17 05:04 roundcube
-rw-rw----   1 mysql mysql    24576 Jul 17 06:15 tc.log
-rw-rw----   1 mysql mysql        6 Jul 17 06:15 vps69091.pid


-> SHOW VARIABLES LIKE 'datadir';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'olF5rZVkFN3d
SHOW VARIABLES LIKE 'datadir'' at line 1


Cheers

Offline
****
Re: Php errros in CWP panel
« Reply #5 on: July 17, 2018, 11:30:18 AM »
oauthv2 database doesnt exist on your server thats why its giving error.

Offline
*
Re: Php errros in CWP panel
« Reply #6 on: July 17, 2018, 11:33:06 AM »
Hi,

Thanks for your help.

What is the solution to that?

Cheers

Offline
*
Re: Php errros in CWP panel
« Reply #7 on: July 17, 2018, 11:49:33 AM »
Update:

I created that database in PhpMyAdmin:

oauthv2

The first warning has gone. But the second notice is still there:

Notice: Trying to get property of non-object in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0


How can I fix that?

Cheers

Offline
****
Re: Php errros in CWP panel
« Reply #8 on: July 17, 2018, 11:51:21 AM »
Login to phpmyadmin with your root password.

Code: [Select]
http://serverip:2030/pma
Navigate to create database

Code: [Select]
http://serverip:2030/pma/server_databases.php
Create database.

Code: [Select]
oauthv2 as latin1_swedish_ci
Download the attached database and import in it.

Code: [Select]
http://send.bullten.net/download/3e2027b25812432019042b2d10b771a5.html

Offline
*
Re: Php errros in CWP panel
« Reply #9 on: July 17, 2018, 11:58:00 AM »
Hi,

It is FIXED!

Thanks for great help.

Why this has happened?

Cheers

Offline
*
Re: Php errros in CWP panel
« Reply #10 on: July 17, 2018, 12:17:13 PM »
Update:

New warnings coming:

2018-07-17 10:49:39 Danger: ModSecurity - SECURITY ISSUE
Mod Security is NOT enabled on your server, click here to enable it.
◊2018-07-17 10:49:39 Danger: Firewall - SECURITY ISSUE
CSF/LFD Firewall is NOT enabled on your server, click here to enable it.
◊2018-07-17 10:49:39 Danger: Hidden Processes - SECURITY ISSUE
Hide all processes if not owned by the user is NOT activated on your server, click here to enable it.


Cheers

Offline
****
Re: Php errros in CWP panel
« Reply #11 on: July 17, 2018, 12:26:04 PM »
Just warning. Enable those functions if you need.

Offline
*
Re: Php errros in CWP panel
« Reply #12 on: July 17, 2018, 12:57:12 PM »
thanks.

I just closed those warnings and refresh cwp browser, they have gone.

Many thanks again for great help.

Cheers

Offline
*
Re: Php errros in CWP panel
« Reply #13 on: July 17, 2018, 01:21:01 PM »
Update:

After I created a user in CWP panel which will automatically created an FTP server with a default index.html. It seem not working when I tried to access that page at:

http://www.mydomain.com/index.html

it generates:

"This site canít be reached"


What could be wrong with that?

Offline
*
Re: Php errros in CWP panel
« Reply #14 on: July 17, 2018, 01:29:49 PM »
Update:

I have to issue the following commands:

[root@vps69091 ~]# service named reload && /etc/init.d/named restart
Redirecting to /bin/systemctl reload named.service
Job for named.service invalid.


they generate errors.

It seems that named has been moved?

Cheers