By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,712 Members | 1,503 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,712 IT Pros & Developers. It's quick & easy.

Uploading large files

P: n/a
Hi

For a CMS admin tool I would like to provide a possibility to upload large
files to a directory on the webserver. As HTTP uploads are limited in file
size and also not comfortable in handling, I thought of an FTP solution.

Displaying a link to ftp://mydomain.com/mydirectory is easy but limited to
browsers who can act as FTP clients, such as Internet Explorer.

When looking at PHP's FTP functions and googling for web-based FTP
applications it looks like they all need an HTTP upload to get the data to
the webserver which acts as an FTP client then.

Java applets usually provide the whole FTP functionality, but I don't want
the user to do something else than uploading files; and I don't speak Java
so I could adapt an applet to my needs.

I thought of a PHP script that could act as something like an intermediate
client: Establish the connection between the FTP server and the remote
computer. But I don't think this is possible.

I would be very happy to get pointed to better ideas on that. How do you
handle large file uploads?

--
Markus
Jul 17 '05 #1
Share this Question
Share on Google+
9 Replies


P: n/a
Markus Ernst napisał(a):
Hi

For a CMS admin tool I would like to provide a possibility to upload large
files to a directory on the webserver. As HTTP uploads are limited in file
size and also not comfortable in handling, I thought of an FTP solution.

Displaying a link to ftp://mydomain.com/mydirectory is easy but limited to
browsers who can act as FTP clients, such as Internet Explorer.

When looking at PHP's FTP functions and googling for web-based FTP
applications it looks like they all need an HTTP upload to get the data to
the webserver which acts as an FTP client then.

Java applets usually provide the whole FTP functionality, but I don't want
the user to do something else than uploading files; and I don't speak Java
so I could adapt an applet to my needs.

I thought of a PHP script that could act as something like an intermediate
client: Establish the connection between the FTP server and the remote
computer. But I don't think this is possible.

I would be very happy to get pointed to better ideas on that. How do you
handle large file uploads?


try this:

edit php.ini
;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;

; Whether to allow HTTP file uploads.
file_uploads = On

; Temporary directory for HTTP uploaded files (will use system default
if not
; specified).
upload_tmp_dir = I:\temp

; Maximum allowed size for uploaded files.
upload_max_filesize = 2M

Jul 17 '05 #2

P: n/a
Kasjan wrote:
try this:

edit php.ini


Thank you for this input. As I am on shared hosting I can't change the ini
settings; and then there is still the limitation that HTTP uploads are not
convenient at large file sizes (such as 10 MB plus), so I hope to find a
non-HTTP solution.

--
Markus
Jul 17 '05 #3

P: n/a
"Markus Ernst" <derernst@NO#SP#AMgmx.ch> writes:
and then there is still the limitation that HTTP uploads are not
convenient at large file sizes (such as 10 MB plus), so I hope to find a
non-HTTP solution.


Why do you say that? I routinely do HTTP uploads that size. Why do you
really think FTP would work better?

--
Make that pile of digital photos presentable: http://ourdoings.com/
It's quicker and easier than you think.
Jul 17 '05 #4

P: n/a
Bruce Lewis wrote:
"Markus Ernst" <derernst@NO#SP#AMgmx.ch> writes:
and then there is still the limitation that HTTP uploads are not
convenient at large file sizes (such as 10 MB plus), so I hope to
find a non-HTTP solution.


Why do you say that? I routinely do HTTP uploads that size. Why do
you really think FTP would work better?


Because you don't get any feedback on the state of the upload. As the upload
can easily take several minutes, you have to wait and don't see if the
upload is still going on or your browser crashed.

--
Markus
Jul 17 '05 #5

P: n/a
"Markus Ernst" <derernst@NO#SP#AMgmx.ch> wrote in
news:41***********************@news.easynet.ch:
Thank you for this input. As I am on shared hosting I can't change the
ini settings; and then there is still the limitation that HTTP uploads
are not convenient at large file sizes (such as 10 MB plus), so I hope
to find a non-HTTP solution.


AFAIK, you will not be able ot find a non-HTTP solution.

If the lack of feedback during file upload is your main concern, you can
try browsing a couple of classes at www.phpclasses.org , perhaps even
http://www.phpclasses.org/browse/package/1554.html or just do a search for
'progress bar'. I haven't tried any of these, but I think that's what you
are after if indeed your big gripe is the lack of client/server feedback.

If you wanted to go non-HTTP for file uploads, you'd have to run a totally
seperate program outside of the web-browser (or a java applet within it).

Good luck...
Jul 17 '05 #6

P: n/a
"Markus Ernst" <derernst@NO#SP#AMgmx.ch> writes:
Because you don't get any feedback on the state of the upload. As the upload
can easily take several minutes, you have to wait and don't see if the
upload is still going on or your browser crashed.


Ah, sounds like an Internet Explorer problem. Since creating the site I
do big uploads to, I've been using firefox. A progress bar on the lower
right shows the status of the upload.

--
Make that pile of digital photos presentable: http://ourdoings.com/
It's quicker and easier than you think.
Jul 17 '05 #7

P: n/a
> Thank you for this input. As I am on shared hosting I can't change the
ini
settings;


Have you tried .htaccess to change the setting? Even if you can't edit
php.ini many shared hosting services will allow .htaccess files
(assuming this is apache, of course).

--cd
Jul 17 '05 #8

P: n/a
Bruce Lewis <br*****@yahoo.com> wrote in
news:nm*************@biohazard-cafe.mit.edu:
"Markus Ernst" <derernst@NO#SP#AMgmx.ch> writes:
Because you don't get any feedback on the state of the upload. As the
upload can easily take several minutes, you have to wait and don't
see if the upload is still going on or your browser crashed.


Ah, sounds like an Internet Explorer problem. Since creating the site
I do big uploads to, I've been using firefox. A progress bar on the
lower right shows the status of the upload.


i don't think is necessarily true, in that the progress bar can reach
maximum before a large file is uploaded....
Jul 17 '05 #9

P: n/a
Good Man wrote:
"Markus Ernst" <derernst@NO#SP#AMgmx.ch> wrote in
news:41***********************@news.easynet.ch:
Thank you for this input. As I am on shared hosting I can't change
the ini settings; and then there is still the limitation that HTTP
uploads are not convenient at large file sizes (such as 10 MB plus),
so I hope to find a non-HTTP solution.


AFAIK, you will not be able ot find a non-HTTP solution.

If the lack of feedback during file upload is your main concern, you
can try browsing a couple of classes at www.phpclasses.org , perhaps
even http://www.phpclasses.org/browse/package/1554.html or just do a
search for 'progress bar'. I haven't tried any of these, but I think
that's what you are after if indeed your big gripe is the lack of
client/server feedback.

If you wanted to go non-HTTP for file uploads, you'd have to run a
totally seperate program outside of the web-browser (or a java applet
within it).

Good luck...


Thanks... I had a look at the phpclasses.org classes, they both just draw
the progress bar, but don't make any relation to a file upload, which seems
to be impossible with PHP. But now I found a small app that uses a Perl
functionality for this:

http://www.raditha.com/php/progress.php/

Raditha also has a very interesting article at his site on building a
web-based FTP app with PHP, where (s)he points out very clearly why PHP/FTP
uploads need an HTTP upload first. And Raditha's company provides a
drag-and-drop upload applet (better than what I was looking for...) at very
reasonable pricing:

http://www.radinks.com/upload/

Thanks all for the discussion.

--
Markus
Jul 17 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.