Linux (Ubuntu) website error

Job ID: 31704336

Budget: £20 – £250 GBP

Linux (Ubuntu) Server System Administrator required to fix the website’s SSL error issue.

NOTE: We still use PHP Version 5.6 due to the age of the website that is run on there which is not compatible with PHP 7 or 8 or a newer version of Ubuntu.

The following error has only occurred in last week and is affected by the file_get_contents(), readfile() and fopen() commands.

Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /var/www/vhosts/xxxxxxxxx.co.uk/httpdocs/src/xxxxxxxxx/AppBundle/Controller/Frontend/PaymentBasketController.php on line 4024

Warning: file_get_contents(): Failed to enable crypto in /var/www/vhosts/xxxxxxxxx.co.uk/httpdocs/src/xxxxxxxxx/AppBundle/Controller/Frontend/PaymentBasketController.php on line 4024

There are many pages affected. This is one of the following pages affected for you to see and test on - https://www.tesportswear.co.uk/secure/pay-with-card-stripe.htm/MzY2NzMzfDUyMDUwNw==

We have been in talk with our server company to get this sorted. They suggested the following:

The print given by your developer is looking for a specific .pem file.

"[default_cert_file] => /usr/lib/ssl/cert.pem"

When john ran a check on the files located within the ssl folder he noted that the cert.pem file was missing

"root@server:~# ls -la /usr/lib/ssl/

total 12

drwxr-xr-x 3 root root 4096 Aug 20 06:26 .

drwxr-xr-x 62 root root 4096 Sep 3 2020 ..

lrwxrwxrwx 1 root root 14 Feb 27 2019 certs -> /etc/ssl/certs

drwxr-xr-x 2 root root 4096 Aug 20 06:26 misc

lrwxrwxrwx 1 root root 20 Jul 13 12:31 openssl.cnf -> /etc/ssl/openssl.cnf

lrwxrwxrwx 1 root root 16 Feb 27 2019 private -> /etc/ssl/private"

The below article directly relates to the the error being given and indicates a method of trouble shooting and resolution, please note I am not cure if the cacert file mentioned in the article is the one you specifically need. However I do believe it relates to the missing .pem file

http://www.bigsoft.co.uk/blog/2017/04/29/file-get-contents-ssl-operation-failed-with-code-1-ssl3-get-server-certificate-certificate-verify-failed

In light of this I have found a guide for creating the .pem file from the certificate parts that should be available on the server. It would be a simple case of opening and copying and pasting the certificate parts in the correct order into this file. (see below)

https://www.digicert.com/kb/ssl-support/pem-ssl-creation.htm

This should hopefully resolve the issue, it isn't as straight forward as I had hoped but if you can create the .pem file from your certificate parts and then make sure it is in the right location and being read it should hopefully resolve the issue.



This unfortunately did not work. The certificate is actually in Plesk and the details can be retrieved from there under the subscription tesportswear.co.uk.

The server company are not Linux administrators and this may not even be the reason for the error.

Hope you can help :)

Thanks!
Related categories: Linux Ubuntu