Re: help with upload in windows
| From: | Richard Lynch | Date: | Mon, 18 Dec 2000 05:34:45 +0000 |
| Subject: | Re: help with upload in windows | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-30830@lists.php.net to get a copy of this message | ||
> why this would happen. There isn't a rights problem as I am doing
> this on my laptop for testing.
Being on your laptop does not give you any particular special dispensation
from security rules: Apache runs as a particular user, and that's the user
PHP behaves as. Either that PHP user can write to the directory or it
can't.
Try right-clicking on the upload and destination folders and making them
writable by anybody.
> php 4.0.3pl1, apache 1.3.14 win98 on laptop .. same system on my
> win2k. Using php as module (not windows installer/cgi)
>
> html form ... test1.html
>
> <html>
> <body>
> <FORM ENCTYPE="multipart/form-data" ACTION="test1.php" METHOD=POST>
> <INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="10000">
> Send this file: <INPUT NAME="userfile" TYPE="file">
> <INPUT TYPE="submit" VALUE="Send File">
> </FORM>
> </body>
> </html>
>
> php script test1.php
> <?php
> $loaddir = 'c:\\program files\\apache
group\\apache\\htdocs\\phpbb\\userfiles\\';
>
> echo(" ");
>
> if (is_uploaded_file($userfile)) {
> copy($userfile, $loaddir);
> } else {
> echo ("Possible file upload attack: filename.");
> }
> ?>
>
> 1) the user file i select is a 7k gif file (it does exist)
> 2) the $loaddir is correct. tried with escaping and without
> 3) php.ini is set with a upload dir .. it does exist.
>
> file_uploads=On ; Whether to allow HTTP file uploads
> upload_tmp_dir=c:/webupload ; temporary directory for HTTP uploaded files
(will use system default if not specified)
>
> I am *sure* that this must be a 'windows' problem in dealing with php
> else all the *nixers would be up in arms <g>
>
> Any help would be appreciated. This one has me stumped
>
> --
> DSig
> David Tod Sigafoos
> mailto:dsig@teleport.com
>
> Using 'The Bat' 1.48 Beta/11
>
> `````
> ( O O )
> _______oOOo__( )__oOOo_______
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>