Sohaib's Tech Blog

Something for every one

Odoo9 Community to Odoo9 Enterprise Database Upgrade — 2016

Odoo9 Community to Odoo9 Enterprise Database Upgrade

Today I’ve purchase Odoo9 Enterprise therefore I need to move my database from Odoo9 community to Odoo9 Enterprise at first I was getting Internal server error then after some research I realize that I need to upgrade my database here are the steps I took.

You need to restore your Odoo9 Community Database to Odoo9 Enterprise and then perform the following task.

Step 1

service odoo stop

Step 2

sudo su odoo -s /bin/bash

Step 3

/usr/bin/odoo.py --addons=/usr/lib/python2.7/dist-packages/openerp/addons -u all

Now Odoo9 Enterprise is started, Next step is you need to access Odoo from the web so it can start the upgrade process, It will start and you exit terminal and start odoo manually or simply reboot your server and walla its done.

Advertisements
Magento2 Varnish 503 Backend Fetch Failed Problem **SOLVED — 2016

Magento2 Varnish 503 Backend Fetch Failed Problem **SOLVED

I’ve  M2.10 , Varnish , Redis and Nginx intalled and using Php7.08 with installed after doing a lot of research I wasn’t able to find a solution for this.

I was moving around attributes from groups to un-assigned group in Magento 2.10, I notice I was having issue with Varnish and the error was Varnish 503 Backend Fetch Failed.

The problem was in “clean_cache_by_tags” function in Magento. I think it’s an error clearing the cache in php7 & magento2.

Quick fix is to turn off block_html cache. Everything works in Php 5.6x but in PHP7.08 its causing a lot of problem.

Should I downgrade or stay upgraded is the question ?

After installing php5.6 it appears everything seems to be working fine

 

How to use Gmail or Amazon SES with Magento — 2016

How to use Gmail or Amazon SES with Magento

Let’s configure Gmail or Amazon SES with Magento2 or Magento 1 or any other php application, basically will configure our server in a way so any php application will then use local php mail but email will route with any SMTP provider.

Step 1

apt-get install msmtp -y
apt-get install libxml-xpath-perl  -y
nano ~/.msmtprc

Now will edit or add .msmtprc file

account gmail
tls on
tls_certcheck off
auth on
host smtp.gmail.com
port 587
user yourusername@gmail.com
from youruser@gmail.com
password Yourpasswordhere

Let’s change permission and give proper ownership and copy the file to appropriate location

chmod 600 ~/.msmtprc
cp -p ~/.msmtprc /etc/.msmtp_php
chown www-data:www-data /etc/.msmtp_php

Now will edit php.ini file so we can tell sendmail to use our Gmail SMTP

I am using PHP 7 so my location is different then your’s probably, if you are using Ubuntu or any flavor you can simply use

locate php.ini

 

nano /etc/php/7.0/fpm/php.ini
nano /etc/php/7.0/cli/php.ini

Now will edit sendmail in php.ini

sendmail_path = "/usr/bin/msmtp -C /etc/.msmtp_php --logfile /var/log/msmtp.log -a gmail -t"

Lastly will make sure to have our log file

touch /var/log/msmtp.log
chown www-data:www-data /var/log/msmtp.log

Now goto your Magento2 admin or Magento admin or any PHP Application to try to sendmail email it will use Gmail or Amazon SES to send emails out, you just need to modify your msmtp file