473,543 Members | 2,000 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4404

"Mick" <te**@nospam.ch erryhill.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.*********@co mcast.net> wrote in message
news:2t******** *****@uni-berlin.de...

"Mick" <te**@nospam.ch erryhill.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.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.

Jul 23 '05 #4
"Mick" <te**@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.


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
13129
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 this, with a flush left margin:
2
7237
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 automate a process on an existing system. Jim Witte jswitte@bloomington.in.us
2
8099
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 function behind the submitbutton click. In this function i call the filechooser.click() event and after this i call the functions to activate the...
3
3352
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, &gt ,&ltCompany&gt to display '<', '>' and '<Company>' respectively. But is there any freeware code available which could implement the above...
0
2442
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 (setting the Default file type ) when you click on the Browse button. Hope to hear from you soon. Thanks & Regards, Sreenivas Kaushik
2
2601
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 be as 3 bcaz ("am" presenting 3 times)
5
1586
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 characters, but a string with 55 characters tries to insert then I get runtime error. So, I want the width of the column so I can cut out that number of...
2
3071
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, I could simply click on a Browse button to pick a file. The Javascript would set the SRC of an IFRAME to that file (mangled to file: form), get the...
1
2850
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 uploaded ex:- jpg,png.... .Then i am using Apache2::Upload module in which we can get the type of file using type function. But the...
0
7412
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7355
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7594
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7748
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7697
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
4900
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3395
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
979
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
648
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.