Some summaries about server 500 errors--written for novices_PHP tutorial

WBOY
Release: 2016-07-13 17:12:32
Original
870 people have browsed it

I remember that when I first came into contact with CGI, I was really curious and unfamiliar. Now I am able to write programs by myself, but I have also gone through a difficult and tortuous road in the process. Now I can also understand the mood of some novices when they face 500Internal Server Error. As the saying goes, everything is difficult at the beginning, which does not allow beginners to successfully debug their first cgi program. Now I will write to you some summaries of my experiences. Experts don’t need to watch me do my best here, haha ​​

1. Since some programmers use the path of the interpreter in the first line of code provided when publishing a program and often ignore this when writing instructions, so this first level is often passed during the debugging process. No, put the first line! #c:/perl/bin/perl.exe Change to the path provided by your service provider
 2. Absolute path error: When using a virtual host, because you do not need to enter the www directory in the URL address of the browser, some netizens ignore this directory and think that this directory is the default directory of the host. In fact, it is not.

For example, wrong: real="/usr/home/4232/image"
Correct: real="/usr/home/4232/www/image"
3. The fuel tank input is wrong. When some programs require the administrator to enter the mailbox address directly on the original code, some netizens often think that the name suking@yang.com.cn is a bit special and ignore it, so they change it to their own mailbox: shohu@21cn.com - -The error occurs from this point. At this time, the system will treat @21cn as an array. Here, if your mailbox is: shohu@21cn.com, it should be changed to shohu@21cn.com
 4. System The environment variables are wrong. The variable values ​​given by some systems (such as mine) are incorrect. For example, {script name} is wrong when monitored in my system. In this way, any program that calls these variables will have to start from scratch. If you are a beginner, you should give up on such a program and either give up on this host or convince your service provider.

5. cgi file attribute settings.
Many netizens say they don’t know how to set file attributes. Here I will tell you a quick method. In coutftp, first upload the file, 2 then click the uploaded file to select it, 3 press shift ctrl a, a window will appear immediately, enter 755 in the window and press ok


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/629352.htmlTechArticleI remember when I first came into contact with cgi, I was really curious and unfamiliar. Now I can write programs by myself, but I have also gone through a difficult and tortuous road in the process. Now I am very capable...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template