I know this question as been asked several times but it keep getting an error message when i do my curl request. I've seen several forums and several curl cmd converter but they arn't going anywhere for me.
Here is my curl request that work on cmd :
curl -X POST --form "inputXml=@ABBE.Xml" http://localhost:8012/RemoteServXml
Here is my curl code on php that returns me an error :
$post = 'inputXml='.$req;
}
try {
$curl = curl_init();
curl_setopt ($curl, CURLOPT_URL, $xmlserverurl);
curl_setopt ($curl, CURLOPT_HEADER, false);
curl_setopt ($curl, CURLOPT_POST, 1);
curl_setopt ($curl, CURLOPT_POSTFIELDS, $post);
curl_setopt ($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($curl, CURLOPT_CONNECTTIMEOUT, 60);
curl_setopt ($curl, CURLOPT_TIMEOUT, 300);
curl_setopt ($curl, CURLOPT_VERBOSE, true);
$buffer = curl_exec ($curl);
"<!doctype html>État HTTP 500 – Erreur interne du serveurbody {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}
État HTTP 500 – Erreur interne du serveur
Type Rapport d'état
message Error executing job: Error reading log file: <?xml version="1.0"?> <error component="XmlUtils" desc="XML parsing error. See Message for details." source="saxerrorhandler.cpp:105"><extra-info key="Message" value="unexpected end of input"/><extra-info key="Source" value="C:\Program Files\Apache Software Foundation\Tomcat 8.5\temp\AServer_Input6741993457441879710.xml:374:3301"/></error"
i tested it with utf8_encode but it still don't work.
Thanks in advance !
**UPDATE 1 :**
Error log on apache/php :
'"55924"' n'est pas reconnu en tant que commande interne
ou externe, un programme ex‚cutable ou un fichier de commandes.
* Hostname was NOT found in DNS cache
* Trying ::1...
* Connected to localhost (::1) port 8090 (#0)
> POST /RemoteServXml HTTP/1.1
Host: localhost:8090
Accept: */*
Accept-Encoding: deflate, gzip
Content-Length: 64287
Content-Type: application/x-www-form-urlencoded
Expect: 100-continue
< HTTP/1.1 100
< HTTP/1.1 500
< Content-Type: text/html;charset=utf-8
< Content-Language: fr
< Content-Length: 1207
< Date: Fri, 28 Aug 2020 07:22:42 GMT
< Connection: close
<
* Closing connection 0