Archive for the 'Linux Support' Category

Got a packet bigger than ‘max_allowed_packet’ bytes

If you get this error when trying to dump a MySQL DB, this is due to the packet limit of MySQL server.

To solve this issue, add an extra entry into /etc/my.cnf file under [mysqld] group:

max_allowed_packet = 100M

This will reset the limitation to 100Mb for file insertion into blob type (or longblob) column. Then restart mysql server:

/sbin/service mysql restart

Reference:
http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html#sysvar_max_allowed_packet

FFmpeg :: make: *** [ffmpeg_frame.lo] Error 1

If you get the following error when running the command make to compile FFmpeg, that means ffmpeg was either installed or previously compiled on your server .

Go into the source’s directory and run the following command.

make distclean
or
make clean

Then rebuild ffmpeg again.

SBDavid

Testing FFmpeg

Verify that FFmpeg is working properly by running the following two commands:

#php -r ‘phpinfo();’ | grep ffmpeg

You will get a few lines similar to the following:

ffmpeg
ffmpeg-php version => 0.6.0-svn
ffmpeg-php built on => April 15 2010 15:31:45
ffmpeg-php gd support => enabled
ffmpeg libavcodec version => Lavc51.62.0
ffmpeg libavformat version => Lavf52.18.0
ffmpeg swscaler => disabled
ffmpeg.allow_persistent => 0 => 0
ffmpeg.show_warnings => 0 => 0

This is the second command to make sure that FFmpeg is working properly:

#/usr/local/bin/ffmpeg
SBDavid

Passive FTP Mode (PASSV)

Passive FTP Mode (PASSV)

A mode for FTP connections that will initiate connections from the client side. Using this mode may be helpful if a user is having problems connecting to an FTP server through a firewall.

PassivePortRange 35000 36000

How to find primary and backup Superblock

dumpe2fs prints the super block and blocks group information for the filesystem present on device.

#dumpe2fs /dev/hda4 | grep -i superblock
dumpe2fs 1.39 (29-May-2006)
Primary superblock at 0, Group descriptors at 1-1
Backup superblock at 32768, Group descriptors at 32769-32769
Backup superblock at 98304, Group descriptors at 98305-98305
Backup superblock at 163840, Group descriptors at 163841-163841
Backup superblock at 229376, Group descriptors at 229377-229377
Backup superblock at 294912, Group descriptors at 294913-294913
Backup superblock at 819200, Group descriptors at 819201-819201
Backup superblock at 884736, Group descriptors at 884737-884737
Backup superblock at 1605632, Group descriptors at 1605633-1605633

Now you can use the command below to repair the file system.

e2fsck - check a Linux ext2/ext3 file system

« Prev - Next »