Posts Tagged ‘Linux’

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

Linux – Find file of X size and print results

July 2nd, 2010

To find a file of X size or greater you would use the following:

find / -type f -size +200000k -exec ls -lh {} \; | awk '{ print $9 ":" $5 }'

replace +200000k with the minimum size of the file you are searching for.

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

Plesk : ERROR: PleskFatalException StatInfo->getProductVersion failed

June 17th, 2010

When you go to https://domain:8443 you get an error message such as :

ERROR: PleskFatalException StatInfo->getProductVersion failed: 

or

ERROR: PleskFatalException
StatInfo->getProductVersion failed: file_get_contents() failed: mktime() [function.mktime]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'UTC' for 'GMT/0.0/no DST' instead

A solution to this is that the version file has not information in it (/usr/local/psa/version). This can be caused by various issues including a failed upgrade, uninstall/reinstall of plesk etc…

If that is the case then just do the following to resolve it:

1 Run rpm -qi psa
2 Note down the following...

[Example from my system - yours will differ]
Version : 9.2.3
Release : cos5.build92091016.19

You also need the server type being used - example CentOS 5
From this info you can create a line (only need one) similar to the following

9.2.3 CentOS 5 92091016.19 [Yours WILL differ] 

Add this to the top of /usr/local/psa/version and restart plesk.

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

Linux – Install Zend Optimizer and IonCube

February 5th, 2010

To install Zend Optimizer or Ion Cube do the following:

FirstĀ  upload test.php. It should contain just <?php phpinfo(); ?>. Once done go to www.yourwebsite.com/test.php

Now check which PHP version is activated. Also you should check if server OS is 32 bit or 64 bit. You can see that from the test.php output >> the first section “System” .

If you see string like

Linux lsh1008 2.6.31.7-hw #1 SMP Thu Dec 10 16:55:16 CST 2009 x86_64

Then the OS (Operating System) is 64 bit (“x86_64” part is what you are looking for). If the string contains

“i686” = > then we have 32 bit OS.

Now that we know the PHP version and the OS type we need to get (know were to get ) the required packages.

For Zend Optimizer http://www.zend.com/en/products/guard/downloads (you need a registration to download, it is free)
For Ioncube visit http://www.ioncube.com/loaders.php

Download the appropriate one. Mind the OS type. The downloads are archives, so download whichever archive type you can extract. The archives contain a folder tree / files that really clearly shows different modules for different PHP versions. You might notice that there are 2 files or folders for each PHP version. One of them containing “ts” in its name. You need the OTHER one. TS stands for “thread safety”, which can be checked as PHP option in the phpinfo() output on the line that says “Thread Safety ” ! .

Ok, make a directory in the FTP root named zend / ioncube (does not really matter) . Upload the module there. (note, if you prefer to use a ssh connection you can create the directory then wget the required files)

Login with SSH and type the following to get the absolute path [path] of the directory. This is important

cd ~
pwd

Now open the php.ini file and look fortheĀ  line that has

zend_extension = “some absolute path”

If you do not find such line to edit, create it in the beginning of the file.

You will now edit the line so it looks like:

zend_extension = “[path]/[ioncubeorzend-folder-you-created]/Zend-or-Ioncube-module”

now save php.ini and go and refresh the test.php page. Hopefully you will have Zend / Ioncube module listed in the modules list.

Note : Yes, you can have them both installed, just make sure the Ioncube line in php.ini is before Zend. Example :

zend_extension = “/home/web/ioncube/ioncube_loader_lin_5.2.so”
zend_extension = “/home/web/zend/ZendOptimizer.so”

This should get them installed.

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

Linux – rdesktop, kick other users off

February 4th, 2010

If you are trying to remote desktop to a server, sometimes you will get the error message that the max amount of connections has already been reached. This will prevent you from connecting.

Thankfully it is possible to force your way onto the server by using the following:

rdesktop -0 -u[login] IP -p[password]

were [login] is the login such as administrator (no []), [password] is that accounts password and IP is the IP address. Also IP:PORT will work if other then 3389.

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