Troubleshootings

Today a developer friend requested to trouble php mcrypt extension on his newly ordered VPS. Most of the time VPS by default comes up with very basic packages. For example, to build and add mcrypt php extension to existing php installation. You would required gcc, make, libtool, libmcrypt, libmcrypt-devel and may other packages.

mcrypt php extension necessary configuration & compilation : 

View current php version
php -v

Output :
PHP 5.3.3 (cli) (built: Jul 3 2012 16:53:21)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with the ionCube PHP Loader v4.0.14, Copyright (c) 2002-2011, by ionCube Ltd.

[Keep Reading…]

Today i extracted one archive which contained .bin and .cue files and i was unable to play them with VLC Media Player, after doing google found it is archive similar to .iso. I convert it to ISO using bchunk utility and mount it as loop back device and .

bchunkFree utility use to convert .bin, .cue files to .iso

1. Install bchunk

On ubuntu/backtrack Linux;
aptitude install bchunk

On RHEL/CentOS Linux;
yum install bchunk

2. Convert .bin .cue to iso using bchunk

bchunk iron-lycp5etg.bin iron-lycp5etg.cue iron-lycp5etg.iso

[Keep Reading…]

TeamViewer 6 or 7.0.9300 beta version can be run as root easily on backtrack or any Linux distribution including Ubuntu / CentOS 6 / RedHat by modifying the wrapper file which is instructed to not execute Team Viewer products as root.

When you run Teamviewer7 from console, you will get this error;

root@hackersgarage:~/Downloads# teamviewer7
TeamViewer: 7.0.9300
Profile: /root (root)
Desktop:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04.2 LTS
Release: 10.04
Codename: lucid

Error: TeamViewer must not be executed as root!

[Keep Reading…]

Last night, i got an email from one of my client’s CPanel server that tailwatched is failed and is not running.

Email contained :

tailwatchd failed @ Fri Dec 23 00:30:10 2011.A restart was attempted automagically
Service Check Method: [check command] tailwatchd is not running

To see what services handle by tailwatched

/usr/local/cpanel/libexec/tailwatchd --status

[Keep Reading…]

If you are setting up NFS and stuck with this error, portmap is conflicting with other service.

If you run this
/etc/init.d/portmap restart

It will throw this error,
pmap_getmaps rpc problem: RPC: Unable to receive; errno = Connection reset by peer
Stopping portmap: [FAILED]
Starting portmap: [ OK ]

[Keep Reading…]

Overview :
Installing a single php extension without recompiling PHP is never been a difficult job but most of the people doesn’t know it which leads to re-compile whole php.. In this article i will explain how can you add new php extension without recompiling whole php.

In our example, i will tell you how can you add iconv php extension without recompiling PHP.

A sample error for iconv php extension which was not installed
Fatal error: Call to undefined function iconv() in /some/path/file.php line 12

iconv php extension necessary configuration & compilation :
View current php version
php -v

Output :
PHP 5.2.13 (cli) (built: Jun 23 2010 04:49:30)
Copyright (c) 1997-2010 The PHP Group

Downloading the same php version source code from php.net
cd /tmp/
wget http://museum.php.net/php5/php-5.2.13.tar.bz2
tar -jxf php-5.2.13.tar.bz2
cd php-5.2.13/ext/iconv

Prepare php extension to compile it.
phpize

Output :
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20060613
Zend Extension Api No: 220060519

aclocal
./configure
make
make install

You can can see iconv php extension is installed under php extensions directory:
ls /usr/local/lib/php/extensions/no-debug-non-zts-20060613/iconv.so

Enable iconv PHP extension in php.ini
echo "extension=iconv.so" >> /usr/local/lib/php.ini

Verify iconv :
php -i | grep -i "iconv support"

Output:
iconv support => enabled