Categories
HowTo Guides Linux Plesk

Install mcrypt for PHP on Plesk 9.x and Pesk 10.x

A recent request to install mcrypt for a payment module for Sagepay led me to put together this quick how-to based upon my CentOS Plesk 9.x webserver.

Categories
Linux Plesk

Plesk IMAP connection limit from single IP

Plesk has a built-in limit of 4 concurrent connections to IMAP from a single IP, so if you have more than 4 users – or more than 4 accounts which connect back to your Plesk server from any 1 IP – your users will get a Send/Receive error.

Categories
CentOS Linux Plesk

Segmentation fault for backupmng

After a recent upgrade to Plesk 9.5 for Linux, I started receiving the following error messages on a daily basis :

/bin/sh: line 1: 2462 Segmentation fault /usr/local/psa/admin/sbin/backupmng> /dev/null 2>&1;

It seems that, when Plesk performs a backup using backupmng utility, there is an error, and you may find errors simliar to below in /var/log/messages log file :

Mar 24 01:33:02 : backupmng[30573]: segfault at 0000000000000010 rip 00000039b6a4a855 rsp 00007fff4fa91710 error 4

Resolution – provided by Plesk

Fixed backupmng utility for CentOS 5 and Debian 5 in attached file.

For fix installation replace %plesk_dir%/admin/sbin/backupmng file by file from attach and correct owner and permissions, it should be root:root, 750.

A simple command to ensure permissions are correct; chown and chmod:

chown root:root /usr/local/psa/admin/sbin/backupmng
chmod 750 /usr/local/psa/admin/sbin/backupmng

Note: %plesk_dir% is environment variable which points to Plesk installation folder. By default it is /usr/local/psa/

Attachments:

backupmng.zip(106Kb)

http://kb.parallels.com/9351

Categories
Linux Plesk

Plesk Prelink Cron error

I found that we had been getting this error every morning since updating the Plesk server to 9.3 :

Cron <root@plesk3> run-parts /etc/cron.daily
/etc/cron.daily/prelink:
/etc/cron.daily/prelink: line 45: /var/log/prelink/prelink.log: No such file or directory
/etc/cron.daily/prelink: line 46: /var/log/prelink/prelink.log: No such file or directory
/etc/cron.daily/prelink: line 47: /var/log/prelink/prelink.log: No such file or directory

The odd thing is that the /var/log/prelink/ folder does not seem to have been created during the upgrade process, and the cron cannot create the folder automatically. Simple fix – SSH into your server and create the folder manually

mkdir /var/log/prelink

Let me know in the comments if this has helped you out…

Categories
Plesk

Quick command : Top 25 Mailboxes by Size

Description : This command will email (or display in terminal) the top 25 mailboxes, ordered by size. Strangely – Plesk doesn’t seem to have any kind of Mailbox Size report, and will only show you the domain mailboxes combined.

Simply SSH into your Plesk server and run the following :

cd /var/qmail/mailnames
du -hs --block-size=1024K */* | sort -nr | head -25 | mail -s 'Top 25 Mailboxes by Size' [email protected]

And if you wish to display on screen :

cd /var/qmail/mailnames
du -hs --block-size=1024K */* | sort -nr | head -25

The first script could be set up as a handy Cron job to send you a weekly / monthly report.

Categories
Linux Plesk

MySQL Database issues – Plesk CP and websites

Tonight I found that our Plesk server had got itself into a state where Domains could not be Activated/Suspended, and websites with Databases were not loading correctly (eg WordPress sites etc), errors were as follows :

Website Logs:

WordPress database error Got error 28 from storage engine for query…

Plesk Control Panel Error:

Unable to activate/deactivate domain: Domain Mgmt backend failed: domainmng: /usr/local/psa/admin/bin/ftpmng execution failed:

Looking at the file system (see below), the TMP directory was full so MySQL will have been unable to create any temp tables etc.

df -h
Filesystem            Size  Used Avail Use% Mounted on

/dev/md1         9.2G  354M  8.4G   4% /
/dev/md5         9.4G  1.7G  7.7G  18% /usr
/dev/md6         213G   15G  199G   7% /var
none             990M  988M  1.8M 100% /tmp
tmpfs            990M     0  990M   0% /usr/local/psa/handlers/before-local
tmpfs            990M     0  990M   0% /usr/local/psa/handlers/before-queue
tmpfs            990M     0  990M   0% /usr/local/psa/handlers/before-remote
tmpfs            990M  5.1M  985M   1% /usr/local/psa/handlers/info
tmpfs            990M     0  990M   0% /usr/local/psa/handlers/spool

In my case, TMP was running at 100% and was filled by file : “repo_transport_tmp_HcQKVt” The temp file was a server backup file which was being downloaded to the local repository. After removing the file, ran the following command to restart MySQL

/etc/rc.d/init.d/mysqld restart