Enable the mcrypt using 'php5enmod mcrypt' and restructure the code...