GithubHelp home page GithubHelp logo

php and xdebug about docker-php-nginx HOT 5 CLOSED

trafex avatar trafex commented on May 28, 2024
php and xdebug

from docker-php-nginx.

Comments (5)

StephanKrauss avatar StephanKrauss commented on May 28, 2024

Hello,

i have add php7-pecl-xdebug.
When i call phpinfo() , i missing Xdebug.

Here the part from the dockerfile:

RUN apk --no-cache add php7 php7-fpm php7-opcache php7-mysqli php7-json php7-openssl php7-curl
php7-zlib php7-xml php7-phar php7-intl php7-dom php7-xmlreader php7-ctype php7-session php7-pecl-xdebug
php7-mbstring php7-gd nginx supervisor curl &&
rm /etc/nginx/conf.d/default.conf

I need a information for the php.ini. What is the correct setting in the php.ini ?

Your sincerly

Stephan

from docker-php-nginx.

TrafeX avatar TrafeX commented on May 28, 2024

Hi @StephanKrauss,

You need to add the php7-xdebug package to be installed and need to enable the extension.
It's not enabled by default, so you can do this in your Dockerfile as follows;

RUN echo 'zend_extension=xdebug.so' > /etc/php7/conf.d/xdebug.ini

from docker-php-nginx.

StephanKrauss avatar StephanKrauss commented on May 28, 2024

Hello,

can i use in the Dockerfile ?

RUN yes | pecl install xdebug \
    && echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
    && echo "xdebug.collect_return=1" >> /usr/local/etc/php/conf.d/xdebug.ini \
    && echo "xdebug.collect_includes=1" >> /usr/local/etc/php/conf.d/xdebug.ini \
    && echo "xdebug.show_mem_delta=1" >> /usr/local/etc/php/conf.d/xdebug.ini \
    && echo "xdebug.collect_params=4" >> /usr/local/etc/php/conf.d/xdebug.ini \
    && echo "xdebug.trace_format=1" >> /usr/local/etc/php/conf.d/xdebug.ini \
    && echo "xdebug.remote_enable=1" >> /usr/local/etc/php/conf.d/xdebug.ini \
    && echo "xdebug.remote_autostart=1" >> /usr/local/etc/php/conf.d/xdebug.ini \
    && echo "xdebug.remote_host='localhost'" >> /usr/local/etc/php/conf.d/xdebug.ini \
    && echo "xdebug.remote_port=9000" >> /usr/local/etc/php/conf.d/xdebug.ini \
    && echo "xdebug.remote_handler='dbgp'" >> /usr/local/etc/php/conf.d/xdebug.ini

Your sincerly

Stephan

from docker-php-nginx.

TrafeX avatar TrafeX commented on May 28, 2024

Hi @StephanKrauss,

Did yo saw my previous comment? #46 (comment)
You don't need the pecl package, you can just add php7-xdebug:

RUN apk add --no-cache php7-xdebug

To configure it, you need to add the echo's you have to this file: /etc/php7/conf.d/xdebug.ini
The file location you are using is incorrect.

from docker-php-nginx.

TrafeX avatar TrafeX commented on May 28, 2024

I'm going to close this issue due to inactivity. If you still need help, please let me know so I can re-open it!

from docker-php-nginx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.