Compiling

There is a wizard available that provides you with the correct file to download, and which paths to use.

You compile Xdebug separately from the rest of PHP. Note, however, that you need access to the scripts 'phpize' and 'php-config'. If your system does not have 'phpize' and 'php-config', you will need to compile and install PHP from a source tarball first, as these script are by-products of the PHP compilation and installation processes. (Debian users can install the required tools with apt-get install php5-dev). It is important that the source version matches the installed version as there are slight, but important, differences between PHP versions. Once you have access to 'phpize' and 'php-config', do the following:

  1. Unpack the tarball: tar -xzf xdebug-2.2.5.tgz. Note that you do not need to unpack the tarball inside the PHP source code tree. Xdebug is compiled separately, all by itself, as stated above.
  2. cd xdebug-2.2.5
  3. Run phpize: phpize (or /path/to/phpize if phpize is not in your path). Make sure you use the phpize that belongs to the PHP version that you want to use Xdebug with. See this FAQ entry if you're having some issues with finding which phpize to use.
  4. ./configure --enable-xdebug
  5. make
  6. make install

这一步装完,会有提示:

[lein@lein xdebug-2.2.5]$ sudo make install
Installing shared extensions: /usr/lib64/php/modules/ +----------------------------------------------------------------------+
| |
| INSTALLATION INSTRUCTIONS |
| ========================= |
| |
| See http://xdebug.org/install.php#configure-php for instructions |
| on how to enable Xdebug for PHP. |
| |
| Documentation is available online as well: |
| - A list of all settings: http://xdebug.org/docs-settings.php |
| - A list of all functions: http://xdebug.org/docs-functions.php |
| - Profiling instructions: http://xdebug.org/docs-profiling2.php |
| - Remote debugging: http://xdebug.org/docs-debugger.php |
| |
| |
| NOTE: Please disregard the message |
| You should add "extension=xdebug.so" to php.ini |
| that is emitted by the PECL installer. This does not work for |
| Xdebug. |
| |
+----------------------------------------------------------------------+ [lein@lein xdebug-2.2.5]$ ll /usr/lib64/php/modules/
total 10988
-rwxr-xr-x. 1 root root 32568 Jan 22 17:09 bcmath.so
-rwxr-xr-x. 1 root root 24696 Jan 22 17:09 bz2.so
-rwxr-xr-x. 1 root root 33752 Jan 22 17:09 calendar.so
-rwxr-xr-x. 1 root root 15568 Jan 22 17:09 ctype.so
-rwxr-xr-x. 1 root root 86912 Jan 22 17:09 curl.so
-rwxr-xr-x. 1 root root 180608 Jan 22 17:09 dom.so
-rwxr-xr-x. 1 root root 65496 Jan 22 17:09 exif.so
-rwxr-xr-x. 1 root root 2713344 Jan 22 17:09 fileinfo.so
-rwxr-xr-x. 1 root root 53624 Jan 22 17:09 ftp.so
-rwxr-xr-x. 1 root root 120896 Jan 22 17:09 gd.so
-rwxr-xr-x. 1 root root 15640 Jan 22 17:09 gettext.so
-rwxr-xr-x. 1 root root 45080 Jan 22 17:09 iconv.so
-rwxr-xr-x. 1 root root 40840 Aug 1 2014 json.so
-rwxr-xr-x. 1 root root 1420712 Jan 22 17:09 mbstring.so
-rwxr-xr-x. 1 root root 45256 Jan 22 17:09 mcrypt.so
-rwxr--r--. 1 root root 329181 Feb 25 23:04 memcached.so
-rwxr--r--. 1 root root 288786 Feb 25 23:04 memcache.so
-rwxr-xr-x. 1 root root 141320 Jan 22 17:09 mysqlnd_mysqli.so
-rwxr-xr-x. 1 root root 53544 Jan 22 17:09 mysqlnd_mysql.so
-rwxr-xr-x. 1 root root 2362280 Jan 22 17:09 mysqlnd.so
-rwxr-xr-x. 1 root root 32896 Jan 22 17:09 pdo_mysqlnd.so
-rwxr-xr-x. 1 root root 116240 Jan 22 17:09 pdo.so
-rwxr-xr-x. 1 root root 29168 Jan 22 17:09 pdo_sqlite.so
-rwxr-xr-x. 1 root root 271984 Jan 22 17:09 phar.so
-rwxr-xr-x. 1 root root 32880 Jan 22 17:09 posix.so
-rwxr--r--. 1 root root 1075737 Feb 25 23:04 redis.so
-rwxr-xr-x. 1 root root 15624 Jan 22 17:09 shmop.so
-rwxr-xr-x. 1 root root 54168 Jan 22 17:09 simplexml.so
-rwxr-xr-x. 1 root root 91368 Jan 22 17:09 sockets.so
-rwxr-xr-x. 1 root root 51328 Jan 22 17:09 sqlite3.so
-rwxr-xr-x. 1 root root 19880 Jan 22 17:09 sysvmsg.so
-rwxr-xr-x. 1 root root 11496 Jan 22 17:09 sysvsem.so
-rwxr-xr-x. 1 root root 15720 Jan 22 17:09 sysvshm.so
-rwxr-xr-x. 1 root root 53896 Jan 22 17:09 tidy.so
-rwxr-xr-x. 1 root root 19712 Jan 22 17:09 tokenizer.so
-rwxr-xr-x. 1 root root 36720 Jan 22 17:09 wddx.so
-rwxr-xr-x 1 root root 925237 Mar 18 23:27 xdebug.so
-rwxr-xr-x. 1 root root 32888 Jan 22 17:09 xmlreader.so
-rwxr-xr-x. 1 root root 54080 Jan 22 17:09 xml.so
-rwxr-xr-x. 1 root root 49152 Jan 22 17:09 xmlwriter.so
-rwxr-xr-x. 1 root root 37104 Jan 22 17:09 xsl.so
-rwxr-xr-x. 1 root root 62480 Jan 29 2014 zip.so

/wherever/you/put/it/xdebug.so 就是 /usr/lib64/php/modules/xdebug.so

Configure PHP to Use Xdebug

  1. add the following line to php.ini: zend_extension="/wherever/you/put/it/xdebug.so". For PHP versions earlier than 5.3 and threaded usage of PHP (Apache 2 worker MPM or the ISAPI module), add: zend_extension_ts="/wherever/you/put/it/xdebug.so" instead. Note: In case you compiled PHP yourself and used --enable-debug you would have to use zend_extension_debug=. From PHP 5.3 onwards, you always need to use the zend_extension PHP.ini setting name, and not zend_extension_ts, nor zend_extension_debug. However, your compile options (ZTS/normal build; debug/non-debug) still need to match with what PHP is using.
  2. Restart your webserver.
  3. Write a PHP page that calls 'phpinfo()' Load it in a browser and look for the info on the Xdebug module. If you see it next to the Zend logo, you have been successful! You can also use 'php -m' if you have a command line version of PHP, it lists all loaded modules. Xdebug should appear twice there (once under 'PHP Modules' and once under 'Zend Modules').

install xdebug on fedora的更多相关文章

  1. install xdebug

    安装准备 安排php的xdebug扩展,在php.ini上配置xdebug.通过phpinfo或者php-m 查看 [Xdebug] zend_extension ="D:\upupw7\P ...

  2. Fedora 25/24/23 nVidia Drivers Install Guide

    https://www.if-not-true-then-false.com/2015/fedora-nvidia-guide/ search Most Popular Featured Linux ...

  3. Fedora 22中的用户和用户组管理

    The control of users and groups is a core element of Fedora system administration. This chapter expl ...

  4. xdebug安装

    sudo apt-get install php-pearsudo apt-get install php5-devsudo pecl install xdebug 下载安装编译完后,在php.ini ...

  5. 开发机多用户 xdebug 远程调试 PhpStorm

    在公司都用的远程开发机开发,每次有错误调试就得dd(xxx)然后保存真是,让我在本地开发用惯xdebug的情何以堪,所以有了下文. 1.安装配置xdebug 直接使用pecl安装即可 # pecl i ...

  6. Fedora 23如何安装LAMP服务器

    LAMP 是开源系统上 Web 服务器的梦幻组合.LAMP 是 Linux. Apache HTTP 服务. MySQL/MariaDB 数据库和 PHP. Perl 或 Python 的简称. 下面 ...

  7. zend studio 安装xdebug

    XDebug安装 到http://xdebug.org/download.php选择自己需要的xdebug版本.然后按照下面的配置建立目录.并在php.ini加入这些内容.重启server 注意xde ...

  8. Ubuntu下安装php调试工具xdebug

    安装xdebug: sudo apt-get install php-pear sudo apt-get install php5-dev pecl install xdebug 创建配置文件: /x ...

  9. ubuntu下php开发环境搭建,nginx+(cgi)php5fpm+memcached+xdebug

    由于只是开发环境,所以都是选择比较简单的apt-get安装方式 ,但中间也遇到一点问题. 首先安装nginx nginx的安装和配置其实很简单,nginx本身非常轻量级, 直接 sudo apt-ge ...

随机推荐

  1. xcode 4 制作静态库详解

    合并.a文件,制作通用静态库 这二个库一个是用于真机运行的一个是用于模拟器运行的.其实我们可以利用lipo将这二个文件打包成一个通用的a文件.命令如下: 将/Users/user/Library/De ...

  2. 【38】通过复合塑模出Has-A 或根据某物实现出

    1.什么是复合? 复合是类型之间的一种关系,某种类型的对象内含其他类型的对象. 2.为什么需要复合,他解决什么问题? 为了代码复用. 3.复合有两层含义:Has-A和根据某物实现出.在应用域中,表示H ...

  3. zoj 3820 Building Fire Stations 树的中心

    Building Fire Stations Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://acm.zju.edu.cn/onlinejudge ...

  4. android学习日记03--常用控件Dialog

    常用控件 9.Dialog 我们经常会需要在Android界面上弹出一些对话框,比如询问用户或者让用户选择.这些功能我们叫它Android Dialog对话框 对话框,要创建对话框之前首先要创建Bui ...

  5. 文件和目录之chmod和fchmod函数

    本篇博文内容摘自<UNIX环境高级编程>(第二版),仅作个人学习记录所用.关于本书可参考:http://www.apuebook.com/. 这两个函数使我们可以更改现有文件的访问权限: ...

  6. Java基础知识强化之网络编程笔记14:TCP之多个客户端上传到一个服务器的思考(多线程改进)

    1. 多个客户端上传到一个服务器的思考 通过while循环可以改进一个服务器接收多个客户端. 但是这个是有问题的.如果是这种情况,假设我还有张三,李四,王五这三个人分别执行客户端  张三:好好学习.a ...

  7. 如何真正免费运营推广APP应用

    随着移动终端的迅速普及,各类APP如雨后春笋般涌现出来,但是真正的运营成功的产品却寥寥无几. 从瓜分渠道资源到抢占用户的过程中,很多同行都明显的感觉到,渠道平台所带来的量日益减少,但是刊例价格却一再攀 ...

  8. JAVA_Gson_example

    package cn.kjxy.GSON; import java.util.List; import cn.kjxy.JSON.HttpHelpers; import com.google.gson ...

  9. 设置N秒后执行某个方法或函数

    设置N秒后执行一个函数,最常用的是设置一个定时器,今天刚看到有这样一个函数,感觉还是比较简单实用的,就先记下来,免得忘记了. 5秒后执行pushSecondController这个函数 [self p ...

  10. 关于Patter类和Match类

    部分引用自: http://developer.51cto.com/art/200906/131761.htm 本文将介绍Java正则表达式中的Pattern类与Matcher类.首先我们要清楚指定为 ...