Error setting certificate file on latest static binary
What happened?
Cannot make http request via symfony http client
(Symfony\Component\HttpClient\Exception\TransportException(code: 0): Error setting certificate file: /etc/pki/tls/certs/ca-bundle.crt
As per https://frankenphp.dev/docs/known-issues/#troubleshooting-tlsssl-issues-with-static-binaries, i tried setting these env vars on starting franken php server but the error persists
My env is github actions ubuntu-latest
I download the static binary as:
- name: Install frankenphp binary
run: curl https://frankenphp.dev/install.sh | sh
- name: Start frankenphp server
run: ./frankenphp start --config Caddyfile > e2e/logs/frankenphp.log 2>&1
env:
- SSL_CERT_FILE: /etc/ssl/certs/ca-certificates.crt
- SSL_CERT_DIR: /etc/ssl/certs
Caddy file
{
debug
log {
output file e2e/logs/caddy.log
format console
level DEBUG
}
frankenphp
}
:8080 {
root * public/
encode gzip
php_server
}
Build Type
Official static build
Worker Mode
No
Operating System
GNU/Linux
CPU Architecture
x86_64
PHP configuration
Using latest static build
Relevant log output
Could you share a minimal reproducer (php code)? I can't seem to run into the issue.
Could you share a minimal reproducer (php code)? I can't seem to run into the issue.
Did u try running on vanilla github actions with ubuntu, i suspect it maybe a platform issue
this is the code, calling a wordpress json api using symfony's http client:
$response = $this
->client
->request(
'GET',
"https://{$domain}/wp-json/wp/v2/categories?slug={$category}",
['timeout' => 3],
);
if (200 !== $response->getStatusCode()) {
return self::CATEGORY_NONE;
}
$categories = $response->toArray();
Okay, I was able to reproduce this now. It looks like we need to explicitly build curl with ca paths disabled and the fallback explicitly enabled.
I need to test whether this breaks anything before we can release it.
can be closed, fixed upstream