<note>First consider fallowing all the previous steps the WD MyBook World Edition Hacks tutorial</note> <note tip>Please read the official PHP documentation before proceeding. PHP Installation and Configuration</note>
# cd /tmp
# wget http://ro.php.net/get/php-5.2.5.tar.gz/from/this/mirror
# mv mirror php-5.2.5.tar.gz
# gunzip php-5.2.5.tar.gz # tar -xvf php-5.2.5.tar
# cd php-5.2.5
# /opt/bin/ipkg install libxml2 # /opt/bin/ipkg install libxslt # /opt/bin/ipkg install zlib # /opt/bin/ipkg install bzip2 # /opt/bin/ipkg install openssl # /opt/bin/ipkg install openssl-dev # /opt/bin/ipkg install php-curl # /opt/bin/ipkg install php-gd # /opt/bin/ipkg install php-imap # /opt/bin/ipkg install php-ldap # /opt/bin/ipkg install php-mbstring # /opt/bin/ipkg install php-mysql # /opt/bin/ipkg install php-pear # /opt/bin/ipkg install libpng # /opt/bin/ipkg install gettext
# ./configure --prefix=/usr/local/php5 --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --enable-cgi --enable-fastcgi --enable-force-cgi-redirect --with-curl=shared,/opt --enable-discard-path --with-openssl=shared,/opt --enable-ftp --with-gd=/opt --enable-gd-native-ttf --with-freetype-dir=/opt --with-jpeg-dir=/opt --with-png-dir=/opt --enable-exif=shared --enable-xml=shared --enable-xmlreader=shared --with-libxml-dir=/opt --with-xpm-dir=/opt --with-xsl=shared,/opt --with-zlib=shared,/opt --enable-mbstring --enable-mbregex --with-iconv --with-regex=php --with-gettext=/opt --with-bz2=shared,/opt --with-mysql=/usr/local/mysql --with-mysqli --with-mysql-sock=/tmp/mysql.sock --with-pdo-mysql=/usr/local/mysql --with-pdo-sqlite=shared --with-sqlite=shared --enable-calendar
# make # make test # make install
# cp php.ini-dist /usr/local/php5/lib/php.ini