Skip to main content

Quick Tip: Make Sure Your PHP Version is Safe with Versionscan

By Bruno Skvorc

PHP

Share:

Free JavaScript Book!

Write powerful, clean and maintainable JavaScript.

RRP $11.95

There’s a tool you can use to check that you have a version of PHP with the most bugfixes. The tool is versionscan and it recently got a 1.0 release.

This quick tip will show you how to install it into your environment so it’s accessible from any folder, letting you call it at any future time without actually needing to require it inside a PHP project.

Step 0 – Optional – Homestead Improved

To follow along, you’d do well to set up a Homestead Improved instance. It’s Vagrant VM that’ll get you up and running with PHP 5.6+ in under five minutes, so you can test what we do here right away.

Step 1 – Composer Global Install

To make a tool accessible globally when it’s a Packagist-hosted Composer project, we install it with the global flag. Enter your VM (vagrant ssh) and execute the following:

composer global require psecio/versionscan:dev-master

This installs the package globally – into Composer’s home folder. On Homestead Improved (see Step 0) Composer is already installed globally and can be called from any folder. If you’re not using the VM from Step 0, install Composer first, then proceed to this step.

Unless you install Composer globally, you might have to run the command like so: php composer.phar global require ...

Step 2 – Run Versionscan

versionscan scan

The output should be something like this:

That’s it!

That’s all there is to it. You now have an always-accessible critical issue scanner installed. There’s not much the tool can help you with other than pure awareness, but knowing is most definitely better than not knowing.

Bruno is a blockchain developer and code auditor from Croatia with Master’s Degrees in Computer Science and English Language and Literature. He's been a web developer for 10 years until JavaScript drove him away. He now runs a cryptocurrency business at Bitfalls.com via which he makes blockchain tech approachable to the masses, and runs Coinvendor, an on-boarding platform for people to easily buy cryptocurrency. He’s also a developer evangelist for Diffbot.com, a San Francisco-based AI-powered machine vision web scraper.

New books out now!

Learn valuable skills with a practical introduction to Python programming!


Give yourself more options and write higher quality CSS with CSS Optimization Basics.