Archive for the 'Plesk Support' Category

Error when try to use PHPMyAdmin in the Plesk CP

Sometimes you might get the following error when try to use PHPMyAdmin in Plesk CP:

“#1045 - Access denied for user ‘pma_xxxxxxx’@'localhost’ (using password: YES)”

You can use the following to fix the issue:

Make sure Plesk PHPMyAdmin user exists in mysql.user table and has right password and privileges. User name and password can be found in /usr/local/psa/admin/htdocs/domains/databases/phpMyAdmin/config.inc.php file.

# cd /usr/local/psa/admin
# grep controluser htdocs/domains/databases/phpMyAdmin/config.inc.php
$cfg['Servers'][$i]['controluser'] = ‘USER’;

# grep controlpass htdocs/domains/databases/phpMyAdmin/config.inc.php
$cfg['Servers'][$i]['controlpass'] = ‘PASSWORD’;

# grep pmadb htdocs/domains/databases/phpMyAdmin/config.inc.php
$cfg['Servers'][$i]['pmadb'] = ‘DATABASE’;

Try to login as this user into MySQL from the command line. If the password doesn’t match, update mysql.user table and set ‘PASSWORD’ password for ‘USER’. If such user doesn’t exist in Mysql, create it with commands like:

# mysql -uadmin -p`cat /etc/psa/.psa.shadow`

mysql> use mysql;
mysql> insert into user values (’localhost’,'USER’,password(’PASSWORD’),’N',’N',’N',’N',’N',’N',’N',’N',’N',’N',’N',’N',’N',’N',’N',’N',’N',’N',’N',’N',’N',”,”,”,”,0,0,0);
mysql> INSERT INTO `db` VALUES(’localhost’,'DATABASE’,'USER’,'Y’,'Y’,'Y’,'Y’,'N’,'N’,'N’,'N’,'N’,'N’,'N’,'N’);
mysql> flush privileges;

Replace USER, PASSWORD and DATABASE with the right values from config.inc.php.

SBDavid

SQL Express not showing up in Plesk

SQL Express not showing up in Plesk

SQL Express not showing up in Plesk :

The SQL server won’t be listed under “Plesk >> Servers >> Database server”.

To solve this, login to the server via RDP.

Start >> Programs >> SQL Server Management Studio Express

Now, login to the SQL server with the below details.

server type : database engine

server name : hostname or IP address

Authentication : Windows Authentication

Do select Authentication type as Windows Authentication. Then create login for ’sa’ user.

security > logins > reset or create new

Or reset the ’sa’ password

security > logins > sa > properties

Also, navigate to

Programs > MS SQL server > Configuration Tools > SQL configuration manager > Network Configuration
> Protocols for MS SQL server

Enable the following :

1. Shared Memory

2. Named Pipes

3. TCP/IP

Once the above are done. Restart the below services.

MS sql server

Plesk sql server

Now you can find the database server under “Plesk >> servers >> database server”.

SBDavid

Postgresql Error on Plesk

Postgresql Error on Plesk

When trying to use Postgresql on Plesk Control Panel >> servers >> Database Servers >> Local PostgreSQL, getting the following error while using the postgresql for the first time.

Unable to rewrite /var/lib/pgsql/data/pg_hba.conf
1
Error on query to PostgreSQL
1
Unable to rewrite /var/lib/pgsql/data/pg_hba.conf
1

0: /usr/local/psa/admin/plib/DatabaseManagerPostgreSQL.php:263DatabaseManagerPostgreSQL-
>createLocalAdminLoginImpl(string ‘admin’, string ‘********’, NULL null)1: /usr/local/psa/
admin/plib/DatabaseManager.php:513DatabaseManager->updateLocalAdmin()2:
/usr/local/psa/admin/plib/DatabaseServerManager.php:229DatabaseServerManager->

updateServer(object of type DatabaseServer)3: /usr/local/psa/admin/htdocs/server/db_server_edit.php:52

This means postgresql is not running and when checking the error logs we can see like this:

#tail -f /usr/local/psa/admin/logs/httpsd_error_log
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket “/tmp/.s.PGSQL.5432″?
sed: can’t read /var/lib/pgsql/data/pg_hba.conf: No such file or directory
#tail -f /var/lib/pgsql/pgstartup.log
postmaster cannot access the server configuration file “/var/lib/pgsql/data/postgresql.conf”:
No such file or directory

Usually this happens when the postgresql database is not properly initialized. For fixing this error, we need to reinitialize the postgrsql database.

# rm -rf /var/lib/pgsql/data
# /etc/rc.d/init.d/postgresql start
Then again go to Plesk Control Panel >> servers >> Database Servers >> Local PostgreSQL and give your
administrator username and password.

DB query failed: Unknown column ’serial’ in ‘field list’

After upgrading plesk from version 8.4 to 8.6, you may encounter the following error while deactivating a domain.

Plesk >> Domains >> domain.com

Error:

DB query failed: Unknown column ’serial’ in ‘field list’
———————- Debug Info ——————————-
0: plib\common_func.php3:243
db_query(string ’select `id`, `name`, `displayName`, `email`, `status`, `type`, `ttl`, `ttl_unit`, `refresh`, `refresh_unit`, `retry`, `retry_unit`, `expire`, `expire_unit`, `minimum`, `minimum_unit`, `serial`, `serial_format` from `dns_zone` where `id`=311′)
1: plib\class.Table.php:189
Table->select()
2: plib\dns\DNSZone.php:49
DNSZone->DNSZone(string ‘311′)
3: plib\common_func.php3:2929
objectMaker(string ‘DNSZone’, string ‘311′)
4: plib\dns\DNSManager.php:34
DNSManager::getDNSZone(string ‘311′)
5: plib\class.Domain.php:787
Domain->getDNSZone()
6: plib\class.Domain.php:244
Domain->turnOff(integer ‘16′, integer ‘0′, boolean false)
7: plib\class.BsDomain.php:417
BsDomain->turnOff()
8: htdocs\domains\dom_ctrl.php3:107

Cause:

Due to the missing entries “serial” and “serial_format” in the table “dns_zone”(under psa database).

Solution:

mysql -u admin -p `cat /etc/psa/.psa.shadow`
(Log in to mysql using Plesk’s stored password)

mysql> use psa
(Select Plesk’s database)

mysql> describe dns_zone;
(Check if there are rows titled serial and serial_format. If not, perform the steps below)

mysql> ALTER TABLE `dns_zone` add `serial` VARCHAR( 12 ) CHARACTER SET ascii COLLATE ascii_bin NOT NULL DEFAULT ‘0′;
mysql> ALTER TABLE `dns_zone` add `serial_format` ENUM( ‘UNIXTIMESTAMP’, ‘YYYYMMDDNN’ ) NOT NULL DEFAULT ‘UNIXTIMESTAMP’;
(Add the appropriate rows to the dns_zone table.)

describe dns_zone;
Should look something like:

+—————+————————————+——+—–+—————+—————-+
| Field | Type | Null | Key | Default | Extra |
+—————+————————————+——+—–+—————+—————-+
| id | int(10) unsigned | NO | PRI | NULL | auto_increment |
| name | varchar(255) | NO | | | |
| displayName | varchar(255) | NO | | | |
| status | int(10) unsigned | NO | | 0 | |
| email | varchar(255) | YES | | NULL | |
| type | enum(’slave’,'master’) | NO | | master | |
| ttl | int(10) unsigned | NO | | 86400 | |
| ttl_unit | int(10) unsigned | NO | | 1 | |
| refresh | int(10) unsigned | NO | | 10800 | |
| refresh_unit | int(10) unsigned | NO | | 1 | |
| retry | int(10) unsigned | NO | | 3600 | |
| retry_unit | int(10) unsigned | NO | | 1 | |
| expire | int(10) unsigned | NO | | 604800 | |
| expire_unit | int(10) unsigned | NO | | 1 | |
| minimum | int(10) unsigned | NO | | 10800 | |
| minimum_unit | int(10) unsigned | NO | | 1 | |
| serial | varchar(12) | NO | | 0 | |
| serial_format | enum(’UNIXTIMESTAMP’,'YYYYMMDDNN’) | NO | | UNIXTIMESTAMP | |
+—————+————————————+——+—–+—————+—————-+
18 rows in set (0.00 sec)

Plesk Retrieve keys - open or save ‘key_update.php’

The plesk license key can be retrieved via plesk control panel

Plesk >> Server >> License Management >> Retrieve keys

Sometimes, when you click on “Retrieve keys”, you will get a download prompt to open or save the ‘key_update.php’ file.

1.Check the log file /usr/local/psa/admin/logs/httpsd_error_log

If you get the error “xmlrpc_client.c:675: assertion failed”,

2. Restart Plesk Control Panel to perform correct startup configuration.

# /usr/local/psa/admin/bin/httpsdctl stop
# /usr/local/psa/admin/bin/httpsdctl start

# /etc/init.d/psa stop
# /etc/init.d/psa start

« Prev - Next »