troubleshooting Question

PHPMailer: Cannot override final method Exception::__clone()

Avatar of RationalRabbit
RationalRabbit asked on
Email ClientsWeb ServersScripting Languages
11 Comments1 Solution1232 ViewsLast Modified:
Using latest version of PHPMailer (5.2.7)
PHP v5.3.10
jQuery 1.8.2
jQuery Mobile 1.3.0

I am writing a Web program in PHP that sends a text message to a mobile device. The initial message may be instigated from a normal Web page or a jQuery Mobile page. After receiving the message, the recipient selects a link that goes to a Mobile page, and pulls up the record saved from the original form that instigated the initial message. The recipient then responds through a radio button selection, which saves to the database and sends a text message to the originators cell phone. That person then responds back.

Intermittently, when that response is made, PHPMailer errors out with the following message:
<b>Fatal error</b>:  Cannot override final method Exception::__clone() in <b>/home/best/public_html/m/PHPMailer/class.phpmailer.php</b> on line <b>3297</b>

At 3297 in PHPMailer is the following (starting at 3292):
/**
 * PHPMailer exception handler
 * @package PHPMailer
 */
class phpmailerException extends Exception
{
    /**
     * Prettify error message output
     * @return string
     */
    public function errorMessage()
    {
        $errorMsg = '<strong>' . $this->getMessage() . "</strong><br />\n";
        return $errorMsg;
    }
}
It seems that something is held in a cache somewhere (or  ???) because once this error occurs, it will continue to fail whenever another attempt is made, even when the process is started from the beginning. It seems like this times out after a while.

In testing, I have gone back and forth as much as 20 times with no errors. At other times it errors on the first response back to the original recipient.

I am totally at a loss.
ASKER CERTIFIED SOLUTION
Marcus Bointon

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 11 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 11 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros