I’m using PHP 7.1.7 on Local by Flywheel. I created this site by simply using the defaults given by the app, and this version includes ImageMagick already configured for use with PHP, saving you a fair amount of work. I’d strongly suggest moving to the newer version of their server environment.
Anyway, if you do, it might help you to know the steps I went through to get the iOS Images Fixer plugin working:
Right-click your site, select Open Site SSH to get a root shell prompt where you can work. Change to root’s home directory, /root so you don’t dump files randomly into the top level of the filesystem.
cd /root
Update the list of available software packages and install build tools and wget.
Download the source code for your version of PHP - mine was 7.1.7. Extract the files from the archive and change to the directory where the exif plugin source code lives.
wget http://museum.php.net/php7/php-7.1.7.tar.gz tar zxf php-7.1.7.tar.gz cd php-7.1.7/ext/exif
Run phpize to set things up for compiling the source. Then configure the build, compile the exif shared library and install it where it belongs.
/opt/php/7.1.7/bin/phpize ./configure --enable-exif=shared --with-php-config=/opt/php/7.1.7/bin/php-config make make install
Edit the php.ini file
nano /conf/php/7.1.7/php.ini
Look for the line that says [exif] on it. Insert this line after the [exif] line:
Use CTRL-W to save the file. Just hit enter when it gives you the opportunity to change the name. CTRL-X will quite the nano editor and take you back to a prompt.
Hit the “Stop Site” button in the Local by Flywheel window. When the site shuts down completely, start it back up. Your iOS Images Fixer plugin ought to work now.
Because I’m using a custom environment it doesn’t give me the option to switch to 7.1.7 unfortunately. I see that there is a new version imminent with PHP7.2 (which is what I’m running in production), so I’ll wait for that and see if it has ImageMagick included. If not, I’ll follow your instructions.
To switch to the Preferred environment you can export the current site using Custom from Local and then re-import. When re-importing, simply select “Preferred” on the Environment page and you should be good to go.
PHP 7.2.0 in Custom doesn’t come with ImageMagick at this time.