久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    • <bdo id='yxAxJ'></bdo><ul id='yxAxJ'></ul>

    <i id='yxAxJ'><tr id='yxAxJ'><dt id='yxAxJ'><q id='yxAxJ'><span id='yxAxJ'><b id='yxAxJ'><form id='yxAxJ'><ins id='yxAxJ'></ins><ul id='yxAxJ'></ul><sub id='yxAxJ'></sub></form><legend id='yxAxJ'></legend><bdo id='yxAxJ'><pre id='yxAxJ'><center id='yxAxJ'></center></pre></bdo></b><th id='yxAxJ'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='yxAxJ'><tfoot id='yxAxJ'></tfoot><dl id='yxAxJ'><fieldset id='yxAxJ'></fieldset></dl></div>
  • <legend id='yxAxJ'><style id='yxAxJ'><dir id='yxAxJ'><q id='yxAxJ'></q></dir></style></legend>

    <small id='yxAxJ'></small><noframes id='yxAxJ'>

  • <tfoot id='yxAxJ'></tfoot>

      1. 使用 Docker Compose 和 WordPress 鏡像設置 Xdebug

        Setting up Xdebug with Docker Compose and WordPress image(使用 Docker Compose 和 WordPress 鏡像設置 Xdebug)

          • <bdo id='sR0iF'></bdo><ul id='sR0iF'></ul>
            • <i id='sR0iF'><tr id='sR0iF'><dt id='sR0iF'><q id='sR0iF'><span id='sR0iF'><b id='sR0iF'><form id='sR0iF'><ins id='sR0iF'></ins><ul id='sR0iF'></ul><sub id='sR0iF'></sub></form><legend id='sR0iF'></legend><bdo id='sR0iF'><pre id='sR0iF'><center id='sR0iF'></center></pre></bdo></b><th id='sR0iF'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='sR0iF'><tfoot id='sR0iF'></tfoot><dl id='sR0iF'><fieldset id='sR0iF'></fieldset></dl></div>

                  <tbody id='sR0iF'></tbody>
                <legend id='sR0iF'><style id='sR0iF'><dir id='sR0iF'><q id='sR0iF'></q></dir></style></legend>
              • <small id='sR0iF'></small><noframes id='sR0iF'>

                1. <tfoot id='sR0iF'></tfoot>
                  本文介紹了使用 Docker Compose 和 WordPress 鏡像設置 Xdebug的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在嘗試使用 docker-compose 設置 Xdebug.我使用的是 PhpStorm IDE,我使用的 Docker 映像安裝了 PHP 7.2.我正在嘗試在此 WordPress 圖像的上下文中執行此操作.這是我當前的 docker-compose.yml 文件:

                   版本:'3'服務:D b:圖像:mysql:5.7端口:- 3306:3306"卷:- db_data:/var/lib/mysql重啟:總是環境:MYSQL_ROOT_PASSWORD:somewordpressMYSQL_DATABASE:wordpressMYSQL_USER:wordpressMYSQL_PASSWORD:wordpress網絡構建腳本:建造: .依賴于取決于:- D b端口:- 8028:80"- 8029:8029"卷:- ./themes/XXXXX:/var/www/html/wp-content/themes/XXXX- ./plugins/XXXX:/var/www/html/wp-content/plugins/XXXXX- ./plugins/XXXXX:/var/www/html/wp-content/plugins/XXXXX- ./plugins/XXXXX:/var/www/html/wp-content/plugins/XXXXX- ./plugins/XXXXX:/var/www/html/wp-content/plugins/XXXXX- ./plugins/XXXXX:/var/www/html/wp-content/plugins/XXXXX- ./plugins/XXXXX:/var/www/html/wp-content/plugins/XXXXX- ./plugins/XXXXX:/var/www/html/wp-content/plugins/XXXXX- ./plugins/XXXXX:/var/www/html/wp-content/plugins/XXXXX重啟:總是環境:WORDPRESS_DB_HOST: db:3306WORDPRESS_DB_USER:wordpressWORDPRESS_DB_PASSWORD:wordpressVIRTUAL_HOST:leasepilot.local卷:數據庫數據:

                  然后我標記為 web-build-scripts(當然是構建的)的 Dockerfile 看起來像這樣:

                  來自 wordpress:latest工作目錄/var/www/html運行 pecl install xdebug-2.6.0 &&docker-php-ext-enable xdebug &&apt-get 更新 &&apt-get install nano &&出口條款=xterm復制搜索-替換-DB/./wp-content/Search-Replace-DB/復制上傳/./wp-content/uploads/復制 ./docker-config/xdebug.ini ../../../usr/local/etc/php/conf.d/xdebug.ini

                  我的本??地 docker-config 目錄中的 xdebug.ini 文件如下所示:

                  zend_extension=xdebug.soxdebug.default_enable=1xdebug.remote_autostart=1xdebug.remote_connect_back=0xdebug.remote_port=9001xdebug.remote_enable=1xdebug.idekey=PHPSTRxdebug.remote_host = docker.for.mac.internal

                  在 PHPStorm 中,我設置了如下調試設置:我已經像這樣設置了服務器映射:

                  我也像在 xdebug.ini 文件中一樣將調試端口設置為 9001:

                  當我運行命令 php -ini |grep xdebug 我的輸出如下:

                  root@a96543427809:/var/www/html# php -ini |grep xdebug無法加載 Xdebug - 它已被加載/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini,/usr/local/etc/php/conf.d/xdebug.ini調試xdebug 支持 =>啟用xdebug.auto_trace =>關閉 =>離開xdebug.cli_color =>0 =>0xdebug.collect_assignments =>關閉 =>離開xdebug.collect_includes =>在 =>在xdebug.collect_params =>0 =>0xdebug.collect_return =>關閉 =>離開xdebug.collect_vars =>關閉 =>離開xdebug.coverage_enable =>在 =>在xdebug.default_enable =>在 =>在xdebug.dump.COOKIE =>沒有價值 =>沒有價值xdebug.dump.ENV =>沒有價值 =>沒有價值xdebug.dump.FILES =>沒有價值 =>沒有價值xdebug.dump.GET =>沒有價值 =>沒有價值xdebug.dump.POST =>沒有價值 =>沒有價值xdebug.dump.REQUEST =>沒有價值 =>沒有價值xdebug.dump.SERVER =>沒有價值 =>沒有價值xdebug.dump.SESSION =>沒有價值 =>沒有價值xdebug.dump_globals =>在 =>在xdebug.dump_once =>在 =>在xdebug.dump_undefined =>關閉 =>離開xdebug.extended_info =>在 =>在xdebug.file_link_format =>沒有價值 =>沒有價值xdebug.filename_format =>沒有價值 =>沒有價值xdebug.force_display_errors =>關閉 =>離開xdebug.force_error_reporting =>0 =>0xdebug.gc_stats_enable =>關閉 =>離開xdebug.gc_stats_output_dir =>/tmp =>/tmpxdebug.gc_stats_output_name =>gcstats.%p =>gcstats.%pxdebug.halt_level =>0 =>0xdebug.idekey =>PHPSTR =>PHPSTRxdebug.max_nesting_level =>256 =>256xdebug.max_stack_frames =>-1 =>-1xdebug.overload_var_dump =>2 =>2xdebug.profiler_aggregate =>關閉 =>離開xdebug.profiler_append =>關閉 =>離開xdebug.profiler_enable =>關閉 =>離開xdebug.profiler_enable_trigger =>關閉 =>離開xdebug.profiler_enable_trigger_value =>沒有價值 =>沒有價值xdebug.profiler_output_dir =>/tmp =>/tmpxdebug.profiler_output_name =>cachegrind.out.%p =>cachegrind.out.%pxdebug.remote_addr_header =>沒有價值 =>沒有價值xdebug.remote_autostart =>在 =>在xdebug.remote_connect_back =>關閉 =>離開xdebug.remote_cookie_expire_time =>3600 =>3600xdebug.remote_enable =>在 =>在xdebug.remote_handler =>dbgp =>數據庫xdebug.remote_host =>docker.for.mac.internal =>docker.for.mac.internalxdebug.remote_log =>沒有價值 =>沒有價值xdebug.remote_mode =>請求 =>請求xdebug.remote_port =>9001 =>9001xdebug.remote_timeout =>200 =>200xdebug.scream =>關閉 =>離開xdebug.show_error_trace =>關閉 =>離開xdebug.show_exception_trace =>關閉 =>離開xdebug.show_local_vars =>關閉 =>離開xdebug.show_mem_delta =>關閉 =>離開xdebug.trace_enable_trigger =>關閉 =>離開xdebug.trace_enable_trigger_value =>沒有價值 =>沒有價值xdebug.trace_format =>0 =>0xdebug.trace_options =>0 =>0xdebug.trace_output_dir =>/tmp =>/tmpxdebug.trace_output_name =>trace.%c =>跟蹤.%cxdebug.var_display_max_children =>128 =>128xdebug.var_display_max_data =>512 =>512xdebug.var_display_max_depth =>3 =>3

                  我已經閱讀了幾個教程,但一直無法弄清楚這一點.任何人都有任何可以幫助我的見解?

                  解決方案

                  我會怎么做

                  • 首先你使用的是 wordpress:latest 所以你必須找到哪個 php您的 wordpress 圖像正在運行的版本.
                  • 然后檢查容器中是否安裝了xdebug.很可能不是!
                  • 使用 xdebug 安裝創建一個 Dockerfile 用于開發,不要將其用于生產,它會降低您的性能.
                  • 從那個 Dockerfile 構建 your-wordpress 鏡像.
                  • 您可能需要使用遠程主機詳細信息創建 xdebug.ini 文件,我正在使用 phpstrom 這就是我的 xdebug.ini 的樣子.我將此文件保存在我的主機中,并使用 volumes 復制它.
                  <塊引用>

                  zend_extension=xdebug.soxdebug.remote_enable=1xdebug.remote_handler=dbgpxdebug.remote_port=10000 # 不要使用 9000 它通常被 php-fpm 使用xdebug.remote_autostart=1xdebug.remote_connect_back=0xdebug.idekey=PHPSTRMxdebug.remote_host=host-ip-here

                  這就是我的 docker-compose 文件的樣子

                  <塊引用>

                  版本:'2'服務:我的服務:建造:上下文:./devdockerfile: Dockerfile端口:- 8080:80"重啟:總是環境:- RUNTIME_ENVIRONMENT=本地工作目錄:/src卷:- ./src:/src- ./php-ini-overrides-dev.ini/xdebug.ini:/etc/php/7.1/mods-available/xdebug.ini

                  • 然后使用 xdebug.ini 詳細信息配置 phpstorm 遠程調試.
                  • 要確保加載了 xdebug 配置,請登錄容器并運行 php -ini |grep xdebug
                  • 這是讓 xdebug 工作的一種方式.
                  • 如果它不起作用,請啟用 xdebug 日志,將 xdebug.remote_log=/log_path/xdebug.log 添加到 xdebug.ini 將有助于診斷問題.
                  • 如果您在設置 phpstorm 遠程調試方面還需要幫助,請告訴我.其實那里有很多資源.

                  I am trying to set up Xdebug with docker-compose. I'm using PhpStorm IDE and the Docker image I'm using installs PHP 7.2. I'm trying to do this within the context of this WordPress image. Here is my current docker-compose.yml file:

                      version: '3'
                  
                      services:
                     db:
                       image: mysql:5.7
                       ports: 
                         - "3306:3306"
                       volumes:
                         - db_data:/var/lib/mysql
                       restart: always
                       environment:
                         MYSQL_ROOT_PASSWORD: somewordpress
                         MYSQL_DATABASE: wordpress
                         MYSQL_USER: wordpress
                         MYSQL_PASSWORD: wordpress
                  
                     web-build-scripts:
                       build: .
                       depends_on:
                         - db
                       ports:
                         - "8028:80"
                         - "8029:8029"
                  
                       volumes:
                         - ./themes/XXXXX:/var/www/html/wp-content/themes/XXXX
                         - ./plugins/XXXX:/var/www/html/wp-content/plugins/XXXXX
                         - ./plugins/XXXXX:/var/www/html/wp-content/plugins/XXXXX
                         - ./plugins/XXXXX:/var/www/html/wp-content/plugins/XXXXX
                         - ./plugins/XXXXX:/var/www/html/wp-content/plugins/XXXXX
                         - ./plugins/XXXXX:/var/www/html/wp-content/plugins/XXXXX
                         - ./plugins/XXXXX:/var/www/html/wp-content/plugins/XXXXX
                         - ./plugins/XXXXX:/var/www/html/wp-content/plugins/XXXXX
                         - ./plugins/XXXXX:/var/www/html/wp-content/plugins/XXXXX
                  
                  
                       restart: always
                       environment:
                         WORDPRESS_DB_HOST: db:3306
                         WORDPRESS_DB_USER: wordpress
                         WORDPRESS_DB_PASSWORD: wordpress
                         VIRTUAL_HOST: leasepilot.local
                  
                  volumes:
                      db_data:
                  

                  Then my Dockerfile which I have tagged as web-build-scripts (and built of course) looks like this:

                  FROM wordpress:latest
                  
                  WORKDIR /var/www/html
                  RUN pecl install xdebug-2.6.0 
                      && docker-php-ext-enable xdebug 
                      && apt-get update 
                      && apt-get install nano 
                      && export TERM=xterm
                  
                  COPY Search-Replace-DB/ ./wp-content/Search-Replace-DB/
                  COPY uploads/ ./wp-content/uploads/
                  COPY ./docker-config/xdebug.ini ../../../usr/local/etc/php/conf.d/xdebug.ini
                  

                  Where my xdebug.ini file that is within my docker-config directory locally looks like so:

                  zend_extension=xdebug.so
                  xdebug.default_enable=1
                  xdebug.remote_autostart=1
                  xdebug.remote_connect_back=0
                  xdebug.remote_port=9001
                  xdebug.remote_enable=1
                  xdebug.idekey=PHPSTR
                  xdebug.remote_host = docker.for.mac.internal
                  

                  Within PHPStorm I have set the debug settings like so: And I have set up the server mapping like so:

                  I have also set the Debug Port to 9001 as I did in my xdebug.ini file:

                  When I run the command php -ini | grep xdebug my output is as follows:

                  root@a96543427809:/var/www/html# php -ini | grep xdebug
                  Cannot load Xdebug - it was already loaded
                  /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini,
                  /usr/local/etc/php/conf.d/xdebug.ini
                  xdebug
                  xdebug support => enabled
                  xdebug.auto_trace => Off => Off
                  xdebug.cli_color => 0 => 0
                  xdebug.collect_assignments => Off => Off
                  xdebug.collect_includes => On => On
                  xdebug.collect_params => 0 => 0
                  xdebug.collect_return => Off => Off
                  xdebug.collect_vars => Off => Off
                  xdebug.coverage_enable => On => On
                  xdebug.default_enable => On => On
                  xdebug.dump.COOKIE => no value => no value
                  xdebug.dump.ENV => no value => no value
                  xdebug.dump.FILES => no value => no value
                  xdebug.dump.GET => no value => no value
                  xdebug.dump.POST => no value => no value
                  xdebug.dump.REQUEST => no value => no value
                  xdebug.dump.SERVER => no value => no value
                  xdebug.dump.SESSION => no value => no value
                  xdebug.dump_globals => On => On
                  xdebug.dump_once => On => On
                  xdebug.dump_undefined => Off => Off
                  xdebug.extended_info => On => On
                  xdebug.file_link_format => no value => no value
                  xdebug.filename_format => no value => no value
                  xdebug.force_display_errors => Off => Off
                  xdebug.force_error_reporting => 0 => 0
                  xdebug.gc_stats_enable => Off => Off
                  xdebug.gc_stats_output_dir => /tmp => /tmp
                  xdebug.gc_stats_output_name => gcstats.%p => gcstats.%p
                  xdebug.halt_level => 0 => 0
                  xdebug.idekey => PHPSTR => PHPSTR
                  xdebug.max_nesting_level => 256 => 256
                  xdebug.max_stack_frames => -1 => -1
                  xdebug.overload_var_dump => 2 => 2
                  xdebug.profiler_aggregate => Off => Off
                  xdebug.profiler_append => Off => Off
                  xdebug.profiler_enable => Off => Off
                  xdebug.profiler_enable_trigger => Off => Off
                  xdebug.profiler_enable_trigger_value => no value => no value
                  xdebug.profiler_output_dir => /tmp => /tmp
                  xdebug.profiler_output_name => cachegrind.out.%p => cachegrind.out.%p
                  xdebug.remote_addr_header => no value => no value
                  xdebug.remote_autostart => On => On
                  xdebug.remote_connect_back => Off => Off
                  xdebug.remote_cookie_expire_time => 3600 => 3600
                  xdebug.remote_enable => On => On
                  xdebug.remote_handler => dbgp => dbgp
                  xdebug.remote_host => docker.for.mac.internal => docker.for.mac.internal
                  xdebug.remote_log => no value => no value
                  xdebug.remote_mode => req => req
                  xdebug.remote_port => 9001 => 9001
                  xdebug.remote_timeout => 200 => 200
                  xdebug.scream => Off => Off
                  xdebug.show_error_trace => Off => Off
                  xdebug.show_exception_trace => Off => Off
                  xdebug.show_local_vars => Off => Off
                  xdebug.show_mem_delta => Off => Off
                  xdebug.trace_enable_trigger => Off => Off
                  xdebug.trace_enable_trigger_value => no value => no value
                  xdebug.trace_format => 0 => 0
                  xdebug.trace_options => 0 => 0
                  xdebug.trace_output_dir => /tmp => /tmp
                  xdebug.trace_output_name => trace.%c => trace.%c
                  xdebug.var_display_max_children => 128 => 128
                  xdebug.var_display_max_data => 512 => 512
                  xdebug.var_display_max_depth => 3 => 3
                  

                  I've gone through several tutorials and haven't been able to figure this out. Anyone hav any insights that may help me?

                  解決方案

                  What i would do

                  • First you are using wordpress:latest so you have to find which php version your wordpress image is running.
                  • Then check is xdebug is installed in the container. Most probably not!
                  • Create a Dockerfile with xdebug installation for the development, dont use this for production, it will slow down your performance.
                  • Build your-wordpress image from that Dockerfile.
                  • You might need to create the xdebug.ini file with your remote host details, i'm using phpstrom this is what my xdebug.ini looks like. I keep this file in my host machine and copy it with volumes.

                  zend_extension=xdebug.so
                  xdebug.remote_enable=1
                  xdebug.remote_handler=dbgp
                  xdebug.remote_port=10000 # dont use 9000 its usually used by the php-fpm
                  xdebug.remote_autostart=1
                  xdebug.remote_connect_back=0
                  xdebug.idekey=PHPSTRM
                  xdebug.remote_host=host-ip-here
                  

                  This is how my docker-compose file looks like

                  version: '2'
                  services:
                      my-service:
                          build:
                            context: ./dev
                            dockerfile: Dockerfile
                          ports:
                              - "8080:80"
                          restart: always
                          environment:
                              - RUNTIME_ENVIRONMENT=local
                          working_dir: /src
                          volumes:
                              - ./src:/src
                              - ./php-ini-overrides-dev.ini/xdebug.ini:/etc/php/7.1/mods-available/xdebug.ini
                  

                  • Then configure phpstorm remote debugging with xdebug.ini details.
                  • To make sure xdebug config loaded, log into container and run php -ini | grep xdebug
                  • This is one way of getting xdebug works.
                  • If its not working enable xdebug log, add xdebug.remote_log=/log_path/xdebug.log to xdebug.ini will help to diagnose the issue.
                  • Let me know if you also need help with setuping the phpstorm remote debugging. Actually there are lots of resources out there.

                  這篇關于使用 Docker Compose 和 WordPress 鏡像設置 Xdebug的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Deadlock exception code for PHP, MySQL PDOException?(PHP、MySQL PDOException 的死鎖異常代碼?)
                  PHP PDO MySQL scrollable cursor doesn#39;t work(PHP PDO MySQL 可滾動游標不起作用)
                  PHP PDO ODBC connection(PHP PDO ODBC 連接)
                  Using PDO::FETCH_CLASS with Magic Methods(使用 PDO::FETCH_CLASS 和魔術方法)
                  php pdo get only one value from mysql; value that equals to variable(php pdo 只從 mysql 獲取一個值;等于變量的值)
                  MSSQL PDO could not find driver(MSSQL PDO 找不到驅動程序)
                  <tfoot id='1l3h5'></tfoot>

                      <tbody id='1l3h5'></tbody>

                    <i id='1l3h5'><tr id='1l3h5'><dt id='1l3h5'><q id='1l3h5'><span id='1l3h5'><b id='1l3h5'><form id='1l3h5'><ins id='1l3h5'></ins><ul id='1l3h5'></ul><sub id='1l3h5'></sub></form><legend id='1l3h5'></legend><bdo id='1l3h5'><pre id='1l3h5'><center id='1l3h5'></center></pre></bdo></b><th id='1l3h5'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='1l3h5'><tfoot id='1l3h5'></tfoot><dl id='1l3h5'><fieldset id='1l3h5'></fieldset></dl></div>
                      • <bdo id='1l3h5'></bdo><ul id='1l3h5'></ul>
                        <legend id='1l3h5'><style id='1l3h5'><dir id='1l3h5'><q id='1l3h5'></q></dir></style></legend>

                          <small id='1l3h5'></small><noframes id='1l3h5'>

                            主站蜘蛛池模板: 极品的亚洲 | 精品福利在线 | 欧美日韩亚洲国产 | 亚洲欧洲精品一区 | 日韩欧美在线观看 | 欧美精品日韩精品 | 一区二区三区欧美在线 | 国产午夜精品理论片a大结局 | 日韩av电影在线观看 | 成人h视频在线 | 在线观看成人小视频 | www国产成人免费观看视频,深夜成人网 | 正在播放国产精品 | 欧美精品一区二区在线观看 | caoporn国产精品免费公开 | 午夜一级做a爰片久久毛片 精品综合 | 国产成人久久av免费高清密臂 | 国产精品久久久久久久久久了 | 国产成人亚洲精品自产在线 | 亚洲日韩欧美一区二区在线 | 国产一区视频在线 | 欧美天堂 | 亚洲一区二区三区四区五区午夜 | 欧美日韩亚洲国产 | 青青草在线播放 | 欧美激情久久久 | 国产亚洲成av人在线观看导航 | 精品视频在线观看 | 香蕉久久网 | 国精产品一区二区三区 | 成人在线亚洲 | 一级欧美 | www.国产精 | 怡红院怡春院一级毛片 | 在线看亚洲 | 成人一区在线观看 | 激情a | 福利精品在线观看 | 久久久精| 欧美黄色性生活视频 | 欧美视频一区二区三区 |