Categories
HowTo Guides Linux Plesk

Protecting your Plesk server against the TimThumb hack

Plenty of WordPress themes, and many plugins, scripts and add-ins now make use of the great TimThumb script to modify images on-the-fly. I have used the script numerous times on my own sites, and for clients – either within a custom written Theme/Plugin or pre-attached within a theme. This results in a lot of different versions of the script over the year – which caused a bit of a panic when I read Cleaning Up the TimThumb Hack | WP Theming outlining the possible threat that an out of date script would cause.

The handy walk-through put together by Devin helped me find firstly; where my scripts were buried, and secondly; which versions required updating (in the end, I updated them all to the latest release)

Categories
CentOS Linux Plesk

MySQL 5.5 update breaks scheduled backups

Found that a recent update of our Plesk 9.5.4 server had broken the scheduled backups although manual backups were still working fine. Its seems that after updating PHP to 5.3 and MySQL to version 5.5 the Plesk Backup Manager was erroring

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 HowTo Guides Linux

Setup simple CentOS Linux webserver

We recently needed a quick and easy web server for internal development and testing. I decided to use CentOS as we have a few root servers with 1&1 which run the same Linux version, CentOS also comes pre-installed with Yum which is a feature that allows you to download and install software easily from the command line.

Installing CentOS was simple, and after choosing the command line server version, deselecting all additional packages – the install only took a few minutes… Infact, it took longer to download the ISO’s than it did to install the OS!

After the CentOS 5.5 Install :

— Update all the OS bits using yum (read more on yum)

yum update

— Install the Web server bits

yum install php php-mysql mysql-server php-gd postgres ImageMagick ImageMagick-devel

— Now add a test file to the root of HTML files we will us “http://www.basicconfig.com/linux/vi” (read more on vi)

vi /var/www/html/index.php

Press “i” to start inserting test into your new file, type “<? phpinfo(); ?>” to allow us to check that PHP is up and running. Finish your file by returning to vi command by pressing “esc” then write and quit by typing “:wq

— To find the IP of your server (if provided by DHCP) to allow us to browse from our network

ifconfig | grep "inet addr"

— In your browser window, visit your web servers internal IP – you should see a PHP Info readout

eg : http://192.168.99.10/index.php

— Now start the MySQL service

service mysqld start

— The service should start and display “OK” when it has, set a root password

/usr/bin/mysqladmin -u root password 'mynewpassword'

And that’s pretty much it. If you want to access the server without being on the server itself, you can access with SSH / SFTP / etc – and of course if you want to expose your server to the outside world, you can forward web traffic to the static IP of your web server.

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