{"id":462,"date":"2013-12-02T00:17:13","date_gmt":"2013-12-01T16:17:13","guid":{"rendered":"http:\/\/fineyi.com\/?p=462"},"modified":"2013-12-02T00:17:13","modified_gmt":"2013-12-01T16:17:13","slug":"centos6-4-lamp%e7%8e%af%e5%a2%83%e4%b8%baphp%e6%b7%bb%e5%8a%a0xdebug%e6%89%a9%e5%b1%95%e6%89%8b%e8%ae%b0","status":"publish","type":"post","link":"http:\/\/www.fineyi.com\/?p=462","title":{"rendered":"CentOS6.4 LAMP\u73af\u5883\u4e3aPHP\u6dfb\u52a0Xdebug\u6269\u5c55\u624b\u8bb0"},"content":{"rendered":"<p>\t\t\t\tCentOS6.4 LAMP\u73af\u5883\u4e3aPHP\u6dfb\u52a0Xdebug\u6269\u5c55\u624b\u8bb0<\/p>\n<p>\u4e4b\u524d\u4e00\u76f4\u7528Zend Studio\u7ed3\u5408Zend debug+ Firefox+toolbar\u7ec4\u5408\u8ddf\u8e2a\u3001\u8c03\u8bd5\u4ee3\u7801\uff0c\u7528\u8d77\u6765\u975e\u5e38\u65b9\u4fbf\u3002\u4f46\u662fZend\u5b98\u65b9\u5bf9zend debug\u5728PHP5.2\u4e4b\u540e\u5c31\u4e0d\u518d\u63d0\u4f9b\u652f\u6301\u3002\u76ee\u524dPHP\u5df2\u66f4\u65b0\u52305.4,\u6240\u4ee5\u5c31\u4e0d\u80fd\u518d\u7528zend debug\u8c03\u8bd5\u4ee3\u7801\uff0cXdebug\u6269\u5c55\u4e5f\u53ef\u4ee5\u5b9e\u73b0\u7c7b\u4f3czend debug\u7684\u529f\u80fd\u3002\u73b0\u63d0\u4f9b\u5728linux\u4e0b\u4e3aPHP\u6dfb\u52a0Xdebug\u6269\u5c55\u7684\u65b9\u6cd5\u3002<\/p>\n<p>\u5f53\u524d\u73af\u5883\uff1aCentOS6.4 64\u4f4d \/ PHP Version 5.3.3<\/p>\n<div>\n<pre class=\"lang:default decode:true\">\u5b89\u88c5\u4f9d\u8d56\uff1a\n[root@E \/]# yum -y install gcc automake autoconf libtool make wget php-devel\n\n\u4e0b\u8f7d\nhttp:\/\/xdebug.org\/files\/\n\u6700\u65b0\u7248\u672c\uff1a2.2.3\n[root@E \/]#\u00a0cd \/home\/soft\n[root@E \/]#\u00a0wget install\u00a0http:\/\/xdebug.org\/files\/xdebug-2.2.3.tgz\n[root@E \/]#\u00a0tar -zxvf xdebug-2.2.3.tgz\n[root@E \/]#\u00a0cd xdebug-2.2.3\/\n\n\u67e5\u770bphpize\u548cphp-config\u8def\u5f84\n[root@E xdebug-2.2.3]# whereis phpize php-config\nphpize: \/usr\/bin\/phpize \/usr\/share\/man\/man1\/phpize.1.gz\nphp-config: \/usr\/bin\/php-config \/usr\/share\/man\/man1\/php-config.1.gz\n\n\u63a5\u7740\u6267\u884c\uff1a\n[root@E \/]#\u00a0\/usr\/bin\/phpize \u00a0.\/configure --enable-xdebug --with-php-config=\/usr\/bin\/php-config\n\n\u65e0\u62a5\u9519\u7684\u8bdd\u6267\u884c\n[root@E \/]#\u00a0make\n\u5728\u5f53\u524d\u76ee\u5f55\u4f1a\u751f\u6210.\/modules\/xdebug.so\n\u590d\u5236\u5230php\u6269\u5c55\u76ee\u5f55\n[root@E xdebug-2.2.3]# cp modules\/xdebug.so \/usr\/lib64\/php\/modules\/\n\n\u4fee\u6539php.ini\n[root@E modules]# vi \/etc\/php.ini\n\u5728\u5e95\u90e8\u52a0\u5165\uff1a\n[Xdebug]\nzend_extension=\"\/usr\/lib64\/php\/modules\/xdebug.so\"\nxdebug.profiler_enable = on\nxdebug.default_enable = on\nxdebug.trace_output_dir=\"\/tmp\/xdebug\"\nxdebug.trace_output_name = trace.%c.%p\nxdebug.profiler_output_dir=\"\/tmp\/xdebug\"\nxdebug.profiler_output_name=\"cachegrind.out.%s\n\n\u91cd\u542fapache\uff1a\n[root@E modules]# service httpd restart<\/pre>\n<p>phpinfo\u67e5\u770b\uff1a<\/p>\n<p><a href=\"http:\/\/v3.fineyi.com\/wp-content\/uploads\/2013\/12\/Xdebug.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-468\" alt=\"Xdebug\" src=\"http:\/\/v3.fineyi.com\/wp-content\/uploads\/2013\/12\/Xdebug.png\" width=\"606\" height=\"249\" srcset=\"http:\/\/www.fineyi.com\/wp-content\/uploads\/2013\/12\/Xdebug.png 606w, http:\/\/www.fineyi.com\/wp-content\/uploads\/2013\/12\/Xdebug-300x123.png 300w\" sizes=\"auto, (max-width: 606px) 100vw, 606px\" \/><\/a><\/p>\n<p>Xdebug\u6269\u5c55\u6dfb\u52a0\u6210\u529f\uff01<\/p>\n<p>\u8f6c\u8f7d\u8bf7\u6ce8\u660e\u51fa\u5904\uff1a<a title=\"\u6021\u7136\u4e4b\u4e50\" href=\"http:\/\/fineyi.com\/\" target=\"_blank\" rel=\"noopener\">\u6021\u7136\u4e4b\u4e50 \u2013 FineYi<\/a><\/p>\n<p>\u53c2\u8003\u8d44\u6599\uff1a<a title=\"http:\/\/xdebug.org\/files\/\" href=\"http:\/\/xdebug.org\/files\/\" target=\"_blank\" rel=\"noopener\">xdebug file<\/a>\u00a0 <a title=\"http:\/\/www.xmsdn.net\/linux\/sqlite-phpize\/\" href=\"http:\/\/www.xmsdn.net\/linux\/sqlite-phpize\/\" target=\"_blank\" rel=\"noopener\">XMSND<\/a>\u00a0 <a title=\"http:\/\/blog.sina.com.cn\/s\/blog_6f2274fb0100obv8.html\" href=\"http:\/\/blog.sina.com.cn\/s\/blog_6f2274fb0100obv8.html\" target=\"_blank\" rel=\"noopener\">SinaBlog<\/a><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>CentOS6.4 LAMP\u73af\u5883\u4e3aPHP\u6dfb\u52a0Xdebug\u6269\u5c55\u624b\u8bb0 \u4e4b\u524d\u4e00\u76f4\u7528Ze &hellip; <a href=\"http:\/\/www.fineyi.com\/?p=462\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a> <a href=\"http:\/\/www.fineyi.com\/?p=462\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_mi_skip_tracking":false,"footnotes":""},"categories":[3,5,8],"tags":[19,38,55,56,57],"class_list":["post-462","post","type-post","status-publish","format-standard","hentry","category-development-tools","category-linux","category-php","tag-centos","tag-php","tag-xdebug","tag-zend-debug","tag-zend-studio"],"aioseo_notices":[],"_links":{"self":[{"href":"http:\/\/www.fineyi.com\/index.php?rest_route=\/wp\/v2\/posts\/462","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.fineyi.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.fineyi.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.fineyi.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.fineyi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=462"}],"version-history":[{"count":0,"href":"http:\/\/www.fineyi.com\/index.php?rest_route=\/wp\/v2\/posts\/462\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.fineyi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=462"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.fineyi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=462"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.fineyi.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=462"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}