[GH-ISSUE #899] Error in curl for LogglyHandler #352

Closed
opened 2026-03-04 02:14:21 +03:00 by kerem · 1 comment
Owner

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

    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2 );
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true );
    curl_setopt($ch, CURLOPT_TIMEOUT, 320);

#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}

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 curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2 ); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true ); curl_setopt($ch, CURLOPT_TIMEOUT, 320); #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}
kerem closed this issue 2026-03-04 02:14:21 +03:00
Author
Owner

@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.

<!-- gh-comment-id:265963629 --> @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.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/monolog#352
No description provided.