PHP upload file $_files Unable to receive information

Source: Internet
Author: User
Hello, everyone!

I have written a small program for uploading video files.
When testing under Windows:
php5.5+apache2.4.9,php two configurations with maximum upload size already set to 1024M
Uploading any video at this time is no problem.

But when you get to Linux:
Php5.3+nginx, similarly, the PHP configuration file is configured, and nginx.conf also sets the Clinent_max_body_size to 1024M.

But a video file called "I am a little Navy 0.mp4" was copied from the XP system, 140M or so, uploaded, $_files printed out as empty.
In my machine (win8) copy two video files, a 2M a 400M or so, all named "I am a small Navy 0.mp4", are uploaded successfully, so the problem of excluding Chinese name. (I also dealt with the Chinese name in the upload Class).

Now really can't think of, the maximum upload size limit can be excluded, naming problems can be excluded. That can only be a document problem, what is the problem?

Help ...


Reply to discussion (solution)

See if the Upload directory permissions problem, there is no read and write permission to change to 775 or 777 try

If you have not set the upload file format, first upload a small text file to test it.
Includes code (strictly case-sensitive under Linux) and Permissions issues under Linux (this is the most likely)
If the upload is successful, it is your upload file size limit problem.

The size of the uploaded file exceeds the post_max_size limit

Check the error log

Both the post_max_size and upload_max_filesize have been set to 1024M. Nginx.conf also set the Clinent_max_body_size 1024M, do not know I am so set right, online Find method. There should be nothing wrong with it.
The focus of the issue is:
About 400M MP4 can be uploaded, 100M or so MP4 will not upload, and their filenames are the same.
I know the only difference is that the 100M MP4 file is copied from the XP system's computer, and the 400M MP4 file is on my computer, Win8.

Because you do not know the source of the 100M file, it is not clear what the possible reasons, so do not know what information can be given.
I hope you can help, if you need some other information, I will send it out again.

140 that file, the file name is changed to pure digital letters, try to exclude the problem is not coding.

140 that file, the file name is changed to pure digital letters, try to exclude the problem is not coding.



Pure English or pure numbers are not, coding problem?

Is it uploaded using a browser form?
Does the XP system have a successful file?
Can a string from XP be successfully received?

Is it uploaded using a browser form?
Does the XP system have a successful file?
Can a string from XP be successfully received?


Yes, form submission, XP also has a successful file, hair string can also accept, the unsuccessful file, get my machine upload also useless. Two files copied from XP, upload not received

Although the question you asked in 2014, I would like to answer:
PHP 5.3
PHP 5.5
These 2 versions of the file upload method is not the same OH

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.