Uploading problem [message #1242] |
Tue, 26 March 2002 21:23 |
zerobits
Messages: 69 Registered: January 2002 Location: Malaysia
Karma: 0
|
Member |
|
|
when i tried to perform file upload, small size files ok, but when the file size is 5MB or more, the script doesn't work.
what could be wrong?
|
|
|
Re: Uploading problem [message #1244 is a reply to message #1242] |
Tue, 26 March 2002 21:51 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
zerobits wrote on Tue, 26 March 2002 4:23 PM | when i tried to perform file upload, small size files ok, but when the file size is 5MB or more, the script doesn't work.
what could be wrong?
|
Again problem with PHP, php has a problem uploading files with a size of over 2 megs. The reason being is that PHP uses A LOT of memory during the file upload and that causes a problem for the Apache & the PHP child.
The best solution is to use compression when uploading large files or break the files into smaller chunks.
P.S. FUDforum supports multiple attachments per message.
FUDforum Core Developer
|
|
|
Re: Uploading problem [message #1246 is a reply to message #1244] |
Wed, 27 March 2002 10:42 |
Olliver
Messages: 443 Registered: March 2002
Karma: 0
|
Senior Member |
|
|
Hi, another reason could be that upload_max_filesize in the php.ini is restricted to 5meg, which is also the file's default value (if unedited). U could check the setting with phpinfo() to see what it acually has been set to.
bye Ken
[Updated on: Wed, 27 March 2002 10:44] Report message to a moderator
|
|
|
|
Re: Uploading problem [message #29522 is a reply to message #29516] |
Thu, 29 December 2005 02:58 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
You can use FUDAPI to "emulate" addition of attachement to a message.
FUDforum Core Developer
|
|
|
|
Re: Uploading problem [message #29533 is a reply to message #29524] |
Thu, 29 December 2005 19:38 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Read the comments found inside the fudapi.inc.php script, they are quite detailed.
FUDforum Core Developer
|
|
|
Re: Uploading problem [message #30041 is a reply to message #29533] |
Tue, 31 January 2006 10:06 |
awadallah
Messages: 11 Registered: September 2005 Location: Palo Alto, CA
Karma: 0
|
Junior Member |
|
|
Ilia,
I read the comments in fudapi.inc.php and did what I describe below, but for some reason the attachment comes back a 0 byets.
1. I created a topic by userid test with no attachments, the message id is 770.
2. I ftp-ed the large attachment (video.wmv) to
//FUDforum/files
3. I ran the following PHP script (which is in same dir as fudapi at //FUDforum/scripts):
<?php
require("../include/GLOBALS.php");
require("./fudapi.inc.php");
$mid = 770;
print fud_update_message("test", "test", 0, "ahmed", $mid, null, array( "//FUDforum/files/video.wmv") )
?>
After I did this, I noticed that the function did run successfully since the topic subject and body got over-ridden with the "test" strings, and also the message now showed an attachment as:
Attachment: video.wmv
(Size: 18.99MB, Downloaded 0 time(s))
which reflects the correct size of the attachment.
However, when I right click on that file and click on "save targe as" what I get back is a file of size 0 bytes.
Please let me know what am I doing wrong ?
thx,
-- amr
|
|
|
Re: Uploading problem [message #30044 is a reply to message #30041] |
Tue, 31 January 2006 15:08 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
There are a few things to check, first check the files/ directory for the [file_id].attach file and see how big it is. Then check if your PHP has a memory limit and if so what is this limit set to.
FUDforum Core Developer
|
|
|