CentOS6.4 lamp Add xdebug extension step to PHP

Source: Internet
Author: User
The code is as follows Copy Code


Current environment: CentOS6.4 64-bit/PHP Version 5.3.3

Installation dependencies:

[root@e/]# yum-y install gcc automake autoconf libtool make wget php-devel

Download
http://xdebug.org/files/
Latest Version: 2.2.3
[Root@e/]# Cd/home/soft
[root@e/]# wget Install http://xdebug.org/files/xdebug-2.2.3.tgz
[Root@e/]# TAR-ZXVF xdebug-2.2.3.tgz
[Root@e/]# CD xdebug-2.2.3/

View Phpize and Php-config paths
[Root@e xdebug-2.2.3]# Whereis phpize php-config
Phpize:/usr/bin/phpize/usr/share/man/man1/phpize.1.gz
Php-config:/usr/bin/php-config/usr/share/man/man1/php-config.1.gz

Then execute:
[Root@e/]#/usr/bin/phpize./configure--enable-xdebug--with-php-config=/usr/bin/php-config

Execute without error.
[Root@e/]# make
Generated in the current directory./modules/xdebug.so
Copy to PHP extended directory
[Root@e xdebug-2.2.3]# CP modules/xdebug.so/usr/lib64/php/modules/

Modify PHP.ini
[Root@e modules]# Vi/etc/php.ini
Add at bottom:
[Xdebug]
zend_extension= "/usr/lib64/php/modules/xdebug.so"
Xdebug.profiler_enable = On
Xdebug.default_enable = On
Xdebug.trace_output_dir= "/tmp/xdebug"
Xdebug.trace_output_name = trace.%c.%p
Xdebug.profiler_output_dir= "/tmp/xdebug"
Xdebug.profiler_output_name= "cachegrind.out.%s

Restart Apache:
[Root@e modules]# Service httpd restart

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.