When I first tried to install Backdrop on my Virtual Private Server I found there to be a problem with the version of PHP that came provided with my VPS, and I set about installing a more recent release of PHP5.5. This seemed to be working well, but in recent days I have been puzzling over why I could not get Backdrop to scale images when uploading them, either to create thumbnails or to scale an image to a size specified in image field properties. [This is called 'image resolution' which I find somewhat misleading - hopefully Backdrop could change this Drupal terminology.]
The Status Report page in Backdrop confirmed that I had the GD image processing library installed and working, but what I had failed to do was to install the JPEG library that is needed by GD. So it has been necessary to make and install another build of PHP. This involves some linux command line activity for which I use putty.exe on my PC. The current most recent version is PHP5.5.22 and this is how to add it to my Plesk-managed Linux VPS (Plesk 12.0.18 and Ubuntu 14.04.1 LTS).
I started by choosing to use /usr/local/src/php5522/php-5.5.22 as the directory for the source files and /usr/local/php5522 for the directory to hold the new installation. The procedure is then as follows:
First create and change to the new installation directory
cd /usr/local/src
mkdir php5522
cd php5522
Now download the chosen release of PHP from a suitable repository, in my case one in the UK
wget http://www.php.net/get/php-5.5.22.tar.gz/from/uk1.php.net/mirror
Now unpack the zip file
tar xzvf mirror
Now change directory to this new one containing the PHP files
cd php-5.5.22
Use 'make clean' just in case there is anything left from a previous build, but there won't be if it's a new directory
make clean
Now a 'configure' instruction is needed to tell the build process what extensions to include in this build of PHP - here is the one I used, this time including --with-jpeg-dir=/usr/lib
./configure --prefix=/usr/local/php5522 --with-curl --with-gd --with-jpeg-dir=/usr/lib --with-mysql --with-mysqli --with-pdo-mysql --with-zlib --with-openssl --enable-mbstring --enable-calendar --with-config-file-scan-dir=/usr/local/php5522/php.d
Typing this without mistakes is difficult, so I use 'copy and paste', remembering that paste in Putty is done with a right-click.
At the moment I am not sure of the full repertoire of PHP extensions required by Backdrop but the above are working for me at the moment.
At this point the installer will let you know of any packages missing from your current Linux installation, and on my Ubuntu Linux it is necessary to add these using commands such as
sudo apt-get install libjpeg-dev
It is then necessary to try the 'configure' command again, and repeat the process until successful. Once successful it is time to 'make' the configuration and this takes many minutes so find a good book to read!
make
and then I run ' make test ' to find and report and problems to php.net. Then finally we are ready for
make install
The next step is to set up php.ini for this new installation
cp php.ini-development /usr/local/php5522/etc/php.ini
followed by a test that all is well
cd /usr/local/php5522/bin
./php-cgi -v
Finally, with a Plesk installation, one can add this version of PHP to the Control Panel with the command
/usr/local/psa/bin/php_handler --add -displayname 5.5.22 -path /usr/local/php5522/bin/php-cgi -phpini /usr/local/php5522/etc/php.ini -type fastcgi -id 5522
The new version of PHP is now available for use at 'PHP Version' in the Plesk admin page for 'Hosting Settings'