Forum Moderators: coopster
$file_size=$HTTP_POST_FILES['image']['size'];
$file_name=$HTTP_POST_FILES['image']['tmp_name'];
$file_clientname=$HTTP_POST_FILES['image']['name'];
$file_newplace='cimages'."\\".$file_clientname;
i'm just created simple upload image checking script:
if ($file_name!='')
if (is_uploaded_file($file_name))
{
if ($file_size>$picture_maxsize)
{
$error_event.='File cannot be uploaded because its length more than permissible max size';
}
else
{
if ($error_event=='')
{
copy($file_name,$file_newplace);
// move_uploaded_file($file_name,$file_newplace);
}
}
}
else
{
$error_event.='Sorry, but file is not loaded. Please check file path';
}
On my localhost all ok, but on online host it is generated this error:
Warning: Unable to create 'images\T-clubscene.gif': Permission denied in /home/virtual/site11/fst/var/www/html/calendar/admin.php on line 528
Warning: Unable to move '/tmp/phpA7XMKk' to 'images\T-clubscene.gif' in /home/virtual/site11/fst/var/www/html/calendar/admin.php on line 528
What the problem is?
if your isp is using a cacheing mechanism such as the squid cache, they can limit the size of the post data.
many isp's use transparent caches that their users have no idear about.
older versions of squid default to 1mb. after i pointed this issue out to the squid maintainer he made the default unlimited, however it is still configurable in the config file.
i have run into this problem in the past, thought i would share it here.
take care,