Re: File upload
| From: | Samba Sidibeh | Date: | Mon, 03 Dec 2001 10:12:11 +0000 |
| Subject: | Re: File upload | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-10697@lists.php.net to get a copy of this message | ||
No - safe_mode = Off. But I thaught it had something to do with register_globals or track_vars in
the php.ini file but now I have turned on register_globals so that shouldn't be an issue
anymore.
----- Original Message -----
From: "Christian Sandfeld" <csa@zen-sys.com>
To: <php-windows@lists.php.net>
Sent: Monday, December 03, 2001 11:06 AM
Subject: RE: [PHP-WIN] File upload
Without knowing for sure I would imagine that the PHP installation on the
server is running in safe mode (look for the "safe_mode" var in your
php.ini).
Brgds,
Christian
-----Original Message-----
From: Samba Sidibeh [mailto:samba.sidibeh@systeam.se]
Sent: 3. december 2001 10:50
To: php-windows@lists.php.net
Subject: [PHP-WIN] File upload
Hi
I'm trying to learn how to do file upload and I am using the example shown
on php.net's manual (http://www.php.net/manual/en/features.file-upload.php):
<form enctype="multipart/form-data" action="_URL_"
method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="1000">
Send this file: <input name="userfile" type="file">
<input type="submit" value="Send File">
</form>
...for the client
and:
<?php
if (is_uploaded_file($userfile)) {
copy($userfile, "/place/to/put/uploaded/file");
} else {
echo "Possible file upload attack: filename '$userfile'.";
}
/* ...or... */
move_uploaded_file($userfile, "/place/to/put/uploaded/file");
?>
..for the server side. No matter how I do it I always get the response
"Possible file upload attack: filename." from the server. Am I forgetting
something or what. Any help at all would make me very glad.
------------------------
Samba Sidibeh
Systemutvecklare
SYSteam Udac AB
Storgatan 19, Box 174, 751 04 Uppsala
Tel direkt: 018-67 81 35
Tel vxl: 018-67 80 00 Fax: 018-51 66 00
Hemsida: www.systeam.se, www.udac.se
SYSteam Udac ingår i SYSteamkoncernen.
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net
For additional commands, e-mail: php-windows-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net