Certificats SSL - Problème SSL chargement XML
... / Problème SSL chargement XML
BMPCreated with Sketch.BMPZIPCreated with Sketch.ZIPXLSCreated with Sketch.XLSTXTCreated with Sketch.TXTPPTCreated with Sketch.PPTPNGCreated with Sketch.PNGPDFCreated with Sketch.PDFJPGCreated with Sketch.JPGGIFCreated with Sketch.GIFDOCCreated with Sketch.DOC Error Created with Sketch.
Frage

Problème SSL chargement XML

Von
Jean-MedhiR
Erstellungsdatum 2022-03-08 09:19:30 (edited on 2024-09-04 13:18:40) in Certificats SSL

Bonjour,

Je dois depuis un hebergement mutualisé appeler un fichier XML via une URL externe en HTTPS via un script PHP.
En local cela fonctionne très bien mais pas chez OVH.

Le message est le suivant "Warning: simplexml_load_file() [function.simplexml-load-file]: SSL operation failed with code 1. OpenSSL Error messages: error:140773E8:SSL routines:func(119):reason(1000) in ..."

Pensez-vous qu'il y a une restriction chez OVH ?

Merci


3 Antworten ( Latest reply on 2022-03-09 17:13:39 Von
janus57
)

Bonjour,

vous utilisez quoi comme code ?
Quel URL (ou a défaut le message d'erreur complet) ?

Cordialement, janus57

Bonjour,

Merci pour votre aide.

J'utilise la fonction suivante =>

$file = "https://cdn.brother.eu/product-export-sc8/googleshopping/brother-fr/fr-fr-product-list.xml";

$xml = simplexml_load_file($file); // l"erreur est ici
$ns = $xml->getNamespaces(true);

foreach($xml->entry as $item) { .....................

Lien du script en question => https://brotherfrance.fr/event/google_shopping/

Merci
Cordialement

Bonjour,

le mieux serait de récupérer le fichier pour ensuite le traiter, genre avec un file_get_contents ou un curl (attention le xml est visiblement en UTF-16).

Cordialement, janus57