Bug #7882: upload file

From: Date: Mon, 20 Nov 2000 02:39:53 +0000
Subject: Bug #7882: upload file
Groups: php.dev 
Request: Send a blank email to php-dev+get-38522@lists.php.net to get a copy of this message
From: ljballesteros@hotmail.com Operating system: unix solarix PHP version: 3.0.17 PHP Bug Type: Compile Failure Bug description: upload file please help with upload file. my name is Luis Ballesteros of Colombia. I am beginnig the working with php3. thanks you. sorry not speak english. Warning: Unable to create './imagenes/copia.JPG': Permission denied in > /home/seven/public_html/upload/upload1.php3 on line 12 > File Upload Failed > Directory does not exist > > <HTML><BODY BGCOLOR=FFFFFF> > <?php > > if (isset($submit)){ > if ($upload != 'none'){ > > if (copy($username","./imagenes/".$username)){ > echo "Successfully uploaded <BR>\n"; > } > else{ > echo "<FONT COLOR=FF0000><B>File Upload > Failed</B></FONT><BR>\n"; > > $perms = @fileperms($uploadDir); > $owner = @fileowner($uploadDir); > if (!$perms){ > echo "Directory does not exist: $uploadDir<BR>\n"; > } > else{ > $myuid = getmyuid(); > if (!($perms & 2) && !(($owner == $myuid) && > ($perms > & 128))){ > echo get_current_user(), " doesn't have > permission to write in $uploadDir<BR>\n"; > } > } > } > } > else{ > echo "<FONT COLOR=FF0000><B>File Upload > Failed*****</B></FONT><BR>\n"; > echo "Filesize exceeds limit in FORM or php.ini<BR>\n"; > } > } > ?> > <FORM ENCTYPE=multipart/form-data ACTION=upload1.php3 METHOD=POST> > <INPUT TYPE=HIDDEN NAME=MAX_FILE_SIZE VALUE=2097152> > Upload File: <INPUT NAME=upload TYPE=FILE><BR> > <INPUT TYPE=SUBMIT NAME=submit VALUE="Upload"> > </FORM> > </BODY></HTML> > _________________________________________________________________________

« previous php.dev (#38522) next »