Robert Fitzpatrick wrote:
> I have a small application that ran on one server and now gives me a
> problem with uploading images on a new server. I am running PHP 4.4.4
> now on this server and hoping it is just something that needs adjusted
> in php.ini, but cannot seem to find. The file is posted as a file fields
> in a  multipart/form-data form, the application tests the file with
> getimagesize() shown below. I am getting the die response in the
> browser. I tried echo of the file and it prints a random file name under
> the /tmp directory on this CentOS Linux system. If I sleep for 10
> seconds, the file gets created and gone after the script finishes. Can
> someone suggest what my problem may be?

no. but start by stopping the assumption that getimagesize() returns something
equivelant to false to mean the same thing as that the file does not exist
(or is not an image file.)

this might help: http://php.net/is_uploaded_file

also check it's not a permissions issue (i.e. the file is being created but the
webserver cannot subsequently read the file)

> 
> if (!getimagesize($_FILES['filPhoto']['tmp_name'])) {
>       die('The file you are attempting to upload is not an image file.');
> } else {
> <snip>
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to