ABHIONLINUX
Site useful for linux administration and web hosting

2011/03/28

Unable to load dynamic library ‘/usr/lib64/php/modules/ffmpeg.so


if you are getting the error message “Unable to load dynamic library ‘/usr/lib64/php/modules/ffmpeg.so” when you add the ffmpeg.so extension to the PHP configuration file i.e. php.ini file and tries to run PHP.

PHP Warning:  PHP Startup: Unable to load dynamic library ‘/usr/lib64/php/modules/ffmpeg.so’ – /usr/lib64/php/modules/ffmpeg.so: undefined symbol: _php_create_ffmpeg_frame in Unknown on line 0

Please try the fix given below.

Goto the the ffmpeg-php-0.x.0 directory and edit the ffmpeg_frame.c file

vi  /usr/src/ffmpeg-php-0.6.0/ffmpeg_frame.c

Now replace every instance of ‘PIX_FMT_RGBA32′ with ‘PIX_FMT_RGB32′ in the file by executing

Save the file and recompile ffmpeg-php

#ldconfig
#phpize
#./configure --enable-shared --with-ffmpeg=/usr/local/cpffmpeg
#make -j$cpu
#make install

phpize : command not found

#-bash: phpize: command not found


This error is due to "phpize" command not available on your server. To fix, install php-devel package.


yum  install php-devel

How to install GIT

Git is distributed version control system focused on speed, effectivity and real-world usability on large projects. Following are the steps to intsall Git

wget http://kernel.org/pub/software/scm/git/git-1.7.3.tar.bz2
tar jxvf git-1.7.3.tar.bz2
cd git-1.7.3
./configure
make && make install
git

2011/03/23

Yum update failed.


Yum update failed.
===================================
"-bash-3.1# yum update
Loading “installonlyn” plugin
error: no dbpath has been set
error: cannot open Packages database in /%{_dbpath}
Traceback (most recent call last):
File “/usr/bin/yum”, line 29, in ?
yummain.main(sys.argv[1:])
File “/usr/share/yum-cli/yummain.py”, line 82, in main
base.getOptionsConfig(args)
File “/usr/share/yum-cli/cli.py”, line 206, in getOptionsConfig
errorlevel=opts.errorlevel)
File “/usr/lib/python2.4/site-packages/yum/__init__.py”, line 132, in
doConfigSetup
self.conf = config.readMainConfig(startupconf)
File “/usr/lib/python2.4/site-packages/yum/config.py”, line 598, in
readMainConfig
yumvars['releasever'] = _getsysver(startupconf.installroot,
startupconf.distroverpkg)
File “/usr/lib/python2.4/site-packages/yum/config.py”, line 661, in
_getsysver
idx = ts.dbMatch(‘provides’, distroverpkg)
TypeError: rpmdb open failed"
==========================


If you are getting this error, you need to clear the database.

Yum clean all
rm -f /var/lib/rpm/_db*
rpm -rebuilddb
yum update

If this doesnt fix your issue, try the following steps also.

rm /dev/urandom
mknod -m 644 /dev/urandom c 1 9
yum clean all.


This should fix your issue.

2011/03/21

Command to check the performance of the hard disk.


Command to check the performance of the hard disk.

You can use the command given below to check the hard disk performance.

hdparm /dev/sda

/dev/sda:
 multcount     = 16 (on)
 IO_support    =  1 (32-bit)
 readonly      =  0 (off)
 readahead     = 256 (on)
 geometry      = 19457/255/63, sectors = 312581808, start = 0


You can replace /dev/sda with the name of your disk device.

2011/03/20

Request exceeded the limit of 10 internal redirects due to probable configuration error. Use ‘LimitInternalRecursion’ to increase the limit ifnecessary. Use ‘LogLevel debug’ to get a backtrace

Request exceeded the limit of 10 internal redirects due to probable configuration error. Use ‘LimitInternalRecursion’ to increase the limit ifnecessary. Use ‘LogLevel debug’ to get a backtrace


When you try to browse your website, if you are getting this error. This means that you have exceeded the limit of intername redictions used in your website.


To avoid  this error message simply use following code in .htaccess file.


RewriteRule .* - [L]