1.1.Requirements

To use Myddleware you need a server

  • With a web server like apache.
  • PHP from version 5.5
  • MYSQL

Please have a look at the Symfony2 requirements to install Myddleware : http://symfony.com/doc/2.8/reference/requirements.html

Myddleware uses Doctrine so you will need to have the PDO driver installed for the database server you intend using.

Make sure that only_full_group_by isn’t in the MySQL option sql_mode.

1.2.Downloading Myddleware

Please download the latest version of Myddleware here.

1.3.Copying files to web server

Once you have downloaded the Myddleware package, copy and extract it on your web server.

You should have these directories :

installation_fichiers

Set the following permissions :

  • Make sure that these permissions are correctly set up :
    • Directory myddleware/app/cache/ has to be writable by the web user
    • Directory myddleware/app/logs/ has to be writable by the web user
    • File myddleware/app/config/parameters.yml has to be writable by the web user

1.4.Install Myddleware

For security reasons, your virtual host must be redirect on the web dir.

After your virtualhost is configured, you can install Myddleware using this URL : http://<path_to_myddleware>/web/installMyddleware.php

Change your file permission or PHP configuration if you face a permission error or if a PHP requirement is missing :

installation_1

Once you have fixed the potential errors, you should be able to install Myddleware.

Create a database on your server. Fill in the form to connect to this database then create your user profile to log in to Myddleware :

installation_2

Wait until the page is refreshed (this could take 30 seconds) :

installation_3

For security reasons, please delete the installation file : http://<path_to_myddleware>/installMyddleware.php

Then click on the URL to open Myddleware and log in with the user profile you have just created :

installation_4

Myddleware is now ready to be used :

installation_5

1.5.Install via command

Before starting, make sure your configuration is correct : open a command shell and run the program check.php in the directory app : php app/check.php

contab_1

Change your file permission or PHP configuration in case of permission error or missing PHP requirement :

contab_2

Create a database on your server then change these parameters in the file /myddleware/app/config/parameters.yml:

  • database_driver: pdo_mysql
    • Don’t change the driver pdo_mysql
  • database_host:
    • It is “localhost” if the database is on the server where you have installed Myddleware
  • database_port:
  • database_name:
  • database_user:
  • database_password:
  • secret:
    • You have to create a random string of 32 characters (more info here)

 

Then, go to your Myddleware directory and run these commands :

Clear the cache in case you have already tried to install Myddleware

  • php app/console cache:clear --env=prod

Generate the file Myddleware needs to run (more info here)

  • php app/console assetic:dump --env=prod --no-debug

Generate web bundles files

  • php app/console assets:install web --env=prod

Create tables into your database

  • php app/console doctrine:schema:update --force --env=prod

Add data in the created tables

  • php app/console doctrine:fixtures:load --append --env=prod

Create the user profile to log into Myddleware. Change the values myddleware_username, myddleware_user_email, myddleware_password into your own parameters

  • php app/console fos:user:create myddleware_username myddleware_user_email myddleware_password --env=prod

Add the admin role to the user you have just created

  • php app/console fos:user:promote myddleware_username ROLE_ADMIN --env=prod

 

Now make sure that these permissions are correctly set up :

  • Directory myddleware/app/cache/ has to be writable by the web user
  • Directory myddleware/app/logs/ has to be writable by the web user
  • File myddleware/app/config/parameters.yml has to be writable by the web user

For security reasons, please delete the installation file : <path_to_myddleware>/web/installMyddleware.php

You can now access Myddleware with this URL :

http://<path_to_myddleware>/web/app.php

1.6.Install from Github

To get Myddleware from Github, use this command :
git clone https://github.com/Myddleware/myddleware.git

Go to the Myddleware root directory and install the vendors :
php composer.phar install --no-plugins --no-scripts

Create your parameter.yml file :
cp app/config/parameters.yml.dist app/config/parameters.yml

Then follow the steps for installation via command here.

 

2.Setting up a cron task

Myddleware can work with background tasks to sync your data, send notifications, clean data, and more.

If you wish to do so, you will have to set up some background tasks using the crontab.

Before creating the crontask, make sure your configuration is correct, open a command shell and run the program check.php in the directory app : php app/check.php

contab_1

Change your file permission or PHP configuration in case of permission error or missing PHP requirement :

contab_2

You can now start the following tasks depending on your needs :

cd <myddleware directory>; php app/console myddleware:synchro ALL  --env=background  > /dev/null 2>&1

  • This program will synchronise the data by running every active rule.
  • Parameter => ALL or rule_name_slug :

cd <myddleware directory>; php app/console myddleware:rerunerror 100 5  --env=background  > /dev/null 2>&1

  • This program will read the documents in error and will try to send them again
  • 1st parameter => limitation on the number of documents in error that the program will read. In this particular case, the program will read a maximum of 100 documents in error
  • 2nd parameter => limitation on the number of attempts : documents that Myddleware tried to send maximum 5 times will be read.

cd <myddleware directory>; php app/console myddleware:cleardata  --env=background  > /dev/null 2>&1

  • This program will clear all data depending on whether the parameter “Deleting data” is set on the rule.
  • Don’t run this program if you don’t want to clear data.

cd <myddleware directory>; php app/console myddleware:notification  --env=background  > /dev/null 2>&1

  • This program will send a notification if some documents are in error. An e-mail will be sent to the email address set up in the file myddleware/app/config/config_background.yml , parameter notification_emailaddress

Here is an example of the crontab :

cron_example

3.Upgrading Myddleware

We suggest you use git to update Myddleware. If you don’t have git on your server, here are the instructions on how to install it : https://git-scm.com/download/linux

Before doing anything else, create a backup of your Myddleware before updating.

After the backup, go to the root directory of Myddleware and run the command as stated below to update all the Myddleware files.

If you have never used git with Myddleware, please send these commands:

git init
git remote add -t master origin https://github.com/Myddleware/myddleware.git
git fetch
git checkout origin/master -ft

Otherwise you can only send the command :

git pull

If you get this message below during the pull, you have probably changed at least one file in the Myddleware standard code. Please read the good practices article to learn how to add custom upgraded & safe code in Myddleware. It will help you manage the conflicts. You can also delete these files, run the pull and you will get the latest version of this files. However, you will loose your custom code.

Then update Symfony2 vendors and their dependencies:
php composer.phar install --no-plugins --no-scripts

Run this command to rebuilt the boostrap cache :
php vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php

At this stage, if it is your first upgrade with git, you will have to answer “yes” several times to this question:

Then run this command to update Myddleware’s database:
php app/console doctrine:schema:update --force --env=background
php app/console doctrine:fixtures:load --append --env=background

Clear the cache and refresh css and js files with these commands:
rm -rf app/cache/*
php app/console assetic:dump --env=background --no-debug
php app/console assets:install web --env=background
php app/console myddleware:upgrade --env=background

If you encounter any difficulties updating Myddleware, please contact us on our forum : https://github.com/Myddleware/myddleware/issues

4.Platform.sh

First of all, click on this link on “try now” :

You will be invited to create a free trial account on Platform.sh, our cloud hosting partner. Myddleware will then be deployed automatically.

Once your account is created, choose the region your cloud is located in:

Finally, continue to payment. You won’t be charged during the trial period (30 days) and you can cancel anytime.

At this point Platform.sh generates your account :

Please wait 2 minutes and you will be redirected to your platform environment. Add a name to your projet :

Click on “Next”. Platform.sh will then generate your Myddleware environment :

Wait 2 minutes until the status changes to “Success” :

Click on “Visit your website”. You will be redirected to the login page of your Myddleware :

For security reasons, please change your password in Myddleware :

You will also be able to change your email address as well, should you want to be alerted on your data transfers’ advancements.

Have fun with Myddleware !

Suggest Edit