Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Upload - checklist of things to watch out for

Status
Not open for further replies.

whinger74

Programmer
Aug 13, 2002
25
GB
Hi,
I am trying to upload files to a Linux server running PHP and Apache, but I can't currently do it with files greater than 5119 bytes. (if I try to upload something that's 5020 bytes I get error code 1)
I was just wondering wether I'm missing something from my lovely checklist:

HTML:
MAX_FILE_SIZE hidden form field (I'm not actually using this at all, as I've read a couple of bad things about it!)

php.ini file:
upload_max_filesize
post_max_size

Apache configuration directive:
LimitRequestBody 3024000

Is there anything else I might have missed?
Thanks as always
 
Just print_r($_FILES); and check the error status that your file have!

From that you can understand if the file is uploaded or there is another problem!

Check this first! and then I can help you more!

I do not thing that you forget something from this list!

:)
 
Thanks for reading.
I said before: "if I try to upload something that's 5020 bytes I get error code 1"
i.e.
Array
(
[userfile] => Array
(
[name] => uploadthis.txt
[type] =>
[tmp_name] =>
[error] => 1
[size] => 0
)

)

 
Value: 1; The uploaded file exceeds the upload_max_filesize directive in php.ini

if you check the php manual for file uploading you can check the error codes!

number 1 is in php.ini!

maybe create a file with phpinfo(); inside and check the size in there! :)

Hope it helps!: )
 
Because the upload_max_filesize was in my checklist this was obvously something I'd checked. The master value was 60M, and the local was 0, but even though I've changed them both now to 60M, uploads of 5220 bytes and over are still failing :(
 
Can you show me exacly what you have in the Configuration file!

I mean you have 60M?

If yes try useing in bytes!

60000000 and check if this is ok!


And again check the error is in 1 still?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top