FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » Uploading problem
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Uploading problem [message #1242] Tue, 26 March 2002 21:23 Go to next message
zerobits is currently offline  zerobits   United Kingdom
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 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
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 Go to previous messageGo to next message
Olliver   Germany
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 #29516 is a reply to message #1244] Tue, 27 December 2005 08:36 Go to previous messageGo to next message
awadallah is currently offline  awadallah   United States
Messages: 11
Registered: September 2005
Location: Palo Alto, CA
Karma: 0
Junior Member


I am also encountering this problem, however, I was wondering if there is a work around solution through ftp ?

I mostly post large files to the forum my self rather than expect my visitors to post the files.

If I ftp the file into the FUDforum/files then rename it to something.atch (like all the other files in there), then how can I refer to it in my post ?

Thanks,

-- amr
Re: Uploading problem [message #29522 is a reply to message #29516] Thu, 29 December 2005 02:58 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
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 #29524 is a reply to message #29522] Thu, 29 December 2005 05:43 Go to previous messageGo to next message
awadallah is currently offline  awadallah   United States
Messages: 11
Registered: September 2005
Location: Palo Alto, CA
Karma: 0
Junior Member


cool, can you please provide more details (like a short cook book) on how to use FUD API to do that. I am sure other users would appreciate learning about that too. (I am also a bit clueless on where to start).

thx,

-- amr
Re: Uploading problem [message #29533 is a reply to message #29524] Thu, 29 December 2005 19:38 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
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 Go to previous messageGo to next message
awadallah is currently offline  awadallah   United States
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 Go to previous message
Ilia is currently offline  Ilia   Canada
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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Warning on msg.php
Next Topic: attachments not usable
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 07:25:47 GMT 2024

Total time taken to generate the page: 0.02159 seconds