magicbug / Cloudlog

Web based amateur radio logging application built using PHP & MySQL supports general station logging tasks from HF to Microwave with supporting applications to support CAT control.
http://www.cloudlog.co.uk
MIT License
467 stars 192 forks source link

PHP Error when trying to import LOTW certificate #2928

Closed raufaser closed 10 months ago

raufaser commented 10 months ago

This is for reporting bugs with the code, if this issue is regarding setting up on your local server please use the forum see readme for details

Describe the bug 2 PHP errors are thrown when trying to import a LOTW certifiacte

To Reproduce Steps to reproduce the behaviour:

  1. Go to 'Log Of The World'
  2. Click on 'Upload Certificate'
  3. Click on 'Choose File'
  4. Pick the .p12 file from the file picker dialog
  5. Click on 'Upload File'
  6. See error
A PHP Error was encountered
Severity: Warning
Message: Undefined array key "cert"
Filename: controllers/Lotw.php
Line Number: 407

A PHP Error was encountered
Severity: Warning
Message: Cannot modify header information - headers already sent by (output started at /var/www-cloudlog/system/core/Exceptions.php:283)
Filename: helpers/url_helper.php
Line Number: 564

Expected behaviour The .p12 LOTW certificate is uploaded to cloudlog

Screenshots If applicable, add screenshots to help explain your problem.

Screenshot 2024-01-21 004240

Desktop (please complete the following information):

Additional context The certificate has NO password. The installation is a normal installation. NO docker.

github-actions[bot] commented 10 months ago

Uh oh! @raufaser, the image you shared is missing helpful alt text. Check your issue body.

Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image.

Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs.

magicbug commented 10 months ago

Please do not open duplicate threads in issues and discussions.

If your getting errors I'd suggest turning on full logging in Cloudlog in /application/config/config.php and then trying to upload a certificate and provide a copy of the log output file in /application/log without this it is impossible to debug anything

and a full detail of how your running cloudlog

raufaser commented 10 months ago

Thanks for pointing me to the log.

The interesting lines: (more in attachement) log.txt

ERROR - 2024-01-27 11:44:52 --> Severity: Warning --> Undefined array key "cert" /var/www-cloudlog/application/controllers/Lotw.php 407
ERROR - 2024-01-27 11:44:52 --> error:0308010C:digital envelope routines::unsupported
ERROR - 2024-01-27 11:44:52 --> Severity: Warning --> Cannot modify header information - headers already sent by (output started at /var/www-cloudlog/system/core/Exceptions.php:283) /var/www-cloudlog/system/helpers/url_helper.php 564

I will investigate this further error:0308010C:digital envelope routines::unsupported

Seems to be something open_ssl / php related.

Cloudlog is running on a VPS:

magicbug commented 10 months ago

That helps are you exporting the certficiate from tQSL using the latest version?

raufaser commented 10 months ago

That helps are you exporting the certficiate from tQSL using the latest version?

No I wasn't. And that was the problem. I wouldn't not have guessed that this could be an issue. My version wasn't ancient. 2.6.something ...

Anyways. Thanks a lot for the help and your awesome work in general.