473,511 Members | 15,197 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

file upload problems

Good day,

I am trying to upload a file to the server.
http://chops.novatrope.com/game/test/form2.html
Here is some more debugging info:Array
(
[userfile] =Array
(
[name] =Pequot.gif
[type] =>
[tmp_name] =>
[error] =3
[size] =0
)

)

I am usiing code from the php manual.
Here is the php info http://chops.novatrope.com/info.php

<?php
// In PHP versions earlier than 4.1.0, $HTTP_POST_FILES should be used instead
// of $_FILES.

$uploaddir = '/usr/home/arthur/public_html/game/test/uploads/';
$uploadfile = $uploaddir . basename($_FILES['userfile']['name']);

echo '<pre>';
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
echo "File is valid, and was successfully uploaded.\n";
} else {
echo "Possible file upload attack!\n";
}

echo 'Here is some more debugging info:';
print_r($_FILES);

print "</pre>";

?>

and here is my html

<!-- The data encoding type, enctype, MUST be specified as below -->
<form enctype="multipart/form-data" action="getfile2.php" method="POST">
<!-- MAX_FILE_SIZE must precede the file input field -->
<input type="hidden" name="MAX_FILE_SIZE" value="1000000" />
<!-- Name of input element determines name in $_FILES array -->
Send this file: <input name="userfile" type="file" />
<input type="submit" value="Send File" />
</form>

Thanks,
Arthur Jacobs
st**@sonic.net

Jan 11 '07 #1
5 1869
Arthur Jacobs wrote:
Good day,

I am trying to upload a file to the server.
http://chops.novatrope.com/game/test/form2.html
Here is some more debugging info:Array
(
[userfile] =Array
(
[name] =Pequot.gif
[type] =>
[tmp_name] =>
[error] =3
[size] =0
)

)

I am usiing code from the php manual.
Here is the php info http://chops.novatrope.com/info.php
...........
>
Thanks,
Arthur Jacobs
st**@sonic.net
When I tried it just now, it went thru fine.

Hendri Kurniawan
Jan 11 '07 #2
Thank you -thank you! Mr. Kurniawan,
You are correct you put' test.txt' in! I had been trying for a week to
send a 50k gif and it gave me the error I posted. Do you know how I can
send a gif.?

Full of gratitude,
Arthur Jacobs

On 2007-01-11 14:22:19 -0800, Hendri Kurniawan <as****@email.comsaid:
Arthur Jacobs wrote:
>Good day,

I am trying to upload a file to the server.
http://chops.novatrope.com/game/test/form2.html
Here is some more debugging info:Array
(
[userfile] =Array
(
[name] =Pequot.gif
[type] =>
[tmp_name] =>
[error] =3
[size] =0
)

)

I am usiing code from the php manual.
Here is the php info http://chops.novatrope.com/info.php
..........
>>
Thanks,
Arthur Jacobs
st**@sonic.net

When I tried it just now, it went thru fine.

Hendri Kurniawan

Jan 12 '07 #3
Arthur Jacobs wrote:
Thank you -thank you! Mr. Kurniawan,
You are correct you put' test.txt' in! I had been trying for a week to
send a 50k gif and it gave me the error I posted. Do you know how I can
send a gif.?

Full of gratitude,
Arthur Jacobs

On 2007-01-11 14:22:19 -0800, Hendri Kurniawan <as****@email.comsaid:
>Arthur Jacobs wrote:
>>Good day,

I am trying to upload a file to the server.
http://chops.novatrope.com/game/test/form2.html
Here is some more debugging info:Array
(
[userfile] =Array
(
[name] =Pequot.gif
[type] =>
[tmp_name] =>
[error] =3
[size] =0
)

)

I am usiing code from the php manual.
Here is the php info http://chops.novatrope.com/info.php
..........
>>>
Thanks,
Arthur Jacobs
st**@sonic.net

When I tried it just now, it went thru fine.

Hendri Kurniawan

Hi,

I just re-test your PHP file.
It only works if the actual file is of 0 bytes.
Even a test file of 1 char will produce partial-file-upload error.

Just a hunch, check your max_input_time it should defaulted to 60 (ie. 1
minutes)
if you don't set it to anything.

Other than that I'm not sure wheter it's config error or not.
But your coding is correct. Maybe other people in th NG can help.

Hendri Kurniawan
Jan 12 '07 #4
Happy days are here again....
Good Day,

In case you run into this problem again have the person make sure their
var/log dir is not full. Mine was overflowing, and that was the whole
problem (my fault-no excuse). I want to thank you guys and gals for
your patience and help!

serene at last,
~arthur

On 2007-01-11 23:16:43 -0800, Hendri Kurniawan <as****@email.comsaid:
Arthur Jacobs wrote:
>Thank you -thank you! Mr. Kurniawan,
You are correct you put' test.txt' in! I had been trying for a week to
send a 50k gif and it gave me the error I posted. Do you know how I can
send a gif.?

Full of gratitude,
Arthur Jacobs

On 2007-01-11 14:22:19 -0800, Hendri Kurniawan <as****@email.comsaid:
>>Arthur Jacobs wrote:
Good day,

I am trying to upload a file to the server.
http://chops.novatrope.com/game/test/form2.html
Here is some more debugging info:Array
(
[userfile] =Array
(
[name] =Pequot.gif
[type] =>
[tmp_name] =>
[error] =3
[size] =0
)

)

I am usiing code from the php manual.
Here is the php info http://chops.novatrope.com/info.php

..........

Thanks,
Arthur Jacobs
st**@sonic.net
When I tried it just now, it went thru fine.

Hendri Kurniawan


Hi,

I just re-test your PHP file.
It only works if the actual file is of 0 bytes.
Even a test file of 1 char will produce partial-file-upload error.

Just a hunch, check your max_input_time it should defaulted to 60 (ie.
1 minutes)
if you don't set it to anything.

Other than that I'm not sure wheter it's config error or not.
But your coding is correct. Maybe other people in th NG can help.

Hendri Kurniawan

Jan 17 '07 #5
Happy days are here again....
Good Day,

In case you run into this problem again have the person make sure their
var/log dir is not full. Mine was overflowing, and that was the whole
problem (my fault-no excuse). I want to thank you guys and gals for
your patience and help!

serene at last,
~arthur

On 2007-01-11 23:16:43 -0800, Hendri Kurniawan <as****@email.comsaid:
Arthur Jacobs wrote:
>Thank you -thank you! Mr. Kurniawan,
You are correct you put' test.txt' in! I had been trying for a week to
send a 50k gif and it gave me the error I posted. Do you know how I can
send a gif.?

Full of gratitude,
Arthur Jacobs

On 2007-01-11 14:22:19 -0800, Hendri Kurniawan <as****@email.comsaid:
>>Arthur Jacobs wrote:
Good day,

I am trying to upload a file to the server.
http://chops.novatrope.com/game/test/form2.html
Here is some more debugging info:Array
(
[userfile] =Array
(
[name] =Pequot.gif
[type] =>
[tmp_name] =>
[error] =3
[size] =0
)

)

I am usiing code from the php manual.
Here is the php info http://chops.novatrope.com/info.php

..........

Thanks,
Arthur Jacobs
st**@sonic.net
When I tried it just now, it went thru fine.

Hendri Kurniawan


Hi,

I just re-test your PHP file.
It only works if the actual file is of 0 bytes.
Even a test file of 1 char will produce partial-file-upload error.

Just a hunch, check your max_input_time it should defaulted to 60 (ie.
1 minutes)
if you don't set it to anything.

Other than that I'm not sure wheter it's config error or not.
But your coding is correct. Maybe other people in th NG can help.

Hendri Kurniawan

Jan 17 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
2438
by: CHIN | last post by:
Hi all.. here s my problem ( maybe some of you saw me on other groups, but i cant find the solution !! ) I have to upload a file to an external site, so, i made a .vbs file , that logins to...
13
4281
by: Sky Sigal | last post by:
I have created an IHttpHandler that waits for uploads as attachments for a webmail interface, and saves it to a directory that is defined in config.xml. My question is the following: assuming...
4
2166
by: HNguyen | last post by:
Hi, I have a Web application in ASP.NET. My Application allows the users upload files into the server after checking their user names and passwords. For each transaction, the Web program will...
2
1380
by: Buddy Ackerman | last post by:
I'm have Windows 2000 Server and my website allows uploads of files (using <input type="file">) However I have some problems when a user trys to upload a large (>8MB) file. When the user submits...
18
4317
by: Jen | last post by:
I'm using Microsoft's own VB.NET FTP Example: http://support.microsoft.com/default.aspx?scid=kb;en-us;832679 I can get the program to create directories, change directories, etc., but I can't...
4
6245
by: Jonny | last post by:
Hello Group How do I open a Save File Dialog from an ASPX page behind a browse button? Any help would be fantastic!! I am using ASP.NET 1.1 using VB.NET as the coding language TIA
3
8374
by: MN | last post by:
Hello all - I'm hoping that someone knows the answer to this as I have not done this in ASP before. Basically, I need to select a csv file from my desktop through the "Browse.." button in my...
6
3031
by: Vic Spainhower | last post by:
Hello, I am trying to do a FTP file upload which works fine on my localhost but on my ISP server it fails. I can't seem to find where I can go to find the specific cause of the failure. In both...
3
19829
by: markus.rietzler | last post by:
i want to do (multiple) file upload(s) and display a progress bar. with firefox and safari it is no problem at all. only IE makes some problems. my script is based on ajax-uploader, which can be...
1
47353
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click...
0
7237
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,...
0
7137
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...
0
7417
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...
0
7506
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...
0
5659
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5063
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4734
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...
0
3219
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...
0
3210
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.