SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Guru augathra's Avatar
    Join Date
    Jul 2004
    Location
    united states
    Posts
    826
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Form Submit - WMV & images

    Hello, I have 2 file forms to upload wmv and gif/jpg files to my server. Im just testing the script, all it's supposed to do is check & see if it's empty, and then tell me. The problem is when I submit the form, the page goes to Cannot find server...? Any ideas why? The action is PHP_SELF also, the file boxes are affecting the page load somehow.

  2. #2
    SitePoint Enthusiast
    Join Date
    Nov 2004
    Location
    Boston
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Where is the script?


    Things to check!

    1. make sure you are allowing enough upload size limits for both your server type and your php settings!

    For PHP settings

    These values will have to be checked and adjusted!

    max_execution_time = 30 <- the total time the script can run
    max_input_time = 60 <- the total time allowed for the script to process incoming data
    post_max_size = 8M <- the max size any post sent can contain
    upload_max_filesize = 2M <- the max file upload size!


    The server side, may contain (max content length) or other var(s) that you will need to setup correctly!


    Showing your script will also help!

    J!

  3. #3
    SitePoint Guru augathra's Avatar
    Join Date
    Jul 2004
    Location
    united states
    Posts
    826
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, if i just do the image it will work. The size issues is what I believe it is. And .wmv movies are quite large. I tried a 40MB video, not realizing it. I only plan to have 5MB movies, so everything should go ok?

  4. #4
    SitePoint Guru augathra's Avatar
    Join Date
    Jul 2004
    Location
    united states
    Posts
    826
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    originally i was trying to check file types, so no one sends an evil file to my server. Whenever I try to echo the file type of a wmv, it comes out empty. The image comes out as image/gif.


    Could this be because it's too large still?

  5. #5
    SitePoint Guru augathra's Avatar
    Join Date
    Jul 2004
    Location
    united states
    Posts
    826
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry for post after post, but the name is printing, just not the type?

    My code:

    echo $_FILES['movie']['name'] . ' - ' . $_FILES['movie']['type'];


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •