24×7servermanagement.com
P r o f e s s i o n a l — M a n a g e m e n t — S o l u t i o n s-
Fixing plesk horde webmail
Posted on February 13th, 2010 No commentsSometimes you may see horde webmain in plesk windows showing page not found errors or not working properly during sending email via webmail. Here is the general fix for all the problems.
"%plesk_bin%\websrvmng.exe" --reconfigure-webmail
"%plesk_bin%\defpackagemng.exe" --fix --type=webmail.hordeHope this helps.
-
Enable php_mcrypt.dll extension in Windows 2003
Posted on January 15th, 2010 No commentsHere is the simple way to enable mcrypt extension on Windows 2003 standard edition. Download the libmcrypt.dll from internet as we manage to download from http://dllcity.com/download-free-dll-file-libmcrypt.html , Once you download unzip it and put the dll into your C:\Windows\system32 folder.
enable the line extension=php_mcrypt.dll in php.ini and restart IIS. Thats it however you can check the phpinfo and see mcrypt extensions enabled.
-
Yum error: No module named sqlite
Posted on January 8th, 2010 No commentsToday we upgraded one of our centos 4.8 server to centos 5.4 via yum. But after upgrade yum seems to be showing sqlite error.
[root@server1]# yum clean all
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:No module named sqlite
Please install a package which provides this module, or
verify that the module is installed correctly.It’s possible that the above module doesn’t match the
current version of Python, which is:
2.4.3 (#1, Sep 3 2009, 15:37:12)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)]If you cannot solve this problem yourself, please go to
the yum faq at:
http://wiki.linux.duke.edu/YumFaqTo fix this download the latest python-sqlite rpm from CentOS 5.4 mirror and peform a forceful upgrade.
[root@server1]# rpm -Uvh python-sqlite-1.1.7-1.2.1.i386.rpm –force
Preparing… ########################################### [100%]
1:python-sqlite ########################################### [100%]
[root@server1]# yum clean all
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Cleaning up Everything[root@server1]# yum update
-
Error: Missing Dependency: perl(URI) >= 1.17 is needed by package subversion
Posted on December 30th, 2009 No commentsIf you are Getting that above error while installating Subversion on CentOS via YUM , Here is what you need to do to get this fixed.
Just run the following command from your server. We assume you have CentOS 5.4 on the server
rpm -ivh http://mirror.centos.org/centos-5/5.4/os/i386/CentOS/perl-URI-1.35-3.noarch.rpm
Then run yum install subversion
-
How To: Disable suexec in Plesk
Posted on December 25th, 2009 No commentsToday we had to install php4 as CGI on the Plesk server, But plesk comes with php5 and suexec enabled. So in order to run php4 we need to disable suexec disabled as php4 pages were showing “internal server error”
So here is what you need to do.
find suexec on the server
# whereis suexec
Result
suexec: /usr/sbin/suexec /usr/sbin/suexec.saved_by_psa /usr/share/man/man8/suexec.8.gz
Then rename the suexec binary and that will disable suexec.
# mv /usr/sbin/suexec /usr/sbin/suexec_old
Restart httpd
service httpd restart
Thats all you can check your phpinfo for php4 as “phpinfo.php4″ file on the server. Please note the extension for file will be .php4 as apache needs to reconginze which files should be executed as php4. This article does not include steps for how to install php4 as CGI on plesk based server.
-
How to Install FFmpeg on CentOS via Yum
Posted on November 26th, 2009 No commentsThe easiest way to install FFMPEG and other modules is through yum. Following are the steps given to install ffmpeg with yum command.
First we will have to install the DAG RPM repositories which contains huge amount of rpm packages. It’s very easy. Just install the latest rpmforge-release package for your distribution and architecture.
This will automatically install the configuration and GPG keys that are for safely installing RPMforge packages.
Please select the correct command from the following list:
* Supported Red Hat Enterprise Linux 5 / i386:
rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
* Red Hat Enterprise Linux 5 / x86_64:
rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS//rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
* Red Hat Enterprise Linux 4 / i386:
rpm -Uhv http://apt.sw.be/redhat/el4/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el4.rf.i386.rpm
* Red Hat Enterprise Linux 4 / x86_64:
rpm -Uhv http://apt.sw.be/redhat/el4/en/x86_64/rpmforge/RPMS/rpmforge-release-0.3.6-1.el4.rf.x86_64.rpm
* Red Hat Enterprise Linux 3 / i386:
rpm -Uhv http://apt.sw.be/redhat/el3/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el3.rf.i386.rpm
* Red Hat Enterprise Linux 3 / x86_64:
rpm -Uhv http://apt.sw.be/redhat/el3/en/x86_64/rpmforge/RPMS/rpmforge-release-0.3.6-1.el3.rf.x86_64.rpm
* Red Hat Enterprise Linux 2 / i386:
rpm -Uhv http://apt.sw.be/redhat/el2.1/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el2.rf.i386.rpm
* Red Hat Linux 9 / i386:
rpm -Uhv http://apt.sw.be/redhat/9/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.rh9.rf.i386.rpm
* Red Hat Linux 7.3 / i386:
rpm -Uhv http://apt.sw.be/redhat/8.0/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.rh7.rf.i386.rpm
Installing FFMPEG.
yum install ffmpeg ffmpeg-devel
Install FFMPEG-PHP Extension
FFmpeg-php is a very good extension and wrapper for PHP which can pull useful information about video through API interface. Inorder to install it you will need to download the source file and then compile and install extension in your server.
cd /usr/local/src
wget http://downloads.sourceforge.net/project/ffmpeg-php/ffmpeg-php/0.6.0/ffmpeg-php-0.6.0.tbz2?use_mirror=nchc
tar -xjf ffmpeg-php-0.6.0.tbz2
phpize
./configure
make
make installOnce you have done that without any problems then you will see the php extension file /usr/local/lib/php/extensions/no-debug-non-zts-20060613/ffmpeg.so and you will need mention that extension in php.ini file.
nano /usr/local/lib/php.ini
Put the below two lines at the end of the php.ini file
[ffmpeg]
extension=ffmpeg.soThen restart apache using — service httpd restart
Installing Mplayer + Mencoder
Just issue the following yum commands to install the rest of the packages.
yum install mplayer mencoder
Installing FlvTool2
Flvtool2 is a flash video file manipulation tool. It can calculate metadata and can cut and edit cue points for flv files.
If you are on Centos 5 try yum install flvtool2 with dag repository and if you get package not found you will need to manually download and compile the flvtool2. You can download latest version of flvtool2 from:- http://rubyforge.org/projects/flvtool2/
wget <url-link>
ruby setup.rb config
ruby setup.rb setup
sudo ruby setup.rb installIf you get command not found error, it probably means that you dont have ruby installed. Being a cpanel server you can do that using /scripts/installruby OR yum install ruby
-
Plesk-Stats shows Permission Denied Error
Posted on November 23rd, 2009 No commentsToday one of our domains on Windows 2008 server had a issue with plesk-stat ( webstats) showing permisssion denied error while accessing http://domain.com/plesk-stat/webstats/ thus not allowing to view the stats. There are multiple ways to solve this issue, some of them are given below.
1.) From Plesk Click Domains –> Select the domain and click check permissions.
2.) From IIS right click the domain and click permissions, Then apply proper permission to IUSR_username
3.) From the %Plesk%\admin\bin directory, run the following command.
websrvmng –remove-vhost –vhost-name=yourdomain.com
‘yourdomain.com’ is the Plesk domain that is getting the Error: Permission Denied when trying to view statistic reports through plesk panel or from direct URL http://yourdomain.com/plesk-stat/webstats
Then issue the following command to restore the domain settings.
websrvmng –reconfigure-vhost –vhost-name=yourdomain.com
Hopefully with the above methods it should solve.
-
Running 32bit PHP on Windows 2003 x64 Bit.
Posted on October 29th, 2009 No commentsOne of our Windows VPS was having trouble executing php on 64bit Windows 2003 server. The installation for php and adding ISAPI modules were all done properly but still we were receiving “HTTP 500 Internal Server Error” for phpinfo.php file. OR you may receive ” %1 is not a valid Win32 application”
This is because you are running 32bit PHP application to work on a 64bit machine. So In order to configure IIS to run in 32-bit mode you need to execute the following command on command prompt:
cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1
This will set the Enable32bitAppOnWin64 metabase property to True.
Restart IIS from the Console and that should show you the phpinfo.php page easily. Please note that IIS 6.0 does not support running in both 32-bit and 64-bit modes at the same time so in other words this is an ‘all or nothing’ system wide setting which affects all IIS web sites on the server, so if you need to run both 32-bit and 64-bit applications in IIS you will either have to locate them on separate machines or run them all in 32-bit mode.
After this we had Invalid Memory Execution error. So we had to change the Memory limit to 32MB for php based application since the VPS was only having 256MB memory.
-
Optimizing Debian Plesk server
Posted on October 11th, 2009 No commentsToday we had a very strange issue on one of our debian based plesk server where sites were loading too slow, After investigation we finally revealed that Debian switches on IPv6 by default, and then uses this before it uses IPv4 for DNS resolution hence causing DNS delays and site loading slow. So we need to set the ipv6 to off and then reboot the server.
Here is how it should be done on the server. Login into the server via shell and perform the following steps.
There is a configuration file called “aliases” here: /etc/modprobe.d/aliases
Edit the file you will find a line like this: alias net-pf-10 ipv6
Change it to: alias net-pf-10 off ipv6
Reboot the machine.
If the server is running with BIND, double check that your BIND server has come back online after reboot or restart Bind.Apache optimizations
Apache, the most popular web server, is a stable and reliable software for providing web pages to the world. But sometimes, it happens that Apache will struggle under high loaded traffic. Here is an overview on how you can optimize apache so it can cope with higher loads.
DNS Lookups
A good way to enhance your server response time is to disable DNS LookUp. When DNS Look Up is activated, Apache will perform a name resolution each time a new client connect to the server in order to record the full host name of the client. Disabling DNS LookUp, Apache will only save the IP of the client.
Disable DNS lookups by ensuring your Apache setup contains “HostnameLookups Off” inside either /etc/apache/httpd.conf, or /etc/apache2/apache2.conf can immediately make your server capable of handling more traffic.
Web statistics software such as awstats can perform name resolution if you still need to get that information, but keep in mind that this will increase the time required by awstats to process your logs.
MaxClients
On start up, Apache will create a number of processes (Servers), and will handle a maximum of simultaneous requests (MaxClients). Any connection attempts over MaxClients will be queued. The MaxClients maximum value is capped by Here is a default setting for a Debian/Ubuntu box:
<IfModule prefork.c>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 20
MaxRequestsPerChild 0
</IfModule>In order to handle more request at the same time, someone could use settings like:
<IfModule prefork.c>
StartServers 15
MinSpareServers 10
MaxSpareServers 20
ServerLimit 512
MaxClients 512
MaxRequestsPerChild 0
</IfModule>Note that in order to exceed the 256 MaxClients default capped value, we re-defined ServerLimit with a value of 512. You need to add “ServerLimit 512″
Optimize MySQL for Low Memory Use in Debain
MySQL is a light database engine compared to many of it’s rivals, but for some reason the Debian MySQL-server package contains a setup that makes it very heavy and memory consuming. The Debian version of mysql becomes memory consuming because it comes with config file where MySQL’s most memory consuming and seldom used storage engine InnoDB is enable. As result of this the MySQL server instance uses around 100MB of memory while almost idle.
And here comes the optimization tip.
Since the InnoDB storage engine is used very seldom it can be disable in most cases and let the server save almost about 100MB of memory.
To disable to InnoDB storage engine add this to my.cnf (the default MySQL configuration files) in /etc/mysql/
skip-innodb
I think these steps are enough to optimize your Debain server and hopefully it should be performing better.
-
Install imagemagick with PHP imagick extension on Plesk CentOS VPS
Posted on October 7th, 2009 1 commentHere are the steps and procedures you need to follow for install Imagemagick on Plesk VPS. login into the server and give the following commands, This requires yum to be installed on the server.
yum install ImageMagick
yum install ImageMagick-devel
yum install php-pear [for PECL]
pecl install imagick
if you are getting the following error then you do not have compiler installed. You can do that using yum install gccconfigure: error: no acceptable C compiler found in $PATH See `config.log’ for more details.”
Restart the pecl install imagick command at the end you should something like this which means the build was successfully done and the extension was installed successfully.
Build process completed successfully
Installing ‘/usr/lib64/php/modules/imagick.so’
install ok: channel://pecl.php.net/imagick-2.3.0
configuration option “php_ini” is not set to php.ini location
You should add “extension=imagick.so” to php.iniThen you need to include the extenion in php.ini. Here is how it needs to be done.
echo “extension=imagick.so” > /etc/php.d/imagick.ini
Restart apache
/etc/init.d/httpd restart OR service httpd restart
Verify it using the following command
php -m | grep imagick
Thats it.. With these steps we were able to install imagemagik successfully on one of our server. Hope this helps you as well.



Recent Comments