Article ID: 129454, created on Sep 16, 2016, last review on Sep 16, 2016

  • Applies to:
  • Operations Automation 6.0

Symptoms

A WordPress site application provisioning task fails with the following error:

Script execution failed: executing '/opt/alt/php56/usr/bin/php -d open_basedir= -q configure' for APS application instance with id 13233 returned value '255' with output '' and errors 'PHP Fatal error: Uncaught exception 'phpmailerException' with message 'Invalid address: wordpress@' in /var/www/vhosts/1/140960/webspace/siteapps/WordPress-13233/htdocs/wp-includes/class-phpmailer.php:946
Stack trace:
#0 /var/www/vhosts/1/140960/webspace/siteapps/WordPress-13233/htdocs/wp-includes/pluggable.php(352): PHPMailer->setFrom('wordpress@', 'WordPress')
...

Cause

The issue is corrected in scope of request APSI-537 and fixed in Wordpress APS application version 4.6.1-235.

Resolution

Import the latest Wordpress APS version and use it for provisioning.

In order to fixed a failed task for an older Wordpress version, comment the following block inside /var/www/vhosts/1/<webspace_id>/webspace/siteapps/WordPress-<instance_id>/htdocs/wp-includes/class-phpmailer.php (the exact path is found in the task error message):

public function setFrom($address, $name = '', $auto = true)
{
    $address = trim($address);
    $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
    // Don't validate now addresses with IDN. Will be done in send().
//    if (($pos = strrpos($address, '@')) === false or
//        (!$this->has8bitChars(substr($address, ++$pos)) or !$this->idnSupported()) and
//        !$this->validateAddress($address)) {
//        $error_message = $this->lang('invalid_address') . $address;
//        $this->setError($error_message);
//        $this->edebug($error_message);
//        if ($this->exceptions) {
//            throw new phpmailerException($error_message);
//        }
//        return false;
//    }
    $this->From = $address;
    $this->FromName = $name;
    if ($auto) {
        if (empty($this->Sender)) {
            $this->Sender = $address;
        }
    }
    return true;
}

Re-submit the task afterwards.

Search Words

PHP Fatal error: Uncaught exception 'phpmailerException' with message 'Invalid address: wordpress@' i

configureSiteAppsHandler on OBJREF:iis:0:getDomainService:10441

Wordpress

5356b422f65bdad1c3e9edca5d74a1ae caea8340e2d186a540518d08602aa065 e12cea1d47a3125d335d68e6d4e15e07 956c448bddc7e1f3585373687602379f 6f1456866eed87488c0f02b298a741c0

Email subscription for changes to this article
Save as PDF