Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is the proper php lib ? #1460

Open
beppe9000 opened this issue Jan 25, 2020 · 3 comments
Open

What is the proper php lib ? #1460

beppe9000 opened this issue Jan 25, 2020 · 3 comments

Comments

@beppe9000
Copy link

beppe9000 commented Jan 25, 2020

I saw this: https://github.com/wasilak/errbit-php but it is archived, also https://github.com/emgiezet/errbitPHP seems to be obsolete. How do I setup errbit in PHP apps?

Edit: Do I just use https://github.com/airbrake/phpbrake ?

@stevecrozz
Copy link
Member

I'm not too familiar with the world of PHP, but it looks like this should work. If you find that it does, I can amend the README

@beppe9000
Copy link
Author

Ok then. I'll post here again when I have tried it

@mickadoo
Copy link

mickadoo commented Jan 5, 2021

@beppe9000 I ran into the same issue - originally I tried to for the emgiezet repo and got it working with some minimal changes but it doesn't seem to be maintained.

I've only used it locally for testing so far, but the below code seems to work to report errors to Errbit.

$api_key = getenv('ERRBIT_API_KEY');
$errbit_url = getenv('ERRBIT_URL');
if ($api_key && $errbit_url) {
	$errbit = new Airbrake\Notifier([
		'projectId' => 1,
		'projectKey' => $api_key,
		'host' => $errbit_url
	]);
	$errbit->notify($exception);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants