ascending.taurus avatar

How to fix cURL error (77) when do Wordpress update

ascending.taurus

Published: 06 Mar 2019 › Updated: 06 Mar 2019How to fix cURL error (77) when do Wordpress update

How to fix cURL error (77) when do Wordpress update

Today when I do update plugins on my Wordpress site I met the following error screenshot. I searched curl error codes and found it caused by SSL. The error message is: Problem with reading the SSL CA cert (path? access rights?).

alt

I searched in Google and according to my server details I fixed it with the following steps.

My Server has Plesk installed so it doesn't suit you if you use other panel.

Step 1, get where your Plesk installed

Connect to your server by SSH.

If you use Mac then you may open Terminal and enter command:

ssh root@xxx.xxx.xxx.xxx

After connected to your server, please enter command:

vi /etc/psa/psa.conf

And then you'll see the plesk path at the beginning of the conf file as the following.
alt

Click ESC and then enter :q! will let you quote vi.

Step 2, open / create panel.ini and update / add settings

You need open or create the file of PLESK_PRODUCT_ROOT_D/admin/conf/panel.ini if it doesn't exit.

In my server the file doesn't exist and I created a new one. Plesk already prepare a sample file there so I just copied it.
alt

Enter command: vi panel.ini and you'll see plesk already prepared settings but just comment them. Move down to the end of the file and add the following codes and save the file:

[php]
curlCertificatesUrl="http://curl.haxx.se/ca/cacert.pem

Click keyboard i enter inserted mode to paste the above codes in vi. Click ESC and enter :wq will save and quote vi

Step 3, download the cacert.pem file

Enter command: cd /PLESK_PRODUCT_ROOT_D/Additional/PHPSettings/ .

If /Additional/PHPSettings/ doesn't exist then just user the following commands to create them.

Enter command: mkdir Additional
Enter command: cd Additional
Enter command: mkdir PHPSettings
Enter command: cd PHPSettings

Then download the cacert.pem from http://curl.haxx.se/ca/cacert.pem.

Enter command: wget http://curl.haxx.se/ca/cacert.pem

Step 4, execute plesk daily task

Enter command: plesk daily

Wait until the command executed. If your server doesn't have "plesk daily" command then it because your plesk version is old and you have to wait one day until plesk executed automatically.

Step 5, get the php version which run on your server

Open plesk and click: Websites & Domains

And you'll see PHP version as the following screenshot:
alt

Step 5, change PHP settings for all your sites

In plesk, navigate to Tools & Settings --> General Settings --> PHP Settings

alt

Open the link of FastCGI application for your PHP version.
alt

Click "ini" table and add the following to the ini file and save it.

curl.cainfo = /PLESK_PRODUCT_ROOT_D/Additional/PHPSettings/cacert.pem

PLESK_PRODUCT_ROOT_D is the value which read from psa.conf. In my case it is /usr/local/psa/

alt

That's all, now it will be OK when you do updating again


alt



Posted from my blog with SteemPress : https://waytowp.com/how-to-fix-curl-error-77-when-do-wordpress-update/

Leave How to fix cURL error (77) when do Wordpress update to:

Written by

Read more #utopian-io posts


Best Posts From ascending.taurus

We have not curated any of ascending.taurus's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From ascending.taurus