RE: [PHP-WIN] Upload files under windows

From: Date: Tue, 19 Dec 2000 14:53:13 +0000
Subject: RE: [PHP-WIN] Upload files under windows
Groups: php.windows 
Request: Send a blank email to php-windows+get-4536@lists.php.net to get a copy of this message
David, As no one answered... php3 + IIS4 + NT4. No problem. The only one: I forgot to set upload_tmp_dir... but you didn't. NB: there is no file_uploads variable in php3.ini. Sorry. B.E. -----Message d'origine----- De: David Tod Sigafoos [mailto:dsig@teleport.com] Date: dimanche 17 décembre 2000 19:48 À: 'php-windows@lists.php.net' Objet: [PHP-WIN] Upload files under windows The following code is taken from the manual and zend.com (well actually tried both .. this IS from zend). I get an error in the copy section. Being under windows I am not sure why this would happen. There isn't a rights problem as I am doing this on my laptop for testing. 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 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

« previous php.windows (#4536) next »