473,387 Members | 1,545 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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
Jul 23 '05 #1
4 4393

"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
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
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
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: TR | last post by:
Is it possible with CSS to prevent this wrapping alignment with a checkbox with a nested label? This is the label of the checkbox that wraps beneath it I'd prefer it looked like...
2
by: Jim Witte | last post by:
Hi, How do I set a file input element? If it's a text input, I can set the value property. But this doesn't work with file inputs. And no, I can't change it - I'm writing a script to...
2
by: Laermans_k | last post by:
Hi, Does anyone have a solution to use the <input type="file" id="filechooser"> and the <input type="submit" id="submitbutton"> in 1 button click? I've already tried to create a javascript...
3
by: ajay2552 | last post by:
Hi, I have a query. All html tags start with < and end with >. Suppose i want to display either '<' or '>' or say some text like '<Company>' in html how do i do it? One method is to use &lt,...
0
by: Srikash74 | last post by:
Hi, I am using File Upload Control in ASP.NET (2.0). I would like to know is there any way we can filter the file type and show only the required files (e.g .html) in the open dialog control...
2
by: charlesbritto | last post by:
A C++ program for counting individual string in a text file using file handling functions., for ex: if the text file contains, am a boy,am studying +2,am from chennai Now the result shoud...
5
by: =?Utf-8?B?TWlrZSBPS0M=?= | last post by:
How do I get the width of a column using Type Datasets? I don't want to know the length of the data in the column, I want to know the width of the column. In my code, if the column width is 50...
2
by: Chris Riesbeck | last post by:
I assume the answer to this is "no" with no workarounds, but just checking. I have a page I open locally from my filesystem for "scrubbing" Microsoft Word generated junk from HTML. In Firefox 2,...
1
by: sasimca007 | last post by:
Hai friends, I have a doubt that if we are having a page which having the functionality to upload a file, then if we want to restrict to some types of files only have to be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.