From 8e8cfc379a4860373baa432284b24c426d8de2be Mon Sep 17 00:00:00 2001 From: clem Date: Tue, 1 Dec 2020 23:11:14 +0100 Subject: [PATCH] =?UTF-8?q?le=20howto=20pour=20outrepasser=20les=20erreurs?= =?UTF-8?q?=20de=20certificat=20auto-sign=C3=A9=20lors=20de=20devs=20en=20?= =?UTF-8?q?https=20local?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 8 ++++++++ content/configuration_mails.html | 2 ++ inc/charger_pdf.php | 5 +++++ 3 files changed, 15 insertions(+) create mode 100644 content/configuration_mails.html diff --git a/README.md b/README.md index ed27fbe..a20b76c 100644 --- a/README.md +++ b/README.md @@ -192,3 +192,11 @@ $fonction(lire_config('souscriptions/slug_souscription_validation'), $Tdest, $op * 'contexte' => ['parametre_url_1' => 'valeur_1', 'parametre_url_2' => 'valeur_2', ...] * 'nom' => 'nom_fichier_attache' ] ``` + +## Outrepasser l'erreur de certificat auto-signé lors de devs en https local +=> dans `inc/cherger_pdf.php` décommenter les 2 lignes suivante: +``` + // pour une connexion https locale (certificat auto-signé) décommenter les 2 lignes suivantes + curl_setopt($CurlConnect, CURLOPT_SSL_VERIFYHOST, false); + curl_setopt($CurlConnect, CURLOPT_SSL_VERIFYPEER, false); +``` diff --git a/content/configuration_mails.html b/content/configuration_mails.html new file mode 100644 index 0000000..fb2fba9 --- /dev/null +++ b/content/configuration_mails.html @@ -0,0 +1,2 @@ +[(#AUTORISER{webmestre}|sinon_interdire_acces)] + diff --git a/inc/charger_pdf.php b/inc/charger_pdf.php index 64d1934..5f78bd4 100644 --- a/inc/charger_pdf.php +++ b/inc/charger_pdf.php @@ -18,6 +18,11 @@ function inc_charger_pdf_dist($fichier_pdf, $contexte = []){ } } $CurlConnect = curl_init(); + + // pour une connexion https locale (certificat auto-signé) décommenter les 2 lignes suivantes + //curl_setopt($CurlConnect, CURLOPT_SSL_VERIFYHOST, false); + //curl_setopt($CurlConnect, CURLOPT_SSL_VERIFYPEER, false); + curl_setopt($CurlConnect, CURLOPT_URL, $url); curl_setopt($CurlConnect, CURLOPT_RETURNTRANSFER, 1 ); //curl_setopt($CurlConnect, CURLOPT_POSTFIELDS, $request);