Re: Re: HTTP PUT problems
| From: | Darren McClelland | Date: | Sat, 24 Aug 2002 16:40:23 +0000 |
| Subject: | Re: Re: HTTP PUT problems | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-113950@lists.php.net to get a copy of this message | ||
Here is the relevant section of code:
if(!isset($userfile) || !isset($userfile_name) || !isset($userfile_size)){
$mesg = sprintf("PHP_PUT_FILENAME: '%s' PHP_UPLOADED_FILE_NAME: '%s'
userfile: '%s'\n",
$PHP_PUT_FILENAME, $PHP_UPLOADED_FILE_NAME, $userfile);
$err = new Error($mesg);
$err->notify();
printf("%d\n", ZCOMM_BAD_UPLOAD);
exit;
}
This is some debugging code I put in to try to figure out where the filename
was. The problem is that $PHP_PUT_FILENAME, and $PHP_UPLOADED_FILE_NAME are
not set, so I have no way to get to the uploaded file.
As for the browser question I'm using curl to PUT the the file. If I turn on
mod_put I can put files up on the server to my heart's content. I need to do
some processing of the files after they get to the server, and I'd like to do
it with PHP. I had a solution that worked fine with RFC 1867 HTTP POST file
upload, but due to breakages on the client end I need to get PUT working.
Has anyone gotten PUT working with PHP and if so how?
Thanks,
Darren McClelland
On Saturday 24 August 2002 00:23, you wrote:
> Can you show the code - alot easier to see the error with the full picture
> JohnP
>
>
> "Darren McClelland" <darren@seattleserver.com> wrote in message
> news:php.general-113907@news.php.net...
>
> > Hello,
> > I am attempting to use the HTTP PUT method for file upload with PHP and
> > am having problems. I can get the desired PHP script to run when I PUT my
>
> file
>
> > but the $PHP_PUT_FILENAME, and $PHP_UPLOADED_FILE_NAME variables
>
> described
>
> > in the documentation aren't set. Where is the put file placed and where
>
> can I
>
> > get the file name? Has anyone gotten this to work?
> >
> > I am using PHP 4.2.2 with Apache 1.3.23 on Linux.
> > PHP RPMs from here: http://rpms.arvin.dk/php/rh72/
> >
> > Thanks,
> > Darren McClelland