Upload problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Pierre Jelenc

    Upload problem


    I have a file upload set up from a form, which works fine with small
    files (6k) but fails silently with larger ones (16k and up).

    The form has:

    <input type="hidden" name="MAX_FILE_ SIZE" value="1000000" >

    and the script handling the uploads has:

    set_time_limit( 3000); // no difference with set_time_limit( 0)
    ignore_user_abo rt(true);

    which should provide ample time for whatever needs to happen. The sever is
    not running under safe mode.

    When the upload fails, nothing happens in the browser: after the files
    appear to have been sent (as measured by the time it takes for activity to
    stop on my line monitor), the original form is still there, and I see no
    error message.

    What could be the cause of such behavior?

    Pierre
    --
    Pierre Jelenc | H o m e O f f i c e R e c o r d s
    | * Marwood * The Cucumbers *
    T h e G i g o m e t e r | * Switchblade Kittens * Pawnshop *
    www.thegigometer.com | www.homeofficerecords.com
  • Pedro

    #2
    Re: Upload problem

    Pierre Jelenc wrote:[color=blue]
    >When the upload fails, nothing happens in the browser: after the files
    >appear to have been sent (as measured by the time it takes for activity to
    >stop on my line monitor), the original form is still there, and I see no
    >error message.
    >
    >What could be the cause of such behavior?[/color]
    No idea



    put

    <?php
    echo '<pre>POST'; print_r($_POST) ;
    echo '<br />FILES'; print_r($_FILES );
    echo '</pre>';
    ?>

    in the part of your script that handles the uploads to
    test/verify/debug the posting process.


    --
    "Yes, I'm positive."
    "Are you sure?"
    "Help, somebody has stolen one of my electrons!"
    Two atoms are talking:

    Comment

    • Pierre Jelenc

      #3
      Re: Upload problem

      Pedro <hexkid@hotpop. com> writes:[color=blue]
      >
      > <?php
      > echo '<pre>POST'; print_r($_POST) ;
      > echo '<br />FILES'; print_r($_FILES );
      > echo '</pre>';
      > ?>
      >
      > in the part of your script that handles the uploads to
      > test/verify/debug the posting process.[/color]

      When the upload works, the results are as expected, for example:

      POST
      Array
      (
      [MAX_FILE_SIZE] => 1000000
      [title] => test upload
      [submit] => Save
      )

      FILES
      Array
      (
      [slide] => Array
      (
      [name] => emmaandtata.jpg
      [type] => image/jpeg
      [tmp_name] => /tmp/phpSy5sPq
      [error] => 0
      [size] => 6616
      )

      )


      With a larger file, as I said before, I get nothing, the script is not
      executed at all.

      Pierre
      --
      Pierre Jelenc | H o m e O f f i c e R e c o r d s
      | * Marwood * The Cucumbers *
      T h e G i g o m e t e r | * Switchblade Kittens * Pawnshop *
      www.thegigometer.com | www.homeofficerecords.com

      Comment

      • Pedro

        #4
        Re: Upload problem

        Pierre Jelenc wrote:
        [...][color=blue]
        >With a larger file, as I said before, I get nothing, the script is not
        >executed at all.[/color]

        What values do you have in PHP.INI for

        post_max_size
        upload_max_file size



        --
        "Yes, I'm positive."
        "Are you sure?"
        "Help, somebody has stolen one of my electrons!"
        Two atoms are talking:

        Comment

        • Pierre Jelenc

          #5
          Re: Upload problem

          Pedro <hexkid@hotpop. com> writes:[color=blue]
          >
          > What values do you have in PHP.INI for
          >
          > post_max_size[/color]

          8M
          [color=blue]
          > upload_max_file size[/color]

          7M

          Pierre
          --
          Pierre Jelenc | H o m e O f f i c e R e c o r d s
          | * Marwood * The Cucumbers *
          T h e G i g o m e t e r | * Switchblade Kittens * Pawnshop *
          www.thegigometer.com | www.homeofficerecords.com

          Comment

          • Pedro

            #6
            Re: Upload problem

            Pierre Jelenc wrote:[color=blue]
            >Pedro <hexkid@hotpop. com> writes:[color=green]
            >>
            >> What values do you have in PHP.INI for
            >>
            >> post_max_size[/color]
            >
            >8M
            >[color=green]
            >> upload_max_file size[/color]
            >
            >7M
            >
            >Pierre[/color]

            fishing ...

            can you upload large files (16k :) to other servers?
            does the server log have anything about the failed upload?



            --
            "Yes, I'm positive."
            "Are you sure?"
            "Help, somebody has stolen one of my electrons!"
            Two atoms are talking:

            Comment

            • Pierre Jelenc

              #7
              Re: Upload problem

              Pedro <hexkid@hotpop. com> writes:[color=blue]
              >
              > can you upload large files (16k :) to other servers?[/color]

              Yes, to 2 others.
              [color=blue]
              > does the server log have anything about the failed upload?[/color]

              Nothing. The POST request is in the access log, but without any indication
              of a problem, and the error log has nothing.

              Pierre
              --
              Pierre Jelenc | H o m e O f f i c e R e c o r d s
              | * Marwood * The Cucumbers *
              T h e G i g o m e t e r | * Switchblade Kittens * Pawnshop *
              www.thegigometer.com | www.homeofficerecords.com

              Comment

              Working...