为什么我的网站给我500错误? [英] why is my site giving me a 500 error?

查看:68
本文介绍了为什么我的网站给我500错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是ryerson大学的学生,我试图为我的任务创建一个简单的网站,我得到500内部服务器错误


我的代码编译并且似乎没有任何语法错误,但我似乎无法弄清楚它有什么问题,任何帮助都会很棒,这是我到目前为止的代码

Im a student of ryerson university, Im trying to create a simple website for my assignment and Im getting a 500 internal server error

my code compiles and doesnt seem to have any syntax errors but I cant seem to figure out what is wrong with it, any help will be great, here is the code I have so far

展开 | 选择 | 换行 | 行号

推荐答案

代码看起来应该运行正常,所以其他错误。一些可能性:


shebang行是错误的

没有以ASCII模式上传

权限不正确
The code looks like it should run OK, so something else is wrong. Some possibilities:

the shebang line is wrong
not uploaded in ASCII mode
permissions not correct



代码看起来应该运行正常,所以其他错误。一些可能性:


shebang行是错误的

没有以ASCII模式上传

权限不正确
The code looks like it should run OK, so something else is wrong. Some possibilities:

the shebang line is wrong
not uploaded in ASCII mode
permissions not correct



好​​吧,shebang系列几乎是我教授笔记中的复制粘贴工作,如果你能给我一个简单的演练,我不知道你在ascii模式下上传是什么意思在你的意思,那将是伟大的,(不要以为我在演讲幻灯片上看到了很多)和权限,我认为我做得对,cgi-bin文件夹设置为711,和cgi文件设置为644并且我已经尝试过755.我甚至尝试过它作为777只是作为测试而且仍然以相同的结果结束


所以我猜猜ascii模式部分是它可能是因为我从来没有测试过。我只需要一些有关如何测试的指南

well the shebang line is pretty much a copy paste job from my professor''s notes, and im not sure what you mean by uploading in ascii mode, if you can give me a simple walkthrough on what you mean there, that would be great, (dont think I saw much on that on the lecture slides) and as for permissions, I think I did it right, the cgi-bin folder is set to 711, and the cgi files are set to 644 and i''ve tried 755. i''ve even tried it as 777 just as a test and still ended up with the same results

so im guessing the ascii mode portion is what it could be since I''ve never tested that. i''ll just need some kinda guide through how I would test this


当您使用FTP程序将perl脚本从计算机传输到服务器时,您可以使用ASCII(文本)进行传输文件)或二进制(图像和可执行文件)模式。阅读您正在使用的FTP应用程序的帮助文件,以确定如何更改传输模式。

当文件以ASCII传输时,几乎所有FTP应用程序都将更改行结尾(或文本)模式从本地行结尾到远程服务器的行结尾。例如,如果你在Windows上编写perl程序,行结尾是\\\\ nn,如果你将它转移到Unix服务器,脚本将无法正常工作,因为carraige返回(\ r)但如果你使用FTP应用程序几乎所有人都知道将行结尾更改为操作系统使用的远程服务器,\ n for Unix。


一些编辑器也允许你保存包含许多操作系统的行结尾的文件。你可以检查你的编辑器,看看是否有一个选项可以保存为Unix或Linux或其他任何东西。
When you transfer the perl script from your computer to the server using an FTP program, you can transfer in ASCII (text files) or binary (images and executables) mode. Read the help files of the FTP application you are using to detemine how to change the transfer mode.

Almost all FTP applications will change the line endings when a file is transferred in ASCII (or text) mode from the local line endings to the line endings of the remote server. For example, if you write the perl program on Windows the line endings are \r\n and if you tranfer that to a Unix server the script would not work because of the carraige returns (\r) but if you use an FTP application almost all of them know to change the line endings to whatever ther remote servers operating system uses, \n for Unix.

Some, not many, editors also allow you to save a file with line endings of many operating systems. You can check your editor to see if there is an option to save as Unix or Linux or whatever.


这篇关于为什么我的网站给我500错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆