Apache的配置文件语法错误,问题所在?怎么修改?

我IBM   的AIX4.3下安装用root用户安装apache,提示安装成功!我一律采用默认值。  
   
  当我用   ../../bin/apachectl   start   启动时,提示语法错误:  
  Syntax   error   on   line   296   of   /rtdb/apache/apa20/conf/httpd.conf:  
  Expected     but   saw    
   
  由于我在windows、Linux   下都安装过,从没碰到这种错误。  
   
  请问这是怎么回事?是apache内核问题?  
  应该不是AIX的问题?因为在装AIX时自带IBM   HTTPServer这个可以运行。  
  IBM   HTTPServer   安装在   /usr/HTTPServer  
  我的现在安装在   /swes/apache  
   
  请问高手,具体是哪儿的错?怎么修改?

****************************************************************************

肯定是配置文件有错误啦,这么一点错误你都不会改,好笨笨,你们公司怎么会请你做事?太不公平了,我现在可失业中啊?谁来帮我呀。。。。。。。。。。。。。。。。。。。。。。。。。。。。  
   
  其实apache的配置文件也很有条理,你买一本apache管理大全,看一下就知道哪个选项是干什么的。  
  是配对使用的。中间是一些配置选项。  
  错误提示是少了一个。请注意:也可带属性,这有点类似XML语法,你有没有看过XML?但APACHE的配置文件并不全是按照XML文档来制定的

怎么改?  
  vi   /swes/apache/conf/httpd.conf  
  然后搜索Directory,看看是否匹配就行了,很有可能是哪一行被#给注释掉了,你去掉它前面的#就行了。  
  快去改,改完了来给我加分

4 楼gflei(学而实习之)回复于 2001-11-13 19:45:27 得分 0

先请教个实质问题:这个错误是由哪个模块引起的?  
  也就是说:系统缺少了什么文件,才引起这种问题?  
  今天在我调试的过程中,发现不但有这个错误还有类似错误。  
  首先想知道的是:这是操作系统的引起的还是Aapche引起的?  
   
  lurenfu所说的那种错误根本不可能发生,因为我的还没修改那些文件,采用的是默认配置!  
  所以说:错误不在配置文件上。。  
   
  希望能得到高手的指点,错误在哪?Top

5 楼lurenfu(具有中国特色的社会主义初级阶段,一百年不变)回复于 2001-11-13 19:50:18 得分 0

你有检查过配置文件没有?不可能是程序或系统引起的,这个错误肯定是由apache的配置文件引起的,apache跟系统是独立的,没有什么系统文件可以控制apache的行为Top

6 楼gflei(学而实习之)回复于 2001-11-13 20:34:19 得分 0

回lurenfu:   首先我没动过配置文件;其次我也检查过配置文件,没有不匹配的问题。  
  这个现在只可能跟系统中原先有老版本的apache有关了。Top

7 楼lurenfu(具有中国特色的社会主义初级阶段,一百年不变)回复于 2001-11-13 21:29:40 得分 0

卸载掉原来的老版,重新安装Top

8 楼superdreamer(只懂一点点!)回复于 2001-11-14 09:10:34 得分 10

to   gflei:你说的问题应该是AIX的编译器问题。我找到方法给你帖上来!Top

9 楼superdreamer(只懂一点点!)回复于 2001-11-14 09:17:29 得分 35

你的apache版本是多少呀?你的问题是AIX编译器的bug原因!你自己到网上去找吧,应该能找到方法的!在www.google.com上输入:Expected     but   saw    
  你会得到很多有用的信息的,若解决了别忘来加分:)Top

10 楼lurenfu(具有中国特色的社会主义初级阶段,一百年不变)回复于 2001-11-14 09:19:43 得分 5

啊?AIX怎么会有那么重要的BUG?Top

11 楼superdreamer(只懂一点点!)回复于 2001-11-14 09:29:40 得分 0

谁知道呢?也许是他版本的原因吧,AIX我没用过,不知道BUG解决了没有;  
  Top

12 楼gflei(学而实习之)回复于 2001-11-14 12:14:23 得分 0

to:   superdreamer.我用Apache是1.3.22版本的,至于AIX的BUG我还没查。  
   
  不过那原先自带的IBM   HTTPServer怎么就可以用?那不需要编译不?不管怎么样,谢过了先!Top

13 楼superdreamer(只懂一点点!)回复于 2001-11-14 12:17:33 得分 0

你到网上去查了没有,你看过就知道了Top

14 楼gflei(学而实习之)回复于 2001-11-14 13:23:28 得分 0

to:   superdreamer   刚刚查了一下全是英文,需仔细研究,如果你一直到怎么做?不妨告诉我?  
   
  关于分数的问题,那不是问题!Top

15 楼gflei(学而实习之)回复于 2001-11-14 13:27:43 得分 0

to:   superdreamer   补充一下编译器版本:4.4.0.0Top

16 楼superdreamer(只懂一点点!)回复于 2001-11-14 13:41:49 得分 0

楼上老兄,你自己慢慢看吧:)你哪个东西,我没用过,我想你会找到解决方法的。不好   意思啦,我不是高手,我只能帮你到这儿啦Top

17 楼amorzh(快车)回复于 2001-11-14 13:56:14 得分 10

有可能与系统有关,关于读配置命令,是在apache内核中实现的,你的命令出错是因为apache在源程序中比较两个字符串相等(cmd->end_token和cmd->cmd->name)是利用判断两个字符串的指针的值是否一致(他认为这两个字符串指针应该指向同一个地方,他这样做也是为了节省时间,)  
   
  你这个问题是因为两个字符串虽然是一样的,但是他们并不是指向同一个地方。可能在编译时加一些define??Top

18 楼lurenfu(具有中国特色的社会主义初级阶段,一百年不变)回复于 2001-11-14 14:01:23 得分 0

妈的,系统有个内核,你现在到好,应用程序也叫内核了,apache顶多只是个应用程序,你写一个hello,world的程序除了行为跟apache不一样外,没有任何区别,apache有内核,hello,world也有内核。这样一来,操作系统有内核,应用程序也有内核,那。。。。。。。  
   
  我实在是被你们的概念给搞糊涂了,去你姥姥的,乱用词汇Top

19 楼gflei(学而实习之)回复于 2001-11-14 14:29:01 得分 0

to:   amorzh   非常感谢您能解释得这么清楚,我现在还不具备改写apache内核的能力。不过问题的确像superdreamer所说的,是编译器的问题,我现在正在查有关资料,等问题解决一定会告诉大家。Top

20 楼gflei(学而实习之)回复于 2001-11-14 16:53:04 得分 0

现在很高兴告诉大家,在superdreamer的提示下,我已经解决了自己的问题!  
   
  再次再次感谢关系此问题的人!特别感谢superdreamer!!  
   
  解决问题的办法:  
            1.先看次文:  
  Full   text   of   PR   number   2312:  
  Received:   (qmail   27406   invoked   by   uid   2012);   28   May   1998   19:08:53   -0000  
  Message-Id:   <[email protected]>  
  Date:   28   May   1998   19:08:53   -0000  
  From:   Tim   Evans    
  Reply-To:   [email protected]  
  To:   [email protected]  
  Subject:   syntax   error   in   distributed   httpd.conf   file  
  X-Send-Pr-Version:   3.2  
   
  >Number:                   2312  
  >Category:               os-aix  
  >Synopsis:               syntax   error   in   distributed   httpd.conf   file  
  >Confidential:       no  
  >Severity:               serious  
  >Priority:               medium  
  >Responsible:         apache  
  >State:                     closed  
  >Class:                     sw-bug  
  >Submitter-Id:       apache  
  >Arrival-Date:       Thu   May   28   12:10:00   PDT   1998  
  >Last-Modified:     Thu   May   27   12:42:51   PDT   1999  
  >Originator:           [email protected]  
  >Organization:  
  >Release:                 1.3b7  
  >Environment:  
  AIX   4.3;   AIX   cc    
  >Description:  
  After   compiling   and   installing   1.3b7   in   default   location,   I   changed   *only*   the   port   number   in  
  the   distributed   httpd.conf   file.     httpd   fails   to   start   with   this   error:  
   
  Syntax   error   on   line   40   of   /usr/local/apache/conf/access.conf:  
  Expected     but   saw    
   
  NOTE:     "Expected     but   saw   "  
  >How-To-Repeat:  
   
  >Fix:  
   
  >Audit-Trail:  
  State-Changed-From-To:   open-analyzed  
  State-Changed-By:   coar  
  State-Changed-When:   Sun   Sep   27   09:41:57   PDT   1998  
  State-Changed-Why:  
   
  This   is   a   known   problem   with   the   AIX   C   compiler   (see   also  
  PRs   2534,   2664,   2853,   and   3042).     IBM   are   aware   of   the  
  problem.     I'm   putting   this   report   into   'analyzed'   so   we  
  can   notify   you   of   the   correction   if   and   when   we   get   one.  
   
  Category-Changed-From-To:   general-os-aix  
  Category-Changed-By:   coar  
  Category-Changed-When:   Sun   Sep   27   09:41:57   PDT   1998  
   
  State-Changed-From-To:   analyzed-closed  
  State-Changed-By:   [email protected]  
  State-Changed-When:   Sun   Dec   13   14:54:32   PST   1998  
  State-Changed-Why:  
  The   AIX   compiler   problem   which   gave   the   error   of  
  "on   Expected     but   saw   "     has   been   fixed.  
  +     A   set   of   PTF's   which   correct   the   problem   are   available   from:  
  +     http://service.software.ibm.com/support/rs6000  
  +     The   PTF's   are:     U462005,   U462006,   U462007,   and   U462023   through  
  +     U462030.     The   PTF's   have   been   tested   and   do   indeed   fix   the   problem.  
   
  Thanks   for   using   Apache  
   
  From:   [email protected]  
  To:   [email protected]  
  Cc:   [email protected]  
  Subject:   Re:   os-aix/2312:   syntax   error   in   distributed   httpd.conf   file  
  Date:   Wed,   16   Dec   1998   14:00:19   -0500  
   
    Yes,   the   listed   PTF's   are   for   the   xlC   3.6.4   compiler.  
    Please   talk   with   your   IBM   Service   Rep.   to   see  
    if   your   compiler   is   effected.  
    >   Synopsis:   syntax   error   in   distributed   httpd.conf   file  
    >  
    >   State-Changed-From-To:   analyzed-closed  
    >   State-Changed-By:   [email protected]  
    >   State-Changed-When:   Sun   Dec   13   14:54:32   PST   1998  
    >   State-Changed-Why:  
    >   The   AIX   compiler   problem   which   gave   the   error   of  
    >   "on   Expected     but   saw   "     has   been   fixed.  
    >   +     A   set   of   PTF's   which   correct   the   problem   are   available   from:  
    >   +     http://service.software.ibm.com/support/rs6000  
    >   +     The   PTF's   are:     U462005,   U462006,   U462007,   and   U462023   through  
    >   +     U462030.     The   PTF's   have   been   tested   and   do   indeed   fix   the   problem.  
    >  
    These   PTF's   appear   to   be   for   the   old   AIX   compiler,   not   the   latest   one  
    (i.e.   "C   for   AIX   Version   4.3").  
     
     
  Comment-Added-By:   [email protected]  
  Comment-Added-When:   Mon   Feb     1   07:34:08   PST   1999  
  Comment-Added:  
  According   to   the   IBM   compiler   people:  
  The   AIX   4.3   compiler   is   old   and   out   of   support.  
  The   AIX   3.6.4   C/C++   compiler   problem   is   fixed   with   the   PTF's  
  listed   above  
  The   only   forthcoming   comiler   fix   is   for   the   AIX   4.4   C   compiler  
  and   this   PTF's   to   fix   this   will   be   available   in   April   99.  
   
  Sorry   for   any   confusion   that   IBM   numbering   scheme   has   caused.  
   
  Comment-Added-By:   [email protected]  
  Comment-Added-When:   Thu   May   27   12:42:49   PDT   1999  
  Comment-Added:  
  IBM   has   released   a   fix   their   4.4   C   compiler.  
  The   APAR   number   is   IX87837,   you   can   go   to:  
  http://service.software.ibm.com/cgi-bin/support/rs6000.support/downloads  
  use   the   AIX   Fix   Distribution   Service,   and   search   on   the   APAR   number   above,  
  it   will   pull   up   the   updated   filesets   with   the   fix.  
  Evidently   this   fix   has   been   available   for   a   while,   but   I   just  
  got   wind   of   the   updated   APAR.   Shane  
  >Unformatted:  
  [In   order   for   any   reply   to   be   added   to   the   PR   database,   ]  
  [you   need   to   include     in   the   Cc   line   ]  
  [and   leave   the   subject   line   UNCHANGED.     This   is   not   done]  
  [automatically   because   of   the   potential   for   mail   loops.   ]  
   
   
   
          2.针对自己编译器的版本进行修改,我是在最后一种情况,所以我升级了aix的c   编译器,升为4.4.0.3.  
          3.重新编译安装apache  
          4.问题解决了。  
   
  在此,告诉大家,这是我们交流的好场所,注意我问的言语,请互相尊重!Top

21 楼gflei(学而实习之)回复于 2001-11-14 16:55:32 得分 0

现在很高兴告诉大家,在superdreamer的提示下,我已经解决了自己的问题!  
   
  再次再次感谢关系此问题的人!特别感谢superdreamer!!  
   
  解决问题的办法:  
            1.先看次文:  
  Full   text   of   PR   number   2312:  
  Received:   (qmail   27406   invoked   by   uid   2012);   28   May   1998   19:08:53   -0000  
  Message-Id:   <[email protected]>  
  Date:   28   May   1998   19:08:53   -0000  
  From:   Tim   Evans    
  Reply-To:   [email protected]  
  To:   [email protected]  
  Subject:   syntax   error   in   distributed   httpd.conf   file  
  X-Send-Pr-Version:   3.2  
   
  >Number:                   2312  
  >Category:               os-aix  
  >Synopsis:               syntax   error   in   distributed   httpd.conf   file  
  >Confidential:       no  
  >Severity:               serious  
  >Priority:               medium  
  >Responsible:         apache  
  >State:                     closed  
  >Class:                     sw-bug  
  >Submitter-Id:       apache  
  >Arrival-Date:       Thu   May   28   12:10:00   PDT   1998  
  >Last-Modified:     Thu   May   27   12:42:51   PDT   1999  
  >Originator:           [email protected]  
  >Organization:  
  >Release:                 1.3b7  
  >Environment:  
  AIX   4.3;   AIX   cc    
  >Description:  
  After   compiling   and   installing   1.3b7   in   default   location,   I   changed   *only*   the   port   number   in  
  the   distributed   httpd.conf   file.     httpd   fails   to   start   with   this   error:  
   
  Syntax   error   on   line   40   of   /usr/local/apache/conf/access.conf:  
  Expected     but   saw    
   
  NOTE:     "Expected     but   saw   "  
  >How-To-Repeat:  
   
  >Fix:  
   
  >Audit-Trail:  
  State-Changed-From-To:   open-analyzed  
  State-Changed-By:   coar  
  State-Changed-When:   Sun   Sep   27   09:41:57   PDT   1998  
  State-Changed-Why:  
   
  This   is   a   known   problem   with   the   AIX   C   compiler   (see   also  
  PRs   2534,   2664,   2853,   and   3042).     IBM   are   aware   of   the  
  problem.     I'm   putting   this   report   into   'analyzed'   so   we  
  can   notify   you   of   the   correction   if   and   when   we   get   one.  
   
  Category-Changed-From-To:   general-os-aix  
  Category-Changed-By:   coar  
  Category-Changed-When:   Sun   Sep   27   09:41:57   PDT   1998  
   
  State-Changed-From-To:   analyzed-closed  
  State-Changed-By:   [email protected]  
  State-Changed-When:   Sun   Dec   13   14:54:32   PST   1998  
  State-Changed-Why:  
  The   AIX   compiler   problem   which   gave   the   error   of  
  "on   Expected     but   saw   "     has   been   fixed.  
  +     A   set   of   PTF's   which   correct   the   problem   are   available   from:  
  +     http://service.software.ibm.com/support/rs6000  
  +     The   PTF's   are:     U462005,   U462006,   U462007,   and   U462023   through  
  +     U462030.     The   PTF's   have   been   tested   and   do   indeed   fix   the   problem.  
   
  Thanks   for   using   Apache  
   
  From:   [email protected]  
  To:   [email protected]  
  Cc:   [email protected]  
  Subject:   Re:   os-aix/2312:   syntax   error   in   distributed   httpd.conf   file  
  Date:   Wed,   16   Dec   1998   14:00:19   -0500  
   
    Yes,   the   listed   PTF's   are   for   the   xlC   3.6.4   compiler.  
    Please   talk   with   your   IBM   Service   Rep.   to   see  
    if   your   compiler   is   effected.  
    >   Synopsis:   syntax   error   in   distributed   httpd.conf   file  
    >  
    >   State-Changed-From-To:   analyzed-closed  
    >   State-Changed-By:   [email protected]  
    >   State-Changed-When:   Sun   Dec   13   14:54:32   PST   1998  
    >   State-Changed-Why:  
    >   The   AIX   compiler   problem   which   gave   the   error   of  
    >   "on   Expected     but   saw   "     has   been   fixed.  
    >   +     A   set   of   PTF's   which   correct   the   problem   are   available   from:  
    >   +     http://service.software.ibm.com/support/rs6000  
    >   +     The   PTF's   are:     U462005,   U462006,   U462007,   and   U462023   through  
    >   +     U462030.     The   PTF's   have   been   tested   and   do   indeed   fix   the   problem.  
    >  
    These   PTF's   appear   to   be   for   the   old   AIX   compiler,   not   the   latest   one  
    (i.e.   "C   for   AIX   Version   4.3").  
     
     
  Comment-Added-By:   [email protected]  
  Comment-Added-When:   Mon   Feb     1   07:34:08   PST   1999  
  Comment-Added:  
  According   to   the   IBM   compiler   people:  
  The   AIX   4.3   compiler   is   old   and   out   of   support.  
  The   AIX   3.6.4   C/C++   compiler   problem   is   fixed   with   the   PTF's  
  listed   above  
  The   only   forthcoming   comiler   fix   is   for   the   AIX   4.4   C   compiler  
  and   this   PTF's   to   fix   this   will   be   available   in   April   99.  
   
  Sorry   for   any   confusion   that   IBM   numbering   scheme   has   caused.  
   
  Comment-Added-By:   [email protected]  
  Comment-Added-When:   Thu   May   27   12:42:49   PDT   1999  
  Comment-Added:  
  IBM   has   released   a   fix   their   4.4   C   compiler.  
  The   APAR   number   is   IX87837,   you   can   go   to:  
  http://service.software.ibm.com/cgi-bin/support/rs6000.support/downloads  
  use   the   AIX   Fix   Distribution   Service,   and   search   on   the   APAR   number   above,  
  it   will   pull   up   the   updated   filesets   with   the   fix.  
  Evidently   this   fix   has   been   available   for   a   while,   but   I   just  
  got   wind   of   the   updated   APAR.   Shane  
  >Unformatted:  
  [In   order   for   any   reply   to   be   added   to   the   PR   database,   ]  
  [you   need   to   include     in   the   Cc   line   ]  
  [and   leave   the   subject   line   UNCHANGED.     This   is   not   done]  
  [automatically   because   of   the   potential   for   mail   loops.   ]  
   
   
   
          2.针对自己编译器的版本进行修改,我是在最后一种情况,所以我升级了aix的c   编译器,升为4.4.0.3.  
          3.重新编译安装apache  
          4.问题解决了。  
   
  在此,告诉大家,这是我们交流的好场所,注意我们的言语,请互相尊重!Top

22 楼superdreamer(只懂一点点!)回复于 2001-11-14 17:04:02 得分 0

恭喜你啦!Top

23 楼gflei(学而实习之)回复于 2001-11-15 08:20:35 得分 0

不只是么原因,这个贴子加不了分了,老是出错!  
  现在我只能另罚一个贴子,希望你们能进去拿分!Top

相关问题

  • 想通过程序修改apache的配置文件httpd.conf,有什么好的方法吗?
  • 如何修改配置文件中的字段值?
  • 我如何修改这个配置文件
  • 如何在程序中修改配置文件?
  • 修改配置文件内容算法,急用,高分送!
  • 谁有win2000 server + apache 下的 php4.30 的配置文件
  • 配置文件
  • 如何修改配置文件才能使Tomcat显示调试信息?
  • 不使用定时检测,如何得知配置文件被修改
  • 问一个 C#如何读取和修改".cfg配置文件" 的问题
href="http://www.csdn.net/ui/styles/public_header_footer.css" type="text/css" rel="stylesheet" />
网站简介| 广告服务| VIP资费标准| 银行汇款帐号| 网站地图| 帮助| 联系方式| 诚聘英才| English| 问题报告
世纪乐知(北京)网络技术有限公司 版权所有, 京 ICP 证 020026 号
北京创新乐知广告有限公司 提供技术支持
Copyright © 2000-2007, CSDN.NET, All Rights Reserved
GongshangLogo
id="myframe" border="0" name="myframe" src="http://www.csdn.net/ggmm/dd333.htm" frameborder="no" width="0" scrolling="no" height="0">

你可能感兴趣的:(apache,compiler,aix,ibm,编译器,sun)