RE: [PHP] Upload File Problem

From: Date: Thu, 18 Jul 2002 12:06:12 +0000
Subject: RE: [PHP] Upload File Problem
Groups: php.general 
Request: Send a blank email to php-general+get-108247@lists.php.net to get a copy of this message
> From: Mark Colvin [mailto:mark.colvin@ccmltd.co.uk] > Sent: Thursday, July 18, 2002 12:41 PM > To: joakim.andersson@cybercom.se > > Joakim, > > Thank you for your reply. I tried your example and get > 'Possible file upload > attack: filename.' meaning that 'if > (is_uploaded_file($_FILES['img1']['tmp_name']))' returns > false. I put a > couple of echo statements in before the if statement to check > '$img1_name' > '$img1_size and '$img1_type' and these all returned the > correct values. I > have my upload_tmp_dir in php.ini set to /var/www/html/img > and this folder > has 777 permissions. Do you think the file is not getting to > temp directory > and if so any idea why? Have you tried echoing $_FILES['img1']['tmp_name'] or $HTTP_POST_FILES['img1']['tmp_name']? If the first doesn't work, you may have to exchange $_FILES to $HTTP_POST_FILES or $_FILES['img1']['tmp_name'] to $img1_tmp_name etc. /Joakim

« previous php.general (#108247) next »