[PHP-users 2142] Re: kondara apache1.3.20 PHP4.0.3pl1 でPHP が動作しない。

Yasuo Ohgaki php-users@php.gr.jp
Tue, 18 Sep 2001 17:24:48 +0900


大垣です。

> こんにちは石田ともうします。
> もっともな指摘ありがとうございます。
> 前提条件として秀和システム書籍の
> 「PHP4かんたんWeb構築ガイド」を参考にしています。
> ※verが古いのはこの本に忠実に行っているからで。

php4のモジュールが読み込まれていない、httpd.confの場所が違う等では?
Apacheにmod_infoを組み込んでモジュールが読み込まれているか確認されては
どうでしょうか?

mod_info、mod_actionが組み込まれていれば、httd.conf内の以下部分を
変更するとServer Infoが表示できます。

====from default httpd.conf=====
# Allow remote server configuration reports, with the URL of
# http://servername/server-info (requires that mod_info.c be loaded).
# Change the ".your_domain.com" to match your domain to enable.
#
#<Location /server-info>
#    SetHandler server-info
#    Order deny,allow
#    Deny from all
#    Allow from .your_domain.com
#</Location>
==========
注) allow fromはIP AddressでもOkです。“192.168.0.”、“192.168.0.1”
等と設定できます。

Apacheのconfigureが面倒であれ
、--enable-shared=max, --enable-module=mostとすればほとんどのモジュー
ルが有効になります。このconfigureでインストールし、Server Infoを表示可
能にhttpd.confを設定してもServer Infoが表示できない場合は、編集してい
るhttpd.confが間違っています。findで探すと複数のhttpd.confが見つかるは
ずです。

参考までに私の開発用サーバーのServer Infoは以下のようになっています。
(mod_php4.cが在れば、PHPモジュールは組み込まれています)

==========
Apache Server Information
Server Settings, mod_ssl.c, mod_php4.c, mod_setenvif.c, mod_so.c,
mod_headers.c, mod_expires.c, mod_access.c, mod_rewrite.c,
mod_alias.c, mod_userdir.c, mod_actions.c, mod_cgi.c, mod_dir.c,
mod_autoindex.c, mod_info.c, mod_status.c, mod_negotiation.c,
mod_mime.c, mod_mime_magic.c, mod_log_config.c, mod_define.c,
mod_env.c, mod_vhost_alias.c, http_core.c

Server Version: Apache/1.3.20 (Unix) mod_ssl/2.8.4 OpenSSL/0.9.6a
Server Built: Sep 12 2001 12:24:18
API Version: 19990320:10
Run Mode: standalone
User/Group: nobody(99)/99
Hostname/port: tmp-dev.localnet:80
Daemons: start: 5    min idle: 5    max idle: 10    max: 150
Max Requests: per child: 0    keep alive: on    max per connection:
100
Threads: per child: 0
Excess requests: per child: 0
Timeouts: connection: 300    keep-alive: 15
Server Root: /usr
Config File: /etc/httpd/conf/httpd.conf
PID File: /var/run/httpd.pid
Scoreboard File: /var/run/httpd.scoreboard
以下省略
===========

PHP4.0.3を使う訳ではないようですが、このバージョンの--enable-trans-sid
にはバグが在るので使わないことお勧めします。(4.0.5以降はOK。 IIRC)

--
Ohgaki, Yasuo (大垣 靖男) 
Mail: yohgaki@dd.iij4u.or.jp