sh: /mencoder: No such file or directory

This is the problem caused due to PHP safe_mode restrictions to execute linux commands. If safe mode is on we can not run linux commands by exec() PHP function. Try safe mode Off when you want to execute linux tools with PHP…. Disable dangerous function from executing to exec().. that will cause application non functional … Read more

Create TCPDF PHP Fonts

TCPDF supports TrueTypeUnicode (UTF-8 Unicode), OpenTypeUnicode, TrueType, OpenType, Type1, CID-0 and Core (standard) fonts. You will find font creation utility at fonts/utils of TCPDF… copy desired font to fonts/utils/svnlabs.ttf * For TrueTypeUnicode # cd /var/www/html/tcpdf/fonts/utils # ttf2ufm -a -F svnlabs.ttf # php -q makefont.php svnlabs.ttf svnlabs.ufm * For embedded fonts to tcpdf PDF file.. copy … Read more

Exclude folders from zip – tar

TAR – Tape Archive  (application/x-tar) A common archive format used on Unix-like systems. Generally used in conjunction with compressors such as gzip, bzip2, compress or xz to create .tar.gz, .tar.bz2, .tar.Z or tar.xz files. # tar -cvvf foo.tar foo/ –exclude=”/home/svnlabs” # tar -cvzpP –file=/home/backup.tar.gz –exclude={/dev/*,/proc/*,/sys/*,/tmp/*} / tar work with directory “/” except for /dev, /proc, … Read more

Install MP4Box

MP4Box is a multimedia package used for  conversion, splitting, hinting, dumping and others. zlib is a software library used for data compression. zlib was written by Jean-Loup Gailly and Mark Adler and is an abstraction of the DEFLATE compression algorithm used in their gzip file compression program. Source: http://sourceforge.net/projects/gpac/files/ Download latest “gpac-0.4.5.tar.gz” & “gpac_extra_libs-0.4.5.tar.gz” from … Read more

Install git on linux

Git is a free distributed revision control, or software source code management project with an emphasis on being fast. Git was initially designed and developed by Linus Torvalds for Linux kernel development. Every Git working directory is a full-fledged repository with complete history and full revision tracking capabilities, not dependent on network access or a … Read more

wsdl in php

We can use nusoap and pear library to invoke web service … there are some command line tools to consume services and generate/validate wsdl ….. 1. wsdl (call method at CLI) # wsdl WSDL_URL METHOD 2. soapUI create wsdl project and use web services 3. wsdl2php wsdl2php convert service methods as the class like structure … Read more

send xml over post

<?php /* $url = Web Service Url or Server Url where xml have to post $xml = XML  schema to post on server */ function sendXmlOverPost($url, $xml) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); // For xml, change the content-type. curl_setopt ($ch, CURLOPT_HTTPHEADER, Array(“Content-Type: text/xml”)); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $xml); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // … Read more

Grep / ACK

Grep / ACK Ack can be replacement for grep….. # yum install ack Suppose you are on /var/www/html, here you want to search text “svnlabs” in all files in current directory…. you can use: # ack svnlabs # man ack    (for more options) grep : print lines matching a pattern. find : search for … Read more

midentify – mplayer

midentify – It is the utility come with mplayer to find video ID of video files…. # /usr/bin/midentify video.mp4 ID_VIDEO_ID=0 ID_AUDIO_ID=1 ID_AID_1_LANG=eng ID_FILENAME=video.mp4 ID_DEMUXER=lavfpref ID_VIDEO_FORMAT=avc1 ID_VIDEO_BITRATE=0 ID_VIDEO_WIDTH=320 ID_VIDEO_HEIGHT=240 ID_VIDEO_FPS=25.000 ID_VIDEO_ASPECT=1.3333 ID_AUDIO_FORMAT=255 ID_AUDIO_BITRATE=0 ID_AUDIO_RATE=24000 ID_AUDIO_NCH=2 ID_LENGTH=72.62 ID_SEEKABLE=1 ID_CHAPTERS=0 ID_VIDEO_CODEC=ffh264 ID_AUDIO_BITRATE=128000 ID_AUDIO_RATE=48000 ID_AUDIO_NCH=2 ID_AUDIO_CODEC=faad ID_EXIT=EOF Try # mediainfo to get video infrmation on linux box  🙂