Reputation: 577
I have an existing php script using base64_encode that works fine and then when i move this script into a new server it doesn't work, the script will just terminate with a blank page.
I tried to catch exception
try
{
$encrypted = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, md5($key), $string, MCRYPT_MODE_CBC, md5(md5($key))));
}
catch(Exception $ex)
{
echo 'Message: ' . $ex->getMessage(); die;
}
It still only shows a blank page. Any idea what caused this?
Upvotes: 1
Views: 183
Reputation:
try
if(!function_exists('base64_encode')){
echo 'base64_encode function not enabled';
}
if(!function_exists('mcrypt_encrypt')){
echo 'mcrypt not enabled';
}
to check if those needed functions are enabled.
Upvotes: 2