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

curl_setopt(): supplied resource is not a valid cURL handle resource #1

Closed
maxakropolis opened this Issue Nov 16, 2017 · 4 comments

Comments

Projects
None yet
3 participants
@maxakropolis
Copy link

maxakropolis commented Nov 16, 2017

We began to experience this error when attempting to upgrade from PHP7.0 to PHP7.1

ERROR: Uncaught CLI exception {"exception":"[object] (ErrorException(code: 2): 
curl_setopt(): supplied resource is not a valid cURL handle resource at 
vendor/nvanheuverzwijn/monolog-logdna/src/Monolog/Handler/LogdnaHandler.php:89)

It seems that line 89 needs the $closeAfterDone parameter passing, otherwise Monolog destroys the curl resource that is initialised in LogdnaHandler

https://github.com/Seldaek/monolog/blob/master/src/Monolog/Handler/Curl/Util.php#L32

I'm unsure why this worked previously but doesn't work now, but I forked the code to prove this and it works.

@nvanheuverzwijn

This comment has been minimized.

Copy link
Owner

nvanheuverzwijn commented Nov 24, 2017

I will look into this, thanks for the issue !

@PLaRoche

This comment has been minimized.

Copy link
Contributor

PLaRoche commented Dec 13, 2017

Same issue here

PLaRoche added a commit to manifoldco/monolog-logdna that referenced this issue Dec 13, 2017

@nvanheuverzwijn

This comment has been minimized.

Copy link
Owner

nvanheuverzwijn commented Dec 13, 2017

@PLaRoche Thanks for the PR. @maxakropolis See version 2.0.1 and 1.0.2. Sorry for the delay, thank you for your time.

Cheers !

@maxakropolis

This comment has been minimized.

Copy link

maxakropolis commented Dec 14, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment