Download the PHP package ofbeaton/db-ping without Composer

On this page you can find all versions of the php package ofbeaton/db-ping. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package db-ping

db-ping

db-ping verifies a database server is responding by executing a query in a timed loop.

Latest Stable Version Minimum PHP Version Build Status

Optionally includes slave replication checks.

PHP 5.6+ console command that uses PDO to provide the database drivers:

Updates

The project is considered in a usable state and feature complete.

This project is used in corporate applications. As such, the authors are unlikely to update it on a regular basis, but instead when the corporate applications that use it run into problems. You should expect updates in the 5-10yr range.

Issues and PRs will be monitored, and we will continue to work with the community to provide updates as they are contributed.

Installing via phar

Before proceeding, you need a working PHP 5.6+ installation.

The recommended way to install db-ping is by downloading the phar.

See Releases for downloads.

Next, run the phar from the command line:

Testing

Smoke test

If there is no mysql server running locally, pinging will give a connection refused error as below

Against a real MySql server

Launch a temporary mysql server:

docker run --name some-mysql --rm -e MYSQL_ROOT_PASSWORD=my-secret-pw -e MYSQL_USER=user -e MYSQL_PASSWORD=pass -p 3306:3306 mysql

Wait a few seconds while it initializes, then open another terminal and ping it:

To stop the dockerfile: docker stop some-mysql

Against a real database server via ODBC

  1. Set up your php server for ODBC
  2. Add the server you'd like to test against to the /etc/odbc.ini file (on linux)
  3. Ping it

The ping SQL query can be repeated more than once per ping with the repeat option. This is useful to make the ping test more stressful:

The output format can be controlled with the format option:

Also, et instead of te would shuffle the order

Unit tests

Run vbin/phing check

License

This software is distributed under the MIT License. Please see License file for more information.


All versions of db-ping with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
ext-pdo Version *
symfony/console Version ^3.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ofbeaton/db-ping contains the following files

Loading the files please wait ....