473,396 Members | 1,853 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,396 software developers and data experts.

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 1867
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
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
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
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
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
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
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
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
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
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
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
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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
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,...

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.