r00tk1LL Posted August 14, 2007 Share Posted August 14, 2007 I know there are allot of scripts out there for a PHP progress bar, most implementing CGI but I have not had any success with them. Does anyone know of a surefire way to implement a progress bar for PHP that works with a simple html form? Quote Link to comment https://forums.phpfreaks.com/topic/64855-php-upload-progress-bar/ Share on other sites More sharing options...
dbo Posted August 14, 2007 Share Posted August 14, 2007 I could be wrong but I was under the impression that these are mainly javascript... Quote Link to comment https://forums.phpfreaks.com/topic/64855-php-upload-progress-bar/#findComment-323603 Share on other sites More sharing options...
NArc0t1c Posted August 14, 2007 Share Posted August 14, 2007 AJAX. Â http://www.google.com/search?q=AJAX+and+PHP+Uploader Quote Link to comment https://forums.phpfreaks.com/topic/64855-php-upload-progress-bar/#findComment-323615 Share on other sites More sharing options...
dbo Posted August 14, 2007 Share Posted August 14, 2007 Like I said... Javascript Quote Link to comment https://forums.phpfreaks.com/topic/64855-php-upload-progress-bar/#findComment-323620 Share on other sites More sharing options...
NArc0t1c Posted August 14, 2007 Share Posted August 14, 2007 Ajax - Asynchronous JavaScript and XML Quote Link to comment https://forums.phpfreaks.com/topic/64855-php-upload-progress-bar/#findComment-323627 Share on other sites More sharing options...
dbo Posted August 14, 2007 Share Posted August 14, 2007 Thank you for spelling out the acronym for me but I've done Ajax development in the past. It's just a buzzword. The httprequest oject has been around for ages and the XML piece is irrelevant. It could just as easily be a flat file or database rather than xml. Quote Link to comment https://forums.phpfreaks.com/topic/64855-php-upload-progress-bar/#findComment-323630 Share on other sites More sharing options...
r00tk1LL Posted August 14, 2007 Author Share Posted August 14, 2007 Ok guys, do you know of one that works for sure? Quote Link to comment https://forums.phpfreaks.com/topic/64855-php-upload-progress-bar/#findComment-323864 Share on other sites More sharing options...
NArc0t1c Posted August 14, 2007 Share Posted August 14, 2007 You will have to search google. Quote Link to comment https://forums.phpfreaks.com/topic/64855-php-upload-progress-bar/#findComment-323957 Share on other sites More sharing options...
d22552000 Posted August 14, 2007 Share Posted August 14, 2007 see... php 5.1.2.0 was compiled WITHOUT one important C header file that would make it possible for php to be used with ajax asa per request platform  Either you recompile php with 5.1.2 and the cuproq.c and cuproq.h files, or you find another wya of doing it, without ajax or cgi... Quote Link to comment https://forums.phpfreaks.com/topic/64855-php-upload-progress-bar/#findComment-323961 Share on other sites More sharing options...
NArc0t1c Posted August 14, 2007 Share Posted August 14, 2007 see... php 5.1.2.0 was compiled WITHOUT one important C header file that would make it possible for php to be used with ajax asa per request platform  Either you recompile php with 5.1.2 and the cuproq.c and cuproq.h files, or you find another wya of doing it, without ajax or cgi... What? <?php echo '<script language="Javascript" type="text/javascript"> Ajax here.. </script>'; ?> Quote Link to comment https://forums.phpfreaks.com/topic/64855-php-upload-progress-bar/#findComment-323965 Share on other sites More sharing options...
r00tk1LL Posted August 14, 2007 Author Share Posted August 14, 2007 I have looked around and found allot of scripts that either implement poorly, or just don't work. Have you guys seen this done before on a php/mysql site? Â All I really need is something that shows a progress bar while my HTML form is uploading a file to it's temp directory (or wherever it goes), then pass it off to a php script that will handle moving the file to the right directory. Â Any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/64855-php-upload-progress-bar/#findComment-323972 Share on other sites More sharing options...
d22552000 Posted August 14, 2007 Share Posted August 14, 2007 as I said above, its not supported in php. It doesnt work properly and sometimes you will get notices and warnings in your scripts. thats is, the html and xml part of it. Quote Link to comment https://forums.phpfreaks.com/topic/64855-php-upload-progress-bar/#findComment-323982 Share on other sites More sharing options...
r00tk1LL Posted August 14, 2007 Author Share Posted August 14, 2007 Ok what alternatives are there to accomplish this? I tried some CGI stuff and it worked fairly well, but I couldn't get it to work with PHP for the life of me. Especially passing variables between them. Quote Link to comment https://forums.phpfreaks.com/topic/64855-php-upload-progress-bar/#findComment-324006 Share on other sites More sharing options...
d22552000 Posted August 14, 2007 Share Posted August 14, 2007 I would suggest, don't use php if you want a progress bar, or recompile php, or dont use an upload progress bar (that was my choice). Quote Link to comment https://forums.phpfreaks.com/topic/64855-php-upload-progress-bar/#findComment-324008 Share on other sites More sharing options...
r00tk1LL Posted August 14, 2007 Author Share Posted August 14, 2007 I have a hosted account so I dont think recompiling is an option, do you know how to make PHP and CGI talk? Quote Link to comment https://forums.phpfreaks.com/topic/64855-php-upload-progress-bar/#findComment-324010 Share on other sites More sharing options...
d22552000 Posted August 14, 2007 Share Posted August 14, 2007 you can't unless you make cgi unload ALL of its variables to a text file and then make php read thattext file every time you want them to talk... althoguh if hte cgi redirects to a url iwth variables..? you could use $_GET['var'] in php... Quote Link to comment https://forums.phpfreaks.com/topic/64855-php-upload-progress-bar/#findComment-324011 Share on other sites More sharing options...
dbo Posted August 14, 2007 Share Posted August 14, 2007 What are you even talking about PHP not being compiled with this or that? That is totally irrelevant to being able to use Ajax. You need to check out the Javascript/Ajax forum. Quote Link to comment https://forums.phpfreaks.com/topic/64855-php-upload-progress-bar/#findComment-324045 Share on other sites More sharing options...
cooldude832 Posted August 14, 2007 Share Posted August 14, 2007 you can't use php in this case for the fact that php can't produce output (visiable output) until the doc is loaded. You can use ajax to query the file's progress and then using an updating div in javascript or come up with a java/flash solution Quote Link to comment https://forums.phpfreaks.com/topic/64855-php-upload-progress-bar/#findComment-324047 Share on other sites More sharing options...
dbo Posted August 14, 2007 Share Posted August 14, 2007 Exactly. Although I've got to be honest I've never really seen much of a need for a progress bar to begin with. Quote Link to comment https://forums.phpfreaks.com/topic/64855-php-upload-progress-bar/#findComment-324050 Share on other sites More sharing options...
cooldude832 Posted August 14, 2007 Share Posted August 14, 2007 slow down to tell someone how slow a upload is going. And in a cooperate huge file upload the idea seems a bit childish. Quote Link to comment https://forums.phpfreaks.com/topic/64855-php-upload-progress-bar/#findComment-324052 Share on other sites More sharing options...
dbo Posted August 14, 2007 Share Posted August 14, 2007 I don't understand what you just said. Â With broadband most forms don't hang long enough for it to matter most of the time and if it's a user with dial up the less bandwidth being used on extra stuff (progress bar) the better. Quote Link to comment https://forums.phpfreaks.com/topic/64855-php-upload-progress-bar/#findComment-324058 Share on other sites More sharing options...
cooldude832 Posted August 14, 2007 Share Posted August 14, 2007 okay you said what i said. Why waste the bandwidth to use a status bar. Quote Link to comment https://forums.phpfreaks.com/topic/64855-php-upload-progress-bar/#findComment-324067 Share on other sites More sharing options...
Barand Posted August 14, 2007 Share Posted August 14, 2007 I'm using 5.1.2 and no problems with ajax. The xmlhttp object is client side, nothing to do with php. Â php just receives a query string, processes accordingly then echos output. Â Everything else is handled on the client. Quote Link to comment https://forums.phpfreaks.com/topic/64855-php-upload-progress-bar/#findComment-324114 Share on other sites More sharing options...
r00tk1LL Posted August 15, 2007 Author Share Posted August 15, 2007 Ok, so I have users that upload files over 3MB and I need a way to show the progress, so what is the best option when I have PHP/MYSql based site?    Quote Link to comment https://forums.phpfreaks.com/topic/64855-php-upload-progress-bar/#findComment-324182 Share on other sites More sharing options...
cooldude832 Posted August 15, 2007 Share Posted August 15, 2007 like I said java or flash that integrated the file upload into it will be your best bet, you can somehow use them and then send off ajaxs to run the file handling after the user has it placed in a temp spot. Quote Link to comment https://forums.phpfreaks.com/topic/64855-php-upload-progress-bar/#findComment-324184 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.