PHPfileuploader errors

Last post 08-21-2009, 1:20 AM by Adam. 11 replies.
Sort Posts: Previous Next
  •  06-19-2009, 3:56 AM 53289

    PHPfileuploader errors

    Hi,
     
    I'm testing phpfileuploader on our site and have a few problems.
     
    Using the single file upload example
     
    1) Uploading a 5 MB file displays a message box after the upload has taken place saying the file is too big (5.92 MB) although the max setting is 10MB
     
    2) On smaller files I get an error using the MoveTo or CopyTo functions
     
    Uploaded File:
    FileName : 1G34.pdf
    FileSize : 5206
    FilePath : /tmp/uploadertemp/persisted.442f2080-c1a6-4051-bc4f-4e440262a02a.1G34.pdf.resx

    Warning: copy(/documents) [function.copy]: failed to open stream: Permission denied in /home/charterh/public_html/phpfileuploader/phpuploader/include_phpuploader.php on line 729
     
    Any ideas?
     
    Regards,
    Cj
  •  06-19-2009, 7:26 AM 53293 in reply to 53289

    Re: PHPfileuploader errors

    cjmoore:
    1) Uploading a 5 MB file displays a message box after the upload has taken place saying the file is too big (5.92 MB) although the max setting is 10MB
    OK, resolved this bit, the max file size setting on the server is 2MB
  •  06-19-2009, 1:37 PM 53301 in reply to 53293

    Re: PHPfileuploader errors

  •  06-20-2009, 3:47 AM 53317 in reply to 53301

    Re: PHPfileuploader errors

    Thanks Adam but I have no control over the host max file limit.
     
    I'm more concerned with my 2nd problem, all files error with this type of warning
     
    2) On smaller files I get an error using the MoveTo or CopyTo functions
     
    Uploaded File:
    FileName : 1G34.pdf
    FileSize : 5206
    FilePath : /tmp/uploadertemp/persisted.442f2080-c1a6-4051-bc4f-4e440262a02a.1G34.pdf.resx

    Warning: copy(/documents) [function.copy]: failed to open stream: Permission denied in /home/charterh/public_html/phpfileuploader/phpuploader/include_phpuploader.php on line 729
     
    Thanks
    Cary
  •  06-20-2009, 1:10 PM 53320 in reply to 53317

    Re: PHPfileuploader errors

    Cary,
     
    You are probably getting this error because the permission on your directory are not setup correctly. You need to give "write" permission to the "documents" directory for your script to work properly.

    To do this, connect to your site with your FTP and give the documents directory permission to write with 777.

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  06-23-2009, 9:10 PM 53432 in reply to 53320

    Re: PHPfileuploader errors

    Hi Adam,
     
    After a bit of manipulation of the php scripts I've finally got it working.
     
    In include_phploader.php I had to modify the GetSystemTempFolder function....
     
    on my host system the upload_tmp_dir is null so I had to modify the path to my tmp folder
     
            if($str==null||strlen($str)==0)
                $str="/home/charterh/tmp";
     
    and then in the single/multiplefiles scripts I had to use
     
    $mvcfile->MoveTo("/home/charterh/uploads/".$mvcfile->FileName);
     
    instead of
     
    $mvcfile->MoveTo("/uploads");
     
    Make sense?
     
    Regards,
    Cary
  •  06-23-2009, 9:35 PM 53435 in reply to 53432

    Re: PHPfileuploader errors

    Cary:
     
    You can set the :
     
    $uploader->TempDirectory="/home/charterh/tmp";
     
    instead of modifying the source. Otherwise you need modify it again if you upgrate the product.
     
    The MoveTo method just use the move function , so the parameter should be a full path instead of a directory.
     
    Regards,
    Terry
  •  06-24-2009, 4:39 AM 53450 in reply to 53435

    Re: PHPfileuploader errors

    $uploader->TempDirectory="/home/charterh/tmp";
     This doesn't work for me, I changed the GetSystemTempFolder back to the original and tried the above and nothing happens, the file uploads "somewhere" but after the upload the "Uploaded File:" information doesn't appear.
     
    The MoveTo method just use the move function , so the parameter should be a full path instead of a directory.
    Looking at the source the MoveTo function use the rename function ie. rename($this->FilePath,$newpath);
     
    If I use $mvcfile->MoveTo("/home/charterh/uploads"); I get this error:
     
    Warning: rename(/home/charterh/tmp/uploadertemp/persisted.e980b51f-cf0c-48d7-bdbb-a655293f5944.IMAG0084.jpg.resx,/home/charterh/uploads) [function.rename]: Is a directory
     
    Which looks like the error is caused by trying to rename a file to a directory which is why I now use
     
    $mvcfile->MoveTo("/home/charterh/uploads/".$mvcfile->FileName);
     
    Full Path + filename.
     
    Regards,
    Cary
     
     
     
     
     
     
     
     
     
  •  06-24-2009, 12:49 PM 53472 in reply to 53450

    Re: PHPfileuploader errors

    Cary,
     
    Please download the control again.
     
    We have improved a little on the TempDirectory issue.
     
    Regards,
    Terry
     
  •  06-24-2009, 6:24 PM 53483 in reply to 53472

    Re: PHPfileuploader errors

    Perfect, worked first time.
     
    Thanks,
    Cary.
  •  08-19-2009, 5:26 AM 54796 in reply to 53289

    Re: PHPfileuploader errors

    hi Cj,
    I hope someone can help me here.
    I have the same problem.
    My file limit is 15MB.
     
    I have tweaked php.ini according to the manual.
    my php setting now are:
     
    file_uploads : on
    max_execution_time : 300
    max_input_time : 300
    memory_limit : 64M
    post_max_size : 16M
    upload_max_filesize : 16M
     
    I don't know what else is wrong here. I want my users to be able to upload max 15mb of file and now when I try to upload a 3mb file (which takes about 1 min and 10 seconds), it says the 3mb is too large while file size limit is 15M !
     
    Isn't that strange??
     
    Please help.
     
    Sean 
     
  •  08-21-2009, 1:20 AM 54885 in reply to 54796

    Re: PHPfileuploader errors

    seancs:
    hi Cj,
    I hope someone can help me here.
    I have the same problem.
    My file limit is 15MB.
     
    I have tweaked php.ini according to the manual.
    my php setting now are:
     
    file_uploads : on
    max_execution_time : 300
    max_input_time : 300
    memory_limit : 64M
    post_max_size : 16M
    upload_max_filesize : 16M
     
    I don't know what else is wrong here. I want my users to be able to upload max 15mb of file and now when I try to upload a 3mb file (which takes about 1 min and 10 seconds), it says the 3mb is too large while file size limit is 15M !
     
    Isn't that strange??
     
    Please help.
     
    Sean 
     
     
    For large file uploading, please check the following article:
     
     
    After modifying php.ini file, please make sure you save it before closing the file.

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

View as RSS news feed in XML