2017 © Pedro Peláez
 

library php-requirements-checker

tiny library to check requirements into your PHP application. You must write in the config file my-requirements.php which libraries need to be installed, which folders and files need to be created, then you can execute the script that will show you the status of each requirements.

image

nmalservet/php-requirements-checker

tiny library to check requirements into your PHP application. You must write in the config file my-requirements.php which libraries need to be installed, which folders and files need to be created, then you can execute the script that will show you the status of each requirements.

  • Monday, February 26, 2018
  • by nmalservet
  • Repository
  • 1 Watchers
  • 1 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 3 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

php-requirements-checker

php-requirements-checker is a php script to integrate in each php software to check if the requirements are good, (*1)

How to use

You need to copy the two files php-requirements-checker.php and my-requirements.php into your php application An other method will be to use composer to get the last stable release. Go to the composer section to do it., (*2)

Add your own libraries, folders and file to check

You need to add your own libraries to check, and folders and file. To do it, edit the file my-requirements.php., (*3)

Launch your custom php requirements checker :

Via the web page : http://localhost/myapp/php-requirements-checker.php, (*4)

The result

You will have a result in an html , like the example below, (*5)

, (*6)

Optional section : Install via Composer

Composer is a powerfull tool o install external libraries. If you need to know how composer works, go on this page : https://getcomposer.org/, (*7)

To add this library to your installation via composer, you only need to add "nmalservet/php-requirements-checker" to your "require" section into your composer.json as example below :, (*8)

"require": {
        "nmalservet/php-requirements-checker":"*",
        ...
    },

Then, run the command "composer update". Composer will install the library into your "vendor" folder probably., (*9)

You need to create your own configuration and call the script from your installation. First copy the file my-requirements.php into your folder, for example "my-own-requirements.php". Open a file, for example my-checker.php then include the configuration file and the script., (*10)

include ('my-own-requirements.php');
require(__DIR__ . '/../vendor/nmalservet/php-requirements-checker/php-requirements-checker.php');

So to check if your requirements are installed, you need to use this url: http://localhost/myapp/my-checker.php, (*11)

Optional section : protect your script to check requirements with a restricted access

To protect your script, create an .htaccess file into the directory of your "my-checker.php". Then copy the following lines : <FilesMatch "my-checker.php"> AuthName "Admin Only" AuthType Basic AuthUserFile /var/www/.passwd require valid-user </FilesMatch>, (*12)

You will need to create a file .passwd into /var/www. To do it use toe command line tool htpasswd : https://httpd.apache.org/docs/current/programs/htpasswd.html, (*13)

The Versions

26/02 2018

dev-master

9999999-dev https://github.com/nmalservet/php-requirements-checker

tiny library to check requirements into your PHP application. You must write in the config file my-requirements.php which libraries need to be installed, which folders and files need to be created, then you can execute the script that will show you the status of each requirements.

  Sources   Download

LGPL v3 LGPL-3.0-or-later

The Requires

  • php ^5.3.3

 

check dependencies requirements

14/09 2016

1.1

1.1.0.0 https://github.com/nmalservet/php-requirements-checker

tiny library to check requirements into your PHP application. You must write in the config file my-requirements.php which libraries need to be installed, which folders and files need to be created, then you can execute the script that will show you the status of each requirements.

  Sources   Download

LGPL v3

The Requires

  • php ^5.3.3

 

check dependencies requirements

14/09 2016

v0.1

0.1.0.0 https://github.com/nmalservet/php-requirements-checker

tiny library to check requirements into your PHP application. You must write in the config file my-requirements.php which libraries need to be installed, which folders and files need to be created, then you can execute the script that will show you the status of each requirements.

  Sources   Download

LGPL v3

The Requires

  • php ^5.3.3

 

check dependencies requirements

14/09 2016

1.0

1.0.0.0 https://github.com/nmalservet/php-requirements-checker

tiny library to check requirements into your PHP application. You must write in the config file my-requirements.php which libraries need to be installed, which folders and files need to be created, then you can execute the script that will show you the status of each requirements.

  Sources   Download

LGPL v3

The Requires

  • php ^5.3.3

 

check dependencies requirements