March 25, 201115 yr Is something like this using "APC" http://www.johnboy.com/php-upload-progress-bar/ our only real option for UP bars in PHP? Any of you got any particularly good solutions that you've stumbled across?
March 25, 201115 yr You can also use the uploadprogress PECL module. In my experience, uploadprogress is better for larger files. But you get a lot of additional benefits from having APC installed.
March 25, 201115 yr Author When you say "larger files" ... I'm specifically looking at about 2mb at the moment, possibly eventually 3 or 4. So I guess APC is the way to go....? Cheers Jock.
March 26, 201115 yr Yeah apc will be fine, I'm talking about 30Mb+. Thats just from personal experience too, others might have had better luck, but the 2 sites I support who have ajax upload progress both run uploadprogress and APC. I've turned off APC RFC thing for uploads and just use upload progress for the progress but still use APC for opcode cache.
March 26, 201115 yr Author Yeah apc will be fine, I'm talking about 30Mb+. Thats just from personal experience too, others might have had better luck, but the 2 sites I support who have ajax upload progress both run uploadprogress and APC. I've turned off APC RFC thing for uploads and just use upload progress for the progress but still use APC for opcode cache. Ah cool. Just contacted my hosting company though which I've always been pleased with and doesn't look like they want to install it. They said APC looks like it's to do with PHP caching and they reckon it would compromise security for whatever reason (don't know about that myself). I've explained to them what I want to do and waiting for them to get back to me. Edit - ah forgot to ask them about the other one PECL - maybe they'll do that one. Edited March 26, 201115 yr by Gibson
March 26, 201115 yr LOL Hope that makes sense, I was drunk when I wrote it... I'm surprised your hosting company don't already have it installed, PHP performs much better with it. There are no known security issues with APC whatsoever (if there was they would be fixed because its actively maintained). To my knowledge there haven't been any before so I don't know what they're talking about (probably neither do they). It comes as a PECL package so its easy to install, its only 1 command 'pecl install APC' The only reason I can think that they wouldn't want to install it is it uses extra memory because it caches to memory, but were only talking a few MB. If they were worried about that then they could always disable it globally but enable it for your account. Its going to be bundled by default with PHP6 so they better get used to running it.
March 26, 201115 yr Author LOL Hope that makes sense, I was drunk when I wrote it... and not a spelling mistake in sight! Hmmm.... ok I might put what you've told me to my hosting company then. They didn't seem too familiar with the APC thing. Big question mark over them at the moment then. Let's see whether I can persuade them. Cheers Jock.
March 26, 201115 yr Author Hmmm just checked my mails - they say "Unfortunately APC cannot be installed on our servers". They are suggesting I go for a PERL solution similar to this My link Might have to shop around for another host who is willing to install it I think.... Edited March 26, 201115 yr by Gibson
March 26, 201115 yr Author You can make a pretty feature packed uploader using uploadify - although that uses a combination of Flash and JQuery. Cheers Rallport - that looks good. I also found one called "SWFUpload" which unlike uploadify seems to degrade gracefully if Flash isn't present. This is for an artist's site which will have many members, and knowing artists I would estimate that a few of them might not have Flash or might not have the required version (artists especially middle aged ones are likely to run older machines etc.). In your experience could I use Uploadify and say use swfobject to overlay it on top of my existing vanilla php upload form? I can't find any documentation about this on the uploadify site.
April 5, 201115 yr Author Yer SWF does degrade better granted and looks kinda similar to it aswell. I used it a lot in the past for personal stuff. I guess you could use some of the built in error handlers (never tried this myself) or even detect for the present of flash and display a normal file input if n one is found. If it's a customer facing site I tend to stick with the more typical ajax based file uploads. I kinda forced myself to go with Uploadify in the end because it seems to be the "standard" one people use of this Flash type. It was a bit of a tank I thought to get running properly - lots of mucking about with pathways (if you change the locations of the original stuff which I needed to do), but it seems good now. Quite pleased with it. What do you mean "Typical Ajax based File Uploads"? Have you got an example - one you'd recommend?
April 5, 201115 yr I can send u an AJAX file upload script but it still needs APC or UploadProgress to be enabled.
April 5, 201115 yr Author I can send u an AJAX file upload script but it still needs APC or UploadProgress to be enabled. Ah ok. So the Ajax ones rely on APC or UploadProgress. Cheers - guess I can only investigate those realistically once I find a hosting company willing to implement them.
Create an account or sign in to comment