Problem In Uploading Large Image Size.. – PHP

  php

Q(Question):

Hi to all,
I am created a Search Engine for the maps, Its working properly, but the problem is that…during uploading the map details to the database…It is not uploading the images which have a size more than 2mb…Please help me this…I struck in that…

My code


if ($Scale == "Million")
{
{
if (file_exists("Million/" . $_FILES["photo"]["name"]))
{
$Myerrors[$j++] = $_FILES["photo"]["name"] . " already exists. \n";
}
else
{
$photo = $_FILES['photo']['name'];
move_uploaded_file($_FILES["photo"]["tmp_name"],"Million/".$_FILES["photo"]["name"]);
//chmod("Million/".$_FILES["photo"]["name"], 0775);
}
}
}

A(Answer):

there is a upload file size limit in PHP, you have to change the

upload_max_filesize

from the php settings

Regards

A(Answer):

where is that in wamp server…in which file…is that in php.ini file..or else..please help me in this…the code is correct na..

A(Answer):

it is in the php.ini

or you can set it from the code and from the htaccess also.

in your case i think php.ini is the easiest

Regards

A(Answer):

HI,
Previous in php.ini
post_max_size = 8M
upload_max_filesize = 2M
max_execution_time = 30
max_input_time = 60
memory_limit = 8M

Change to:
post_max_size = 750M
upload_max_filesize = 750M
max_execution_time = 5000
max_input_time = 5000
memory_limit = 1000M

But still it is not coming…

A(Answer):

did you restart the apache server after the changes?

A(Answer):

ya i restart the apache…then it works…thank you very much for your help….

LEAVE A COMMENT