2006-02-21 :-)
_ 朝
0600 起床。
_ 仕事
0710 寒川。
自転車通勤。
昨晩が寒かったので今朝も寒いと期待したのだけど、そうでもなかった。
出勤することには汗をかいていた。
そして「 Melodies of Life 」を脳内再生して思い出し泣き。
_ Mac OS X に Apache 用の PHP4 modules を入れる
pkgsrc を使う。
ref
apache2
www/apache2 を入れておく。
Makefile
あらかじめ www/php4/Makefile.php に以下を追加しておく。
CONFIGURE_ARGS+= --enable-i18n --enable-mbstring --enable-mbstr-enc-tra
www/php4 と www/ap-php を make する。
www/ap-php を make すれば php4 も入ってるか?
cd /usr/pkgsrc/www/ap-php sudo bmake install clean : ===> Required package expat>=2.0.0: NOT found ===> Installing for expat-2.0.0 ===> expat-1.95.8nb2 is already installed - perhaps an older version? *** If so, you may use either of: *** - "pkg_delete expat-1.95.8nb2" and "/usr/pkg/bin/bmake reinstall" to upgrade properly *** - "/usr/pkg/bin/bmake update" to rebuild the package and all of its dependencies *** - "/usr/pkg/bin/bmake replace" to replace only the package without re-linking *** dependencies, risking various problems. *** Error code 1
言われたとおりに実行。
cd /usr/pkgsrc/textproc/expat; sudo bmake update
再度 www/ap-php
cd /usr/pkgsrc/www/ap-php sudo bmake install clean
httpd.conf
以下を書いておく。
LoadModule php4_module lib/httpd/mod_php4.so AddHandler application/x-httpd-php .php AddType application/x-httpd-php .php
php.ini
/usr/pkg/etc/php.ini に以下を書いておく。
% diff -u /usr/pkg/share/examples/php/php.ini-recommended /usr/pkg/etc/php.ini --- /usr/pkg/share/examples/php/php.ini-recommended Tue Feb 21 19:34:37 2006 +++ /usr/pkg/etc/php.ini Tue Feb 21 22:10:45 2006 @@ -72,6 +72,7 @@ ; when calling a function. The PHP 4 style to do this is by making the ; function require the relevant argument by reference. +zend_extension_ts = /Users/rin/public_html/fr/ioncube/ioncube_loader_dar_4.4_ts.so ;;;;;;;;;;;;;;;;;;;; ; Language Options ; @@ -1038,19 +1039,19 @@ [mbstring] ; language for internal character representation. -;mbstring.language = Japanese +mbstring.language = Japanese ; internal/script encoding. ; Some encoding cannot work as internal encoding. ; (e.g. SJIS, BIG5, ISO-2022-*) -;mbstring.internal_encoding = EUC-JP +mbstring.internal_encoding = EUC-JP ; http input encoding. -;mbstring.http_input = auto +mbstring.http_input = auto ; http output encoding. mb_output_handler must be ; registered as output buffer to function -;mbstring.http_output = SJIS +mbstring.http_output = EUC-JP ; enable automatic encoding translation accoding to ; mbstring.internal_encoding setting. Input chars are @@ -1061,11 +1062,11 @@ ; automatic encoding detection order. ; auto means -;mbstring.detect_order = auto +mbstring.detect_order = auto ; substitute_character used when character cannot be converted ; one from another -;mbstring.substitute_character = none; +mbstring.substitute_character = none; ; overload(replace) single byte functions by mbstring functions. ; mail(), ereg(), etc are overloaded by mb_send_mail(), mb_ereg(),
apache
再起動。しないといけないようだ。
sudo /System/Library/StartupItems/Apache/Apache restart
test.php
<?php phpinfo(); ?> を実行するとこう。
'./configure' '--enable-i18n' '--enable-mbstring' '--enable-mbstr-enc-trans' '--without-mysql' '--without-iconv' '--disable-posix' '--with-config-file-path=/Volumes/NetBSD/pkg/etc' '--with-exec-dir=/Volumes/NetBSD/pkg/libexec/php4' '--with-regex=system' '--enable-memory-limit' '--enable-track-vars' '--enable-ipv6' '--with-openssl=/usr' '--with-apxs2=/Volumes/NetBSD/pkg/sbin/apxs' '--prefix=/Volumes/NetBSD/pkg' '--host=powerpc-apple-darwin' '--mandir=/Volumes/NetBSD/pkg/man'
Σ( ̄□ ̄;;
( ̄ω ̄)ノ