<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ubuntu12.04 &#8211; LPC影子技术分享</title>
	<atom:link href="https://www.mudbest.com/tag/ubuntu12-04/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.mudbest.com</link>
	<description>行影不离,忘之却步.</description>
	<lastBuildDate>Wed, 21 Nov 2012 02:16:32 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.2</generator>
	<item>
		<title>Ubuntu12.04下安装Xdebug及配置</title>
		<link>https://www.mudbest.com/ubuntu12-04%e4%b8%8b%e5%ae%89%e8%a3%85xdebug%e5%8f%8a%e9%85%8d%e7%bd%ae/</link>
		
		<dc:creator><![CDATA[hkshadow]]></dc:creator>
		<pubDate>Fri, 26 Oct 2012 09:45:12 +0000</pubDate>
				<category><![CDATA[分享]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[memcached]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[ubuntu12.04]]></category>
		<category><![CDATA[安装]]></category>
		<guid isPermaLink="false">http://www.mudbest.com/?p=1614</guid>

					<description><![CDATA[一: 安装xdebug，这里用pecl 二: 配置xdebug 在php.ini 中加入 在执行以上命令到最后 ... <a title="Ubuntu12.04下安装Xdebug及配置" class="read-more" href="https://www.mudbest.com/ubuntu12-04%e4%b8%8b%e5%ae%89%e8%a3%85xdebug%e5%8f%8a%e9%85%8d%e7%bd%ae/" aria-label="阅读 Ubuntu12.04下安装Xdebug及配置">阅读更多</a>]]></description>
										<content:encoded><![CDATA[<p><strong>一: 安装xdebug，这里用pecl</strong></p>
<pre class="brush: plain; title: ; notranslate">
sudo apt-get install php-pear   
sudo apt-get install php5-dev
sudo pecl install xdebug
</pre>
<p><strong>二: 配置xdebug</strong><br />
<span id="more-1614"></span></p>
<pre class="brush: plain; title: ; notranslate">
cd /etc/php5/apche2/
vi php.ini
</pre>
<p><strong>在php.ini 中加入</strong></p>
<pre class="brush: plain; title: ; notranslate">
&#x5B;php_xdebug]
zend_extension = &quot;/usr/lib/php5/20090626/xdebug.so&quot;
</pre>
<pre class="brush: plain; title: ; notranslate">
sudo pecl install xdebug
</pre>
<p>在执行以上命令到最后会提示你的xdebug.so的所在目录。</p>
<p>此外，还需在使用xdebug之前，在php.ini中指定5个xdebug特定属性</p>
<pre class="brush: plain; title: ; notranslate">
xdebug.profiler_enable=1
xdebug.profiler_enable_trigger=1
xdebug.profiler_output_dir=&quot;/var/log/xdebug&quot;
xdebug.profiler_append=On
xdebug.profiler_output_name = &quot;cachegrind&quot;
</pre>
<p>注意在xdebug.profiler_output_dir = &#8220;/var/log/xdebug&#8221;随后需要创建文件夹</p>
<pre class="brush: plain; title: ; notranslate">
cd /var/log
mkdir xdebug
chmod 777 xdebug -R
</pre>
<p>然后将PHP配置文件的html_errors开启，将错误提示清晰化显示，默认为Off</p>
<pre class="brush: plain; title: ; notranslate">
html_errors = Off
</pre>
<p>改为</p>
<pre class="brush: plain; title: ; notranslate">
html_errors = On
</pre>
<p><strong>参数说明：</strong><br />
xdebug.profiler_enable<br />
#开启（1）或关闭（0）性能分析工具<br />
xdebug.profiler_output_dir=&#8221;/var/log/xdebug&#8221;<br />
#设定效能监测信息输出文件的路径，默认路径为/tmp<br />
xdebug.profiler_output_name<br />
#所用的文件名称<br />
xdebug.profiler_append<br />
#对php脚本发出新请求时，覆盖文件（1），默认情况下此设置为关（0）<br />
xdebug.profiler_enable_trigger<br />
#允许性能分析工具开始使用一个GET/POST 或 COOKIE变量：XDEBUG_PROFIKE。xdebug.profiler_enable必须设置为0</p>
<p>具体的配置可以参考：http://xdebug.org/docs/all_settings<br />
注意：输出目录要预先建好，否则不会输出内容。<br />
重启web服务器(或php-fpm)后，在phpinfo中查看是否有xdebug的信息，有的话就成功了。</p>
<p><a href="http://www.mudbest.com/ubuntu12-04%e4%b8%8b%e5%ae%89%e8%a3%85xdebug%e5%8f%8a%e9%85%8d%e7%bd%ae/2012-10-26-xdebug/" rel="attachment wp-att-1616"><img fetchpriority="high" decoding="async" src="http://www.mudbest.com/wp-content/uploads/2012/10/2012-10-26-xdebug-1024x819.png" alt="" title="2012-10-26-xdebug" width="640" height="511" class="alignnone size-large wp-image-1616" srcset="https://www.mudbest.com/wp-content/uploads/2012/10/2012-10-26-xdebug-1024x819.png 1024w, https://www.mudbest.com/wp-content/uploads/2012/10/2012-10-26-xdebug-537x430.png 537w, https://www.mudbest.com/wp-content/uploads/2012/10/2012-10-26-xdebug.png 1280w" sizes="(max-width: 640px) 100vw, 640px" /></a></p>
<p><a href="http://www.mudbest.com/ubuntu12-04%e4%b8%8b%e5%ae%89%e8%a3%85xdebug%e5%8f%8a%e9%85%8d%e7%bd%ae/2012-10-26-xdebug-2/" rel="attachment wp-att-1620" target="_blank"><img decoding="async" src="http://www.mudbest.com/wp-content/uploads/2012/10/2012-10-26-xdebug1-1024x819.png" alt="" title="2012-10-26-xdebug" width="640" height="511" class="alignnone size-large wp-image-1620" srcset="https://www.mudbest.com/wp-content/uploads/2012/10/2012-10-26-xdebug1-1024x819.png 1024w, https://www.mudbest.com/wp-content/uploads/2012/10/2012-10-26-xdebug1-537x430.png 537w, https://www.mudbest.com/wp-content/uploads/2012/10/2012-10-26-xdebug1.png 1280w" sizes="(max-width: 640px) 100vw, 640px" /></a></p>
<p>三.安装kcachegrind</p>
<pre class="brush: plain; title: ; notranslate">
sudo apt-get install kcachegrind
</pre>
<p>至此，你就可以用kcachegrind,webgrind 来分析你的PHP代码了。</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
