PHP uploading files to server issue, server operating system for CentOS

Source: Internet
Author: User
My little brother is doing this project based on the YII framework, one of the functions of uploading files, I am using xupload this plug-in implementation.
When a user uploads a file, the script creates a new folder at the root of the target server (Os:centos) for the current upload time, for example: 2014_8_3_8_39, and then writes the file to it.
This code is not a problem with the ability to upload after deploying on several servers. But the thing is, there is a problem on the target test machine: The folder can be built, but the content is empty, that is, the file is not uploaded in.
The younger brother checked the httpd log, also did not find the problem. PHP.ini the next two files on the size of the upload file also changed to no avail. But in the same operating system as other machines, there is no problem with the same PHP version.
So I thought it might be the problem with that machine configuration. Little brother to Linux do not know very well, hope to understand the friend can reach out in time, thank you!


Reply to discussion (solution)

First upload a few k of small files to determine that it is not a PHP configuration problem
The upload folder is created in the root directory and is an error in itself.
Inevitably leads to a variety of authority problems. Also, the file cannot be accessed by the Web

The cause of the problem has been found, is the background of the programmer directly took the file away, so it is empty.

  • Related Article

    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.