file upload error

    Date: 11/24/06 (PHP Community)    Keywords: php, html, apache

    I'm uploading some images using the following code as a part of the catch and validate system

    	$image_details = getimagesize($_FILES['userfile']['tmp_name']);
    	// Reject upload if the file isn't an image.
    	if (!file_exists($_FILES['userfile']['tmp_name']))
    	{
    		$text = "the file vanished!";
    	}
    	elseif (!$image_details)
    	{
    		$text = "that file wasn't an image";
    	}
    
    Testing the system with some jpeg images, one of them goes through fine while the other one reports that it's vanished. They're both under the upload limits of the html and php.ini and it's the smaller one that vanishes. I've even tried resizing and saving the images, but it doesn't change things.

    Anyone any idea what's happening?

    Just in case it's relevant (which I doubt) this is the one that works and this is the one that doesn't. Working with PHP 5.1.4/ Apache 2 on win2000 and Centos boxes

    Source: http://community.livejournal.com/php/514268.html

« Create a file || Redirect »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home