File Uploads using <INPUT Type = file...>

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

    File Uploads using <INPUT Type = file...>


    Anyone know of any problems with this???

    Using it to upload image files to a server. Most of the files work fine but
    occasionally one causes error with fopen() on server. Seems the
    'filename/path' param is incorrect. It is actually trying to open the file
    using the directory path I uploaded 'from' and not 'to'.

    (Note: Using PHP on Novell server to open the file.)

    Thanks,

    Mick


  • Harlan Messinger

    #2
    Re: File Uploads using &lt;INPUT Type = file...&gt;


    "Mick" <test@nospam.ch erryhill.ca> wrote in message
    news:k5gbd.1474 99$Np3.6359560@ ursa-nb00s0.nbnet.nb .ca...[color=blue]
    >
    > Anyone know of any problems with this???
    >
    > Using it to upload image files to a server. Most of the files work fine[/color]
    but[color=blue]
    > occasionally one causes error with fopen() on server. Seems the
    > 'filename/path' param is incorrect. It is actually trying to open the file
    > using the directory path I uploaded 'from' and not 'to'.[/color]

    Unless some detail is eluding me, the answer to to stop telling it to do
    that. Why would the location on my hard drive of a file that I'm uploading
    to you have anything to do with where you want it to go on your server?
    Program it to save the file in the directory in which you want it to go, and
    under the name you want it to have.
    [color=blue]
    >
    > (Note: Using PHP on Novell server to open the file.)[/color]

    Comment

    • Mick

      #3
      Re: File Uploads using &lt;INPUT Type = file...&gt;

      PHP (on the server) has a default setting for where file uploads get
      initially placed. I can then do what I want with the file from there. Once
      the script has been completed the temp file automatically gets destroyed so
      I have to do something (ie. copy, move, etc.) before this happens. One of
      the PHP vars I have to work with on the server is the path/filename of the
      this temp file which SHOULD always be the 'default_dir/filename'.
      The problem is that occasionally this var is returning the path/filename of
      the original file on the client machine. Therefore when I try to copy or
      open the file it returns an error because obviously the path/file does not
      exist on the server.

      In writing this I am thinking that it could very well be PHP issue and not
      HTML. Just trying to narrow it down.
      (Note: It is not a MAX_FILE_SIZE issue as I have uploaded larger files
      successfully.)

      Mick


      "Harlan Messinger" <h.messinger@co mcast.net> wrote in message
      news:2t5i33F1qi epkU1@uni-berlin.de...[color=blue]
      >
      > "Mick" <test@nospam.ch erryhill.ca> wrote in message
      > news:k5gbd.1474 99$Np3.6359560@ ursa-nb00s0.nbnet.nb .ca...[color=green]
      > >
      > > Anyone know of any problems with this???
      > >
      > > Using it to upload image files to a server. Most of the files work fine[/color]
      > but[color=green]
      > > occasionally one causes error with fopen() on server. Seems the
      > > 'filename/path' param is incorrect. It is actually trying to open the[/color][/color]
      file[color=blue][color=green]
      > > using the directory path I uploaded 'from' and not 'to'.[/color]
      >
      > Unless some detail is eluding me, the answer to to stop telling it to do
      > that. Why would the location on my hard drive of a file that I'm uploading
      > to you have anything to do with where you want it to go on your server?
      > Program it to save the file in the directory in which you want it to go,[/color]
      and[color=blue]
      > under the name you want it to have.
      >[color=green]
      > >
      > > (Note: Using PHP on Novell server to open the file.)[/color]
      >[/color]


      Comment

      • Malcolm Dew-Jones

        #4
        Re: File Uploads using &lt;INPUT Type = file...&gt;

        Mick (test@nospam.ch erryhill.ca) wrote:
        : PHP (on the server) has a default setting for where file uploads get
        : initially placed. I can then do what I want with the file from there. Once
        : the script has been completed the temp file automatically gets destroyed so
        : I have to do something (ie. copy, move, etc.) before this happens. One of
        : the PHP vars I have to work with on the server is the path/filename of the
        : this temp file which SHOULD always be the 'default_dir/filename'.
        : The problem is that occasionally this var is returning the path/filename of
        : the original file on the client machine. Therefore when I try to copy or
        : open the file it returns an error because obviously the path/file does not
        : exist on the server.

        : In writing this I am thinking that it could very well be PHP issue and not
        : HTML. Just trying to narrow it down.
        : (Note: It is not a MAX_FILE_SIZE issue as I have uploaded larger files
        : successfully.)

        : Mick

        This is certainly not an html issue.

        It is either a bug on your php code or a bug in php itself.

        Having encountered at least one bug in php before now, I would make sure I
        had an up to date version of php, and try the same code on a different php
        setup as one of my debugging steps.

        Comment

        • Harlan Messinger

          #5
          Re: File Uploads using &lt;INPUT Type = file...&gt;

          "Mick" <test@nospam.ch erryhill.ca> wrote:
          [color=blue]
          >PHP (on the server) has a default setting for where file uploads get
          >initially placed. I can then do what I want with the file from there. Once
          >the script has been completed the temp file automatically gets destroyed so
          >I have to do something (ie. copy, move, etc.) before this happens. One of
          >the PHP vars I have to work with on the server is the path/filename of the
          >this temp file which SHOULD always be the 'default_dir/filename'.
          >The problem is that occasionally this var is returning the path/filename of
          >the original file on the client machine. Therefore when I try to copy or
          >open the file it returns an error because obviously the path/file does not
          >exist on the server.
          >
          >In writing this I am thinking that it could very well be PHP issue and not
          >HTML.[/color]

          That's for sure. Extracting just the file name from a path string is
          something to do in the PHP code.

          --
          Harlan Messinger
          Remove the first dot from my e-mail address.
          Veuillez ôter le premier point de mon adresse de courriel.

          Comment

          Working...