How to install ExifTool with Composer

Reply

I’m working on a PHP project, that uses Phil Harveys excellent ExifTool to read Exif and XMP tags from photos. Since ExifTool is written in Perl, there is of course no composer.json to install this dependency directly with Composer. But you can create your own package information in your master composer.json as follows:

{
    ...
    "repositories": [
        ...        
        {
            "type": "package",
            "package": {
                "name": "philharvey/exiftool",
                "version": "10.75",
                "dist": {
                    "url": "https://sno.phy.queensu.ca/~phil/exiftool/Image-ExifTool-10.75.tar.gz",
                    "type": "tar"
                }
            }
        }
    ],
    "require": {
        ...
        "philharvey/exiftool": "10.*"
    }
}

This will automatically download ExifTool version 10.75 and extract it into the vendor folder /vendor/philharvey/exiftool/

Note, that the package type ‘tar’ should extract the file completely. If that is not the case, make sure you have the latest composer version 1.6.2 installed. Some Linux distributions (e.g. Linux Mint 18.3 and probably Ubuntu 16.4 too) are still on version 1.0.0-beta2, which does not support extracting ‘tar.gz’. Read my quick tutorial on how to upgrade composer on Linux Mint 18.3.

 

How to update Composer on Linux Mint 18.3

1 Reply

When you install Composer (the dependency manager for PHP) globally on Linux Mint 18.3 with the package manager…

$ sudo apt install composer
$ composer -V
Composer version @package_branch_alias_version@ (1.0.0-beta2) 2016-03-27 16:00:34

…you’ll get the totally outdated version 1.0.0-beta2. The problem is that this version does not support extracting compressed package files ‘tar.gz’. It also does not support updating itself with:

$ composer selfupdate

So, you need to download the latest composer version (currently 1.6.2) manually and then put it into the directory /usr/local/bin/composer (which overrides /usr/bin/composer)

$ sudo mv composer.phar /usr/local/bin/composer
$ chmod +x /usr/local/bin/composer

now login – logout to apply the changes, voila:

$ composer -V
Composer version 1.6.2 2018-01-05 15:28:41

Visited by a roe deer

Reply

Over the New Year, I’ve spent a couple of days in my vacation home in the canton Vaud. During one night, we got quite a bit of fresh snow and the next evening my wife discovered this roe deer in our orchard. He was probably looking for apples.

Roe deer (Capreolus capreolus)

A roe deer (Capreolus capreolus) looking for food under the snow cover. Nikon D500, Nikon 300mm f2.8, 1/1250, f4.0, ISO 1250

Continue reading

Apache serves cached files with garbled text at end

Reply

When using Apache running on a VirtualBox machine with a shared folder, small files such as JavaScript or CSS files might not get updated from the host and served with additional characters at the end. This happens because of a bug in VirtualBox when Apache is using sendfile to improve data transfer. Just turn the EnabeSendfile Directive off in your httpd.conf, e.g.:

EnableSendfile off

Why I love PhpStorm: SQL GROUP BY handling

2 Replies

Here’s another post from my series why I love JetBrains PhpStorm. This is a SQL query, where I have I list of column names. The IDE not only marks the columns missing in the GROUP BY clause as errors, it also offers an option to fix it for you by adding them to the GROUP BY clause.

PhpStorm understands SQL mixed with PHP code.

More PhpStorm love:
SQL table aliases
JavaScript code completion with dojo

What I don’t like about the Nikon D500

Reply

So far nothing except one (little) thing:
Unlike on the D810, the GPS icon is not displayed on the top LCD only on the rear LCD. The GPS icon (on the rear LCD) blinks as long as no fix is available. Having this information on the top would be useful before taking a picture, especially if you have the Standby Timer setting enabled to save battery.

Why is your PHP output still buffered even when you turned buffering off?

Reply

If you want to stream your content with PHP, you need to have output_buffering set to off in you php.ini and/or use it together with flush(). If this still does not work check your Antivirus software.

On Windows, the on-access scanners of Sophos and Avira Antivirus buffer your http output! The only solution is to either switch to https or turn on-access scan off.

Gimbal and replacement foot for the Nikon 600mm FL

8 Replies

Unfortunately, the Nikon 600mm f1/4E FL ED VR does not balance with the D810 and the foot replacement LCF-13 by Really Right Stuff nor with the Nikon stock foot. The LCF-13 worked perfectly with the previous model 600mm f1/4G ED VR.

After some research I ordered the foot LF-N604FL by jobu design. It is 4 cm longer than the Nikon stock foot and 2cm longer than the new LCF-18 by RRS, which is too short according to this comment. Now, my setup balances fine horizontally, but vertically the lens sits (still) too high with the gimbal by Dietmar Nil.

To balance my setup also vertically, I needed a different gimbal head. The WH-200 Wimberley Head Version II would let me compensate a height up to 12 cm. I went with the Jobu Heavy Duty MK IV, which is a bit lighter, but only gives you about 10.5 cm (my combination requires at least 10 cm).

Continue reading