Category Archives: Plesk

Search for Plesk issues and fixes

How to switch Plesk control panel from IIS to Apache?

How to switch Plesk control panel from one webserver to another?

Launch command prompt.

Start >> Run >> cmd
If IIS is used as Plesk web server switch it to Apache

%plesk_bin%\reconfigurator.exe –switch-plesk-web-server –new-provider=apache

If Apache is used as Plesk web server switch it to IIS

%plesk_bin%\reconfigurator.exe –switch-plesk-web-server –new-provider=iis

Advertisements

ASP.NET , IIS and 32 bit emulation mode in 64 bit server

How to switch between the 32-bit versions of ASP.NET and the 64-bit version of ASP.NET on a 64-bit version of Windows?

IIS 6.0 supports both the 32-bit mode and the 64-bit mode. However IIS 6.0 does not support running both modes at the same time on a 64-bit version of Windows. ASP.NET 1.1 runs only in 32-bit mode. ASP.NET 2.0 runs in 32-bit mode or in 64-bit mode. Therefore, if you want to run ASP.NET 1.1 and ASP.NET 2.0 at the same time, you must run IIS in 32-bit mode.

ASP.NET 1.1, 32-bit version

// To run the 32-bit version of ASP.NET 1.1, follow these steps:

  1. Click Start, click Run, type cmd, and then click OK.
  2. Type the following command to enable the 32-bit mode:
    cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1
  3. Type the following command to install the version of ASP.NET 1.1 and to install the script maps at the IIS root and under:
    %SYSTEMROOT%\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis.exe -i
  4. Make sure that the status of ASP.NET version 1.1.4322 is set to Allowed in the Web service extension list in Internet Information Services Manager.

ASP.NET 2.0, 32-bit version

// To run the 32-bit version of ASP.NET 2.0, follow these steps:

  1. Click Start, click Run, type cmd, and then click OK.
  2. Type the following command to enable the 32-bit mode:
    cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1
  3. Type the following command to install the version of ASP.NET 2.0 (32-bit) and to install the script maps at the IIS root and under:
    %SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i
  4. Make sure that the status of ASP.NET version 2.0.50727 (32-bit) is set to Allowed in the Web service extension list in Internet Information Services Manager.

ASP.NET 2.0, 64-bit version

// To run the 64-bit version of ASP.NET 2.0, follow these steps:

  1. Click Start, click Run, type cmd, and then click OK.
  2. Type the following command to disable the 32-bit mode:
    cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 0
  3. Type the following command to install the version of ASP.NET 2.0 and to install the script maps at the IIS root and under:
    %SYSTEMROOT%\Microsoft.NET\Framework64\v2.0.50727\aspnet_regiis.exe -i
  4. Make sure that the status of ASP.NET version 2.0.50727 is set to Allowed in the Web service extension list in Internet Information Services Manager.

Ref : http://support.microsoft.com/kb/894435

How to check user passwords against a dictionary attack?

How to check user passwords against a dictionary attack?

You can be configured to verify that passwords (read as weak password) cannot be guessed easily using Linux PAM module called pam_cracklib.so. It will check the password against dictionary words. User is not allowed to set new password until and unless conditions satisfied (i.e. weak password is not allowed).

Open password configuration file according to your Linux distribution. And make modification as follows.

For Redhat/Fedora/CentOS Linux, cracklib PAM module is installed by default so no need to install anything. Just open config file:

# vi /etc/pam.d/system-auth

Append/modify as follows:

password required /lib/security/pam_cracklib.so retry=2 minlen=10 difok=6

For Debian or Ubuntu Linux, First install libpam-cracklib PAM module to enable cracklib support.

# apt-get install libpam-cracklib

or

$install libpam-cracklib

Now open config file:

# vi /etc/pam.d/system-auth

Append/modify as follows:

password required pam_cracklib.so retry=2 minlen=10 difok=6

Save and close the file

Where,

* retry=2 : Prompt user at most 2 times before returning with error
* minlen=10 : minimum length allowed for an account password is set to 10 characters. This is the minimum simplicity count for a good password. And you are allowed only 2 times using retry option.
* difok=6: How many characters can be the same in the new password relative to the old. User will see error – BAD PASSWORD: is too similar to the old one
* You can also apply following options to compute the ‘unsimplicity’ of the password.
o dcredit=N : Digits characters
o ucredit=N : Upper characters
o lcredit=N : Lower characters
o ocredit=N : Other characters

Please note that restrictions are only applied to normal users (not to root user).

For further reading : –

http://www.cyberciti.biz/tips/l

http://www.debianhelp.org/node/2708

Installation of FFmpeg + FFmpeg-PHP +Lame + Ruby + Mplayer + Mencoder + flv2tool

FFmpeg is a computer program that can record, convert and stream digital audio and video in numerous formats. FFmpeg is a command line tool that is composed of a collection of free software / open source libraries. It also supports grabbing and encoding in real time from a TV card.

=====================================================================

To install ffmpeg in Debian and Ubuntu servers please refer to the following URL.

http://linux.justinhartman.com/FFmpeg,_FFmpeg-PHP,_Lame,_Libogg,_Libvorbis,_FLVtool2,_Mplayer,_Mencoder,_AMR_Installation

=====================================================================


Go to your installation folder.

cd /usr/local/src

1. Lame MP3 encoder

Pure install of FFmpeg is not enough, the FLV (Flash Video Files) converted has no audio, because FLV audio codec is mp3, so you need LAME support.

Download from sourceforge.net

wget http://nchc.dl.sourceforge.net/sourceforge/lame/lame-3.96.tar.gz
tar xvzf lame-3.96.tar.gz
cd lame-3.96
./configure –enable-shared –prefix=/usr
make
make install

enable-shared to make sure FFmpeg can use LAME later. Type lame in command line to see help after install succeed.

Go to your installation folder.

cd /usr/local/src

2. Install subversion via yum, rpm or up2date (things are easier with Subversion).

For eg: If the server has yum installed, the following command would suffice.

yum install subversion

3. Download ffmpeg using subversion

svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg

cd ffmpeg


./configure –enable-gpl –enable-shared –enable-libmp3lame

==============================
If you are getting the following error

“Unable to create and execute files in /tmp. Set the TMPDIR environment…”
Try to unmount /tmp OR

mkdir /test ; chmod 777 /test
vi configure edit TMPDIR to /test

and execute it once again

====================
make
make install

Go to your installation folder.

cd /usr/local/src

4. Install Ruby (FLVTool2 is written in Ruby, so you have to install Ruby in server too)

FLVTool2 is a manipulation tool for Macromedia Flash Video files (FLV). It can calculate a lot of meta data, insert an onMetaData tag, cut FLV files, add cue points (onCuePoint), show the FLV structure and print meta data information in XML or YAML.

Download from Ruby site, type the following command to compile and install it:

./configure
make
make install

Note: if you have yum installed, just use

yum install ruby

Go to your installation folder.

cd /usr/local/src

5. Install FLVTool2

Download from FLVTool2 site, type the following command to compile and install it:

wget http://rubyforge.org/frs/download.php/9225/flvtool2_1.0.5_rc6.tgz
tar xvzf flvtool2_1.0.5_rc6.tgz
cd flvtool2_1.0.5_rc6/
ruby setup.rb config
ruby setup.rb setup
ruby setup.rb install

Type flvtool2 in command line to see help after install succeed.

Go to your installation folder.

cd /usr/local/src

6. Install ffmpeg-php

wget http://downloads.sourceforge.net/ffmpeg-php/ffmpeg-php-0.5.3.1.tbz2?modtime=1213135005&big_mirror=0
tar xjvf ffmpeg-php-0.5.3.1.tbz2
cd ffmpeg-php-0.5.3.1

phpize
./configure && make
make install

You will get a message as follows, which mention the path

############################
/usr/local/src/ffmpeg-php-0.5.3.1/modules/ffmpeg.so
cp ./.libs/ffmpeg.lai /usr/local/src/ffmpeg-php-0.5.3.1/modules/ffmpeg.la
PATH=”$PATH:/sbin” ldconfig -n /usr/local/src/ffmpeg-php-0.5.3.1/modules
———————————————————————-
Libraries have been installed in:
/usr/local/src/ffmpeg-php-0.5.3.1/modules

Installing shared extensions: /usr/local/lib/php/extensions/no-debug-non-zts-20060613/
########################

This creates the ffmpeg.so file. Include this extension in your php.ini file.
extension=ffmpeg.so

You can find the php.ini that the the server is using with the following command.

php -i |grep php.ini

Make sure that the php.ini has the above mentioned extension directory. Also note the PATH where the shared libraries loaded.

Go to your installation folder.

cd /usr/local/src

7. Libogg + Libvorbis

Download libogg from http://downloads.xiph.org/releases/ogg/

wget http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz
tar xvzf libogg-1.1.3.tar.gz
cd /usr/local/src/libogg-1.1.3
./configure && make && make install

Go to your installation folder.

cd /usr/local/src

Download Libvorbis from http://downloads.xiph.org/releases/ogg/

wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.1.2.tar.gz
tar xvzf libvorbis-1.1.2.tar.gz
cd /usr/local/src/libvorbis-1.1.2
./configure && make && make install

Go to your installation folder.

cd /usr/local/src

8. Mplayer & Codecs

wget http://www.mplayerhq.hu/MPlayer/releases/codecs/essential-20071007.tar.bz2
tar xjvf essential-20071007.tar.bz2
mv /usr/local/src/essential-20071007/ /usr/local/lib/codecs/
chmod -R 755 /usr/local/lib/codecs/

Go to your installation folder.

cd /usr/local/src


wget http://www1.mplayerhq.hu/MPlayer/releases/MPlayer-1.0rc1.tar.bz2
tar xjvf MPlayer-1.0rc1.tar.bz2
cd MPlayer-1.0rc1/
./configure
make
make install

=======================

For more information and FAQs,

http://ffmpeg.mplayerhq.hu/faq.html

Click here for the steps to install FFmpeg and FFmpeg-php in a Linux ( RHEL, CentOS, Fedora) Server.

Common Issues & fixes :

1) If you are getting the following error while running ffmpeg in shell, try the following.

ffmpeg: error while loading shared libraries: libavdevice.so.52: cannot open shared object file: No such file or directory

A)
Step 1: Check if the file “libavdevice.so.52” exists in the server using the following command.

find / -name ‘libavdevice.so.*’

Step 2: You will get the directory in which the file “libavdevice.so.52” exists from the above command.
Suppose the directory is “/usr/local/lib/” in this example.

Step 3: You have to add the directory name in the file “/etc/ld.so.conf”.

Step 4: Execute the command “ldconfig”.

OR

B)
export LD_LIBRARY_PATH=/usr/local/lib:LD_LIBRARY_PATH

But this value will be cleared once you log off that session.

So it is better to save this value in bashrc

vi .bashrc
LD_LIBRARY_PATH=/usr/local/lib

After closing the file execute the command : bash

2)

If you are getting the following errors while installing ffmpeg

checking for ffmpeg headers... configure: error: ffmpeg headers not
found. Make sure you've built ffmpeg as shared libs using the --enable-
shared option 

Check whether “/usr/local/include/ffmpeg” directory is created while installing ffmpeg. If not, create this directory.

mkdir /usr/local/include/ffmpeg

Copy the necessary ffmpeg header files to “/usr/local/include/ffmpeg”.

cp -p /usr/local/src/ffmpeg/libavformat/avio.h /usr/local/include/ffmpeg
cp -p /usr/local/src/ffmpeg/libavformat/avformat.h /usr/local/include/ffmpeg
cp -p /usr/local/src/ffmpeg/libavcodec/avcodec.h /usr/local/include/ffmpeg

Plesk Domain remove Issue

When we try to remove domain the following error message is appearing.

Unable to delete hosting: Unable to create SubDomainManager: Unable to create SubDomainPerformance object: WebServerManager::getSubDomainPerformance() failed: Unable to parse current performance.


Also I am not able to remove the subdomains.

When accessing a sub domain management page the following error message is displayed:

Unable to create SubDomainManager object: Unable to create SubDomainPerformance object: WebServerManager::getSubDomainPerformance() failed: Unable to parse current performance.

CAUSE
========
Sub domain is not configured in IIS.

RESOLUTION
========

It’s needed to be re-configured. This can be done using the following command line utility:

“%plesk_bin%\websrvmng.exe” –update-subdomain –vhost-name=<domain> –subdomain=<subdomain>

========================== If the issue persist try  these also ==========

1. Remove the Registry Key

HKEY_LOCAL_MACHINE -> SOFTWARE -> PLESK -> PSA Config -> Config ->SitesCache

2. The follow your suggestion and remove the domain.

cd %plesk_bin%

websrvmng.exe –remove-vhost –vhost-name=Domainname

3. Then install the domain through the command line:

websrvmng.exe –install-vhost –vhost-name=Domainname

4. Then go to the Plesk Control Panel and delete the domain. It is still in the list, but it will actually delete this time.