You Are Here Home > Server

Server

Problems installing ffmpeg: warning: rpmts_HdrFromFdno: V3 DSA signature: NOKEY, key ID X

Here is how to install ffmpeg:

1 – Create a file named “dag.repo” (no quotes) in “/etc/yum.repos.d”
2 – Copy and paste these lines in it:

[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=0
enabled=1

You will need a newline at the end of the file.

3 – Then run “yum install ffmpeg ffmpeg-devel” (no quotes)

This should install it with no issues, note that I set gpgcheck=0, if you search for it you will see a lot of people are suggesting: gpgcheck=1 which yields to something like:
warning: rpmts_HdrFromFdno: V3 DSA signature: NOKEY, key ID X

Problems installing ffmpeg: warning: rpmts_HdrFromFdno: V3 DSA signature: NOKEY, key ID X
Comments (0)   Filed under: General,Server   Posted by: Codehead

service X does not support chkconfig

Here is how to fix this:

(Assume the name of my script is myscript)

1 – Copy your script into /etc/init.d folder
2 – cd /etc/init.d
3 – chmod +x myscript
4 – Add these lines, including #, right after #!/bin/bash or #!/bin/sh:

# chkconfig: 2345 95 20
# description: Some description
# What your script does (not sure if this is necessary though)
# processname: myscript

5 – chkconfig –level 2345 myscript on

service X does not support chkconfig
Comments (21)   Filed under: General,Server   Posted by: Codehead

PHP Script for recursively deleting a folder and all of its contents, subfolders and files

<?php
 
	set_time_limit(900);
 
	delete_folder(dirname(__FILE__) .'/');
 
	function delete_folder($folder) {
		$folder_contents = get_folder_contents($folder);
		if ($folder_contents) {
			foreach ($folder_contents as $__content) {
				// echo $__content['item'] .'<br />';
				if (is_dir($__content['item']))
					delete_folder($__content['item']);
				else
					unlink($__content['item']);
			}
		}
		rmdir($folder);
	}
 
	function get_folder_contents($folder) {
		if( !is_dir($folder) ) {
			return false;
		}
		$return_array = array();
		$count		  = 0;
		if( $dh = opendir($folder) ) {
			while( ($file = readdir($dh)) !== false ) {
				if( $file == '.' || $file == '..' ) continue;
				$return_array[$count]['item']	= $folder .$file .(is_dir($folder .$file) ? DIRECTORY_SEPARATOR : '');
 
				$count++;
			}
			closedir($dh);
		}
		return $return_array;
	}
 
?>

Put it *inside* the folder that you want to delete and run it.
Be very careful when using this code, I warned you! Don’t use this if you don’t know any PHP.

PHP Script for recursively deleting a folder and all of its contents, subfolders and files
Comments (3)   Filed under: PHP,Server   Posted by: Codehead

WHM-Cpanel account transfer function is NOT flawless

I thought it was great but we have so many problems now with big accounts and I don’t know why they offer this problematic feature.

WHM-Cpanel account transfer function is NOT flawless
Comments (0)   Filed under: Annoying Stuff,Server   Posted by: Codehead
« Newer Posts