A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: php upload problem

  1. #1
    Senior Member
    Join Date
    Sep 2002
    Posts
    185

    php upload problem

    Hi,

    I've got an upload class in php. It works great for files smaller then 10MB,
    but once the file is larger then this, ....

    I've build in a error message when people hit the submit button without selecting a file the text 'no files being send' should appear. it is this text that
    appears when files are being uploaded larger then 10MB. ( this means that my php class has recieved no files for upload ex. fileNum==0 ) in the class I've set the max upload to something like 9999999999999999. Is there a setting in php that causes this to happen?

    for the once who are intrested:

    http://download.netdust.be/uploadClass.zip

    thx,
    P
    I think...I dreamed...in pixels last night...

  2. #2
    Member
    Join Date
    Feb 2004
    Posts
    47
    If you look at phpinfo there are 2 settings in php core:

    upload_max_filesize is set to 16M on mine, I think this is probably what you are having problems with.

    post_max_size is less likely but could be the problem.

    There may be some way of splitting the file in Flash before upload, but I wouldn't bet on it. Another option would be to use a Flash socket plugin (usually the server side is written in java) these are typically used for p2p speech and streaming video, etc but could theoretically be used to transfer files.

  3. #3
    Member
    Join Date
    Feb 2004
    Posts
    47
    I just thought of another possibility, but I've never tried it. You could use FTP. You can decompile an swf to get the password out of it, so if you do use FTP, make sure you either don't care about people finding out the username / password or it's anonymous and only to 1 folder and only temporarily stored there before being moved by php.

  4. #4
    Registered User
    Join Date
    Feb 2001
    Posts
    13,039
    Hi,

    I once ran into the same sitution - after the hosting company had changed settings for 50 MB max, some uploads in the 10 MB region would work and others fail - and no chance to get the real big thing over.
    I did not feel like reading php source or gdb'ing php within apache, and I was even less inclined to talk the hosting company into using my patches afterwards.
    So I replaced the php upload by a cgi one. The benefit: since I read data with my own code, I can stop unauthorized uploads before they consume much bandwidth. The challenge: since the server uses suexec, the cgi scripts cannot read php session files to determine whether an upload is authorized

    Musicman

  5. #5
    Senior Member
    Join Date
    Sep 2002
    Posts
    185
    Hi,

    The problem is solved (max_post was back to 8MB). I should learn to check server settings. My client is managing the server and they switched to an other one. Took me a lot of time to fix errors witch weren't errors but server settings who had changed...

    For now I'm sticking to php, I'm just getting the hang of it... but in the future you never know.
    thx,
    P-sch1ft
    I think...I dreamed...in pixels last night...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center