Ondrej氏に泣いてすがっても、5.6までしかPHPはありません。仕方がないないなら、コンパイルしちゃいましょう。(いろいろためしたので徹夜ですけど;;)
ダウンロードから、php-5.5.34.tar.gz (sig) [17,354Kb] をもらってきます。
/optに展開しましょう。(sudo nautilusなどで) # apt-get install apache2 apache2-dev # apt-get install libxslt1-dev libcurl4-openssl-dev pkg-config libssl-dev libbz2-dev libjpeg-dev libpng-dev libfreetype6-dev libmcrypt-dev # cd /opt/php-5.5.34 # ./configure --enable-cli \ --with-zlib-dir \ --with-freetype-dir \ --enable-mbstring \ --with-libxml-dir=/usr \ --enable-soap \ --enable-calendar \ --with-curl \ --with-mcrypt \ --with-zlib \ --with-gd \ --disable-rpath \ --enable-inline-optimization \ --with-bz2 \ --with-zlib \ --enable-sockets \ --enable-sysvsem \ --enable-sysvshm \ --enable-pcntl \ --enable-mbregex \ --with-mhash \ --enable-zip \ --with-pcre-regex \ --with-mysql \ --with-pdo-mysql \ --with-mysqli \ --with-png-dir=/usr \ --enable-gd-native-ttf \ --with-openssl \ --with-fpm-user=nginx \ --with-fpm-group=nginx \ --with-libdir=/lib/x86_64-linux-gnu \ --enable-ftp \ --with-gettext \ --with-gd \ --with-jpeg-dir=/usr/lib/ \ --enable-fpm \ --enable-maintainer-zts \ --with-apxs2=/usr/bin/apxs
# make # make install # apt install libtool-bin # libtool --finish /opt/php-5.5.34/libs # cp php.ini-development /usr/local/lib/php.ini
# gedit /etc/apache2/mods-available/php5.conf
<FilesMatch ".+\.ph(p[345]?|t|tml)$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch ".+\.phps$">
SetHandler application/x-httpd-php-source
# Deny access to raw php sources by default
# To re-enable it's recommended to enable access to the files
# only in specific virtual host or directory
Require all denied
</FilesMatch>
# Deny access to files without filename (e.g. '.php')
<FilesMatch "^\.ph(p[345]?|t|tml|ps)$">
Require all denied
</FilesMatch>
# Running PHP scripts in user directories is disabled by default
#
# To re-enable PHP in user directories comment the following lines
# (from <IfModule ...> to </IfModule>.) Do NOT set it to On as it
# prevents .htaccess files from disabling it.
<IfModule mod_userdir.c>
<Directory /home/*/public_html>
php_admin_flag engine Off
</Directory>
</IfModule>
# ln -s /etc/apache2/mods-available/php5.conf /etc/apache2/mods-enabled/ php5.loadも同様になってることを確認。~
# service apache2 restart
# gedit /var/www/html/index.html <?php phpinfo(); ?>
にする。
# mv index.html index.php
ん!もっかいリスタートしたほうがいいかもしれませんが、これでとりあえずのところ、pukiwiki-advanceがphp7.0対応まで待てますね。