Latest blog entry

phpize: command not found

August 31, 2010    |   Posted by admin   |    Category: Linux Administration

You may receive the error “-bash: phpize: command not found” while executing the “phpize” command. The reason is the php-devel package is not installed on the server. The easiest way to install the package is to use ‘yum’.

SSH to your server as root and execute:

# yum install php-devel

Once done, you should be able to execute the command ‘phpize’.

Comments Off on phpize: command not found

Can’t create/write to file /tmp/ (Errcode: 13)

August 25, 2010    |   Posted by admin   |    Category: Linux Administration

The error message “Can’t create/write to file /tmp/” appears when any application tries to write it’s temporary files to the /tmp directory and the /tmp directory don’t have a world writable permissions. To fix the issue, make sure the /tmp directory have 777 permissions.

1) SSH to your server as root.

2) Set the permissions of /tmp directory

# chmod 1777 /tmp

3) To verify the permissions, execute

# ls -ld /tmp
 drwxrwxrwt  6 root root 4096 Aug 25 11:23 /tmp/

Once done, the website/application should work fine.

Comments Off on Can’t create/write to file /tmp/ (Errcode: 13)

Table mysql.servers doesn’t exist: Problem adding a database user in plesk Or restarting mysql

August 21, 2010    |   Posted by admin   |    Category: Linux Administration

 

Update: If “mysql_fix_privilege_tables” command does not exist, look at Section 2.

You may receive a “Table ‘mysql.servers’ doesn’t exist” error message while adding a database user in Plesk OR while restarting the Mysql service. The complete error message look like:

Error: Connection to the database server has failed: 
Table 'mysql.servers' doesn't exist

OR

Can't open and lock privilege tables: 
Table 'mysql.servers' doesn't exist

The problem mostly occurs when Mysql is upgraded which introduce newer version of tables and the default Mysql database is not aware of these changes. The “mysql_fix_privilege_tables” command is use to update the Mysql database with the latest contents of the newer version and to fix the privileges of the database users as well.

Section 1:

To fix the issue, SSH to your server and execute:

On a plain Linux OR Linux/cPanel server:

# mysql_fix_privilege_tables --user=root\
 --password=mysqlpasswordhere --verbose

On a Linux/Plesk server:

# mysql_fix_privilege_tables --user=admin\
 --password=`cat /etc/psa/.psa.shadow` --verbose

where, –verbose will display the detailed output.

Section 2:

mysql_upgrade command have superseded mysql_fix_privilege_tables. mysql_fix_privilege_tables is an older script that previously was used to upgrade the system tables in the Mysql database .

To fix the issue, you need to replace mysql_fix_privilege_tables with mysql_upgrade in the above stated commands, i.e.

On a plain Linux OR Linux/cPanel server:

# mysql_upgrade --user=root --password=mysqlpasswordhere --verbose

On a Linux/Plesk server:

# mysql_upgrade --user=admin\
  --password=`cat /etc/psa/.psa.shadow` --verbose

make: ffmpeg_frame.lo error while compiling ffmpeg-php

August 13, 2010    |   Posted by admin   |    Category: Linux Administration

The error message “make: *** [ffmpeg_frame.lo] Error 1” is received while compiling ffmpeg-php and the reason is  the missing ffmpeg_frame.lo file. The ffmpeg-php directory contains a ‘ffmpeg_frame.loT’ file which actually should be ‘ffmpeg_frame.lo’.

The solution is to rename the file ffmpeg_frame.loT to ffmpeg_frame.lo. Go to the directory

# cd /path/to/directory/ffmpeg-php-0.x.x

and rename the file

# cp ffmpeg_frame.loT ffmpeg_frame.lo

Once done, compile ffmpeg-php again.

Related Links:
Unable to load dynamic library ffmpeg.so OR error PIX_FMT_RGBA32

Comments Off on make: ffmpeg_frame.lo error while compiling ffmpeg-php

ffmpeg: error while loading shared libraries: libavdevice.so.52: cannot open shared object file

August 7, 2010    |   Posted by admin   |    Category: Linux Administration

The “loading shared libraries” error message is received when ffmpeg is not able to locate the file libavdevice.so.52.This happens when either the file is missing from the server OR ffmpeg is not looking at the path the file is in.

The ffmpeg command outputs the following error:

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

Solution:
Search the file libavdevice.so.52 on the server using the ‘find’ command

# find / -name libavdevice.so.52

The output will display the complete path to the file for example, /usr/local/lib/libavdevice.so.52 and you need to add the directory path “/usr/local/lib” in the ‘ld.so.conf’ file.

# vi /etc/ld.so.conf

and add the following at the bottom of the file

/usr/local/lib

Save the file and for the new changes to take effect, execute

# ldconfig
Comments Off on ffmpeg: error while loading shared libraries: libavdevice.so.52: cannot open shared object file