cURL not working for https giving 77 error in php

Multi tool use
up vote
0
down vote
favorite
I updated my curl to work on https. It does work on terminal however when I use cUrl in php it doesn't work for any https based url.
The error code i get is 77. I have looked into other solutions but no solution is working at all.
I have already tried adding verifyHost, SSL v 6, return transfer nothing works
A simple code is
$ch = curl_init("https://www.google.com");
$response = curl_exec($ch);
$error = curl_error($ch);
$number = curl_errno($ch);
curl_close($ch);
$response = array(
'Result' => array(
'error'=> $error,
'number' => $number,
//'message'=>$fields,
'count'=> $response
));
$this->jsonOutput($response);
In terminal curl https://www.google.com
works fine.
What is going on, the curl in php was working just fine before.
php curl
add a comment |
up vote
0
down vote
favorite
I updated my curl to work on https. It does work on terminal however when I use cUrl in php it doesn't work for any https based url.
The error code i get is 77. I have looked into other solutions but no solution is working at all.
I have already tried adding verifyHost, SSL v 6, return transfer nothing works
A simple code is
$ch = curl_init("https://www.google.com");
$response = curl_exec($ch);
$error = curl_error($ch);
$number = curl_errno($ch);
curl_close($ch);
$response = array(
'Result' => array(
'error'=> $error,
'number' => $number,
//'message'=>$fields,
'count'=> $response
));
$this->jsonOutput($response);
In terminal curl https://www.google.com
works fine.
What is going on, the curl in php was working just fine before.
php curl
The question does not look the same, but I think this can help you: stackoverflow.com/questions/17064601/…
– Koen Hollander
Nov 8 at 9:59
Do you have multiple versions of php running on your server?
– Andrea Golin
Nov 8 at 10:02
No just one. It was working fine but to install mongodb, I did yum update curl.
– Muhammad Umar
Nov 8 at 10:03
try to run a curl --version, what version did you get?
– Andrea Golin
Nov 8 at 10:08
version is curl 7.29.0
– Muhammad Umar
Nov 8 at 10:09
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I updated my curl to work on https. It does work on terminal however when I use cUrl in php it doesn't work for any https based url.
The error code i get is 77. I have looked into other solutions but no solution is working at all.
I have already tried adding verifyHost, SSL v 6, return transfer nothing works
A simple code is
$ch = curl_init("https://www.google.com");
$response = curl_exec($ch);
$error = curl_error($ch);
$number = curl_errno($ch);
curl_close($ch);
$response = array(
'Result' => array(
'error'=> $error,
'number' => $number,
//'message'=>$fields,
'count'=> $response
));
$this->jsonOutput($response);
In terminal curl https://www.google.com
works fine.
What is going on, the curl in php was working just fine before.
php curl
I updated my curl to work on https. It does work on terminal however when I use cUrl in php it doesn't work for any https based url.
The error code i get is 77. I have looked into other solutions but no solution is working at all.
I have already tried adding verifyHost, SSL v 6, return transfer nothing works
A simple code is
$ch = curl_init("https://www.google.com");
$response = curl_exec($ch);
$error = curl_error($ch);
$number = curl_errno($ch);
curl_close($ch);
$response = array(
'Result' => array(
'error'=> $error,
'number' => $number,
//'message'=>$fields,
'count'=> $response
));
$this->jsonOutput($response);
In terminal curl https://www.google.com
works fine.
What is going on, the curl in php was working just fine before.
php curl
php curl
asked Nov 8 at 9:53
Muhammad Umar
5,4001564141
5,4001564141
The question does not look the same, but I think this can help you: stackoverflow.com/questions/17064601/…
– Koen Hollander
Nov 8 at 9:59
Do you have multiple versions of php running on your server?
– Andrea Golin
Nov 8 at 10:02
No just one. It was working fine but to install mongodb, I did yum update curl.
– Muhammad Umar
Nov 8 at 10:03
try to run a curl --version, what version did you get?
– Andrea Golin
Nov 8 at 10:08
version is curl 7.29.0
– Muhammad Umar
Nov 8 at 10:09
add a comment |
The question does not look the same, but I think this can help you: stackoverflow.com/questions/17064601/…
– Koen Hollander
Nov 8 at 9:59
Do you have multiple versions of php running on your server?
– Andrea Golin
Nov 8 at 10:02
No just one. It was working fine but to install mongodb, I did yum update curl.
– Muhammad Umar
Nov 8 at 10:03
try to run a curl --version, what version did you get?
– Andrea Golin
Nov 8 at 10:08
version is curl 7.29.0
– Muhammad Umar
Nov 8 at 10:09
The question does not look the same, but I think this can help you: stackoverflow.com/questions/17064601/…
– Koen Hollander
Nov 8 at 9:59
The question does not look the same, but I think this can help you: stackoverflow.com/questions/17064601/…
– Koen Hollander
Nov 8 at 9:59
Do you have multiple versions of php running on your server?
– Andrea Golin
Nov 8 at 10:02
Do you have multiple versions of php running on your server?
– Andrea Golin
Nov 8 at 10:02
No just one. It was working fine but to install mongodb, I did yum update curl.
– Muhammad Umar
Nov 8 at 10:03
No just one. It was working fine but to install mongodb, I did yum update curl.
– Muhammad Umar
Nov 8 at 10:03
try to run a curl --version, what version did you get?
– Andrea Golin
Nov 8 at 10:08
try to run a curl --version, what version did you get?
– Andrea Golin
Nov 8 at 10:08
version is curl 7.29.0
– Muhammad Umar
Nov 8 at 10:09
version is curl 7.29.0
– Muhammad Umar
Nov 8 at 10:09
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
As you are using yum, i assume you are working on a CentOS distro.
I have made a brief research and it seems it could be an issues with the NSS centos package, triggered by your yum update
. You could try some basic process restart.
Try to restart your httpd service:
service httpd restart
Or via apache:
apachectl stop
apachectl start
and your php-fpm
sudo service php-fpm restart
..................................... sudo reboot did it ...... Thanks so much
– Muhammad Umar
Nov 8 at 14:50
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
As you are using yum, i assume you are working on a CentOS distro.
I have made a brief research and it seems it could be an issues with the NSS centos package, triggered by your yum update
. You could try some basic process restart.
Try to restart your httpd service:
service httpd restart
Or via apache:
apachectl stop
apachectl start
and your php-fpm
sudo service php-fpm restart
..................................... sudo reboot did it ...... Thanks so much
– Muhammad Umar
Nov 8 at 14:50
add a comment |
up vote
1
down vote
accepted
As you are using yum, i assume you are working on a CentOS distro.
I have made a brief research and it seems it could be an issues with the NSS centos package, triggered by your yum update
. You could try some basic process restart.
Try to restart your httpd service:
service httpd restart
Or via apache:
apachectl stop
apachectl start
and your php-fpm
sudo service php-fpm restart
..................................... sudo reboot did it ...... Thanks so much
– Muhammad Umar
Nov 8 at 14:50
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
As you are using yum, i assume you are working on a CentOS distro.
I have made a brief research and it seems it could be an issues with the NSS centos package, triggered by your yum update
. You could try some basic process restart.
Try to restart your httpd service:
service httpd restart
Or via apache:
apachectl stop
apachectl start
and your php-fpm
sudo service php-fpm restart
As you are using yum, i assume you are working on a CentOS distro.
I have made a brief research and it seems it could be an issues with the NSS centos package, triggered by your yum update
. You could try some basic process restart.
Try to restart your httpd service:
service httpd restart
Or via apache:
apachectl stop
apachectl start
and your php-fpm
sudo service php-fpm restart
answered Nov 8 at 10:26


Andrea Golin
650314
650314
..................................... sudo reboot did it ...... Thanks so much
– Muhammad Umar
Nov 8 at 14:50
add a comment |
..................................... sudo reboot did it ...... Thanks so much
– Muhammad Umar
Nov 8 at 14:50
..................................... sudo reboot did it ...... Thanks so much
– Muhammad Umar
Nov 8 at 14:50
..................................... sudo reboot did it ...... Thanks so much
– Muhammad Umar
Nov 8 at 14:50
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53205237%2fcurl-not-working-for-https-giving-77-error-in-php%23new-answer', 'question_page');
}
);
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
7QU,yACb i,c9,mBoiPFeN8DNH 0ljohY3UdE SKG xGv6 X,Nbn,575 Mm249 j78bnw83GnshX,bWH9YdSEn JL
The question does not look the same, but I think this can help you: stackoverflow.com/questions/17064601/…
– Koen Hollander
Nov 8 at 9:59
Do you have multiple versions of php running on your server?
– Andrea Golin
Nov 8 at 10:02
No just one. It was working fine but to install mongodb, I did yum update curl.
– Muhammad Umar
Nov 8 at 10:03
try to run a curl --version, what version did you get?
– Andrea Golin
Nov 8 at 10:08
version is curl 7.29.0
– Muhammad Umar
Nov 8 at 10:09