#14298 [Ana]: PUT method not supported in PHP 4

From: Date: Tue, 12 Nov 2002 13:41:26 +0000
Subject: #14298 [Ana]: PUT method not supported in PHP 4
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969349616@lists.php.net to get a copy of this message
ID: 14298 Updated by: hholzgra@php.net Reported By: Information-Cascade@ntlworld.com Status: Analyzed -Bug Type: HTTP related +Bug Type: Documentation problem PHP Version: 4.0.6 -Assigned To: zak +Assigned To: hholzgra New Comment: this is a PHP 3 only feature that noone ever ported to PHP 4 ... with 4.3 you will be able to read the PUT data from the php://input stream as the $PHP_PUT stuff in PHP 3 seems to be something almost never used and as the new streams solution is so easy to use i think it is not worth to port the PHP 3 feature here ... in 4.3 you will be able to just do a $in = fopen("php://input","rb"); $out = fopen($outfile,"wb"); while(!feof($in)) { fwrite($out, fread($in, $bufsize)); } fclose($in); fclose($out); no nead to deal with temporary files, no disk space wasted when the script doesn't need the PUT data, and the approach is not limited to PUT requests but will work with all HTTP methods carrying content changed to documentation problem Previous Comments: ------------------------------------------------------------------------ [2002-05-13 08:27:02] jimmy@lusidor.com Just wanted to drop a note about a test I've done: I tried a simple perl script getting the PUT file and it worked. Calling the same script through PHP yields "no file" meaning that PHP does something the uploaded file since the perlscript used by itself works and then called through PHP does'nt. ------------------------------------------------------------------------ [2002-05-09 07:55:50] jimmy@lusidor.com If you find the temporary file variable I would be much obliged if you could drop me a line. BTW I was thinking would'nt it be better to have the PUT values in the superglobal $_FILES ? Or at least in a $HTTP_PUT_FILE var. A possible solution could be something 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. ------------------------------------------------------------------------ [2002-05-08 09:44:42] zak@php.net Current status on this is that I ignored it for a while - I am taking a look at it again. ------------------------------------------------------------------------ [2002-05-03 12:15:39] jimmy@lusidor.com Whats happening on this subject? ------------------------------------------------------------------------ [2001-12-02 01:32:31] zak@php.net Thanks for the report - I am checking into it. --zak ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/14298 -- Edit this bug report at http://bugs.php.net/?id=14298&edit=1

« previous php.doc (#969349616) next »