Latest posts

Browse topics

Tranquil Sunset at Dubulti

Dubulti, has been our home since February 2018, we are spending here this Summer.

One of the rare and actually only attractions here is the beach. I've been documenting it a lot lately.

In today's Piece of Life series - a tranquil sunset from Dubulti beach:

Story telling photo - mother and child in a sunset

Storytelling photo - mother and child in a sunset

Actually, that was here in Jūrmala, I decided to take my second 365 days photo challenge. Photos from today are from folder day 5

Seagulls at sunset

Seagulls at sunset

Portrait in a susnset

Portrait in a sunset

How To Fix: Error: Call to undefined function curl_init()

After upgrading from Ubuntu 12 to Ubuntu 16 I discovered an error for Drupal website sending e-mails using Mailsystem + Postmark

here is the error code:

Error: Call to undefined function curl_init() in Mail_Postmark->send() (line 322 of /srv/www/reinisfischer.com/public_html/sites/all/libraries/postmark-php/Postmark.php).

Luckily there is an easy solution, installing missing curl:

sudo apt-get install php-curl

Hope, that helps!

How To Migrate Drupal Website From Host to Another Host

There might be a dozen of reasons why migrating your existing Drupal (or any other CMS) website from one host to another. In today's article, I will share my experience migrating Drupal 7 from one host to another before upgrading to Drupal 8

In this guide, I will migrate Drupal 7 between two separate Linode VPS, at one there is Ubuntu 12.04 and php 5.5 version while at the other there is Ubuntu 16.04 and php 7 version.

Data copies or Backups

Let's start with setting up an environment on host 1 or existing VPS. First I'm going to create data copies for the public_html folder (After investigating folders structure and size, I learned that existing website is at the size of 3.5GB size - that's decent I guess for a more than 4 years and active website).

For seeing folder sizes on your Ubuntu machine, you can run the following command:

du -sh public_html

Now, let's prepare this folder for migrating to another host.

Run the following command to create a tar.gz archive for public_html folder

tar -czvf completebackup.tar.gz public_html

Making archive file with Putty

Making archive file with Putty

Depending on the size of your website it might be a lengthy process. Though for making a backup for my 3.5GB it took less than a minute. Awesome. 

Now in order to make our backup file accessible via web (wget) let's move it to the public_html in backups folder, if you don't have a backups folder, create one with the following command:

sudo mkdir /srv/www/reinisfischer.com/public_html/backups

Now let us move completebackup.tar.gz to backups folder

mv completebackup.tar.gz public_html/backups

Great, let's move on.

Backup for MySql Database via SSH

If you have a relatively small database you might try to use MySQL database backup using phpmyadmin. My database is larger than 1GB and for this data migration I find it easier to transfer data using SSH

Now let's make the backup for our MySQL database, see How to export/import a MySQL database via SSH 

Exporting a MySQL database

To export a MySQL database, you need to use the mysqldump command. Here is the full command for exporting your database:

mysqldump -uUSERNAME -p DATABASE > backup.sql

You will be prompted for a password - this is your MySQL user's password.

The MySQL database will be exported to a file named "backup.sql" in your current directory.

Now let's move this database to host 2 with wget

from host 2

sudo wget http://www.reinisfischer.com/backups/backup.sql

And now let's import it to MySQL on host

Importing a MySQL database

To import a MySQL database, you need to use the mysql command. Here is the full command:

mysql -uUSERNAME -p DATABASE < backup.sql

Again, you will be prompted for the password of your MySQL user.

The backup.sql is the name of the file that you are importing to your database. It must be in your current working directory

Host 2

Now let's transfer files from host 1 to host 2 server. On host to, make sure you are in the public_html folder

cd /srv/www/reinisfischer.com/public_html

Transfer and extract files using wget and tar

sudo wget http://www.reinisfischer.com/backups/completebackup.tar.gz
sudo tar -zxvf completebackup.tar.gz

LEMP Server Ubuntu 12.04 for serving Drupal on Nginx

We are almost there. Now it is just a matter of some configuration and MySQL database import. 

Now by default phpmyadmin allows uploading just up to 2MB size database. As I have 92MB I had to configure PHPMyAdmin to allow uploading more 

How to configure phpMyAdmin upload directory

Restart FPM

sudo /etc/init.d/php7.0-fpm restart

Lazy Day in The Beach (Dubulti - Majori)

it was one of the sunniest days in early April 2018, we opted in for a Dubulti - Majori (Jūrmala, Latvia) lazy hiking trip. The route is easy and distance is pretty short. 

As usual - I was equipped with a camera and captured some moments. The inspiration for this title I took from here: Lazy Day in Beach (Torremolinos, Spain)

In fact, that is a thing I have been thinking a lot lately - Jūrmala could be developed in a style of Spain's Costa del Sol resort towns. I actually met more folks in April at Jūrmala beach than I met in Spain's resort towns. Sure there are no palms in Jūrmala, but they do make lovely sand sculpturesNew parents feeding seagulls at Jūrmala beach

New parents feeding seagulls at Jūrmala beach

Someone has forgot about the baby. A good mood picture. 

Sand sculptures in Jūrmala

Sand sculptures in Jūrmala