macos - How can I install xdebug PHP extension in PHP 7.1.14, which is installed on osx high sierra?

37

Here is php installed version detail on mac:

 php -v PHP 7.1.14 (cli) (built: Feb  2 2018 08:41:46) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
    with Xdebug v2.6.0, Copyright (c) 2002-2018, by Derick Rethans

Getting error on mac about installed version issue:

pecl/xdebug requires PHP (version >= 7.0.0), installed version is 5.6.28
No valid packages found
install failed
58

Answer

Solution:

copy yourphpinfo() output, either the command line or the page source of of the output. and paste it in the textarea here . you will get custom installation instructions.

366

Answer

Solution:

RUN apt update \
&& apt-get install -y apt-utils locales software-properties-common \
&& locale-gen en_US.UTF-8 \
&& update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8

RUN LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php \
&& apt update \
&& apt install -y curl git unzip ntp imagemagick \
    php7.1-fpm php7.1-cli php7.1-fpm php7.1-dev php7.1-gd \
    php7.1-curl php7.1-mbstring php7.1-soap php7.1-xml php7.1-readline \
    php7.1-zip php7.1-intl php7.1-pgsql php-imagick php-xdebug \
&& mkdir /run/php \
&& phpdismod -s cli xdebug

RUN sed -i "s/error_reporting = .*/error_reporting = E_ALL/" /etc/php/7.1/cli/php.ini \
&& sed -i "s/display_errors = .*/display_errors = On/" /etc/php/7.1/cli/php.ini \
&& sed -i "s/memory_limit = .*/memory_limit = 512M/" /etc/php/7.1/cli/php.ini \
&& sed -i "s/;date.timezone.*/date.timezone = UTC/" /etc/php/7.1/cli/php.ini \
&& sed -i "s/error_reporting = .*/error_reporting = E_ALL/" /etc/php/7.1/fpm/php.ini \
&& sed -i "s/display_errors = .*/display_errors = On/" /etc/php/7.1/fpm/php.ini \
&& sed -i "s/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/" /etc/php/7.1/fpm/php.ini \
&& sed -i "s/memory_limit = .*/memory_limit = 512M/" /etc/php/7.1/fpm/php.ini \
&& sed -i "s/upload_max_filesize = .*/upload_max_filesize = 100M/" /etc/php/7.1/fpm/php.ini \
&& sed -i "s/post_max_size = .*/post_max_size = 100M/" /etc/php/7.1/fpm/php.ini \
&& sed -i "s/;date.timezone.*/date.timezone = UTC/" /etc/php/7.1/fpm/php.ini \
&& sed -i "s/;daemonize = yes/daemonize = no/" /etc/php/7.1/fpm/php-fpm.conf \
&& sed -i "s/listen = .*/listen = 0.0.0.0:9000/" /etc/php/7.1/fpm/pool.d/www.conf
94

Answer

Solution:

For PHP 5.6.28 you need an older xdebug version.

You need to do:pecl install xdebug-2.5.5

People are also looking for solutions to the problem: php - can't able to fetch meta tag for particular url

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.