1

Hello I installed the apache with debian's 9 installation. Then installed php7.0 with apt-get but I need to install php7.1, at first I do

$ su
$ apt-get purge php7.0 

so I downloaded from http://php.net/downloads.php php 7.1.10 and make this

$ ./configure --with-mcrypt
$ make
$ make install

but phpinfo() get the php7.0, so I make

$ su
$ apt-get purge php7.0 
$ apt-get autoremove php7.0

and know phpinfo() is not working. I sumed that now php is not installed.

Then downloaded from http://php.net/downloads.php php 7.1.11 (new today) and inside

$ tar jxvf php-7.1.11.tar.bz2
$ apt-get install build-essential
$ apt-get install libxml2-dev libmcrypt-dev libjpeg-dev
$ cd php-7.1.11
$ ./configure --with-mcrypt --with-pdo-pgsql=/etc/postgresql/9.6/main --with-openssl=/usr/bin/openssl --with-zlib --with-apxs2=/usr/bin/apxs2

And between all the checks I get the next errors

Configuring SAPI modules
checking for Apache 2.0 handler-module support via DSO through APXS... [Fri Oct 27 12:30:45.328686 2017] [core:warn] [pid 12056] AH00111: Config variable ${APACHE_RUN_DIR} is not defined
apache2: Syntax error on line 80 of /etc/apache2/apache2.conf: DefaultRuntimeDir must be a valid directory, absolute or relative to ServerRoot
yes

configure: error: Cannot find OpenSSL's <evp.h>

What's wrong with this?

bgtvfr
  • 1,224
  • 10
  • 19

1 Answers1

0

apt-get install libssl-dev

You must install openssl development files in order to compile php

https://packages.debian.org/stretch/libssl-dev

Also, once you compile php successfully, don't forget to change apache module to the right directory for php.so

There must be a line looking line LoadModule php7_module modules/libphp7.so in apache configuration

bgtvfr
  • 1,224
  • 10
  • 19