FreeBSD/suPHP のバックアップ差分(No.1)


  • 追加された行はこの色です。
  • 削除された行はこの色です。
*suPHP [#u1dc2155]


**環境 [#p59e3df5]
 FreeBSD 6.1-RELEASE-p15
 Apache/2.2.4
 PHP 5.2.1
 suPHP 0.6.2

**PHPをCGIモードで動かすよう再コンパイル・インストール [#z90b6ff6]
 # tar zxvf php-5.2.1.tar.gz
 # cd php-5.2.1
 # ./configure --with-mysql=/usr/local \
  --enable-cgi --disable-cli --disable-pear \
  --enable-force-cgi-redirect \
  --with-tsrm-pth --enable-mbstring \
  --enable-mbstr-enc-trans --enable-trans-sid \
  --enable-versioning
 #make ;make install

**suPHPインストール [#n7762069]

***ソースダウンロードここで最新版をダウンロードしてくる [#xa5d5030]
[[suPHP Homepage>http://www.suphp.org/Home.html]]

***tarボールの展開 [#p5ee83a9]
 $ tar zxvf suphp-0.6.2.tar.gz
 $ cd suphp-0.6.2

***コンフィグ [#e4974c7a]
 $ ./configure --with-apache-user=www \
 --with-php=/usr/local/bin/php --disable-checkpath \
 --disable-checkuid --disable-checkgid \
 --with-min-uid=100 --with-min-gid=100 \
 --with-apr=/usr/local/bin/apr-1-config 

***suPHP_AddHandlerを使えるようにmod_suphp.cを修正 [#t650b7cd]
下記のように修正すると、ApacheコンフィグファイルでsuPHP_AddHandlerが使用可能になる。
 $ vi ./src/apache2/mod_suphp.c
 324     AP_INIT_ITERATE("suPHP_AddHandler", suphp_handle_cmd_add_handler, NULL, ACCESS_C       ONF, "Tells mod_suphp to handle these MIME-types"),
                     ↓↓
 324     AP_INIT_ITERATE("suPHP_AddHandler", suphp_handle_cmd_add_handler, NULL, RSRC_CONF | ACCESS_C        ONF, "Tells mod_suphp to handle these MIME-types"),

***make,make instlal [#u7a7ca06]
 $ su
 # make ;make install