Download the PHP package rothkj1022/php-error-handler without Composer

On this page you can find all versions of the php package rothkj1022/php-error-handler. 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 php-error-handler

php-error-handler

PHP Error Handler can send you comprehensive error reports via email as well as output to the screen if you so choose.

Features:

Written by: Kevin Roth - https://kevinroth.com

License

Released under the MIT license - http://opensource.org/licenses/MIT

Requirements

Optional

Installation

Run the following command in your command line shell in your php project

Done.

You may also edit composer.json manually then perform :

Getting started

Example usage with composer

Example usage without composer

Example with email and database configuration

After including the class file via autoload.php or directly, instantiate the object with a json array like this:

Configuration options

General

displayErrors

Display error details to screen (not recommended for production)

emailErrors

Email error reports to configured recipient(s)

logErrors

Log errors to configured database

cacheFolder

Folder for caching lookups, such as ip addresses

purgeLogInterval

If configured, purges logs in database older than the given interval.

Use mysql date_add interval syntax or set to false

floodInterval

If database is configured, does not send repeat errors via email within set interval

Use mysql date_add interval syntax or set to false

database

Json array of database configuration options

MySQL Example:
PDO (with mysql) Example:

driver

Driver to be used for the database connection

dsn

DSN connection string for PDO connections

hostname

Host name of the database server

username

Database user name

password

Database password

database

Database name

port

Database port

charset

Database character set

table

Database table name for logging error reports

email

recipients

Array of to, cc, or bcc types

to, cc, & bcc

Array of contacts (name, address)

address

Email address of the contact

name

Name of the contact

from

address

Email address of the contact

name

Name of the contact

replyTo

address

Email address of the contact

name

Name of the contact

subject

PHPMailer

Json array of email configuration options. See PHPMailer documentation for detailed default options.

CharSet
isSMTP
Host
Port
SMTPDebug

Get debug info for SMTP sending. See SMTP Debugging for more info.

See also PHPMailer SMTPDebug property documentation

SMTPAutoTLS

Whether to enable TLS encryption automatically if a server supports it, even if `SMTPSecure` is not set to 'tls'.

See also PHPMailer SMTPAutoTLS property documentation

SMTPAuth

Enable SMTP authorization

Username

SMTP account username / email address

Password

SMTP Password

SMTPSecure

Type of encryption used for SMTP sending

SMTPOptions

See PHPMailer SMTPOptions property documentation

Example

errorTypes

Array of PHP error types that you want to be handled

warningTypes

Array of PHP warning types that you want to be handled

noticeTypes

Array of PHP warning types that you want to be handled

handleErrors

Whether or not to process errors

handleWarnings

Whether or not to process warnings

handleNotices

Whether or not to process notices

ipinfoToken

Your API token for ipinfo.io if you have one

Public methods

Plugin method Description
mysqlError($errorMsg, $sql, $errfile = null, $errline = 0, $die = false) Send a MySQL-specific error report, including the query. $errorMsg = the error message to send, usually $mysqli->error. $sql = the query. $errfile = the file in which the error occurred, called by using __FILE__. $errline = the line of the file on which the error occurred, called by using __LINE__. $die = whether or not to stop processing the script after sending the error. See example below.
sendError($errorMsg, $msgDetails = '', $errfile = null, $errline = 0, $die = false) Send a custom error report. $errorMsg = the error message to send. $msgDetails = further details regarding your custom error. $errfile = the file in which the error occurred, called by using __FILE__. $errline = the line of the file on which the error occurred, called by using __LINE__. $die = whether or not to stop processing the script after sending the error. See example below.
mysqlError Example:
sendError Example:

Changelog

Version 2.0.7

Version 2.0.6

Version 2.0.5

Version 2.0.4

Version 2.0.3

Version 2.0.1 & 2.0.2

Version 2.0.0


All versions of php-error-handler with dependencies

PHP Build Version
Package Version
Requires php Version ^5.4 || ^7.0 || ^8.0
phpmailer/phpmailer Version ^6.5.0
guzzlehttp/guzzle Version ^6.3
rothkj1022/php-cache-class Version ^2.1.2
symfony/var-dumper Version ^4.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 rothkj1022/php-error-handler contains the following files

Loading the files please wait ....