Page 1 of 1

Help Required for Video Uploading

Posted: Thu Aug 30, 2007 6:16 am
by harshasks
I am using ffmpeg to upload videos, but is seems to be not taking any file except for txt and pictures.....

And how to change the max upload for a file because i have changed the file size in php.ini but when i run the script php info again it gives 2MB as max size

Please help me with this

Posted: Thu Aug 30, 2007 6:18 am
by VladSun
Did you run:
apachectl restart

after you had changed the php.ini?

Posted: Thu Aug 30, 2007 6:28 am
by Steve Mellor
Also check that your script isn't limiting the size that it lets upload as well.

Posted: Thu Aug 30, 2007 8:10 am
by harshasks
feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


Hi , Thanks for the previous replies , the file size has changed , but still a problem

Code: Select all

<?php



  {
  if ($_FILES["file"]["error"] > 0)
    {
    echo "Return Code: " . $_FILES["file"]["error"] . "<br />";
    }
  else
    {
    echo "Upload: " . $_FILES["file"]["name"] . "<br />";
    echo "Type: " . $_FILES["file"]["type"] . "<br />";
    echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />";
    echo "Temp file: " . $_FILES["file"]["tmp_name"] . "<br />";    if (file_exists("upload/" . $_FILES["file"]["name"]))
      {
      echo $_FILES["file"]["name"] . " already exists. ";
      }
    else
      {
       move_uploaded_file($_FILES["file"]["tmp_name"],
      "upload/" . $_FILES["file"]["name"]);
      echo "Stored in: " . "upload/" . $_FILES["file"]["name"];
      }
    }
  }



?>
This code for uploading videos is giving no upload : THe following message is getting displayed


Upload:
Type:
Size: 0 Kb
Temp file:
already exists.

Thank [s]u[/s] you


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

[quote="[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1"][b]11.[/b] Please use proper, complete spelling when posting in the forums. AOL Speak, leet speak and other abbreviated wording can confuse those that are trying to help you (or those that you are trying to help). Please keep in mind that there are many people from many countries that use our forums to read, post and learn. They do not always speak English as well as some of us, nor do they know these aberrant abbreviations. Therefore, use as few abbreviations as possible, especially when using such simple words.

Some examples of what not to do are ne1, any1 (anyone); u (you); ur (your or you're); 2 (to too); prolly (probably); afaik (as far as I know); etc.[/quote]

Posted: Thu Aug 30, 2007 10:25 am
by Steve Mellor
It looks like you're trying to upload a file with a filename that already exists. Try this instead which will overwrite any files that exist on the server:

Code: Select all

<?php



  {
  if ($_FILES["file"]["error"] > 0)
    {
    echo "Return Code: " . $_FILES["file"]["error"] . "<br />";
    }
  else
    {
    echo "Upload: " . $_FILES["file"]["name"] . "<br />";
    echo "Type: " . $_FILES["file"]["type"] . "<br />";
    echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />";
    echo "Temp file: " . $_FILES["file"]["tmp_name"] . "<br />";    

       move_uploaded_file($_FILES["file"]["tmp_name"],
      "upload/" . $_FILES["file"]["name"]);
      echo "Stored in: " . "upload/" . $_FILES["file"]["name"];
      
    }
  }



?>
If you want to keep the functionality however there are two things you can do. Firstly, upload a different file (with a different name to those you have uploaded before) each time you test the script. Secondly, you could just delete the test uploads as they arrive on your server, just keep your FTP client open.

Posted: Thu Aug 30, 2007 10:30 am
by Kieran Huggins
you need to use a form type of multipart/alternative - I'll bet that's what's missing. do a quick search for the correct syntax, I think I spelled it wrong (is there a hyphen?)