Summary of server 500 errors-for beginners

Source: Internet
Author: User
I remember that when I first came into contact with cgi, I was curious and unfamiliar. Now I have been able to write my own program, but it has gone through a difficult and tortuous detour. Now I am very familiar with some new users in the face of 500 Internal Server Error. As the saying goes, everything is difficult at the beginning, and it fails to allow beginners to debug the first cgi program. Now I will write some summary I have experienced to you. You don't have to watch me make an axe in this class.

1. Some programmers usually ignore this point when writing instructions because the first line of the interpreter path of the code provided by the programmer during Program release uses the path on their own computers, therefore, in the debugging process, the first line is often unable to pass! # C:/perl/bin/perl.exe change to the path provided by your service provider
2. Absolute path error: when using a VM, because the url address of the browser does not need to enter the www Directory, some netizens ignore this directory, assume that this directory is the default directory of the host.

For example, error: real = "/usr/home/4232/image"
Correct: real = "/usr/home/4232/www/image"
3. tank input error, in some programs need administrator in the original code directly enter the mailbox address, some netizens often feel suking@yang.com.cn name some special and ignore, so changed to their mailbox: Shohu@21cn.com -- error occurs from this way, then the system will treat @ 21cn as an array, here, if your mailbox is: Shohu@21cn.com should be changed to shohu@21cn.com
4. an error occurs in system environment variables. Some systems (such as my) provide incorrect variable values. For example, {script name} is incorrect when it is monitored in my system, any program that has called these variables should start from scratch. If you are a beginner, such a program should give up, give up the host, or persuade your service provider.

5. Cgi file attribute settings.
Many netizens say they will not set file attributes. Here is a quick method. In coutftp, upload the file first. 2. Select the file uploaded by electric shock. 3. Press shift ctrl a to open a window, in the window, enter 755 and press OK.


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.