By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,696 Members | 1,424 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,696 IT Pros & Developers. It's quick & easy.

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

P: n/a

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
Jul 23 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a

"Mick" <te**@nospam.cherryhill.ca> wrote in message
news:k5**********************@ursa-nb00s0.nbnet.nb.ca...

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'.
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.

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


Jul 23 '05 #2

P: n/a
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.*********@comcast.net> wrote in message
news:2t*************@uni-berlin.de...

"Mick" <te**@nospam.cherryhill.ca> wrote in message
news:k5**********************@ursa-nb00s0.nbnet.nb.ca...

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'.


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.

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

Jul 23 '05 #3

P: n/a
Mick (te**@nospam.cherryhill.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.

Jul 23 '05 #4

P: n/a
"Mick" <te**@nospam.cherryhill.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.


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.
Jul 23 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.