Archive for the ‘Linux’ category

Plesk – 500 internal error “/usr/bin/sw-engine-cgi: undefined symbol: xmlTextReaderSetup”

October 29th, 2014

When trying to visit the plesk pannel you are getting a “500 internal error”. The following applies to plesk 10 on Centos/Redhat I686.

You then try to use the bootstrapper to repair the installation, or any other command line utility and you find the following occurs:

/usr/bin/sw-engine-cgi: symbol lookup error: /usr/bin/sw-engine-cgi: undefined symbol: xmlTextReaderSetup

For more testing, ssh to the server and run

/usr/bin/sw-engine-cgi -v

You should get the result such as this

/usr/bin/sw-engine-cgi: symbol lookup error: /usr/bin/sw-engine-cgi: undefined symbol: xmlTextReaderSetup

Now find out the the version the server is, use the command “arch”

arch
i686

In order to fix the issue do the following:

#wget http://autoinstall.plesk.com/PSA_10.4.4/dist-rpm-CentOS-5-i386/contrib/sw-engine-2.3.1-201410071349.rhel5.i386.rpm
#rpm -qa | grep sw-en
sw-engine-2.3.1-201410061604.rhel5
#rpm -e sw-engine-2.3.1-201410061604.rhel5 --nodeps --justdb
#rpm -ivh sw-engine-2.3.1-201410071349.rhel5.i386.rpm
#  /usr/bin/sw-engine-cgi -v
PHP 5.3.29 (cgi-fcgi) (built: Oct  7 2014 13:49:37)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2014 Zend Technologies

this should fix the issue, please replace sw-engine-2.3.1-2014etc… with the relevant version available from

http://autoinstall.plesk.com/PSA_10.4.4/dist-rpm-CentOS-5-i386/contrib/.

This fix should also work with other distributions

http://autoinstall.plesk.com/PSA_10.4.4/

if you found this helpful feel free to donate to:
ZEC: t1NQp1UuqQbmnXzazbLTSreS2AbaZpRBuTM
LTC: LZyNF1qkBUA7XFz83m5xwzGgmmj1owQn9d
BTC: 1PY95KFPTEJTR7f2NnSgaB6xB9pwDJkcJz

Mysql – Allow remote connections and create a user

November 21st, 2013

To enable logins from other locations you need to:

1) ssh to the server and edit the my.cnf (located in /etc/my.cnf or /etc/mysql/my.cnf
2) Add the line “bind-address=0.0.0.0”. This allows for localhost and remote connections.
3) Create or Modify a user to have permissions to connect to the server. Assuming the user already exists, connect to the mysql server as an admininistrator. Then type one of/or all of the following (depending on need)

GRANT ALL ON *.* TO username@'%';
GRANT ALL ON *.* TO username@'localhost';
GRANT ALL ON *.* TO username@'X.X.X.X';

Were % is ALL source IP address’s, localhost is only from the localhost, X.X.X.X is allow user from this source IP address.

This grants that user access to ALL databases on the server. To limit access to only certain databases then replace *.* with

databases.nameofdatabase.

You might also need to create/modify the user:

create user username@'X.X.X.X' IDENTIFIED BY 'userpassword';
create user username@'%' IDENTIFIED BY 'userpassword';
create user username@'localhost' IDENTIFIED BY 'userpassword';

Note: while each user is the same name and password, each is a separate entry in the mysql.users table because of the source of the connection for the user.

4) Make sure the firewall allows for remote connection to mysql on port 3306.

if you found this helpful feel free to donate to:
ZEC: t1NQp1UuqQbmnXzazbLTSreS2AbaZpRBuTM
LTC: LZyNF1qkBUA7XFz83m5xwzGgmmj1owQn9d
BTC: 1PY95KFPTEJTR7f2NnSgaB6xB9pwDJkcJz

Adding/Changing the SSL cert for mail in plesk – Linux

August 21st, 2013

The certificate for SMTP over SSL is located in the following files:

1. For QMail MTA: /var/qmail/control/servercert.pem
2. For Postfix MTA: /etc/postfix/postfix_default.pem

Note: Only QMail MTA is used in Parallels Plesk Panel version 8.x and earlier versions. Use instructions from this KB to define which MTA is used in Parallels Plesk Panel version 9.x and later versions.

For IMAP4 and POP3 over SSL, the following certificate files are used:

/usr/share/courier-imap/imapd.pem
/usr/share/courier-imap/pop3d.pem

By default, these are self-signed certificates for “plesk” which are generated during Parallels Plesk installation. If you need to set up your own certificates, copy and paste your certificate and Private Key into the appropriate files and restart “qmail/postfix” and “courier-imap” services:

For version 8.6 and earlier versions:

~# /etc/init.d/xinetd restart
~# /etc/init.d/courier-imap restart

For version 9.x and later versions:

~# /usr/local/psa/admin/sbin/mailmng –restart-service

if you found this helpful feel free to donate to:
ZEC: t1NQp1UuqQbmnXzazbLTSreS2AbaZpRBuTM
LTC: LZyNF1qkBUA7XFz83m5xwzGgmmj1owQn9d
BTC: 1PY95KFPTEJTR7f2NnSgaB6xB9pwDJkcJz

Plesk Key error “Server response: No properly formed ip addresses”

October 8th, 2012

When logging into plesk you see that it is unable to retrieve an updated key. When you try and manually retrieve it (using retrive key) you get the following error:

"Server response: No properly formed ip addresses"

Solution (and makes very little sense) :

  1. ssh to the server
  2. type: sudo killall -HUP httpsd

that’s it.

if you found this helpful feel free to donate to:
ZEC: t1NQp1UuqQbmnXzazbLTSreS2AbaZpRBuTM
LTC: LZyNF1qkBUA7XFz83m5xwzGgmmj1owQn9d
BTC: 1PY95KFPTEJTR7f2NnSgaB6xB9pwDJkcJz

Ubuntu (debian) – Reverse your mouse buttons

May 25th, 2012

When i use a mouse with my left hand, i prefer to have the buttons reversed, for symmetry reasons.

To do this in Ubuntu/Debian you need to do the following:

First run the command:

 xinput list

xinput list ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ Dell Dell USB Optical Mouse id=8 [slave pointer (2)] ⎣ Virtual core keyboard id=3 [master keyboard (2)] ↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)] ↳ Power Button id=6 [slave keyboard (3)] ↳ Power Button id=7 [slave keyboard (3)] ↳ BTC USB Multimedia Keyboard id=9 [slave keyboard (3)] ↳ BTC USB Multimedia Keyboard id=10 [slave keyboard (3)]

This will list your pointer devices, in my case it was a “Dell Dell USB Optical Mouse”

Now to remap your buttons, you need to figure what they are pointing to, so run

xinput --test "Dell Dell USB Optical Mouse"

Note: replace your device name with mine

Now press the buttons on your mouse, should get something like this:

 

button press   1 
button release 1 
button press   1 
button release 1 
button press   3 
button release 3 
button press 2
release release 2

For me that was left button = 1, right = 3 and middle = 2.

to remap button functions i then type the following:

xinput set-button-map "Dell Dell USB Optical Mouse" 3 2 1

The order of the mapping is numeric so now i have button 1 mapped to function 3 and button 3 mapped to 1 (reversed the buttons) i want 2 to remain the same.

That’s it.

if you found this helpful feel free to donate to:
ZEC: t1NQp1UuqQbmnXzazbLTSreS2AbaZpRBuTM
LTC: LZyNF1qkBUA7XFz83m5xwzGgmmj1owQn9d
BTC: 1PY95KFPTEJTR7f2NnSgaB6xB9pwDJkcJz