cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: curl,php4 windows 2000, xml

From: Scott Nichol <snicholnews_at_scottnichol.com>
Date: Mon, 10 Nov 2003 16:00:30 -0500

Is this the same problem you were having back on 9/24? You sure are patient.

Is the servlet giving you any useful error message? There are a number of possible problems, such as it does not like your XML, or it expects a particular Content-Type (e.g. text/xml). The latter would be a problem with the -d option, since that will use the Content-Type for an HTML form. Also, when using -d you are supposed to be sending encoded form parameters, which you are not. That might muck up either curl or the servlet (if curl mangles your XML in some way thinking it is form parameters).

Scott Nichol

Do not send e-mail directly to this e-mail address,
because it is filtered to accept only mail from
specific mail lists.
----- Original Message -----
From: "Bennett" <bennett_at_glengroup.com>
To: <curl-and-php_at_lists.sourceforge.net>
Sent: Monday, November 10, 2003 9:59 AM
Subject: curl,php4 windows 2000, xml

> Hi all,
>
> We're running in to situation where we need to use curl/php to post xml
> data on a windows 2000 system. We've verifiied that php and curl are
> working on the windows 2000 server but when we try:
>
> <?php
> $command = "curl -d \"$xmlFile\" http://<host to post to>";
> exec($command,$response);
> ?>
>
> The host we're trying to post to doesn't accept the $xmlFile. We can do
> a curl -i http://<host to post to> successfully so we know the server
> is alive and accepting curl commands (or at least the curl -i command).
>
> Also, before putting this code on the windows 2000 server, it was
> working on a Linux server. (The same host we're trying to post to
> accepted the xml file just fine. The only thing that was different in
> the linux environment is that we had to put single quotes around the
> $xmlFile).
>
> So, does anyone have any suggestions on how to overcome this?
>
>
> TIA
>
>
>
> -------------------------------------------------------
> This SF.Net email sponsored by: ApacheCon 2003,
> 16-19 November in Las Vegas. Learn firsthand the latest
> developments in Apache, PHP, Perl, XML, Java, MySQL,
> WebDAV, and more! http://www.apachecon.com/
>
>

-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
Received on 2003-11-10