Problem In Uploading Large Image Size..

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vivekgs2007
    New Member
    • Mar 2010
    • 62

    Problem In Uploading Large Image Size..

    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
    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);
    
          }
        }
      }
  • chathura86
    New Member
    • May 2007
    • 227

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

    upload_max_file size

    from the php settings

    Regards

    Comment

    • vivekgs2007
      New Member
      • Mar 2010
      • 62

      #3
      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..

      Comment

      • chathura86
        New Member
        • May 2007
        • 227

        #4
        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

        Comment

        • vivekgs2007
          New Member
          • Mar 2010
          • 62

          #5
          HI,
          Previous in php.ini
          post_max_size = 8M
          upload_max_file size = 2M
          max_execution_t ime = 30
          max_input_time = 60
          memory_limit = 8M

          Change to:
          post_max_size = 750M
          upload_max_file size = 750M
          max_execution_t ime = 5000
          max_input_time = 5000
          memory_limit = 1000M

          But still it is not coming...

          Comment

          • chathura86
            New Member
            • May 2007
            • 227

            #6
            did you restart the apache server after the changes?

            Comment

            • vivekgs2007
              New Member
              • Mar 2010
              • 62

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

              Comment

              Working...