Setting up the PHP Application

Run the installation script

The initializing script is located in the application's main directory:

install.sh

The script runs a composer to download necessary dependencies, initializes some files and sets permissions for some directories. This requires your user to have sudo rights.

The installation script will ask you to provide password for the git repository a few times.

Also, during the installation process you will be asked to provide values for some parameters. You must at least set the correct database connection options. You will be able to change the parameters later on by editing the parameters.yml file described in the next subsection.

The script will also ask you to provide OAuth2 API credentials that you must copy from the customer panel on the FriendlyScore website.

If there are errors during the install.sh run it might be because you made a mistake while typing in the passwords or you set wrong database options when asked.

If there was a typo while giving a password, you can just rerun the installation script.

If the database configuration is wrong you should edit the parameters.yml file as described below and rerun the installation script.

You may run install.sh anytime you want - it will not break a working application or its data. If problems persist, contact us and we will be happy to assist you.

The parameters.yml file

During your White Label deployment, you must set some options in the application's main configuration file app/config/parameters.yml. You might have already set them during the initial install.sh run.

Please bear in mind, that all the lines must be prepended with spaces, not tabs, according to the YAML stantard!

Setting these options by editing the file is optional. You can set them later on, using a temporary setup page within the application itself (it's described in the last section of this document).

First, we need to set the database options:

database_host: your_db_hostname
database_port: the_db_port_or_null_for_default
database_name: your_db_name
database_user: your_db_user_name
database_password: your_db_user_password

For the scoring to work properly, you need to have a configured 'app' in each of the social networks used. The apps should be configured for your White Label's URL. When you set up the social network apps, set their login options:

facebook.appId: ''
facebook.secret: ''
linkedin.apiKey: ''
linkedin.secretKey: ''
twitter.consumer_key: ''
twitter.consumer_secret: ''
google_client_id: ''
google_client_secret: ''
google_enabled: true
google_gmail_data_enabled: false # set to true only if you have sufficient permissions in your google app
google_maps_api_key: ''
paypal.client_id: ''
paypal.secret: ''
paypal.auth_endpoint: 'https://www.paypal.com/webapps/auth/protocol/openidconnect'
paypal.mode: 'live'
instagram.client_id: ''
instagram.secret: ''
instagram.mode: 'live'

Subsequent changes in parameters.yml

If, at any point, you edit the parameters.yml file again, you should run the clear_cache.sh script for the changes to take effect.

Next

Setup vhost