RE: [PHP] File Upload ?

From: Date: Fri, 17 Nov 2000 16:36:11 +0000
Subject: RE: [PHP] File Upload ?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-25918@lists.php.net to get a copy of this message
Directory does exist (I put the 3 dots in there cuz I was tired of typing dir structure; full path exists inside script)... what I don't understand is why it is trying to create a directory? # ls -l -rwxrwxrwx 1 nobody nobody 5026 Nov 16 14:18 index.php -rwxrwxrwx 1 nobody nobody 509 Nov 16 14:18 preview.php drwxrwxrwx 2 nobody nobody 4096 Nov 16 14:53 template -rwxrwxrwx 1 nobody nobody 956 Nov 16 14:59 upload.php -----Original Message----- From: Joe Stump [mailto:joe@earth.care2.com] Sent: Thursday, November 16, 2000 4:29 PM To: Michael Geier Cc: php-general@lists.php.net Subject: Re: [PHP] File Upload ? When you get errors during upload 99% of them are permission related - make sure "nobody" has read/write access to the dir you are writing to. And that the dir exists :O) --Joe On Thu, Nov 16, 2000 at 03:03:50PM -0600, Michael Geier wrote: > I am getting the following errors: > > > Warning: Unable to create '/usr/local/apache/htdocs/.../template/': Is a > directory in /usr/local/apache/htdocs/.../upload.php on line 32 > > Warning: Unable to move '/tmp/php0ygpfr' to > '/usr/local/apache/htdocs/.../template/' in > /usr/local/apache/htdocs/.../upload.php on line 32 > > > > I am using the following code: > > > <body bgcolor="#FFFFFF"> > <font face="Arial,Helvetica,sans-serif" size="2"> > <form enctype="multipart/form-data" > action="<?print($PHP_SELF);?>" > method="POST"> > <INPUT TYPE="hidden" name="MAX_FILE_SIZE" > value="1000000"> > Send this file: <br> > <input name="userfile" type="file"> > <input type="submit" value="Send File"> > </form> > > <? > move_uploaded_file($userfile, "/usr/local/apache/htdocs/.../template/"); > ?> > </font> > </body> > </html> > > > PHP 4.03pl1 > apache 1.3.14 > RH 6.2 > > directory permissions are wide open for right now. > > Any ideas? > Thanks. > > mike > > > -- > 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 ============================================================================ ==== = Joe Stump joestump98@yahoo.com http://www.miester.org = ============================================================================ ==== "Real programmers don't comment their code. It was hard to write, it should be hard to understand." -- 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

« previous php.general (#25918) next »