トップ «前の日記(2017年05月27日) 最新 次の日記(2017年06月20日)» 編集

Masa's blog

検索キーワード:

2017年06月04日 Version up php-5.5.11 to php-7.1.5 [長年日記]

_ Version up php-5.5.11 to php-7.1.5

Build

$ tar xvf php-7.1.5.tar.bz2
$ cd php-7.1.5
$ cat ../php-7.1.5.diff | patch -p0
*** ./configure.ORG     2017-06-04 10:50:30.000000000 +0900
--- ./configure 2017-06-04 10:55:11.000000000 +0900
***************
*** 79826,79832 ****
  ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
 "
  if test "x$ac_cv_have_decl_isnan" = xyes; then :
!   ac_have_decl=1
  else
    ac_have_decl=0
  fi
--- 79826,79832 ----
  ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
 "
  if test "x$ac_cv_have_decl_isnan" = xyes; then :
!   ac_have_decl=0
  else
    ac_have_decl=0
  fi
***************
*** 79837,79843 ****
  ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
 "
  if test "x$ac_cv_have_decl_isinf" = xyes; then :
!   ac_have_decl=1
  else
    ac_have_decl=0
  fi
--- 79837,79843 ----
  ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
 "
  if test "x$ac_cv_have_decl_isinf" = xyes; then :
!   ac_have_decl=0
  else
    ac_have_decl=0
  fi
***************
*** 95505,95511 ****
  ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
 "
  if test "x$ac_cv_have_decl_isfinite" = xyes; then :
!   ac_have_decl=1
  else
    ac_have_decl=0
  fi
--- 95505,95511 ----
  ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
 "
  if test "x$ac_cv_have_decl_isfinite" = xyes; then :
!   ac_have_decl=0
  else
    ac_have_decl=0
  fi
***************
*** 95516,95522 ****
  ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
 "
  if test "x$ac_cv_have_decl_isnan" = xyes; then :
!   ac_have_decl=1
  else
    ac_have_decl=0
  fi
--- 95516,95522 ----
  ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
 "
  if test "x$ac_cv_have_decl_isnan" = xyes; then :
!   ac_have_decl=0
  else
    ac_have_decl=0
  fi
***************
*** 95527,95533 ****
  ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
 "
  if test "x$ac_cv_have_decl_isinf" = xyes; then :
!   ac_have_decl=1
  else
    ac_have_decl=0
  fi
--- 95527,95533 ----
  ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
 "
  if test "x$ac_cv_have_decl_isinf" = xyes; then :
!   ac_have_decl=0
  else
    ac_have_decl=0
  fi
$ ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysqli=mysqlnd --with-gd --with-zlib --with-bz2 --with-openssl=/usr/local/ssl
$ make
$ su
# make install && ldconfig
# cp php.ini-development /usr/local/lib/php7.ini
# vim /usr/local/lib/php7.ini
# cd /usr/local/lib
# rm php.ini
# ln -s php7.ini php.ini

_ After install php-7, apache got segfault

I have to remove line for old php5.

/usr/local/apache2/conf/httpd.conf

#DEL_LoadModule php5_module        modules/libphp5.so
LoadModule php7_module        modules/libphp7.so