phpize: command not found

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’.

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

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 it is unable to write to due to the permission issue. In such a case, make sure the permissions of the /tmp directory is writable i.e. 1777.

1) SSH to your server as root.

2) Set the permissions of /tmp directory

root@server [~]# chmod 1777 /tmp

3) To verify the permissions, execute

root@server [~]# ls -ld /tmp
drwxrwxrwt  6 root root 4096 Aug 25 11:23 /tmp/

Once done, the website/application should work fine.

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

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 server is upgraded from an older to a newer version and the upgrade remains incomplete. Since Mysql often introduces new tables with the newer versions, you need to run the “mysql_fix_privilege_tables” script located in the “/usr/bin/” directory so the mysql database is updated with the latest contents thus fixing the privileges of the database users as well.

Section 1:

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

On a plain Linux OR Linux/cPanel server:

# mysql_fix_privilege_tables --user=root --password=<mysql password here> --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:

If mysql_fix_privilege_tables command does not exist, use mysql_upgrade instead.  mysql_fix_privilege_tables is an older script that previously was used to uprade the system tables in the mysql database after a MySQL upgrade.  mysql_upgrade command have superseded mysql_fix_privilege_tables.

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=<mysql password here> --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

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 misspelled file name. If you notice, “ffmpeg_frame.lo” file is missing from the ffmpeg-php directory, instead a file called “ffmpeg_frame.loT” is present which shouldn’t be there.

The solution is to rename the file from 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

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

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. You see the following error while executing the ‘ffmpeg’ command:

[root@server ~]# 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

You need to add the path to the directory the file is in, in the ‘ld.so.conf’ file. If for example the file is located under “/usr/local/lib” directory, execute

# 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