Best way to install Sentry PHP on server

363 views Asked by At

What is the best way to install sentry-php on my server to monitor and debug custom php script, I followed the instructions from this page https://docs.sentry.io/clients/php/ and downloaded the Sentry script and extracted it and included the autoloader in my application

require_once '/path/to/Raven/library/Raven/Autoloader.php';
Raven_Autoloader::register();

but still confused how to define my client

$client = new Raven_Client('https://<key>:<secret>@sentry.io/<project>');

are them want me to create new php file to define my client or to define in the page ErrorHandler!! and how I can add multi emails to monitor the script?, What is the best way to install it on custom PHP script?!!

1

There are 1 answers

0
David Cramer On

You will need to include the code in all of your scripts, one or way or another. Most people do this through a shared config file, which is then require'd in any files that are independent.