2007年11月6日火曜日

Vine3.2 で PHP5 をインストールしたら Apache2 が起動しない

[crit] Apache is running a threaded MPM, but your PHP Module 
is not compiled to be threadsafe.
You need to recompile PHP. Pre-configuration failed
こんなエラーでApacheが起動できない。

そんな時は、
# update-alternatives --config apache2

Selection Alternative
-----------------------------------------------
+ 1 /usr/sbin/apache2.worker
* 2 /usr/sbin/apache2.prefork
3 /usr/sbin/apache2.threadpool
4 /usr/sbin/apache2.perchild

Press enter to keep the default[*], or type selection number: 2
として、preforkを選択すると解決するらしいが、そのコマンドを実行しても
bash: update-alternatives: command not found
となって、実行できない。
# /usr/sbin/apache2.prefork
で実行すると動くけど。。。

webで他の方法を探していると、シンボリックリンクで回避できる方法があった。
#del /etc/alternatives/apache2
#ln -s /usr/sbin/apache2.prefork* /etc/alternatives/apache2
■ソース
⇒ http://ondes-martenot.info/blog/archives/2004/09/16_1354.php

実行した結果、Apacheは起動できた。
けど、この方法は なんとなくイヤなので、他の方法を探す。

webminでモジュール設定を見ると、「prefork」があった。
これのチェックボックスをオンにして、「worker」をオフ。
設定を適用して、Apacheを起動してみる。

・・・起動しない orz

やっぱり最初のやり方でいいです orz

0 件のコメント :