Php errros in CWP panel

Started by daro2013, July 17, 2018, 10:28:44 AM

Previous topic - Next topic

daro2013

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

bullten

navigate to /var/lib/mysql and see if oauthv2 exist or not. The error shows that this database doesnt exist.

daro2013

hi,

Thank you for your help.

There is no such a file:

/var/lib/mysql

on my server. What it could be?

Cheers
Thon

bullten

what is output of this command

ls -la /var/lib/mysql

Also this command

mysql
SHOW VARIABLES LIKE 'datadir';

daro2013

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

bullten

oauthv2 database doesnt exist on your server thats why its giving error.

daro2013

Hi,

Thanks for your help.

What is the solution to that?

Cheers

daro2013

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

bullten

Login to phpmyadmin with your root password.

http://serverip:2030/pma

Navigate to create database

http://serverip:2030/pma/server_databases.php

Create database.

oauthv2 as latin1_swedish_ci

Download the attached database and import in it.

http://send.bullten.net/download/3e2027b25812432019042b2d10b771a5.html

daro2013

Hi,

It is FIXED!

Thanks for great help.

Why this has happened?

Cheers

daro2013

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

bullten

Just warning. Enable those functions if you need.

daro2013

thanks.

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

Many thanks again for great help.

Cheers

daro2013

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?

daro2013

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