PHP 5.0.4: can NOT upload file

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

    #1

    PHP 5.0.4: can NOT upload file

    Environment: Apache 2.0.5 with PHP 5.0.4.

    Problem: A test php script failed to receive the uploaded file.
    The uploaded file's temp name was shown from the script, but the file
    could not be found in the tempory folder. Also move_uploaded_f ile
    failed to open stream.

    The uploaded file has a small size 1k. Settings: max_input_size= 2M,
    max_execution_t ime=60, max_input_time= 60

    Other test php scripts worked fine, such as echo "hello world", no
    problem.

    Question:
    Are there any configuration options I need to set for Apache or PHP to
    enable file uploading, or something else?

    Thanks

  • Berislav Lopac

    #2
    Re: PHP 5.0.4: can NOT upload file

    GT wrote:[color=blue]
    > Environment: Apache 2.0.5 with PHP 5.0.4.
    >
    > Problem: A test php script failed to receive the uploaded file.
    > The uploaded file's temp name was shown from the script, but the file
    > could not be found in the tempory folder. Also move_uploaded_f ile
    > failed to open stream.
    >
    > The uploaded file has a small size 1k. Settings: max_input_size= 2M,
    > max_execution_t ime=60, max_input_time= 60
    >
    > Other test php scripts worked fine, such as echo "hello world", no
    > problem.
    >
    > Question:
    > Are there any configuration options I need to set for Apache or PHP to
    > enable file uploading, or something else?[/color]

    Is your temp folder writable by Apache?

    Berislav


    Comment

    • GT

      #3
      Re: PHP 5.0.4: can NOT upload file

      yes; "nobody" (apache user id) has created session files in it
      already, but no temp file for the uploaded file.

      Comment

      • Wayne

        #4
        Re: PHP 5.0.4: can NOT upload file

        On 12 Apr 2005 08:44:04 -0700, "GT" <gt1897@yahoo.c om> wrote:
        [color=blue]
        >yes; "nobody" (apache user id) has created session files in it
        >already, but no temp file for the uploaded file.[/color]

        Is your enctype in the form set to "multipart/form-data"??

        Comment

        • GT

          #5
          Re: PHP 5.0.4: can NOT upload file

          The problem is fixed. "nobody" does not have permission to the moveto
          directory. thanks for your help.

          Comment

          Working...