PHP Fatal error: Cannot redeclare quoted_printable_encode()

When encounter the following PHP error:

PHP Fatal error:  Cannot redeclare quoted_printable_encode()

A solution is to put a function before the actual function itself, below is the code example:

if(!function_exists('quoted_printable_encode'))
{
   function quoted_printable_encode($input, $line_max=76, $space_conv=false)
   {
       /* ORIGINAL CODING */
   }
}

  • 12 Users Found This Useful
Was this answer helpful?

Related Articles

Why Use Latest PHP Versions

Each PHP version has lifespan, in which is actively supported within certain period of time after...

Disabled PHP Functions

PHP is a popular scripting language that is commonly used to build web pages nowadays.However,...

Browse a website with hosts file

During server migration or transfer, you might want to test your websites in new server to ensure...

cPanel: Change PHP Version via Select PHP Version

With Select PHP Version (also known as PHP Selector), you can change PHP version and enable...

cPanel: Redirect URL

URL direction, also known as URL forwarding allows you to redirect your website traffic from one...