The Blog

PHP

Symfony 3 adding “swiftmailer-mailgun-bundle” on PLESK

Posted on

Just 4 bundles to make this work

/opt/plesk/php/7.3/bin/php -d memory_limit=-1 /usr/lib/plesk-9.0/composer.phar require nyholm/psr7
/opt/plesk/php/7.3/bin/php -d memory_limit=-1 /usr/lib/plesk-9.0/composer.phar require kriswallsmith/buzz
/opt/plesk/php/7.3/bin/php -d memory_limit=-1 /usr/lib/plesk-9.0/composer.phar require cspoo/swiftmailer-mailgun-bundle
/opt/plesk/php/7.3/bin/php -d memory_limit=-1 /usr/lib/plesk-9.0/composer.phar require mailgun/mailgun-php

Configuration

Symfony 3.4

Also add to your AppKernel:

new cspoo\Swiftmailer\MailgunBundle\cspooSwiftmailerMailgunBundle(),

Configure your application with the credentials you find on the domain overview on the Mailgun.com dashboard.

// app/config/config.yml:
cspoo_swiftmailer_mailgun:
    key: "key-xxxxxxxxxx"
    domain: "mydomain.com"
    endpoint: "https://api.eu.mailgun.net" # Optional. Use this config for EU region. Defaults to "https://api.mailgun.net"
    http_client: "httplug.client" # Optional. Defaults to null and uses discovery to find client. 

# Swiftmailer Configuration
swiftmailer:
    transport: "mailgun"
    spool:     { type: memory } # This will start sending emails on kernel.terminate event

Note that the swiftmailer configuration is the same as the standard one – you just change the mailer_transport parameter.

Posted in Symfony3 Leave a comment

Adding dbase.so to php7.x in PLESK

Posted on

First install DEV for the PHP you are using. In my case that would be PLESK PHP 7.1

apt-get install make gcc plesk-php71-dev

Next use PECL to install dbase extension.

/opt/plesk/php/7.1/bin/pecl install dbase-7.0.0beta1

If all goes good, you should see this:

Build process completed successfully
Installing '/opt/plesk/php/7.1/lib/php/modules/dbase.so'
install ok: channel://pecl.php.net/dbase-7.0.0beta1
configuration option "php_ini" is not set to php.ini location
You should add "extension=dbase.so" to php.ini

Last step is to register the extension:


echo "extension=dbase.so" > /opt/plesk/php/7.1/etc/php.d/dbase.ini

plesk bin php_handler --reread

Posted in PHP, PLESK 2 Comments
Next Page »