急~~~Apache+CGI,系统调用后,出现服务器错误页面,怎么办啊~大牛帮帮忙拉

QQblue 2004-09-28 03:00:16
我在do.c程序里使用了system("/tmp/test"),test是我已经写好的程序,在命令行下没有问题。test会在标准输出上有一些文字。
do是一个页面上的form,中间有个按钮提交信息,当按下时会执行system这句。

我曾经使用execve()代替system(),倒是不出页面错误了,test程序却不执行!

各位大牛帮帮忙吧!!!

错误显示:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, phonix@fwgate.hisense.com 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.



--------------------------------------------------------------------------------

Apache/1.3.26 Server at fwgate.hisense.com Port 443
...全文
130 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
yourway 2004-09-29
  • 打赏
  • 举报
回复
看看apache的日志。
jwwu 2004-09-29
  • 打赏
  • 举报
回复
Internal Server Error
一般是没有打http头的时候执行了标准输出
你看看你的test里面有没有cout 或是fpritf之类的东西
QQblue 2004-09-28
  • 打赏
  • 举报
回复
我在do开始就setuid(0)过了。。。其他可执行文件的权限都被设置成4755,普通文本文件都是读或写权限
limlzm 2004-09-28
  • 打赏
  • 举报
回复
肯定是权限问题,把tmp目录的权限改改,然后试试

2,204

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 CGI
社区管理员
  • CGI社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧