Monday, August 31, 2020

Hostgator warning message: Imagick was compiled against Image Magick version 1654 but version 1650 is loaded

On Hostgator I noticed in my site logs the following error message.

PHP Warning:  Version warning: Imagick was compiled against Image Magick version 1654 but version 1650 is loaded. Imagick will run but may behave surprisingly in Unknown on line 0

I don't know what Image Magick is and I don't think I've done anything to invoke Image Magick. I can only think this is something that's been done on Hostgator's end and may fix itself over time.

I regularly check for error logs in case something I didn't expect/plan for, is occurring on my site. The error.log file only occurs if there's an error, so usually I just have to check for the existence of the file. Once checked I can delete the file. The error.log file then doesn't exist until another unexpected error occurs. Having an error like this means there's always an error.log file and checking every error.log file on every site I maintain, potentially every day, isn't practical.

A bit of research revealed Hostgator support for one person made the following change to their system to suppress the error message. Of course this shouldn't be necessary, but may be required as a short term fix.

https://forums.cpanel.net/threads/getting-an-imagick-error-after-update-to-php-7-3.672365/

The solution according to this post is:

Create a file called .user.ini

Type the following into the file.

 imagick.skip_version_check=true

Save the file in the top level folder for the site.

I ran this suggestion on my site www.5kmradius.com.au and it worked to remove the warning message for Imagick.

Kelvin Eldridge
www.OnlineConnections.com.au


How to redirect Hostgator site requests for http to https

One of the things that bothers me every now and then is that when I create a new site and enter www.SiteName.com.au it goes to the http site instead of the https site and that may cause some features to fail, such as location features. Then my browser remembers the http site and I end up at the site that doesn't work property, having to re-enter the site using https. For me that's an inconvenience, but for uses of my site the real concern is they'll move on thinking the site doesn't work.

To fix this issue I need to automatically redirect people to the https address if they enter the http address.

Let's use an example.

Right now I find if I type www.JustLocal.com.au (one of my sites) I end up going to http://www.justlocal.com.au and the site comes up as not secure. The site still works, but a person seeing that message may not feel comfortable. So I want to redirect a user to use https.

If you have a site on Hostgator that does this, the following is what you can do to automatically redirect users.

Log into your cPanel
Select Files
Open the folder for the site - Previously the site was under the public_html folder, but more recently sites will be found in the folder you start at in Files.
Select the file .htaccess and click Edit (always a good a good idea of taking a copy of what is already there if something goes wrong you can paste it back. A photo using you mobile phone makes a quick image copy.)
Now paste in the following lines. I paste this at the start of the .htaccess file. The first line is usually blank so I enter this starting on the second line. I don't know if the blank line makes any difference.

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Save the changes and Close

Now test to see if using http in the URL is automatically redirected to https. I did this edit as I wrote this post and it worked perfectly for me. I hope this post helps you solve this issue.

Kelvin Eldridge
www.OnlineConnections.com.au

PS. Performed the same change on the site www.CoronavirusVictoria.com.au and it worked perfectly. The .htaccess file did contain lines I'd not seen before so it's important not to touch any lines in the .htaccess file that are already there.

Monday, August 10, 2020

YouTube VR/360 doesn't work with Samsung Galaxy S7. Images too far apart with Cardboard type viewer.

 I must admit getting a cheap (around $10-$12) VR viewer from Big W felt like a great bargain. I could check out VR/360 videos and see what I thought. Whilst I didn't expect the quality to be perfect, at least I didn't have to spend hundreds of dollars.

For a while this seemed to work well. Then I change to a Samsung Galaxy S7 and nothing seem to work. The images just didn't line up so I ended up with two distance images and not the two images merged into one. Something didn't seem right so today I decided to investigate.

At first I started to look for apps that could play YouTube videos in stereoscopic and after a little hunting realised this feature is actually built into YouTube. One path led to another and eventually I found a site which enabled me to set up my own QR Code for Google Cardboard.

My gut feeling was telling me the two images were too far apart. I wanted to make a QR Code for Google Cardboard (an app you can install) so I could get the two images lined up better. You can find the facility to build you own QR Code for Google Cardboard at https://arvr.google.com/cardboard/viewerprofilegenerator/.

Completing the form based on my measurements produced the same two images that were too far apart. My two lens have inter-lens measure of 65mm. I built a number of profiles and found if I had the inter-lens gap of 40, this would produce what I wanted. There may be an even better size but this was good enough for me.

Now I can watch 360VR movies using YouTube using the Samsung Galaxy S7 using my VR Viewer from Big W. I can also watch normal movies in stereoscopic which makes the movies look like they on the big screen. Pretty cool.

The following is the QR Code to set the inter-lens gap to 40.

Kelvin Eldridge
360 VR videos

Thursday, August 6, 2020

Formatting comments in YouTube.

Every day I learn something new from others. Today I learnt that you could put a line through text (known as strikethrough), which is something I didn't know.

It turns out you can do strikethrough, italic and bold formatting, using a specific character placed before and after the text you wish to format. The format characters are the following.

Strikethrough: -
Italic: _
Bold: *

You can also combine multiple format options.

Kelvin Eldridge