curl-and-php
RE: PHP script to accept PUT from curl on Apache
Date: Mon, 27 Mar 2006 01:41:02 -0800
It doesn't reject it so much as it receives no data and thus (as I've
written it) returns a 404 error. Recall, the script can:
1) Get the correct filename of the PUT
2) Open and write "Hello world" to the file on disk without any errors
3) Open and read from stdin without any errors
It's just that 'stdin' returns no data. It's exactly as if the correct PUT
headers are being sent and received, but no actual file data is going
through.
It's very probable it's a problem with the PHP code or Apache configuration.
But I'm at a loss of what that might be, and thus I'm evaluating all options
(including the unlikely possibility it's a problem in curl).
Has anyone on this list successfully used curl to PUT data to a PHP script?
Can you offer any tips on how to make it all work?
-david
> -----Original Message-----
> From: curl-and-php-bounces_at_cool.haxx.se [mailto:curl-and-php-
> bounces_at_cool.haxx.se] On Behalf Of Daniel Stenberg
> Sent: Sunday, March 26, 2006 11:35 PM
> To: curl with PHP
> Subject: Re: PHP script to accept PUT from curl on Apache
>
> On Sun, 26 Mar 2006, David Barrett wrote:
>
> > I hate to ask this basic question, but scouring the net and mailing list
> > isn't turning up what I need. Basically, how do I use the curl command
> line
> > to PUT a file to a PHP script in Apache?
>
> And you use the curl command line fine. Your problem is in the server/PHP
> end
> and not with curl...
>
> > C:\>curl -i -T test http://be1.redswoosh.net/metadata/
> > HTTP/1.1 100 Continue
> >
> > HTTP/1.1 404 Failed
>
> This attempts to send a PUT but your server rejects it.
>
> Why it rejects it is a PHP issue I can't answer to.
>
> --
> Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
> _______________________________________________
> http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2006-03-27