php cgi htaccess

发布于 2024-09-03 06:14:38 字数 629 浏览 3 评论 0原文

我尝试执行cgi但失败了。 我在 .htaccess 中包含以下行

AddHandler cgi-script .cgi
Options +ExecCGI

abc.com/ 相当于 /home 目录

abc.com/compare 相当于 /home/compare 目录

abc.com/compare/contact 相当于 /home/compare/contact 目录

.htaccess 文件位于联系人目录中

,但服务器返回以下消息。

服务器内部错误 遇到内部错误或 配置错误并且无法 完成您的请求。请联系 服务器管理员, [电子邮件受保护]并通知他们 错误发生的时间以及任何事情 你可能已经这样做了 导致错误。更多信息 关于此错误可能可以在 服务器错误日志。

还有一件事是问题

是什么,我可以看到 phpinfo() 是否启用了 cgi?

i try to execute cgi but failed.
i include following lines in .htaccess

AddHandler cgi-script .cgi
Options +ExecCGI

abc.com/ is equivalent to the /home directory

abc.com/compare is equivalent to the /home/compare directory

abc.com/compare/contact is equivalent to the /home/compare/contact directory

.htaccess file located in contact directory

but server returns the following message.

Internal Server Error The server
encountered an internal error or
misconfiguration and was unable to
complete your request.Please contact
the server administrator,
[email protected] and inform them of the
time the error occurred, and anything
you might have done that may have
caused the error.More information
about this error may be available in
the server error log.

what is the problem

one more thing is can i see phpinfo() that cgi is enable or not??

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

怼怹恏 2024-09-10 06:14:38

您的服务器启用了 CGI 吗?
你必须在 httpd.conf 中启用它,看一下:
http://httpd.apache.org/docs/2.2/howto/cgi。 html

Is CGI enabled on your server?
You have to enable it in the httpd.conf, take a look at:
http://httpd.apache.org/docs/2.2/howto/cgi.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文