我IBM 的AIX4.3下安裝用root用戶安裝apache,提示安裝成功!我一律採用默認值。
當我用 ../../bin/apachectl start 啓動時,提示語法錯誤:
Syntax error on line 296 of /rtdb/apache/apa20/conf/httpd.conf:
Expected </Directory> but saw </Directory>
由於我在windows、Linux 下都安裝過,從沒碰到這種錯誤。
請問這是怎麼回事?是apache內核問題?
應該不是AIX的問題?因爲在裝AIX時自帶IBM HTTPServer這個可以運行。
IBM HTTPServer 安裝在 /usr/HTTPServer
我的現在安裝在 /swes/apache
請問高手,具體是哪兒的錯?怎麼修改?
****************************************************************************
肯定是配置文件有錯誤啦,這麼一點錯誤你都不會改,好笨笨,你們公司怎麼會請你做事?太不公平了,我現在可失業中啊?誰來幫我呀。。。。。。。。。。。。。。。。。。。。。。。。。。。。
其實apache的配置文件也很有條理,你買一本apache管理大全,看一下就知道哪個選項是幹什麼的。
<Directory>與</Directory>是配對使用的。中間是一些配置選項。
錯誤提示是少了一個</Directory>。請注意:<Directory>也可帶屬性,這有點類似XML語法,你有沒有看過XML?但APACHE的配置文件並不全是按照XML文檔來制定的
怎麼改?
vi /swes/apache/conf/httpd.conf
然後搜索Directory,看看<Directory與</Directory>是否匹配就行了,很有可能是哪一行</Directory>被#給註釋掉了,你去掉它前面的#就行了。
快去改,改完了來給我加分
4 樓gflei(學而實習之)回覆於 2001-11-13 19:45:27 得分 0
先請教個實質問題:這個錯誤是由哪個模塊引起的?
也就是說:系統缺少了什麼文件,才引起這種問題?
今天在我調試的過程中,發現不但有這個錯誤還有<Files>類似錯誤。
首先想知道的是:這是操作系統的引起的還是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 </Directory> but saw </Directory>
你會得到很多有用的信息的,若解決了別忘來加分:)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
有可能與系統有關,關於讀</directory>配置命令,是在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 <[email protected]>
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 </Directory> but saw </Directory>
NOTE: "Expected </Directory> but saw </Directory>"
>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 </Files> but saw </Files>" 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 </Files> but saw </Files>" 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 <[email protected]> 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 <[email protected]>
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 </Directory> but saw </Directory>
NOTE: "Expected </Directory> but saw </Directory>"
>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 </Files> but saw </Files>" 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 </Files> but saw </Files>" 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 <[email protected]> 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