在mac编译调试php的工具xdebug
来源:互联网 发布:淘宝什么零食好吃 编辑:程序博客网 时间:2024/05/18 20:33
Compiling & installing Xdebug for PHP 5.2.5 (Entropy.ch build) on OS X 10.5
http://alexander.kirk.at/2008/12/26/debugging-php-on-mac-os-x/
http://www.designified.com/blog/article/60/compiling-installing-xdebug-for-php-525-entropych-build-on-os-x-105
看起来很复杂,要自己编译xdebug的sourcecode,然后才能安装
The solution is a combination of Xdebug andMacGDBp.
Following on from my previous post detailing Installing Xdebug for PHP (Entropy.ch build) on OS X, this post deals with compiling and installing xdebug 2.0.2 forPHP Version 5.2.5 (www.entropy.ch Release 6) on OS X 10.5.2 Mac Pro 64-bit (2 x Quad-Core Intel Xeon).
The instructions below are a composite of those in the Xdebug README and the user ‘pilif/Philip’ on the entropy forums who posted the CFLAGS settings used to compile Xdebug for x86 64bit architecture (see the post here – thanks Philip!)
The standard release of Marc Liyanage’s PHP Apache Module may not work under OS X 10.5, depending on the architecture of the processor – you will know if you get the error message “The following install step failed: run postflight script for EntropyPHP. Contact the software… “.
Marc has been hard at work compiling an updated 4-way binary and trying to get all the dependencies and packages working – the latest version which I am using (works fine) and which this tutorial is based on isLeopard:PHP 5.2.5 Release 6 BETA
The binary distribution of Xdebug from Activestate which I was using previously won’t work with this version ofPHP (I believe I am right in saying it will only work on a 32bit architecture but I may be well wrong) so it needs to be complied from source – luckily it’s pretty easy to do!
First off we need to make sure PHP 5.2.5 from the Entropy site is installed and working, and that the install directory is /usr/local/php5/
Next we need to make sure it is using a php.ini file (probably located at /usr/local/php5/lib/php.ini – if not make a copy of the ‘php.ini-recommended’ file and rename it ‘php.ini’).
We need to make sure that errors are set to be displayed in the ini file (display_errors = On
anderror_reporting = E_ALL
).
The OS X developer tools must be installed (either from the Leopard install disk or the disks which came with the computer).
- Run a phpinfo() page up on the local web server and find the ‘extension_dir’ entry (in the Configuration ->PHP Core section) – copy that value down (it will be something like /usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613/)
- Download the source code from http://xdebug.org/
- In the terminal, cd into the directory which the source code tar file is in
- Unpack the tarball:
tar -xzf xdebug-2.0.2.tgz
- cd into the unpacked directory:
cd xdebug-2.0.2
- Run phpize (using the phpize installed with the Entropy distribution, not the one installed byOSX):
/usr/local/php5/bin/phpize
- Configure:
CFLAGS='-arch x86_64' ./configure --enable-xdebug
- Run make:
make
- Copy the compiled module to the directory you determined in step 1 (replacing the directory shown here with your one if it is differant):
cp modules/xdebug.so /usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613/
Open your php.ini file (for the Entropy version it is at /usr/local/php5/lib/php.ini) and add the following:
[xdebug]zend_extension=/usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613/xdebug.so
(obviously substitute your extensions directory path from stage 1 if it isn’t the same as mine)
- Restart the web server
- Reload the phpinfo() page and look for the ‘Xdebug’ section – if all is working it should show up along with a whole bunch of directives
- 在mac编译调试php的工具xdebug
- 在mac编译调试php的工具xdebug
- PHP调试工具的使用XDEBUG
- php调试工具xdebug的配置说明
- PHP调试工具 Xdebug + WinCacheGrind
- PHP调试工具Xdebug安装
- PHP调试工具Xdebug安装
- [PHP调试工具]XDebug配置
- Xdebug—php调试工具
- PHP配置调试工具XDebug
- PHP配置调试工具XDebug
- PHP调试工具xdebug安装调试教程
- mac下phpstorm+Xdebug断点调试PHP
- PHP调试及性能分析工具Xdebug
- 为PHP安装Xdebug调试工具
- PHP调试工具Xdebug安装配置教程
- 为PHP安装Xdebug调试工具
- PHP调试工具Xdebug安装配置教程
- struts2.0升级struts2.3.3
- 轻轻松松做内存检测
- js 各种奇葩写法2
- 苹果信息推送服务(Apple Push Notification Service)使用总结
- Eclipse安装插件支持jQuery智能提示
- 在mac编译调试php的工具xdebug
- ALV总结
- linux shell切换用户
- FreeBSD软件安装卸载工具--Ports和Packages详解!
- Use Xmanager connect solaris 10 Xwindows
- 大二第二学期总结
- 最简单的JSP与JavaBean:setProperty和getProperty
- Oracle instr()函数的一些特殊用法
- python集锦(三)