安裝PHP調試庫PHP DBG (文章純屬引用)

來源:互聯網
上載者:User

 

   
Server partCompiling for Linux/Unix:
  1. install PHP (4.0.6 or higher). Follow instructions shipped with PHP.
  2. make sure phpize script is created.
  3. download DBG sources, unpack them for example in /usr/local/src directory.
  4. make sure you have autoconf 2.13 or newer, automake 1.4 or newer and libtool 1.3.3 or newer
  5. run deferphpize script. This script assumes that phpize is located in /usr/local/bin/phpize. If it isn't, please set $phpize environment variable with proper path.
  6. dbg.so library will be created in modules subdirectory.

from this point onwards, installation is similar to the installation of any official PHP extension. Proceed with "Configuring server part" topic

Compiling for Win32:
  1. download the latest PHP sources (4.0.6 or higher) and unpack them.
  2. download the latestDBG package, and install it.
  3. Copy dbg directory to the ext subdirectory of the PHP directory tree.
  4. Run Visual C++ open php4ts workspace and add the project named dbg.dsp to it.
  5. Select one of Debug_TS, Release_TS or Release_TS_Inline active configuration and compile it.
Using precompiled version for Win32:
  • download DBG archive, and unpack it.
    There are some versions of php_dbg.dll-x.x.x where x.x.x is a php version the dll is compatible with.

    from this point onwards, installation is similar to the installation of any official PHP extension. Proceed with "Configuring server part" topic

Configuring server part:
  1. copy php_dbg.dll (win32) or dbg.so (linux) into appropriate directory. Read PHP documentation on how to install PHP extension.
  2. add extension=php_dbg.dll (win32) or
    extension=dbg.so (linux) entry into php.ini file.
  3. enable debugger: find and edit (or add new) following entries in the php.ini file:
    [debugger]
    debugger.enabled = true
    debugger.profiler_enabled = true
    debugger.JIT_host = clienthost
    debugger.JIT_port = 7869
    note that clienthost is a keyword for DBG. If you use it, DBG will automatically detect IP of each client.
  4. run <? phpinfo(); ?> script just to make sure dbg extension is working properly. You will see following message in the header:
    with DBG v2.11.30, (C) 2000,2004 by Dmitri Dmitrienko, http://dd.cron.ru

    and appropriately formed dbg section.

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.