GreenArrow Documentation

Special Sending Rules PHP Path


This configuration is only available for customers with an on-premise license.

It’s possible to use a version of PHP for Special Sending Rules other than the one shipped with GreenArrow Engine.

  1. On Centos 7, you can install PHP 7 from the Remi packages:

     yum install
     yum-config-manager --enable remi-safe
     yum install php70 php70-php-devel php70-php-pecl-redis php70-php-mbstring php70-php-process
     yum-config-manager --disable remi-safe

    Alternatively, on other systems or for other versions of PHP, install PHP from source:

     # Assuming you're inside the PHP source dir that you wish to install...
     ./configure --prefix=/usr/local/php-7.0 --enable-mbstring --with-curl --with-gd
     make install
  2. Not required for Remi installations Install phpredis:

    For PHP 7, at the current time a special branch of phpredis is required. For example, if your PHP 7 installation is at /usr/local/php-7.0:

     git clone -b php7 /usr/local/src/phpredis
     cd /usr/local/src/phpredis
     ./configure --with-php-config=/usr/local/php-7.0/bin/php-config
     make install
  3. Write the PHP 7 binary path to Studio’s configuration file.

    For Remi installations:

     echo /opt/remi/php70/root/usr/bin/php > /var/hvmail/control/

    Otherwise, write the path to the php binary as you previously installed above:

     echo /usr/local/php-7.0/bin/php > /var/hvmail/control/
  4. Send a test campaign that uses Special Sending Rules.

    Here’s a special sending rule that writes PHPINFO for confirmation of version:

    return array_map((function ($recipient) use ($campaign_information_hash) {
      $phpinfo = ob_get_contents();

      return array(
        'html'              => "",
        'text'              => "PHP INFO\n\n$phpinfo",
        'subject'           => "PHP INFO",
    }), $multiple_recipients_information_hash);