Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

224
Views
php curl throws 503 on HTTPS but works on HTTP

I am running joomlatools-box and trying to execute curl on a https site which throws 503. If I try it on a http site it works perfectly. I suspect something is wrong in my ubuntu vagrant box or that a proxy is in the way but cannot really figure out how to resolve this.

Trying the following code does not work will result in 503 Service Unavailable:

$ch = curl_init('https://example.com');
curl_setopt($ch ,CURLOPT_RETURNTRANSFER,true);
$ret = curl_exec($ch);
curl_close($ch);
var_dump($ret);
die();

The code below works and returns the contents of the site:

$ch = curl_init('http://example.com');
curl_setopt($ch ,CURLOPT_RETURNTRANSFER,true);
$ret = curl_exec($ch);
curl_close($ch);
var_dump($ret);
die();

EDIT: Running php 7.2.27, curl version:

$ curl --version
curl 7.70.0-DEV (x86_64-pc-linux-gnu) libcurl/7.70.0-DEV OpenSSL/1.1.1d zlib/1.2.11 libssh2/1.9.0
Release-Date: [unreleased]
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp 
Features: AsynchDNS HTTPS-proxy IPv6 Largefile libz NTLM NTLM_WB SSL TLS-SRP UnixSockets
over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!