Problems with porting a website from Windows to Linux (fedora)

Source: Internet
Author: User
The problem of porting a website from Windows to Linux (fedora)-Linux Enterprise Application-Linux server application information. The following is a detailed description. Today, my boss asked me to port my website from the previous stage to linux, but when I migrated it, I found many of my previous mistakes (some of which are related to the operating system, we use fedora core 5 ).

1. For example, in Windows, the names of database tables are not case-sensitive. However, they must be case-insensitive in linux. Otherwise, an error will be reported when you write a query statement.

2. that is, the field name (as long as it is a field represented by an array) must be enclosed in single quotation marks. Otherwise, there will be notice (equivalent to a syntax error during compilation), such as table ['id'], which must be enclosed in quotation marks.

3. in linux, it is best to declare the variable before using it. Otherwise, notice will undefined the variable.

4. The JS statement previously written is useless now. I don't know why. You have to find the reason for this.

5. If the PATH_TRANSLATED parameter exists during file upload, you should change it to SCRIPT_TRANSLATED and modify the permission to store the uploaded folder (so that the file can be written ).

6. it is found that the str_replace function must be received through variables in linux to avoid errors. For example, in Windows, you can directly write str_replace ('\', '\/', $ url ), in linux, $ url = str_replace ('\', '\/', $ url) is required. Otherwise, str_replace only writes the modified result into a temporary variable, while $ url is still the value before conversion, please note!

Well, remember these items today. Hope to help friends.
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.