Apache無法啓動解決 the requested operation has failed

apache報"the requested operation has failed!"錯誤,不能啓動時,問題解決辦法如下:

原因一:80端口占用例如IIS,另外就是迅雷。我的apache服務器就是被迅雷害得無法啓用!

原因二:軟件衝突裝了某些軟件會使apache無法啓動如Dr.com 你打開網絡連接->TcpIp屬性->高級->WINS標籤 把netbios的lmhosts對勾去掉,禁用tcp/ip的netbios. 然後再啓動應該就可以了。

原因三:httpd.conf配置錯誤如果apache的配置文件httpd.conf搞錯了,在windows裏啓動它,會提示the requested operation has failed,這是比較鬱悶的事,因爲查錯要看個半天。 其實可以用命令行模式啓動apache,並帶上參數,apache會提示你哪句有誤,然後就可以針對性的解決。

檢查錯誤方法:進入cmd 然後進入 Apache安裝目錄(具體爲你自己的安裝目錄)\bin> httpd.exe -w -n "Apache2.2" -k start

(引號中的Apache2.2修改爲你的Apache服務名,我的是2.2.4版,服務名就是Apache2.2,可以到計算機服務裏找)



提示123行有問題時(提示:Syntax error on line 123 of ...........),打開Apache安裝目錄\conf\httpd.conf 找到第123行的內容看看有什麼明顯的問題,修改過來,如果沒有的話,根據錯誤內容查找解決辦法:上面報的錯誤是: LoadModule takes two arguments, a module nam
e and the name of a shared object file to load it from ...

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

PHP錯誤:LoadModule takes two arguments,a module name and the name of a shared object

Syntax error on line 60 of C:/Program Files/Apache Group/Apache2/conf/httpd.conf:

LoadModule takes two arguments, a module name and the name of a shared object file to load it from Note the errors or messages above, and press the key to exit. ….

是因爲LoadModule php5_module C:/Program File/PHP/php5apache2_2.dll 有空格出現

改成:LoadModule php5_module C:/Progra~1/PHP/php5apache2_2.dll

在這裏:Program File = Program~1

或者只要在參數兩端加上引號就可以了
LoadModule php5_module "d:/Program Files/php5.3.5/php5apache2_2.dll"

轉自:http://hi.baidu.com/tuqin526/item/97d5600eeed120cb2f4c6ba2

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


然後再次啓動,報錯如下:


錯誤描述:[Mon Aug 26 17:02:51 2013] [crit] Apache is running a threaded MPM, but your PHP
 Module is not compiled to be threadsafe.  You need to recompile PHP.

【詳細錯誤】:Apache is running a threaded MPM, but your php module is not compiled to be threadsafe. you need to recompile php. pre-configuration failed.

【造成原因】:服務管理器由IIS更換至Apache,原php版本是無線程安全(nts)的,因此需要將php同時更換爲線程安全版本(ts).

【處理辦法】:

1.  下載新的php5.2.17 VC6 x86 Thread Safe,更新原php程序.


2. 重新配置參數項。







發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章