I'm trying on a project, that i need to create a progress bar while uploading some file with php.
I find this example;
http://www.johnboy.com/php-upload-progress-bar/
But the progress bar is not working in my PHP 5.4 local server, or any my internet server that PHP5.4 too.
I have knowladge about the bar building like width: x% but i cant get the progress variable.
Is there any code that i can check the file's uploaded size, while i'm uploading it?
theCurrentUploadedSize($_FILES["thefile"]);
or like
theCurrentSize("path/to/thefile/whileuploading");
Any help or link might help me, i dont have any knowladge about file management with php.
-----------Solved-----------------
The problem was about the APC add-on for the PHP. If you have such problem, look for how to install Alternative PHP Cache Add-on.
have you had a look at the upload progress functionallit built into PHP since 5.4?
There is a good description at http://oliversmith.io/technology/2011/12/04/php-5-4-file-upload-progress-and.html5-progress-bars/
Related
I want to write a simple custom file upload progress code in a PhP, JQuery environment. My server host runs only PhP 5.2 or 5.3. The following is not supported: http://www.php.net/manual/en/session.upload-progress.php. It requires PhP 5.4. Yes, I am on Godaddy shared web hosting.
My question is, how to get around this. Surely file upload progress bars existed before 5.4. I do not want to invest time in something outdated either. I would prefer writing raw code myself, instead, but only if required. I was thinking of writing code to manually check the file sizes of the temporary files and use it in the progress bars. Since that would be low-level coding, it should run on any version of PhP. Is this a good and feasible approach? Or there are better ways. Please reply.
I have been looking for AGES trying to find a progress bar i can easily integrate without having to downloads libraries like APC etc.
Does anyone know a really simple PHP progress bar i can integrate with ease into my current code?
Massive Thanks!!!
First of all, You need to search inside JS plug-ins not PHP. That's why you did't find anything: there is no "progress-bar for PHP".
Instead, there are bunch of free jQuery (especially Ajax based) upload plugins. Here are some of them
http://www.uploadify.com/
http://valums.com/ajax-upload/
http://blueimp.github.com/jQuery-File-Upload/
If you want to have a true (server side) progress bar, you will have to install the libraries you mentioned.
You can however fake it, if the client knows how large the file is and how much it has transferred already.
Plupload is one with multiple engines (HTML5, Flash, Silverlight etc.) and is being integrated via jquery
This would be one http://pixeline.be/experiments/jqUploader/test.php
Check this out:
http://valums.com/ajax-upload/
It doesn't require APC or any other external PHP libraries and you can get file progress feedback on a shared host.
I have my own video sharing app,
My question is... is there any library,script or something else, to help me in rotating videos whatever their file extension is?
Many peoples are uploading videos but sometimes i found video (guessing shared with iphones or mobile phones) and i see them horizontally instead of vertically...
Does anyone have any ideas how to rotate them dynamically?
Im not familiar with any "libraries" that will do that. I think your better bet would be to find a command-prompt-enabled video software package (like Any Video Converter [See Q7]) that PHP can execute via command prompt on the fly.
PHP doesn't do that, and there are no extensions that I know off, made for that purpose.
You can use ffmpeg to manipulate videos, by calling it from your scripts (see shell_execute() and such functions). Reading the ffmpeg documentation will help you figure what can (and can't) be done with that powerful tool.
How get frame from animate SWF to JPEG(or better animate GIF), using PHP. Possible using ffmpeg? Thanks.
This is not really possible without using a Windows box to open the file and capture a screenshot of the file. If you can convert the .swf to .flv then you can use ffmpeg to pull a frame, but if it is something like a game, well yea you are sort of out of luck unless you can setup (or are on) a Windows box.
I will try and find my code I used for windows to capture a screenshot, which worked in Windows 7 and XP and post it here, will have to wait till later as I do not have access to my backup files right now.
You might also take a look at this thread: Website screenshots using PHP
i ahave a form in which i need to upload the files of 50 mb, for which I want to use Uber uploader as it supports upload more than 10mb , but I am unaware of how to integrate the uber uploader in my project.. I am new to this and PECL and APC things used in project, I also cam to know that it needs linux server, which my client dont have he uses windows server..
please guideme to integrate the uber uploader into my php project...
Does it really need to be that particular product? It looks pretty complicated to set up from what I can see, and setting up APC and a Linux server just to have a upload progress bar sounds a bit over the top.
Is using a Flash-based uploader like SWFUpload an option at all? I don't know how it behaves for uploads that big but I expect it should work fine. Will be easy enough to find out.
If you want to stick with Uber Uploader, however, the INSTALL_AND_FAQ.HTML file in the download package should give you some first guidance.