PHP6 を使ってみる 1

PHP6 をそろそろ試してみようと思ったので、まずはインストールから。
OS は、 Mac OSX Tiger.
インストール先は /opt/local/php6 .

まずは configure.

./configure   \
--prefix=/opt/local/php6 \
--with-apxs2=/opt/local/apache2/bin/apxs  \
--enable-filter=shared \
--with-openssl=shared  \
--with-bz2=shared  \
--with-curl=shared \
--enable-exif=shared \
--with-gd=shared \
--with-jpeg-dir=/opt/local \
--with-png-dir=/opt/local \
--with-zlib-dir=/opt/local \
--with-freetype-dir=/opt/local \
--enable-gd-native-ttf=shared \
--enable-gd-jis-conv=shared \
--enable-pdo \
--with-pdo-mysql=/opt/local/lib/mysql5 \
--with-ldap=shared \
--with-imap=/opt/local \
--with-kerberos \
--with-imap-ssl=shared \
--enable-mbstring \
--with-xsl=shared  \
--with-xmlrpc=shared \
--enable-zip=shared  \
--enable-intl=shared \
--with-gettext=shared,/opt/local \
--with-mcrypt=shared,/opt/local

いちいち *-dir の類にパス指定するのも馬鹿っぽいから LD_LIBRARY_PATH や LDFLAGS に /opt/local/lib 入れたりしたんだけど、結局上手く行かずにベタに指定したけど、そういうもんなのかな?


あと、入ってると make で失敗するオプションが --enable-phar. /Users/kazuaki/work/php/php6/php6.0-200807250830/ext/phar/phar.php requires PHP extension Phar. って言われても、どうすんだよって感じ。 PHP5 の Phar は入ってるけど、そこじゃないんだろな。
気になるけど、追っかけようと思ったけど、今日は力尽きたので、やる気になったら調べる。
PDO に関しても OSX だと shared は、まだサポートされてなかったりで shared 外したりした。


んで configure 終わったら、いつものように make && make test んで、 sudo make install


最後に、cd /opt/local/bin/; sudo ln -s /opt/local/php6/bin/php php6 した。

疲れたので今日はここまで。