Jump to content

Recommended Posts

I want to allow my customers to upload large files to their directory - could be anywhere between 100MB and 300MB. I am pretty sure that if I attempted to do that with a simple upload form in php with my current host the php script would be running for so long that they would disable scripting on the account as they have a thing about "permanent server processes".

 

I don't like to offer regular ftp login details as an option as there is nothing stopping the customer uploading a php file that can access the rest of the server and delete files.

 

Would a php based ftp solution solve this problem? i.e It would be able to check filetypes before accepting the upload - but would it still have the same problems with running the script past the limit the host allows?

Link to comment
https://forums.phpfreaks.com/topic/188322-uploading-really-large-files/
Share on other sites

PHP has a configuration setting for the maximum upload file size - way below 100MB by default (usually hovering around 16MB or so I think).  You can no doubt ask for this to be increased, but I'd be impressed if your host upped it to 100MB, never mind 300MB.  And as you've already noted the page would need to be open for the entire duration of the upload, you could probably find a script out there which will generate a dynamic progress bar or something similar.

 

I'd suggest setting up an FTP account for these users, and just restricting them to one directory - there's nothing particularly risky about this method, especially if you move it outside of the www root so that it can't be accessed and run from the web.

Using ftp requires your users to have access to an ftp client (and be able to set it up). Using ftp functions through a server side script within a browser will still require the user to upload a file to the server. Server side ftp is used to transfer files from the server to another ftp server. PHP is server side, not client side!

 

For large file uploads I often use http://uber-uploader.sourceforge.net/

This at least shows the progress of the file upload.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.