mirror of
https://github.com/Seldaek/monolog.git
synced 2026-04-25 23:55:56 +03:00
[GH-ISSUE #899] Error in curl for LogglyHandler #352
Labels
No labels
Bug
Documentation
Feature
Needs Work
Support
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/monolog#352
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @BogMor on GitHub (Dec 9, 2016).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/899
Is strange because this error wasn't before. The sending to Slack is working for the same message.
I'm using the handler LogglyHandler and on sending the log, I have the error:
"Curl error (code 60): SSL certificate problem: self signed certificate in certificate chain"
The error trace is below. Maybe the function "send" of "LogglyHandler" requires some SSL directives
#0 /mypath/Monolog/Handler/LogglyHandler.php(98): Monolog\Handler\Curl\Util::execute(Resource id #30)
#1 /mypath/Monolog/Handler/LogglyHandler.php(61): Monolog\Handler\LogglyHandler->send('{"message":"[Pr...', 'inputs')
#2 /mypath/Monolog/Handler/AbstractProcessingHandler.php(37): Monolog\Handler\LogglyHandler->write(Array)
#3 /mypath/Monolog/Logger.php(336): Monolog\Handler\AbstractProcessingHandler->handle(Array)
#4 /mypath/Monolog/Logger.php(587): Monolog\Logger->addRecord(300, '[Project "xyz...', Array)
#5 /mypath/framework/MyLogger.php(392): Monolog\Logger->warning('[Project "xyz...', Array)
#6 /mypath/framework/MyLogger.php(245): MyLogger::setMessage('usage', 'Email or passwo...', 'Response', 300, false)
#7 /mypath/index.php(71): MyLogger::setUsageMessage('Email or passwo...', 'Response', 300)
#8 {main}
@BogMor commented on GitHub (Dec 9, 2016):
After I clear the cache, the tests were without errors. So, I had in my cache the certificate for logs-01.loggly.com (host for Monolog) and one for loggly.com (login on site to see the results). I checked and aren't the same certificate.
My problem is now solved, but maybe is better to introduce the curl parameters
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1 );
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true );
curl_setopt($ch, CURLOPT_TIMEOUT, 320);
Thank you.