PHPackages                             mistralys/errorcode-incrementor - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. mistralys/errorcode-incrementor

ActiveLibrary

mistralys/errorcode-incrementor
===============================

Simple PHP script that increments counters via HTTP requests or programmatically.

1.0.1(5y ago)013MITPHP

Since Feb 5Pushed 5y ago1 watchersCompare

[ Source](https://github.com/Mistralys/errorcode-incrementor)[ Packagist](https://packagist.org/packages/mistralys/errorcode-incrementor)[ RSS](/packages/mistralys-errorcode-incrementor/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

Error code / counter incrementor
================================

[](#error-code--counter-incrementor)

Simple PHP script that increments a counter when accessed, and the displays the current count.

Can also be used programmatically when used as a project's composer dependency.

Installation
------------

[](#installation)

- Check out in a folder of your choice in the document root of your webserver
- Rename `config-local.dist.php` to `config-local.php`
- Ensure that the `storage` folder is writable by the script
- Edit the required settings in the file, set up the counters you wish to use (see Configuration)

Configuration
-------------

[](#configuration)

### Password

[](#password)

The counter is password protected to avoid someone hogging the server in a DOS attack, since it causes a write operation on the hard drive, and can thus create a heavy system load in such a context.

Even if this seems like a trivial operation, take care to choose a good password.

### The counters list

[](#the-counters-list)

The counters array in `config-local.php` is very simple. Let's say you have two applications for which you want to maintain error code counters, called "Mistral" and "Tramontane" (Wind names). The counters list would look like this:

```
