MyTrueHost launched Web Hosting for Indian clients just in Rs 60/Month with various payment options(netbanking, debit card, credit card,cash card or paypal).
Please Visit at https://www.mytruehost.in

How to install ffmpeg, ffmpeg-PHP, Mplayer, Mencoder, flv2tool, LAME MP3 Encoder, and Libog from source

This article shows how to install ffmpeg, ffmpeg-PHP, Mplayer, Mencoder, flv2tool, LAME MP3 Encoder, and Libog from source. It should work on most systems, however may need some tweaking from system to sytem.

cd /usr/local/src

Download source tarballs:

wget http://rubyforge.org/frs/download.php/9225/flvtool2_1.0.5_rc6.tgz
wget http://easynews.dl.sourceforge.net/sourceforge/lame/lame-3.97.tar.gz
wget http://superb-west.dl.sourceforge.net/sourceforge/ffmpeg-php/ffmpeg-php-0.5.0.tbz2
wget http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz
wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.1.2.tar.gz
wget http://www4.mplayerhq.hu/MPlayer/releases/codecs/essential-20061022.tar.bz2

Extract the tarballs:

tar zxvf lame-3.97.tar.gz
tar zxvf libogg-1.1.3.tar.gz
tar zxvf libvorbis-1.1.2.tar.gz
tar zxvf flvtool2_1.0.5_rc6.tgz
tar jxvf essential-20061022.tar.bz2
tar jxvf ffmpeg-php-0.5.0.tbz2
tar zxvf flvtool2_1.0.5_rc6.tgz
Make a directory to store all the codecs:

mkdir /usr/local/lib/codecs/


Install any necessary packages:

yum install gcc gmake make libcpp libgcc libstdc++ gcc4 gcc4-c++ gcc4-gfortran
yum install subversion ruby ncurses-devel

svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
cd /usr/local/src/mplayer
svn update
cd /usr/local/src

Copy codecs for mplayer:

mv /usr/local/src/essential-20061022/* /usr/local/lib/codecs/
chmod -R 755 /usr/local/lib/codecs/

If you are using secure tmp:

mkdir /usr/local/src/tmp
chmod 777 /usr/local/src/tmp
export TMPDIR=/usr/local/src/tmp

Installing Lame:

cd /usr/local/src/lame-3.97
./configure
make && make install

Installing Libogg:

cd /usr/local/src/libogg-1.1.3
./configure && make && make install

Installing libvorbis:

cd /usr/local/src/libvorbis-1.1.2
./configure && make && make install

Installing flvtool2:

cd /usr/local/src/flvtool2_1.0.5_rc6/
ruby setup.rb config
ruby setup.rb setup
ruby setup.rb install

cd /usr/local/src/mplayer
./configure && make && make install

Installing ffmpeg:

cd /usr/local/src/ffmpeg/
./configure –enable-libmp3lame –enable-libogg –enable-libvorbis –disable-mmx –enable-shared
make && make install

ln -s /usr/local/lib/libavformat.so.50 /usr/lib/libavformat.so.50
ln -s /usr/local/lib/libavcodec.so.51 /usr/lib/libavcodec.so.51
ln -s /usr/local/lib/libavutil.so.49 /usr/lib/libavutil.so.49
ln -s /usr/local/lib/libmp3lame.so.0 /usr/lib/libmp3lame.so.0
ln -s /usr/local/lib/libavformat.so.51 /usr/lib/libavformat.so.51

Installing ffmpeg-php:

cd /usr/local/src/ffmpeg-php-0.5.0/
phpize
./configure
make
make install

Note: Make sure this is the correct php.ini for this server.

echo ‘extension=/usr/local/lib/php/extensions/no-debug-non-zts-20020429/ffmpeg.so’ >> /usr/local/Zend/etc/php.ini

Restart apache:

service httpd restart

You should be ready to go now!

Note: up2date can be used if you don’t have yum installed.



Webmail : Server replied: 110 Can’t open SMTP stream.

I’m getting an error on a couple of my servers when trying to send email from webmail.

Connection timed out
Server replied: 110 Can’t open SMTP stream.

Solution :–

I found the config for cpanel’s SM:
/usr/local/cpanel/base/3rdparty/squirrelmail/config/config.php

I just changed:
$useSendmail = false;

to:
$useSendmail = true;

thats all



Unable to login to horde

Unable to login to horde

Solution :–

Kindly try following steps:

1. Login to shell of the server using root login details and open the file ” /usr/local/cpanel/3rdparty/etc/horde/php.ini ” using vi or any other editor

2. Search for [Session] and change the following

From:-
session.save_handler = sqlite
session.save_path =/var/cpanel/userhomes/cpanedmin/sessions/phpsess.sdb
To:-
session.save_handler = files
session.save_path = /tmp

3. Save and exit

4. Restart Apache server.

 

Portflood Rule

You need to login to server as root and open csf file & add below rule.

——
PORTFLOOD = “26;tcp;20;300”
——

This rule blocks IPs that connect to port 26 via TCP more than 20 times within 300 seconds for 300 seconds. Most of the packets are to port 26, so this should stop the attack. If you need to add rules like this they are located in /etc/csf/csf.conf and the fields are as follows:

——–
port;protocol;numberofhits;backofftime
——–

Back off time is in seconds and marks the initial time interval the connections occur during and the time the IP will remained blocked after sending it’s last packet to the port.

 

Python Installation

1) Download and extract Python:

cd /usr/local/src
wget http://apache.dataphone.se/httpd/modpython/mod_python-3.3.1.tgz
tar zxvf mod_python-.3.3.1tgz

2) Configure & install Python

cd mod_python-3.3.1
./configure –with-apxs=/usr/local/apache/bin/apxs (check where your apxs is by typing: locate apxs)
make
make install

3) Configure Apache

pico -w /usr/local/apache/conf/httpd.conf
Locate your LoadModule – section by pressing CTRL-W and typing “LoadModule”. Add the following line under the others:
LoadModule python_module libexec/mod_python.so

Now locate your AddModule – section by pressing CTRL-W and typing “AddModule”. Add the following line under the others:
AddModule mod_python.c

Installation and Configuration complete.

4) We need to test python script on the server.

Go to any accounts on the server
create testpython.py and put below code
—–
def handler(req):
req.send_http_header()
req.write(“Hello World!”)
return apache.OK
—–

Open .htaccess file and put below code.
—-
AddHandler python-program .py
PythonHandler testingpython
PythonDebug On
—-

Now restart Apache service and test your script.



Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly.

Sometimes if you login in to PHPMYADMIN, you can see the error as follows.

Cannot start session without errors, please check errors given in your PHP and/or webserver log
file and configure your PHP installation properly.

Solution :-

1) Check permissions of /tmp. It should be 755. Change it to 1777.

2) Open file /usr/local/cpanel/3rdparty/etc/phpmyadmin/php.ini

Change session.save_path as /tmp and restart apache.

 

phpMyadmin errror “#2002 – The server is not responding (or the local MySQL server’s socket is not correctly configured)”

phpMyAdmin – Error

#2002 – The server is not responding (or the local MySQL server’s socket is not correctly configured)

Solution :-

1. First check whether mysql is working in the server or not.

2, Check whether there is a symbolic link from mysql.sock to /tmp. If not, create a symlink between /var/lib/mysql/mysql.sock and /tmp/mysql.sock.
~~~~~~~~~
ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
~~~~~~~~~

3. If this doesn’t fix the issue check the file: /usr/local/cpanel/base/3rdparty/phpMyAdmin/config.inc.php and make sure the entries are like this:
~~~~~~~~~~~~~~~~
$cfg[‘Servers’][$i][‘socket’] = ‘/var/lib/mysql/mysql.sock’;
$cfg[‘Servers’][$i][‘connect_type’] = ‘socket’;
~~~~~~~~~~~~~~~~~

 

phpmyadmin error: Existing configuration file (./config.inc.php) is not readable.

When I try to access phpmyadmin on a cPanel server, i get the following error:

Existing configuration file (./config.inc.php) is not readable.

Solution :–

Login to the server as root :

1) cd /usr/local/cpanel/base/3rdparty/phpMyAdmin
2) chown root:cpanelphpmyadmin config.inc.php

Thats all.


Outlook Express Email Setting

Below are the outlook express settings :-

1. On the Tools menu, click Accounts
2. Select the Mail tab, click Add, and then click Mail.
3. In the Display name text box, type your name (e.g. info), and then click Next.
4. In the E-mail address text box, type your email address@yourdomainname (e.g. example@yourdomainname), and then click Next
5. In the list of Internet mail server types, select POP3.
6. In the Incoming mail server text box, type the name of the POP3 server i.e., ServerIP or mail.yourdomainname
7. In the Outgoing mail server text box, type the name of the SMTP server i.e., ServerIp or mail.yourdomainname
8. Click Next.
9. In the Internet Mail Logon dialog box, enter your emailaddress as Account name, enter the password ,then click Next.
10. Click Finish.
11. On the Tools menu, click Accounts.
12. To select the Mail tab, click the e-mail account.
13 Click Properties.
14. Click the servers tab, and select My server requires authentication
15. Then Click the Advanced tab, and select Leave a copy of messages on server.
16. Click OK.

mysql service is not working

Please login to server as root and fire below commands

1) killall -9 mysqld
2) cd /etc/rc.d/init.d
3) safe_mysqld –skip-grant-tables &
4) mysqladmin status

EnjoyCool