это не проблема сервера, у меня была такая же проблема щас приведу свой исходник:
Код
$max_photo_size = 500000;
$upload_required = true;
$upload_page = 'form_add_car.php';
$err_msg = false;
do
{
if (!isset ($_FILES['foto1_image']))
{
$err_msg = 'The form was not sent in completely.';
break;
}
else
{
$foto1_image = $_FILES['foto1_image'];
}
switch ($foto1_image['error'])
{
case UPLOAD_ERR_INI_SIZE:
$err_msg = 'The size of the image is too large, '.
"it can not be more than $max_photo_size bytes.";
break 2;
case UPLOAD_ERR_PARTIAL:
$err_msg = 'An error ocurred while uploading the file, '.
"please <a href='{$upload_page}'>try again</a>.";
break 2;
case UPLOAD_ERR_NO_FILE:
if ($upload_required)
{
$err_msg = 'You did not select a file to be uploaded, '.
"please do so <a href='{$upload_page}'>here</a>.";
break 2;
}
break 2;
case UPLOAD_ERR_FORM_SIZE:
$err_msg = 'The size was too large according to '.
'the MAX_FILE_SIZE hidden field in the upload form.';
case UPLOAD_ERR_OK:
if ($foto1_image['size'] > $max_photo_size)
{
$err_msg = 'The size of the image is too large, '.
"it can not be more than $max_photo_size bytes.";
}
break 2;
default:
$err_msg = "An unknown error occurred, ".
"please try again <a href='{$upload_page}'>here</a>.";
}
if (!in_array($foto1_image['type'],array ('image/jpeg', 'image/pjpeg', 'image/png')))
{
$err_msg = "You need to upload a PNG or JPEG image, ".
"please do so <a href='{$upload_page}'>here</a>."; echo"$err_msg";
break;
}
} while (0);
if (!$err_msg)
{
$f = fopen($foto1_image['tmp_name'],"rb"); // имя файла или картинки -- открыли файл на чтение
$upload = fread($f,filesize($foto1_image['tmp_name'])); // считали файл в переменную
fclose($f); // закрыли файл, можно опустить
$foto1 = addslashes($upload);
}
как вы поняли этому скрипту требуеться передать foto1_image с формы 'form_add_car.php'