<?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>I&#039;m Donkey &#187; Linux</title>
	<atom:link href="http://imdonkey.com/blog/archives/tag/linux/feed" rel="self" type="application/rss+xml" />
	<link>http://imdonkey.com/blog</link>
	<description></description>
	<lastBuildDate>Thu, 26 Aug 2010 02:14:19 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>如何让Linux支持PHP GD库的imagerotate方法</title>
		<link>http://imdonkey.com/blog/archives/7</link>
		<comments>http://imdonkey.com/blog/archives/7#comments</comments>
		<pubDate>Mon, 14 Dec 2009 08:26:01 +0000</pubDate>
		<dc:creator>luoxi</dc:creator>
				<category><![CDATA[坨坨胡同儿]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://imdonkey.com/wordpress/?p=7</guid>
		<description><![CDATA[这里介绍的方法是经过试验可行的（虽然后来遇到了其他问题，见文章下面），在此感谢原作者的贡献！
原文地址：<a title="  You are herehow to enable php imagerotate function on ubuntu how to enable php imagerotate function on ubuntu" href="http://voae.com/enable-php-imagerotate-gd" target="_blank">http://voae.com/enable-php-imagerotate-gd
</a>……
<span style="color: #ff0000;">发现问题</span>：Apache有时会莫名kill掉进程，查看log有类似“child pid *** exit signal Segmentation fault”的错误，重启Apache后正常，但过儿又会异常依旧…

这种情况虽然偶尔出现，但却是不可忽视的隐患。经google，感觉似乎是由于PHP升级后，和模块间兼容性的bug。

所以迫不得已，只能rollback回之前的PHP版本，然后用<a href="http://blog.madtech.cx/2006/12/08/debian-etch-libapache2-mod-php5-with-bundled-libgd-gdlib/">Debian Etch libapache2-mod-php5 with bundled libgd (GDLib)</a>一文中提到的方法，并实践成功！这个办法虽然麻烦些，但对系统影响最小，首推这个。<p class='read-more'><a href='http://imdonkey.com/blog/archives/7'>阅读全文 »</a></p>]]></description>
			<content:encoded><![CDATA[<div>
<p>这里介绍的方法是经过试验可行的（虽然后来遇到了其他问题，见文章下面），在此感谢原作者的贡献！</p>
<p><span style="color: #ffffff;"><span style="color: #000000;">原文地址：</span><a title="  You are herehow to enable php imagerotate function on ubuntu how to enable php imagerotate function on ubuntu" href="http://voae.com/enable-php-imagerotate-gd" target="_blank">http://voae.com/enable-php-imagerotate-gd</a></span></p>
<p>Here is the steps for Ubuntu Server 8.04.1 and PHP5. Like Djamu said it will install a GD pre-compiled working version. It is a complete bundled (forked) GD libraries:<br />
这是在Ubuntu Server 8.04.1 和 PHP5环境下的步骤（注：Debian下也成功了）。就像Djamu所说，这个方法安装的GD是预编译的可用版本。是完全绑定的GD库：</p>
<p><strong>1</strong>. If not already done removing your current GD package and its configurations.<br />
先删除你当前的GD包及其配置信息</p>
<p>sudo apt-get &#8211;purge remove</p>
<p><strong>2</strong>. Adding 2 lines to your file /etc/apt/sources.list.<br />
将上面两行加到系统的源列表文件/etc/apt/sources.list</p>
<p>deb <a title="http://packages.dotdeb.org" href="http://packages.dotdeb.org/">http://packages.dotdeb.org</a> stable all<br />
deb-src <a title="http://packages.dotdeb.org" href="http://packages.dotdeb.org/">http://packages.dotdeb.org</a> stable all</p>
<p><strong>3</strong>. Updating your current apt-get list.<br />
更新你的apt-get列表</p>
<p>apt-get update</p>
<p><strong>4</strong>. Installing working GD package.<br />
安装可用的GD包</p>
<p>apt-get install php5-gd</p>
<p>It will complain about non-authenticated sources, just ignore, it will also update some additional php libs.<br />
When prompt select keep_current modified php.ini.<br />
它会警告这是没有身份验证的源，甭管它。它还会更新一些其他的php库。<br />
当出现提示信息时，选择“keep_current modified php.ini”（保留之前所用的php.ini）</p>
<p><strong>5</strong>. Restarting Apache<br />
重启Apache。<br />
/etc/init.d/apache2 restart</p>
<p>如果重启Apache失败，可能是由于某个模块版本不匹配，需要重新编译一下，具体哪个模块的问题要看error信息是什么。</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-华丽的分割线&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p><span style="color: #ff0000;">发现问题</span>：Apache有时会莫名kill掉进程，查看log有类似“child pid *** exit signal Segmentation fault”的错误，重启Apache后正常，但过儿又会异常依旧…<br />
这种情况虽然偶尔出现，但却是不可忽视的隐患。经google，感觉似乎是由于PHP升级后，和模块间兼容性的bug。</p>
<p>所以迫不得已，只能rollback回之前的PHP版本，然后用<a href="http://blog.madtech.cx/2006/12/08/debian-etch-libapache2-mod-php5-with-bundled-libgd-gdlib/">Debian Etch libapache2-mod-php5 with bundled libgd (GDLib)</a>一文中提到的方法，并实践成功！这个办法虽然麻烦些，但对系统影响最小，首推这个。（前面写了一大堆，最后首推另外一个，真不好意思）</p>
<p>其他可能会对你有帮助的链接：<br />
<a href="http://rashost.com/blog/ubuntu-php5-gd-compile" target="_blank">Ubuntu 下安装php5-gd 不能使用imagerotate函数的解决方法</a><br />
<a href="http://blog.madtech.cx/2006/12/08/debian-etch-libapache2-mod-php5-with-bundled-libgd-gdlib/">Debian Etch libapache2-mod-php5 with bundled libgd (GDLib)</a><br />
<a href="http://topic.csdn.net/u/20070926/14/e2031693-964d-44cb-ae01-76e0d387c78e.html" target="_blank">imageRotate()函数不能用!!</a></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://imdonkey.com/blog/archives/7/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
