ID:               10383
 Comment by:       product-leather1762 at hotmail dot com
 Reported By:      matt at kurzweiltech dot com
 Status:           Bogus
 Bug Type:         HTTP related
 Operating System: RH Linux
 PHP Version:      4.0.3pl1
 New Comment:

<a href=http://f-whitelolitacinema.da.ru>product leather</a>


Previous Comments:
------------------------------------------------------------------------

[2002-07-17 11:02:46] groenendijk at frg dot eur dot nl

I'm having the same problem over here (used to work fine in
php3.0.18):
Redhat 7.3
Apache updated rpm: apache-1.3.23-14
php-4.2.1 

httpd.conf:
Script PUT /put.php3

script snippet:
if (isset($PHP_AUTH_USER) && isset($PHP_AUTH_PW)) {
  syslog(5,"Authorized, trying authenticated FTP");
  syslog(5,"PHP_PUT_FILENAME=$PHP_PUT_FILENAME,
REQUEST_URI=$REQUEST_URI");
  putenv("SERVER_NAME=$SERVER_NAME");
  putenv("REQUEST_URI=$REQUEST_URI");
  putenv("PHP_AUTH_USER=$PHP_AUTH_USER");
  putenv("PHP_AUTH_PW=$PHP_AUTH_PW");
  putenv("PHP_PUT_FILENAME=$PHP_PUT_FILENAME");
  $fp=popen("/home/httpd/exec/put.pl",'r');

syslog output:
Jul 17 16:59:59 spinoza put.php3: Started
Jul 17 16:59:59 spinoza put.php3: Unauthorized, requesting
authentication
Jul 17 16:59:59 spinoza put.php3: Started
Jul 17 16:59:59 spinoza put.php3: Authorized, trying authenticated FTP
Jul 17 16:59:59 spinoza put.php3: PHP_PUT_FILENAME=,
REQUEST_URI=/lia/test.html
Jul 17 16:59:59 spinoza put.pl[22726]: SERVER_NAME www.frg.eur.nl
Jul 17 16:59:59 spinoza put.pl[22726]: REQUEST_URI /lia/test.html

as you can see in the log, other variables are there, except for this
one.

Bart

------------------------------------------------------------------------

[2002-06-02 13:33:41] [EMAIL PROTECTED]

Thank you for taking the time to report a problem with PHP.
Unfortunately your version of PHP is too old -- the problem
might already be fixed. Please download a new PHP
version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.



------------------------------------------------------------------------

[2001-04-18 15:22:09] matt at kurzweiltech dot com

I have been trying to use PUT method support, as described in the PHP
manual in the section "Handling File Uploads."  The documentation says
that when the request type is PUT, the body of the request is saved in
a temporary file (in the directory specified in php.ini), and the name
of the file is saved in a variable called $PHP_PUT_FILENAME (I tried
$PHP_UPLOAD_FILE_NAME too, there is an inconsistency in the
documentation, but neither worked anyway).

As the documentation says, I put a line in httpd.conf (I am using
apache 1.3.12) that says:

Script PUT /path/to/myscript.php

This works great...all PUT requests are getting redirected to my
script.  I know this, because the other parts that don't deal with the
file are getting executed, and I was able to send HTML back to the
client in an "echo" statement.

Now, the value of the variable $PHP_PUT_FILENAME is empty.  I looked at
various other bugs alluding to this issue, and made sure of a couple
things:  in php.ini, register_globals is on, and the temporary file
directory for uploads is also set (to /tmp). I also tried
$PHP_UPLOADED_FILE_NAME (which is in the documentation example), to no
avail.  I am using an HTTP/1.1 PUT, not HTTP/1.0 as someone else did in
an earlier bug.

Next, I searched through all of the most recent sources for PHP_PUT,
PHP_UPLOAD, and other such things, and came up with nothing.  Nowhere
in the PHP source is there any mention of such a variable.

In one of the other bugs mentioning this problem, somebody mentioned
cURL as an alternative.  cURL, as far as I understand, is a set of
functions that allow you to *make* PUT requests (and many other types
of requests), but do not allow you to *receive* PUT requests, which is
what I am trying to do.

I next tried to get at the raw data of the PUT directly, figuring
perhaps the $HTTP_RAW_POST_DATA would have the data or
fopen("php://stdin","rb") would, but neither worked.  For the latter,
PHP already reads all of stdin, so nothing is left over to read, and
for the former, I'm not sure that the variable ever gets set (I read a
couple of mailing list posts about trouble with the HTTP_RAW_POST_DATA
variable, I don't think it exists anymore).  Is there a published
workaround somewhere?

For simplicity's sake, I'm not including my php_info() dump in this
submission, but I'll be happy to give you one if you want it. 

Any insight into this would be much appreciated.  If receiving PUT
requests is no longer supported, at what point was that support
dropped?  It would be cool to have the documentation in that section
updated if it was in fact dropped.  I know this is kind of an obscure
problem from the perspective of the WWW, as only a couple browsers use
PUT, but when developing applications it's a lot easier to use PUT
because no encoding is involved.

Please let me know if there is any more information you need from me.

-Matt

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=10383&edit=1

Reply via email to