Date: 08/26/02
- Next message: Dallas Thunder: "[PHP-DOC] How to generate a CHM help file?"
- Previous message: Rasmus Lerdorf: "Re: [PHP-DOC] how to change my cvs forwarding email address?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
ID: 10307
Comment by: alan <email protected>
Reported By: excalibur <email protected>
Status: Open
Bug Type: Documentation problem
Operating System: freebsd 4.2
PHP Version: 4.2.1
New Comment:
I couldnt get PUT to work like that, looks like this patch will solve
it.
http://marc.theaimsgroup.com/?l=php-dev&m=102983806024466&w=2
(read the following responsed for a bit more detail on why php cant
read PUT at present)
regards
Alan
Previous Comments:
------------------------------------------------------------------------
[2002-08-25 20:14:11] wez <email protected>
Making this a Documentation Problem; I can't find any code
that sets PHP_UPLOADED_FILE_NAME, PHP_PUT_FILENAME or
other variations, so it seems that the docs at
http://www.php.net/manual/en/features.file-upload.put-method.php
are just plain wrong.
However, it does seem that fopen("php://stdin", "rb") will
allow access to that data (but I haven't tried to verify this).
------------------------------------------------------------------------
[2002-08-25 19:57:56] wez <email protected>
Sounds like the data is ending up coming from stdin;
try the following code:
$data = fopen("php://stdin", "rb");
$destfile = fopen("file_to_overwrite", "wb");
while(!feof($data)) {
$chunk = fread($data, 4096);
fwrite($destfile, $chunk);
}
fclose($destfile);
fclose($data);
This doesn't explain why it doesn't behave as documented,
but should be enough to get you going.
------------------------------------------------------------------------
[2002-08-25 12:40:18] vvs_php <email protected>
PUT method is used for publishing from HTML editors.
But apache brings the data to the script to the stdin stream.
So, PHP does not accept any data. And, also, does not set up
any variable on that score.
------------------------------------------------------------------------
[2002-08-13 22:43:27] kalowsky <email protected>
updating version as per user comments.
------------------------------------------------------------------------
[2002-07-15 03:22:45] t.jago <email protected>
I am using FreeBSD 4.6 and mod_php4-4.2.1_2.
I am using curl to send the file.
curl -T /kernel http://server/test.dat
Interesting thing is that the PHP code is executed and terminated
BEFORE the file has completed uploading. Weird.
------------------------------------------------------------------------
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/10307
-- Edit this bug report at http://bugs.php.net/?id=10307&edit=1-- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: Dallas Thunder: "[PHP-DOC] How to generate a CHM help file?"
- Previous message: Rasmus Lerdorf: "Re: [PHP-DOC] how to change my cvs forwarding email address?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

