CGI "Internal Server Error"
在安裝 CGI 程式時如果設定錯誤,便會看到 "500 Internal Server Error" 訊息,一般常見的錯誤可以用以下方法解決:
1. CGI 程式的權限需要設定為 711 或 755。
2. 程式的最開端有一行類似 #!/usr/bin/perl,其中 #! 是必需要的,然後確定 /usr/bin/perl 是正確的路徑,另外這行前不可以有空格或空行。
3. 如果程式本身會讀寫其他檔案,要檢查存取檔案的絕對路徑或相對路徑是否正確,以及檔案是否有權限存取。
4. 根據 HTTP 栛定,在輸出內容前要先輸出 HTTP Headers,否則便會遇上便會錯誤,在 Apache 的 error log 裡面看到的錯誤是 "Premature end of script headers",解決方法是在輸出內容前加一句:
print ("Content-Type: text/html;\n\n");
如大家發現有錯漏,或者有其他補充,觀迎回覆指教。
以上为网络解决:
问题:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>500 Internal Server Error</title> </head> <body> <h1>Internal Server Error</h1> <p>The server encountered an internal error ormisconfiguration and was unable to completeyour request.</p> <p>Please contact the server administrator, webmaster@localhost and inform them of the time the error occurred,and anything you might have done that may havecaused the error.</p>
<p>More information about this error may be availablein the server error log.</p> <hr><address>Apache/2.2.22 (Ubuntu) Server at 192.168.8.111 Port 80</address>< /body> </html>
解决:
添加:
printf ("Content-Type: text/html;\n\n");
即可
CGI "Internal Server Error"的更多相关文章
- Apache Internal Server Error
当使用 Apache 作为服务器,使用 cgi 程序接收来自 web 端的访问时,出现如下错误: Internal Server Error The server encountered an int ...
- PHP如何让apache支持.htaccess 解决Internal Server Error The server …错误
TP框架 打开 www.newtp.com/index.php/Home/Index/abc出现 如下错误: Internal Server Error The server encountered ...
- mvcmovie sample 在window10 下的部署问题(HTTP Error 500.19 - Internal Server Error)
mvcmovie sample 在window10 下的部署问题 使用VS2018配置好了mvcmovie sample,发布到IIS后,打开报错: HTTP Error 500.19 - Inter ...
- EBS Webservice Timeout,HTTP Server Return "500 Internal Server Error"
http://blog.itpub.net/26687597/viewspace-1207571/ 基于Oracle EBS R12,开发了一个Webservice用于返回某项主数据,当请求的数据量非 ...
- 如何让apache支持.htaccess 解决Internal Server Error The server …错误
如何让apache支持.htaccess 解决Internal Server Error The server …错误 文章来源:小灰博客| 时间:2013-12-25 12:17:08| 作者:Le ...
- HTTP 错误 500.21 - Internal Server Error 解决方案
不久前重新安装了Windows7,在安装了VS2010 开发平台之后,将网站发布到IIS,访问发生如下错误: HTTP 错误 500.21 - Internal Server Error处理程序“Ni ...
- HTTP 错误 500.21 - Internal Server Error 处理程序“PageHandlerFactory-Integrated”在其模块列表中有一个错误模块“ManagedPipelineHandler”
HTTP 错误 500.21 - Internal Server Error 处理程序“PageHandlerFactory-Integrated”在其模块列表中有一个错误模块“ManagedPipe ...
- <<< php程序在运行后报“internal server error”错误
上传的php程序在运行后报“internal server error”错误,检查以下两方面: 1.请您检查php程序的属性是否设置为755,如果php程序的属性不是755,那么运行的时候会报“int ...
- HTTP 错误 500.23 - Internal Server Error
HTTP 错误 500.23 - Internal Server Error 检测到在集成的托管管道模式下不适用的 ASP.NET 设置. IIS8.0详细错误 老版本WEB程序用 VS2013打开时 ...
随机推荐
- Django drf:手撸自定义跨域
项目需求: 1.用域名8000向8001发送请求,用django框架解决跨域问题 2.用上自定义中间件配置,支持get.post.put.detele和非简单请求 3.支持版本控制 4.在settin ...
- Log parser工具使用
Windows日志存放于目录“C:\Windows\System32\winevt\Logs”中, 在目录中可以找到“System”.“Setup”.“Application”.“Security” ...
- windows RabbitMQ Server 环境配置中的一些坑
原文:https://blog.csdn.net/lindonglian/article/details/55805637 RabbitMQ的服务端基于Erlang语言编写,要在机器上安装Rabbit ...
- NXP LPC系列学习笔记汇总(持续更新中)
1. LPC11E68循环冗余校验CRC学习笔记 文章主要介绍了如何使用LPC11E68的CRC外设功能,并介绍了与CRC引擎相关的寄存器,然后以生成CRC-CCITT多项式校验为例进行了介绍. 2. ...
- Gym - 102346D Denouncing Mafia 取k叶子节点使叶子到根覆盖节点数最大
给你一棵树 你可以取K条链 一条链为根到叶子的路径 问你K条链最多覆盖树上多少个节点 贪心的做 肯定是每次取最长链 但是取完最长链 一颗树就会变为若干个森林 我们要维护当前所有森林里的最长链 ans数 ...
- mybatis3.1-[topic-18-20]-_映射文件_参数处理_单个参数&多个参数&命名参数 _POJO&Map&TO 三种方式及举例
笔记要点出错分析与总结 /**MyBatis_映射文件_参数处理_单个参数&多个参数&命名参数 * _POJO&Map&TO 三种方式及举例 _ * 单个参数 : #{ ...
- JS控制SVG缩放+鼠标控制事件
话不多说,直接上代码吧,不行你砍我... <!DOCTYPE html> <html lang="en"> <head> <meta ch ...
- 电脑视频下载王-Apowersoft Video Download Capture v6.3.6
Apowersoft Video Download Capture (视频下载王) 是由香港Apowersoft出品的一款集视频下载.视频转换.媒体播放及录屏等功能为一体的多功能视频下载工具,简便实用 ...
- 并发编程:Thread和Runable-01
1.继承Thread类(不推荐) 代码很简单,就不说了 public class ThreadTest02 { public static void main(String[] args) { n ...
- 定时器 延时调用setTimeout
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...