Uploading FILES in PHP $ _ FILES is unacceptable. Hello, everyone!
I wrote a small program for uploading video files.
When testing in windows:
Php5.5 + apache2.4.9. The maximum php Upload size has been set to 1024 MB.
At this time, it is okay to upload any video.
But on linux:
Php5.3 + nginx. Similarly, the php configuration file is configured. nginx. conf also sets clinent_max_body_size to 1024 MB.
However, a video file named 0.mp4 is copied from the XP system. it is about MB and uploaded. $ _ FILES is blank.
On my local machine (win8), I copied two video files, one of which is about 2 MB and one of which is MB. they both named "I am 0.mp4" and all uploaded successfully. Therefore, the problem of Chinese names was ruled out. (I also processed the Chinese name in the upload class ).
I cannot think of it now. The maximum upload size can be ruled out, and the naming problem can be ruled out. It's only a file problem. what is the problem ..
Help...
Reply to discussion (solution)
Check whether the permission to upload the directory is correct. if there is any permission to read and write, change it to 775 or 777.
If you have not set the Upload file format, upload a small text file first.
Including code (strictly case sensitive in Linux) and permission issues in Linux (most likely)
If the upload is successful, the file size limit is incorrect.
The size of the uploaded file exceeds the limit of post_max_size.
Check the error log
Both post_max_size and upload_max_filesize have been set to 1024 MB. Nginx. conf also sets clinent_max_body_size 1024 M. I don't know if this setting is correct. It should be okay.
The focus of the problem is:
MP4 files of about MB can be uploaded, and MP4 files of about MB cannot be uploaded, and their file names are the same.
I know the only difference is that M of MP4 files are copied from the Windows XP system computer, and M of MP4 files are from Win8.
I don't know the source of M file creation or the possible reasons, so I don't know what information I can give.
I hope you can help me. if you need other information, I will send it again.
In File 140, the file name should be changed to a pure number or letter. try to confirm whether the file is encoded.
In File 140, the file name should be changed to a pure number or letter. try to confirm whether the file is encoded.
No English or numbers, encoding problems?
Is it uploaded using a browser form?
Is there any successful file in the XP system?
Can I send a string from XP successfully?
Is it uploaded using a browser form?
Is there any successful file in the XP system?
Can I send a string from XP successfully?
Yes, form submission. there are successful files on xp, and sending strings is acceptable. it is useless to upload the unsuccessful file on my machine. I copied two files from XP and could not receive the files for uploading.
Even if you asked a question in May 2014, I still want to answer:
Python 5.3
Python 5.5
These two versions have different methods for uploading files.