How to upload .rar or videos to Wampserver with php - php

I'm trying to upload files to Wampserver using php. I can upload like any kind of text file, excels, html, images and .zip, but when I try to upload .rar or .mp4, even though the POST method on the browser shows a 200 the server doesn't allow it, so the file isn't stored on the server.
What I have to do to allow wampserver to accept some file extensions that I want? Thank you.

Change the settings in the PHP.ini file. You're looking for:
'post_max_size'
'upload_max_filesize'
Set those to what the values you require are.

Related

Apache2 cant find pdf file in default directory

so, I have a setup with apache2, php5, Mysql, etc... everything seems to work alright and I'm using default directory /var/www/html.
I can upload pdfs into directory /var/www/html/uploads, and also display the pdfs uploaded into directory in list of links by using scandir(php method).
I've also checked permissions on the directory, pdf files, and /etc/mime.types.
And ofc, the files are there too. I have also tried naming my pdf files with lower case without any special characters.
The error code is 404 Not found:The requested URL /var/www/html/uploads/cv.pdf was not found on this server. When I try to download the file, by right-clicking link and downloading, i just get a broken pdf that isnt readable. However, the pdf files seem perfectly fine, since when I scp them back to my local computer and read them they're not broken at all.
Any suggestions on why I may be experiencing this error?
All suggestions and help appreciated.

social.png upload viruses as images in php

I know for the fact that there is trojan or malware in php which represents itself as an image. And I also know that to filter out the file upload we use extensions such as .txt or .png.
Is there a way to scan the files manually when they are being uploaded into the server using server built-in antivirus or the server doing this kind of tasks automatically for us? ( I mean particularly in cpanel )
thanks
If you are worried about code being uploaded to your server in the form of an image, simply re-encode the image upon upload. A file containing code with an image extension will throw an error when the encoder tries to process it.

uploading .mov file

I am uploading the video files with flash uploader object and then convert it into .mp4 format through Zencoder. Firstly file gets uploaded into server folder. All the files with extension .wmv , .flv etc. are gets moved to folder, But when I upload .mov file then, it does not gets uploaded into server folder. Is there need to change any server settings?
You should do this async, upload the file, store it (here you make sure your file is saved properly, and then launch the encoding process).
It seems you may be running into some timeout issues, since no especial treatment is needed for .mov files in php or apache.

big size multi image upload

I built a website in that I upload 10 too big size(10MB) images. When uploading start, it continues to some time then a blank page will come. I tried to change php_values in .htaccess file, because I don't have permission to change the settings in php.ini file (it's shared server). I have some doubts regarding this.
1) what happen if file will going to post request, because I want fastly uploded the files.
2) it takes time when posting the request or uploding the file, I am cropping the images (loop) using php GD functions.
It is because of the limits your web hosting provider set. Which values did you try to change in the .htaccess?
You could try using some flash uploader, it should work despite the limits imposed by the server. A good one is SWFUpload.
That is because of the exection time of a script.You can edit your php.ini file. If that is not permitted you can set the *MAX_EXECUTION_TIME* for a script using your .htaccess file.

Flash/PHP: Using the AS3 Jpeg Encoder

I am a beginner at both Actionscript3 and PHP, and I'm trying to get Henry Jone's movie clip to jpeg code to work for me, as seen here:
http://henryjones.us/articles/using-the-as3-jpeg-encoder
I downloaded the source and then uploaded the .swf and the .php in the same directory. However, when I click "download your sketch," it downloads the .php file instead of a jpeg.
The .swf I uploaded can be seen here:
http://www.snut.org/storage/scrntest/sketch.swf
I didn't change any of the code from the source I downloaded, so I can't figure our what the problem is. Can anyone help?
Rule of thumb - any time your web server downloads .php files instead of rendering the output of the file it is a good sign that your server isn't set up to handle PHP. You need to tell Apache to use PHP, google around for "install PHP on Apache web server" and that should get you started.
Basically .php files are just text files, so unless you have something telling your web server to treat .php files different from normal text files then it'll just assume the user wants to download the file that's being linked.

Categories