[PHP 4.2.0] HTTP PUT method & $_FILES ?
| From: | Jimmy Lantz | Date: | Fri, 10 May 2002 08:00:24 +0000 |
| Subject: | [PHP 4.2.0] HTTP PUT method & $_FILES ? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-96917@lists.php.net to get a copy of this message | ||
Hi,
I'm trying to get the PUT method working on a Apache server running PHP as
module.
Theese are the steps I've taken so far:
- I see in my apache logs that I've got PUT requests "PUT /path/filename.html
HTTP/1.1" OK
- I've added Script PUT /put.php , And checked so that the requests are beeing
transfered to this function. OK
- I've tried to get the ENV VARS but none show more than the PATH_TRANSLATED
(and it's beeing set) OK
- Checked the vars $PHP_UPLOADED_FILE_NAME and $PHP_PUT_FILENAME But neither
are being set to any tmpfile NOT OK!
- Checked $HTTP_RAW_POST_DATA , not set either.
Would'nt it be better to have the PUT valuables in the superglobal $_FILES ?
Or at least in a $HTTP_PUT_FILE var.
If someone could direct me to where I can fine the temporary file, I would be
much obliged!
Theres bugs referring to this as an "non working" function is this so?
- Bug #10383 Receiving an HTTP PUT, rather than sending one
- Bug #14298 PUT absent $PHP_PUT_FILENAME $PHP_UPLOADED_FILE_NAME
I propose a solution like the following:
$HTTP_PUT_FILE['request_uri']
Path of the proposed upload like /mytest/filename.htm
$HTTP_PUT_FILE['path_translated']
The full path of the proposed upload like
/usr/home/foo/bar/public_html/mytest/filename.htm
$HTTP_PUT_FILE['size']
The size, in bytes, of the uploaded file.
$HTTP_PUT_FILE['tmp_name']
Temp name something like /tmp/hfdhjfufd8733
My only bad is that I cant program in C otherwise I would have been there
doing it already.
/ Jimmy