<?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>haohtml&#039;s blog &#187; php</title>
	<atom:link href="http://blog.haohtml.com/tag/php/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.haohtml.com</link>
	<description>haohtml&#039;s life and works</description>
	<lastBuildDate>Sun, 05 Feb 2012 12:05:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>在安装php的make时候,出现错误&quot;chmod: cannot access `ext/phar/phar.phar&#039;: No such file or directory&quot;的解决办法</title>
		<link>http://blog.haohtml.com/archives/12482</link>
		<comments>http://blog.haohtml.com/archives/12482#comments</comments>
		<pubDate>Sun, 05 Feb 2012 06:45:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[服务器类]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=12482</guid>
		<description><![CDATA[在对php进行configure的时候,只需要在./configure的后面加上--without-pear 即可.<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="404错误页面重定向 PHP使用HEADER头发送状态(Status)信息(一)" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3070&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12482">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4028468.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">404错误页面重定向 PHP使用HEADER头发送状态(Status)信息(一)</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="50个非常有用的PHP工具" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F7059&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12482">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/08/02/20541028.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">50个非常有用的PHP工具</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="从php核心代码看require和include的区别" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F4311&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12482">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4027588.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">从php核心代码看require和include的区别</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="PHP验证码：随机扭曲、旋转、变形（仿Google验证码）" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F4354&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12482">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4027581.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">PHP验证码：随机扭曲、旋转、变形（仿Google验证码）</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>在对php进行configure的时候,只需要在./configure的后面加上<span style="color: #0000ff;">--without-pear</span> 即可.</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="404错误页面重定向 PHP使用HEADER头发送状态(Status)信息(一)" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3070&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12482">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4028468.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">404错误页面重定向 PHP使用HEADER头发送状态(Status)信息(一)</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="50个非常有用的PHP工具" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F7059&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12482">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/08/02/20541028.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">50个非常有用的PHP工具</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="从php核心代码看require和include的区别" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F4311&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12482">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4027588.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">从php核心代码看require和include的区别</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="PHP验证码：随机扭曲、旋转、变形（仿Google验证码）" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F4354&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12482">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4027581.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">PHP验证码：随机扭曲、旋转、变形（仿Google验证码）</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/archives/12482/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>编译php出错：error while loading shared libraries: libmysqlclient.so.18: cannot open shared object f</title>
		<link>http://blog.haohtml.com/archives/12479</link>
		<comments>http://blog.haohtml.com/archives/12479#comments</comments>
		<pubDate>Sun, 05 Feb 2012 06:38:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[服务器类]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=12479</guid>
		<description><![CDATA[近日在编译php，make的时候出错： /root/dev/php-5.3.6/sapi/cli/php: error while loading shared libraries:  libmysqlclient.so.18: cannot open shared object file: No such file or  directory make: *** [ext/phar/phar.php] Error 127 =================================================== 网上找到的解决办法是: ln -s /usr/local/mysql/lib/libmysqlclient.so.18  /usr/lib/ 照做后仍然报错，原因是该方法适用于32位系统，64位系统应使用下面的这行 ln -s /usr/local/mysql/lib/libmysqlclient.so.18  /usr/lib64/ 另外：在编译的时候，不写mysql的路径，而使用mysqlnd代替，也可解决该问题的出现。<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="在安装php的make时候,出现错误&quot;chmod: cannot access `ext/phar/phar.phar': No such file or directory&quot;的解决办法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12482&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12479">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">在安装php的make时候,出现错误&quot;chmod: cannot access `ext/phar/phar.phar': No such file or directory&quot;的解决办法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="50个非常有用的PHP工具" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F7059&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12479">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/08/02/20541028.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">50个非常有用的PHP工具</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="404错误页面重定向 PHP使用HEADER头发送状态(Status)信息(一)" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3070&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12479">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4028468.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">404错误页面重定向 PHP使用HEADER头发送状态(Status)信息(一)</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="PHP验证码：随机扭曲、旋转、变形（仿Google验证码）" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F4354&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12479">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4027581.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">PHP验证码：随机扭曲、旋转、变形（仿Google验证码）</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>近日在编译php，make的时候出错：</p>
<blockquote><p>/root/dev/php-5.3.6/sapi/cli/php: error while loading shared libraries:  libmysqlclient.so.18: cannot open shared object file: No such file or  directory<br />
make: *** [ext/phar/phar.php] Error 127</p></blockquote>
<p>===================================================</p>
<p><strong>网上找到的解决办法是:</strong></p>
<blockquote><p>ln -s /usr/local/mysql/lib/libmysqlclient.so.18  /usr/lib/</p></blockquote>
<p>照做后仍然报错，原因是该方法适用于32位系统，64位系统应使用下面的这行</p>
<blockquote><p>ln -s /usr/local/mysql/lib/libmysqlclient.so.18  /usr/lib64/</p></blockquote>
<p>另外：在编译的时候，不写mysql的路径，而使用mysqlnd代替，也可解决该问题的出现。</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="在安装php的make时候,出现错误&quot;chmod: cannot access `ext/phar/phar.phar': No such file or directory&quot;的解决办法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12482&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12479">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">在安装php的make时候,出现错误&quot;chmod: cannot access `ext/phar/phar.phar': No such file or directory&quot;的解决办法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="50个非常有用的PHP工具" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F7059&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12479">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/08/02/20541028.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">50个非常有用的PHP工具</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="404错误页面重定向 PHP使用HEADER头发送状态(Status)信息(一)" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3070&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12479">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4028468.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">404错误页面重定向 PHP使用HEADER头发送状态(Status)信息(一)</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="PHP验证码：随机扭曲、旋转、变形（仿Google验证码）" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F4354&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12479">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4027581.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">PHP验证码：随机扭曲、旋转、变形（仿Google验证码）</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/archives/12479/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Centos64位系统下&quot;configure: error: libjpeg.(a&#124;so) not found&quot;的解决办法</title>
		<link>http://blog.haohtml.com/archives/12272</link>
		<comments>http://blog.haohtml.com/archives/12272#comments</comments>
		<pubDate>Mon, 12 Dec 2011 13:23:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[服务器类]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[lnmp]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=12272</guid>
		<description><![CDATA[刚刚发布了Centos6.1新版本.就下载了64位的版本进行测试. 按照原来的lnmp安装教程.在安装php的过程中.执行到./configure 这一步的时候.竟然提示"configure: error: libjpeg.(a&#124;so) not found"这项错误.明明已经安装过了libjpeg 和libjpeg-devel了.可这里仍然提示找不到库文件.很明显是路径的问题.默认会在/usr/lib/目录里查找相应的文件.但用whereis libjpeg发现.libjpeg被安装在了/usr/lib64/目录里. [root@bogon php-5.2.17]# whereis libjpeg libjpeg: /usr/lib/libjpeg.so /usr/lib64/libjpeg.so 1.如果提示"configure: error: libjpeg.(a&#124;so) not found"错误 所以这里我们需要复制一份libjpeg.so到/usr/lib/目录里才可以.再次执行./configure命令即可. cp -frp /usr/lib64/libjpeg.* /usr/lib/ 2.注意过程中还会提示" Configure: error: libpng.(also) not found."错误,解决办法和上面的一样. cp -frp /usr/lib64/libpng* /usr/lib/ 3.如果提示"configure: error: Cannot find ldap libraries in /usr/lib."的话. cp -frp /usr/lib64/libldap* /usr/lib/ 说明: 通过上面的搜索其实就知道一些原因了,configure一般的搜索编译路径为/usr/lib/下,因为php默认就在/usr/lib/下找相关库文件,而x64机器上是在:/usr/lib64.这时你就可以直接把需要的库文件从/usr/lib64中拷贝到/usr/lib/中去就可以了. 常见错误参考:http://apps.hi.baidu.com/share/detail/11746738<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="centos升级内核教程" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12448&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12272">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">centos升级内核教程</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="CentOS下安装lnmp(Nginx+PHP+MySQL)fpm" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F5732&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12272">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">CentOS下安装lnmp(Nginx+PHP+MySQL)fpm</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="Centos下安装lnmp教程(最新版2012-02-05)" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12473&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12272">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Centos下安装lnmp教程(最新版2012-02-05)</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="How to install PHP-fpm + Nginx on CentOS 5.3" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F5774&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12272">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4022556.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">How to install PHP-fpm + Nginx on CentOS 5.3</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>刚刚发布了Centos6.1新版本.就下载了64位的版本进行测试.</p>
<p>按照原来的lnmp安装教程.在安装php的过程中.执行到./configure 这一步的时候.竟然提示"configure: error: libjpeg.(a|so) not found"这项错误.明明已经安装过了libjpeg 和libjpeg-devel了.可这里仍然提示找不到库文件.很明显是路径的问题.默认会在/usr/lib/目录里查找相应的文件.但用whereis libjpeg发现.libjpeg被安装在了/usr/lib64/目录里.</p>
<pre>[root@bogon php-5.2.17]# whereis libjpeg
libjpeg: /usr/lib/libjpeg.so /usr/lib64/libjpeg.so</pre>
<p>1.如果提示"<span style="color: #ff0000; font-size: medium;">configure: error: libjpeg.(a|so) not found"<span style="color: #000000;">错误</span></span></p>
<p>所以这里我们需要复制一份libjpeg.so到/usr/lib/目录里才可以.再次执行./configure命令即可.</p>
<pre>cp -frp /usr/lib64/libjpeg.* /usr/lib/</pre>
<p>2.注意过程中还会提示" <span style="color: #ff0000;">Configure: error: libpng.(also) not found.</span>"错误,解决办法和上面的一样.</p>
<pre>cp -frp /usr/lib64/libpng* /usr/lib/</pre>
<p><span>3.如果提示"</span><span style="color: #ff0000; font-size: medium;">configure: error: Cannot find ldap libraries in /usr/lib."</span>的话.</p>
<p><span style="color: #000000; font-size: small;">cp -frp /usr/lib64/libldap* /usr/lib/</span></p>
<p><strong><span style="color: #0000ff;">说明:</span></strong></p>
<blockquote><p>通过上面的搜索其实就知道一些原因了,configure一般的搜索编译路径为/usr/lib/下,因为php默认就在/usr/lib/下找相关库文件,而x64机器上是在:/usr/lib64.这时你就可以直接把需要的库文件从/usr/lib64中拷贝到/usr/lib/中去就可以了.</p></blockquote>
<p>常见错误参考:<a href="http://apps.hi.baidu.com/share/detail/11746738">http://apps.hi.baidu.com/share/detail/11746738</a></p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="centos升级内核教程" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12448&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12272">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">centos升级内核教程</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="CentOS下安装lnmp(Nginx+PHP+MySQL)fpm" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F5732&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12272">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">CentOS下安装lnmp(Nginx+PHP+MySQL)fpm</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="Centos下安装lnmp教程(最新版2012-02-05)" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12473&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12272">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Centos下安装lnmp教程(最新版2012-02-05)</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="How to install PHP-fpm + Nginx on CentOS 5.3" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F5774&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12272">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4022556.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">How to install PHP-fpm + Nginx on CentOS 5.3</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/archives/12272/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>php里函数名或者方法名前加 &amp; 符号表示的意思</title>
		<link>http://blog.haohtml.com/archives/11925</link>
		<comments>http://blog.haohtml.com/archives/11925#comments</comments>
		<pubDate>Thu, 10 Nov 2011 08:42:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[程序开发]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=11925</guid>
		<description><![CDATA[先阅读手册 ========== 从函数返回一个引用，必须在函数声明和指派返回值给一个变量时都使用引用操作符 &#38; ： 例子 17-13. 由函数返回一个引用 &#60;?php function &#38;returns_reference() { return $someref; } $newref =&#38; returns_reference(); ?&#62; 有关引用的更多信息, 请查看引用的解释。 在来看一段很多开源代码喜欢用的单例注册模式 &#60;?php class a{} class b{} function &#38; aa($name) { static $class = array(); if(!$class[$name]) { $class[$name] = new $name(); } return $class[$name]; } $a = &#38; aa('a'); $b = &#38; aa('b'); $a2 = [...]<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="在安装php的make时候,出现错误&quot;chmod: cannot access `ext/phar/phar.phar': No such file or directory&quot;的解决办法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12482&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11925">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">在安装php的make时候,出现错误&quot;chmod: cannot access `ext/phar/phar.phar': No such file or directory&quot;的解决办法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="从php核心代码看require和include的区别" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F4311&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11925">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4027588.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">从php核心代码看require和include的区别</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="50个非常有用的PHP工具" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F7059&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11925">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/08/02/20541028.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">50个非常有用的PHP工具</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="PHP 输入／输出流" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F5123&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11925">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">PHP 输入／输出流</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>先阅读手册<br />
==========<br />
从函数返回一个引用，必须在函数声明和指派返回值给一个变量时都使用引用操作符 &amp; ：</p>
<p>例子 17-13. 由函数返回一个引用</p>
<pre class="brush:[php]">&lt;?php
function &amp;returns_reference()
{
return $someref;
}

$newref =&amp; returns_reference();
?&gt;</pre>
<p>有关引用的更多信息, 请查看引用的解释。</p>
<p>在来看一段很多开源代码喜欢用的单例注册模式</p>
<pre class="brush:[php]">&lt;?php
class a{}
class b{}
function &amp; aa($name)
{
    static $class = array();
    if(!$class[$name])
    {
        $class[$name] = new $name();
    }
    return $class[$name];
}
$a = &amp; aa('a');
$b = &amp; aa('b');

$a2 = &amp; aa('a');
$b2 = &amp; aa('b');

echo $a === $a2 ? '$a和$a2是同一个实例化对象&lt;br/&gt;' : '';
echo $b === $b2 ? '$b和$b2是同一个实例化对象' : '';
?&gt;</pre>
<p><span id="more-11925"></span>程序输出:</p>
<blockquote><p>$a和$a2是同一个实例化对象<br />
$b和$b2是同一个实例化对象</p></blockquote>
<p><strong>函数的引用</strong><br />
对于函数的引用，主要区别在于内存性能～<br />
function &amp;load_message 和 function load_message，第一个在使用的时候也要用 &amp;load_message声明为一个引用返回，而第二个只是将函数的结果赋值到一个变量中，该函数一般用于递归作用。至于引用，还是建议你自己写几个例子，测试一下。就明白了，只看字面意思总归不如实践的好，同时网上有很多关于php 引用的例子。可以参照一下。</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="在安装php的make时候,出现错误&quot;chmod: cannot access `ext/phar/phar.phar': No such file or directory&quot;的解决办法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12482&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11925">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">在安装php的make时候,出现错误&quot;chmod: cannot access `ext/phar/phar.phar': No such file or directory&quot;的解决办法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="从php核心代码看require和include的区别" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F4311&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11925">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4027588.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">从php核心代码看require和include的区别</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="50个非常有用的PHP工具" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F7059&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11925">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/08/02/20541028.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">50个非常有用的PHP工具</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="PHP 输入／输出流" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F5123&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11925">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">PHP 输入／输出流</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/archives/11925/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>php5.3不支持ZendOptimizer的解决办法(Zend Guard Loader)</title>
		<link>http://blog.haohtml.com/archives/11919</link>
		<comments>http://blog.haohtml.com/archives/11919#comments</comments>
		<pubDate>Sun, 06 Nov 2011 08:35:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[服务器类]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[ZendOptimizer]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=11919</guid>
		<description><![CDATA[PHP 5.3 下，Zend Optimizer 已经被全新的 Zend Guard Loader 取代 ------------------------------------------------ 1. 下载 Zend Guard Loader 压缩包。（官方下载地址：http://www.zend.com/en/products/guard/downloads） 2. 解压并提取 ZendGuardLoader.so（Linux）或 ZendLoader.dll（Windows），对应你的PHP版本。 3. 在你的 php.ini 文件添加下面一行，用来加载 Zend Guard Loader： Linux 和 Mac OS X:　zend_extension = 完整路径/ZendGuardLoader.so Windows（非线程安全）: 　zend_extension = 完整路径/ZendLoader.dll 4. 在 php.ini 额外新增一行，启用 Zend Guard Loader：  zend_loader.enable = 1 5. 可选：可以在 php.ini 文件添加以下行到 Zend Guard Loader 配置位置： [...]<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="在安装php的make时候,出现错误&quot;chmod: cannot access `ext/phar/phar.phar': No such file or directory&quot;的解决办法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12482&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11919">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">在安装php的make时候,出现错误&quot;chmod: cannot access `ext/phar/phar.phar': No such file or directory&quot;的解决办法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="在FreeBSD7.0下安装ZendOptimizer" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F821&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11919">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">在FreeBSD7.0下安装ZendOptimizer</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="采用curl库在PHP程序之间传递数组[原创]" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3223&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11919">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4027629.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">采用curl库在PHP程序之间传递数组[原创]</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="从php核心代码看require和include的区别" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F4311&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11919">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4027588.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">从php核心代码看require和include的区别</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>PHP 5.3 下，Zend Optimizer 已经被全新的 <strong>Zend Guard Loader</strong> 取代</p>
<p>------------------------------------------------</p>
<p>1. 下载 Zend Guard Loader 压缩包。（官方下载地址：<a href="http://www.zend.com/en/products/guard/downloads" target="_blank">http://www.zend.com/en/products/guard/downloads</a>）</p>
<p>2. 解压并提取 ZendGuardLoader.so（Linux）或 ZendLoader.dll（Windows），对应你的PHP版本。</p>
<p>3. 在你的 php.ini 文件添加下面一行，用来加载 Zend Guard Loader：</p>
<p><strong>Linux 和 Mac OS X:　</strong><span style="color: #0000ff;">zend_extension = 完整路径/ZendGuardLoader.so</span><br />
<strong>Windows（非线程安全）:</strong> 　<span style="color: #0000ff;">zend_extension = 完整路径/ZendLoader.dll</span></p>
<p>4. 在 php.ini 额外新增一行，启用 Zend Guard Loader：</p>
<blockquote><p> zend_loader.enable = 1</p></blockquote>
<p>5. 可选：可以在 php.ini 文件添加以下行到 Zend Guard Loader 配置位置：<span id="more-11919"></span></p>
<p>;禁用许可证检查（为了性能的原因）<br />
zend_loader.disable_licensing = 0</p>
<p>;让 Zend Guard Loader 支持混淆级别。级别在 Zend Guard 的<a href="http://www.zend.com/topics/Zend-Guard-User-Guidev5x.pdf" target="_blank">官方详细文档</a>。 0 - 不启用混淆<br />
zend_loader.obfuscation_level_support = 3</p>
<p>;从这个路径寻找Zend产品授权的产品许可证。欲了解更多有关如何创建一个许可证文件的信息，请参阅 Zend Guard 用户指南.<br />
zend_loader.license_path =</p>
<p>6. 如果您使用 Zend debugger，请确保加载 Zend guard Loader。</p>
<p>7. 如果您使用 ioncube loader，请务必在它之前加载 Zend guard Loader。</p>
<p>8. 重新启动Web服务器。</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="在安装php的make时候,出现错误&quot;chmod: cannot access `ext/phar/phar.phar': No such file or directory&quot;的解决办法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12482&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11919">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">在安装php的make时候,出现错误&quot;chmod: cannot access `ext/phar/phar.phar': No such file or directory&quot;的解决办法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="在FreeBSD7.0下安装ZendOptimizer" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F821&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11919">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">在FreeBSD7.0下安装ZendOptimizer</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="采用curl库在PHP程序之间传递数组[原创]" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3223&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11919">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4027629.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">采用curl库在PHP程序之间传递数组[原创]</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="从php核心代码看require和include的区别" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F4311&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11919">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4027588.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">从php核心代码看require和include的区别</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/archives/11919/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>常用PHP安全设置加固</title>
		<link>http://blog.haohtml.com/archives/11257</link>
		<comments>http://blog.haohtml.com/archives/11257#comments</comments>
		<pubDate>Sun, 04 Sep 2011 12:39:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[服务器类]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[安全]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=11257</guid>
		<description><![CDATA[1.隐藏php版本 2.禁用危险的php函数 3.命令注入攻击 4.SQL注入攻击 5.xss攻击 6.会话劫持攻击 7.关闭注册全局变量 8.上传文件 9.远程包含、本地包含 10.Php.ini包含补丁文件,我们可以根据需要，通过它包含或者nginx的模块 1.隐藏php版本 expose_php=off 2.禁用危险的php函数 popen,pentl_exec,passthru,exec,system,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_alter,ini_restore,dl,pfsockopen,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,show_source,escapeshellcmd,escapeshellarg,curl_exec,curl_multi_exec,parse_ini_file,assert 至于eval函数，我们用suhosin把这些全部都加进eval的黑名单 3.命令注入攻击 还是函数使用不严格造成的，这个我们应该不会有这些问题，因为如果存在，我们也禁用过，程序自然会报错 4.SQL注入攻击 magic_quotes_gpc = On；还有就是程序上的事情 5.xss攻击 举例说明，以前的公司还有新网都有后台客户提交工单给技术人员，然而提交位置存在xss跨站漏洞，如果在其位置跨个木马、偷取cookies、密码进行csrf攻击，后果不堪设想。 有必要的情况下增加xss模块 6.会话劫持攻击 这个说起来容易，对于session，需要条件及其苛刻，没有足够条件也是无法成功的！！ 7.关闭注册全局变量 在PHP中提交的变量，包括使用POST或者GET提交的变量，都将自动注册为全局变量，能够直接访问，这是对服务器非常不安全的，所以我们不能让它注册为全局变量，就把注册全局变量选项关闭：register_globals = Off 当然，如果这样设置了，那么获取对应变量的时候就要采用合理方式，比如获取GET提交的变量var，那么就要用$_GET['var']来进行获取，这个php程序员要注意。 8.上传文件 这里文件在另外个服务器没什么要说的,注意服务器上传目录无执行权限 9.远程包含、本地包含 常见攻击方法： 远程包含不用说了，直接包含远程的恶意代码获取控制权 防范：在php.ini关闭allow_url_fopen = off 本地包含常见攻击方法有三种， 1.日志包含。 2./proc/environ包含客户端user-agent。 3.图片包含。以上三种方法都是先向其内容插入恶意代码，使其包含执行 防范：open_basedir限制了目录，防止了1,2的攻击方法。至于第三种我们的图片在调用服务器，本地包含是无效的^_^。 10.Php.ini包含补丁文件,我们可以根据需要，通过它包含或者nginx的模块 在php.ini中引用。在配置文件内引用的话，将影响到所以的网站，包含所有页面 在php.ini中，找到此节： ; Automatically add files before or after any [...]<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="在安装php的make时候,出现错误&quot;chmod: cannot access `ext/phar/phar.phar': No such file or directory&quot;的解决办法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12482&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11257">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">在安装php的make时候,出现错误&quot;chmod: cannot access `ext/phar/phar.phar': No such file or directory&quot;的解决办法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="同服务器多网站的安全设置（windows server+apache+php）" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3432&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11257">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">同服务器多网站的安全设置（windows server+apache+php）</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="PHP安全配置" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3114&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11257">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">PHP安全配置</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="采用curl库在PHP程序之间传递数组[原创]" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3223&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11257">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4027629.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">采用curl库在PHP程序之间传递数组[原创]</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>1.隐藏php版本<br />
2.禁用危险的php函数<br />
3.命令注入攻击<br />
4.SQL注入攻击<br />
5.xss攻击<br />
6.会话劫持攻击<br />
7.关闭注册全局变量<br />
8.上传文件<br />
9.远程包含、本地包含<br />
10.Php.ini包含补丁文件,我们可以根据需要，通过它包含或者nginx的模块</p>
<p><strong>1.隐藏php版本</strong></p>
<blockquote><p><strong></strong>expose_php=off</p></blockquote>
<p><strong>2.禁用危险的php函数</strong><br />
popen,pentl_exec,passthru,exec,system,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_alter,ini_restore,dl,pfsockopen,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,show_source,escapeshellcmd,escapeshellarg,curl_exec,curl_multi_exec,parse_ini_file,assert<br />
至于eval函数，我们用suhosin把这些全部都加进eval的黑名单<span id="more-11257"></span></p>
<p><strong>3.命令注入攻击</strong><br />
还是函数使用不严格造成的，这个我们应该不会有这些问题，因为如果存在，我们也禁用过，程序自然会报错</p>
<p><strong>4.SQL注入攻击</strong><br />
<span style="color: #0000ff;">magic_quotes_gpc = On；</span>还有就是程序上的事情</p>
<p><strong>5.xss攻击</strong><br />
举例说明，以前的公司还有新网都有后台客户提交工单给技术人员，然而提交位置存在xss跨站漏洞，如果在其位置跨个木马、偷取cookies、密码进行csrf攻击，后果不堪设想。<br />
有必要的情况下增加xss模块</p>
<p><strong>6.会话劫持攻击</strong><br />
这个说起来容易，对于session，需要条件及其苛刻，没有足够条件也是无法成功的！！</p>
<p><strong>7.关闭注册全局变量</strong><br />
在PHP中提交的变量，包括使用POST或者GET提交的变量，都将自动注册为全局变量，能够直接访问，这是对服务器非常不安全的，所以我们不能让它注册为全局变量，就把注册全局变量选项关闭：register_globals = Off<br />
当然，如果这样设置了，那么获取对应变量的时候就要采用合理方式，比如获取GET提交的变量var，那么就要用$_GET['var']来进行获取，这个php程序员要注意。</p>
<p><strong>8.上传文件</strong><br />
这里文件在另外个服务器没什么要说的,注意服务器上传目录无执行权限</p>
<p><strong>9.远程包含、本地包含</strong><br />
常见攻击方法：<br />
远程包含不用说了，直接包含远程的恶意代码获取控制权<br />
防范：在php.ini关闭<span style="color: #0000ff;">allow_url_fopen = off</span><br />
本地包含常见攻击方法有三种，<br />
1.日志包含。<br />
2./proc/environ包含客户端user-agent。<br />
3.图片包含。以上三种方法都是先向其内容插入恶意代码，使其包含执行<br />
防范：<span style="color: #0000ff;">open_basedir</span>限制了目录，防止了1,2的攻击方法。至于第三种我们的图片在调用服务器，本地包含是无效的^_^。</p>
<p><strong>10.Php.ini包含补丁文件,我们可以根据需要，通过它包含或者nginx的模块</strong><br />
在php.ini中引用。在配置文件内引用的话，将影响到所以的网站，包含所有页面<br />
在php.ini中，找到此节：</p>
<blockquote><p>; Automatically add files before or after any PHP document.<br />
;auto_prepend_file = “phpids.php”<br />
;auto_append_file = “alert.php”</p></blockquote>
<p>默认是空，请添加所包含的文件。同时找到：</p>
<blockquote><p>; UNIX: “/path1:/path2″<br />
;include_path = “.:/php/includes”<br />
;<br />
; Windows: “\path1;\path2″<br />
include_path = “.;F:\PHPnow\htdocs”</p></blockquote>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="在安装php的make时候,出现错误&quot;chmod: cannot access `ext/phar/phar.phar': No such file or directory&quot;的解决办法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12482&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11257">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">在安装php的make时候,出现错误&quot;chmod: cannot access `ext/phar/phar.phar': No such file or directory&quot;的解决办法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="同服务器多网站的安全设置（windows server+apache+php）" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3432&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11257">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">同服务器多网站的安全设置（windows server+apache+php）</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="PHP安全配置" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3114&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11257">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">PHP安全配置</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="采用curl库在PHP程序之间传递数组[原创]" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3223&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11257">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4027629.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">采用curl库在PHP程序之间传递数组[原创]</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/archives/11257/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Call to undefined function curl_init()错误解决</title>
		<link>http://blog.haohtml.com/archives/11060</link>
		<comments>http://blog.haohtml.com/archives/11060#comments</comments>
		<pubDate>Tue, 30 Aug 2011 09:26:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[程序开发]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=11060</guid>
		<description><![CDATA[提示不支持这个函数，于是在php.ini文件里启用了扩展，把前面的;去掉，重启apache，竟然不起作用．后来查找了一下，原来还需要两个dll(libeay32.dll、ssleay32.dll)文件支持，将dll复制到c:/windows/system32目录里．然后重启apache即可． 特在此记录一下．<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="在安装php的make时候,出现错误&quot;chmod: cannot access `ext/phar/phar.phar': No such file or directory&quot;的解决办法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12482&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11060">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">在安装php的make时候,出现错误&quot;chmod: cannot access `ext/phar/phar.phar': No such file or directory&quot;的解决办法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="PHP Curl 多线程实现" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F5330&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11060">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">PHP Curl 多线程实现</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="采用curl库在PHP程序之间传递数组[原创]" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3223&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11060">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4027629.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">采用curl库在PHP程序之间传递数组[原创]</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="PHP Warning: date() [function.date]: It is not safe是什么问题" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F4837&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11060">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">PHP Warning: date() [function.date]: It is not safe是什么问题</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>提示不支持这个函数，于是在php.ini文件里启用了扩展，把前面的;去掉，重启apache，竟然不起作用．后来查找了一下，原来还需要两个dll(libeay32.dll、ssleay32.dll)文件支持，将dll复制到c:/windows/system32目录里．然后重启apache即可．</p>
<p>特在此记录一下．</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="在安装php的make时候,出现错误&quot;chmod: cannot access `ext/phar/phar.phar': No such file or directory&quot;的解决办法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12482&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11060">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">在安装php的make时候,出现错误&quot;chmod: cannot access `ext/phar/phar.phar': No such file or directory&quot;的解决办法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="PHP Curl 多线程实现" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F5330&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11060">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">PHP Curl 多线程实现</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="采用curl库在PHP程序之间传递数组[原创]" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3223&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11060">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4027629.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">采用curl库在PHP程序之间传递数组[原创]</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="PHP Warning: date() [function.date]: It is not safe是什么问题" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F4837&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11060">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">PHP Warning: date() [function.date]: It is not safe是什么问题</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/archives/11060/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP unset销毁变量并内存释放问题</title>
		<link>http://blog.haohtml.com/archives/10960</link>
		<comments>http://blog.haohtml.com/archives/10960#comments</comments>
		<pubDate>Wed, 10 Aug 2011 00:51:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[程序开发]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[内存释放]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=10960</guid>
		<description><![CDATA[for ( $i = 1; $i &#60; 100; $i++ ) { $str = str_repeat('01234567', $i); $a = memory_get_usage(); unset($str); $b = memory_get_usage(); echo "\n ".$i.': '.($b - $a).' Bytes.'; } 从结果看出： 8 x 32 = 256 在256字节长的时候才真正有必要释放内存，有些人说，不如直接$str = null来的速度快。 结果如下： 1: 0 Bytes. 2: 0 Bytes. 3: 0 Bytes. 4: 0 Bytes. 5: 0 Bytes. [...]<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="在安装php的make时候,出现错误&quot;chmod: cannot access `ext/phar/phar.phar': No such file or directory&quot;的解决办法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12482&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F10960">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">在安装php的make时候,出现错误&quot;chmod: cannot access `ext/phar/phar.phar': No such file or directory&quot;的解决办法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="使用新的内存管理器" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F4364&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F10960">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4027574.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">使用新的内存管理器</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="深入探讨PHP中的内存管理问题" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F4367&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F10960">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4026209.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">深入探讨PHP中的内存管理问题</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="PHP变量对内存的开销与释放 unset()是否真的释放内存" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F1934&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F10960">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">PHP变量对内存的开销与释放 unset()是否真的释放内存</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<blockquote><p>for ( $i = 1; $i &lt; 100; $i++ ) {<br />
$str = str_repeat('01234567', $i);<br />
$a = memory_get_usage();<br />
unset($str);<br />
$b = memory_get_usage();<br />
echo "\n<br />
".$i.': '.($b - $a).' Bytes.';<br />
}</p></blockquote>
<div>从结果看出：</div>
<div>8 x 32 = 256 在256字节长的时候才真正有必要释放内存，有些人说，不如直接$str = null来的速度快。<span id="more-10960"></span></div>
<div>结果如下：</div>
<div>1: 0 Bytes.<br />
2: 0 Bytes.<br />
3: 0 Bytes.<br />
4: 0 Bytes.<br />
5: 0 Bytes.<br />
6: 0 Bytes.<br />
7: 0 Bytes.<br />
8: 0 Bytes.<br />
9: 0 Bytes.<br />
10: 0 Bytes.<br />
11: 0 Bytes.<br />
12: 0 Bytes.<br />
13: 0 Bytes.<br />
14: 0 Bytes.<br />
15: 0 Bytes.<br />
16: 0 Bytes.<br />
17: 0 Bytes.<br />
18: 0 Bytes.<br />
19: 0 Bytes.<br />
20: 0 Bytes.<br />
21: 0 Bytes.<br />
22: 0 Bytes.<br />
23: 0 Bytes.<br />
24: 0 Bytes.<br />
25: 0 Bytes.<br />
26: 0 Bytes.<br />
27: 0 Bytes.<br />
28: 0 Bytes.<br />
29: 0 Bytes.<br />
30: 0 Bytes.<br />
31: 0 Bytes.<br />
32: -272 Bytes.<br />
33: -280 Bytes.<br />
34: -288 Bytes.<br />
35: -296 Bytes.<br />
36: -304 Bytes.<br />
37: -312 Bytes.<br />
38: -320 Bytes.<br />
39: -328 Bytes.<br />
40: -336 Bytes.<br />
41: -344 Bytes.<br />
42: -352 Bytes.<br />
43: -360 Bytes.<br />
44: -368 Bytes.<br />
45: -376 Bytes.<br />
46: -384 Bytes.<br />
47: -392 Bytes.<br />
48: -400 Bytes.<br />
49: -408 Bytes.<br />
50: -416 Bytes.<br />
51: -424 Bytes.<br />
52: -432 Bytes.<br />
53: -440 Bytes.<br />
54: -448 Bytes.<br />
55: -456 Bytes.<br />
56: -464 Bytes.<br />
57: -472 Bytes.<br />
58: -480 Bytes.<br />
59: -488 Bytes.<br />
60: -496 Bytes.<br />
61: -504 Bytes.<br />
62: -512 Bytes.<br />
63: -520 Bytes.<br />
64: -528 Bytes.<br />
65: -536 Bytes.<br />
66: -544 Bytes.<br />
67: -552 Bytes.<br />
68: -560 Bytes.<br />
69: -568 Bytes.<br />
70: -576 Bytes.<br />
71: -584 Bytes.<br />
72: -592 Bytes.<br />
73: -600 Bytes.<br />
74: -608 Bytes.<br />
75: -616 Bytes.<br />
76: -624 Bytes.<br />
77: -632 Bytes.<br />
78: -640 Bytes.<br />
79: -648 Bytes.<br />
80: -656 Bytes.<br />
81: -664 Bytes.<br />
82: -672 Bytes.<br />
83: -680 Bytes.<br />
84: -688 Bytes.<br />
85: -696 Bytes.<br />
86: -704 Bytes.<br />
87: -712 Bytes.<br />
88: -720 Bytes.<br />
89: -728 Bytes.<br />
90: -736 Bytes.<br />
91: -744 Bytes.<br />
92: -752 Bytes.<br />
93: -760 Bytes.<br />
94: -768 Bytes.<br />
95: -776 Bytes.<br />
96: -784 Bytes.<br />
97: -792 Bytes.<br />
98: -800 Bytes.<br />
99: -808 Bytes.&nbsp;</p>
<p>PHP的unset()函数用来清除、销毁变量，不用的变量，我们可以用unset()将它销毁。但是某些时候，用unset()却无法达到销毁变量占用的内存！我们先看一个例子：<br />
&lt;?php<br />
$s=str_repeat('1',255);  //产生由255个1组成的字符串<br />
$m=memory_get_usage();  //获取当前占用内存<br />
unset($s);<br />
$mm=memory_get_usage();  //unset()后再查看当前占用内存<br />
echo $m-$mm;<br />
?&gt; 最后输出unset()之前占用内存减去unset()之后占用内存，如果是正数，那么说明unset($s)已经将$s从内存中销毁(或者 说，unset()之后内存占用减少了)，可是我在PHP5和windows平台下，得到的结果是：-48。这是否可以说明，unset($s)并没有起 到销毁变量$s所占用内存的作用呢？我们再作下面的例子：<br />
&lt;?php<br />
$s=str_repeat('1',256);  //产生由256个1组成的字符串<br />
$m=memory_get_usage();  //获取当前占用内存<br />
unset($s);<br />
$mm=memory_get_usage();  //unset()后再查看当前占用内存<br />
echo $m-$mm;<br />
?&gt; 这个例子，和上面的例子几乎相同，唯一的不同是，$s由256个1组成，即比第一个例子多了一个1，得到结果是：224。这是否可以说明，unset($s)已经将$s所占用的内存销毁了？<br />
通过上面两个例子，我们可以得出以下结论：<br />
<strong>结论一、unset()函数只能在变量值占用内存空间超过256字节时才会释放内存空间。</strong></p>
<p>那么是不是只要变量值超过256，使用unset就可以释放内存空间呢？我们再通过一个例子来测试一下：<br />
&lt;?php<br />
$s=str_repeat('1',256);  //这和第二个例子完全相同<br />
$p=&amp;$s;<br />
$m=memory_get_usage();<br />
unset($s);  //销毁$s<br />
$mm=memory_get_usage();<br />
echo $p.'&lt;br /&gt;';<br />
echo $m-$mm;<br />
?&gt; 刷新页面，我们看到第一行有256个1，第二行是-48，按理说我们已经销毁了$s，而$p只是引用$s的变量，应该是没有内容了，另外，unset($s)后内存占用却比unset()前增加了！现在我们再做以下的例子：<br />
&lt;?php<br />
$s=str_repeat('1',256);  //这和第二个例子完全相同<br />
$p=&amp;$s;<br />
$m=memory_get_usage();<br />
$s=null;  //设置$s为null<br />
$mm=memory_get_usage();<br />
echo $p.'&lt;br /&gt;';<br />
echo $m-$mm;<br />
?&gt; 现在刷新页面，我们看到，输出$p已经是没有内容了，unset()前后内存占用量之差是224，即已经清除了变量占用的内存。本例中的$s=null也可以换成unset()，如下：<br />
&lt;?php<br />
$s=str_repeat('1',256);  //这和第二个例子完全相同<br />
$p=&amp;$s;<br />
$m=memory_get_usage();<br />
unset($s);  //销毁$s<br />
unset($p);<br />
$mm=memory_get_usage();<br />
echo $p.'&lt;br /&gt;';<br />
echo $m-$mm;<br />
?&gt; 我们将$s和$p都使用unset()销毁，这时再看内存占用量之差也是224，说明这样也可以释放内存。那么，我们可以得到另外一条结论：<br />
<strong>结论二、只有当指向该变量的所有变量（如引用变量）都被销毁后，才会释放内存。</strong></p>
<p>相信经过本文的例子后，大家应该对unset()有所了解了，最起码，本人用unset()也是为了在变量不起作用时，释放内存。</p>
<p>转载:<a href="http://hi.baidu.com/18701433144/blog/item/2b3a37649cee0d53eaf8f87c.html">http://hi.baidu.com/18701433144/blog/item/2b3a37649cee0d53eaf8f87c.html</a></p>
</div>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="在安装php的make时候,出现错误&quot;chmod: cannot access `ext/phar/phar.phar': No such file or directory&quot;的解决办法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12482&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F10960">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">在安装php的make时候,出现错误&quot;chmod: cannot access `ext/phar/phar.phar': No such file or directory&quot;的解决办法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="使用新的内存管理器" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F4364&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F10960">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4027574.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">使用新的内存管理器</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="深入探讨PHP中的内存管理问题" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F4367&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F10960">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4026209.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">深入探讨PHP中的内存管理问题</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="PHP变量对内存的开销与释放 unset()是否真的释放内存" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F1934&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F10960">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">PHP变量对内存的开销与释放 unset()是否真的释放内存</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/archives/10960/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Redis的PHP客户端</title>
		<link>http://blog.haohtml.com/archives/10199</link>
		<comments>http://blog.haohtml.com/archives/10199#comments</comments>
		<pubDate>Fri, 01 Jul 2011 04:10:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[nosql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[redis]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=10199</guid>
		<description><![CDATA[Redis支持的客户端种类非常多，包括C、Java、PHP、Python等，本文主要介绍PHP客户端的安装和使用。 Redis的客户端实际上担负了通过网络协议与Redis Server进行通信的过程，通信的过程必须遵循协议规范，让客户的调用更加符合特定语言的使用习惯。现有PHP客户端：rediska、phpredis、Predis、Redisent。这些可护短中，有纯PHP的实现方案，也有二进制版本的实现方案。 官方提供的PHP客户端列表如下： 特性比较 &#160; predis phpredis Rediska 易扩展 ∆ ∆ 客户端策略和Hash算法定义 ∆ ∆ 实现方式 纯PHP PHP扩展（C语言） 纯PHP 测试数据（本地环境下） 18900 SET/sec using 12 bytes for both key and value18300 GET/sec while retrieving the very same values 0.210 seconds to fetch 30000 keys using _KEYS *_. 29000 SET/sec using 12 bytes for both key and [...]<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="在安装php的make时候,出现错误&quot;chmod: cannot access `ext/phar/phar.phar': No such file or directory&quot;的解决办法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12482&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F10199">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">在安装php的make时候,出现错误&quot;chmod: cannot access `ext/phar/phar.phar': No such file or directory&quot;的解决办法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="Redis作者谈Redis应用场景" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F10139&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F10199">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Redis作者谈Redis应用场景</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="深入理解 Redis 内部实现" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11942&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F10199">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">深入理解 Redis 内部实现</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="Redis系统性介绍" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11534&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F10199">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/09/25/34081663.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Redis系统性介绍</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>Redis支持的客户端种类非常多，包括C、Java、PHP、Python等，本文主要介绍PHP客户端的安装和使用。</p>
<p>Redis的客户端实际上担负了通过网络协议与Redis Server进行通信的过程，通信的过程必须遵循协议规范，让客户的调用更加符合特定语言的使用习惯。现有PHP客户端：rediska、phpredis、Predis、Redisent。这些可护短中，有纯PHP的实现方案，也有二进制版本的实现方案。</p>
<p>官方提供的PHP客户端列表如下：<span id="more-10199"></span></p>
<p><strong>特性比较</strong></p>
<p>&nbsp;</p>
<table width="100%" border="1" cellspacing="2" cellpadding="5">
<tbody>
<tr>
<td valign="top"></td>
<td valign="top">predis</td>
<td valign="top">phpredis</td>
<td valign="top">Rediska</td>
</tr>
<tr>
<td valign="top">易扩展</td>
<td valign="top">∆</td>
<td valign="top"></td>
<td valign="top">∆</td>
</tr>
<tr>
<td valign="top">客户端策略和Hash算法定义</td>
<td valign="top">∆</td>
<td valign="top"></td>
<td valign="top">∆</td>
</tr>
<tr>
<td valign="top">实现方式</td>
<td valign="top">纯PHP</td>
<td valign="top">PHP扩展（C语言）</td>
<td valign="top">纯PHP</td>
</tr>
<tr>
<td valign="top">测试数据（本地环境下）</td>
<td valign="top">18900 SET/sec using 12 bytes for both key and value18300 GET/sec while retrieving the very same values</p>
<p>0.210 seconds to fetch 30000 keys using _KEYS *_.</td>
<td valign="top">29000 SET/sec using 12 bytes for both key and value30000 GET/sec while retrieving the very same values</p>
<p>0.037 seconds to fetch 30000 keys using "KEYS *"".</td>
<td valign="top"></td>
</tr>
<tr>
<td valign="top">测试结果（网络环境下）</td>
<td valign="top">3150 SET/sec using 12 bytes for both key and3150 GET/sec while retrieving the very same</p>
<p>0.212 seconds to fetch 30000 keys using "KEYS *".</td>
<td valign="top">3300 SET/sec using 12 bytes for both key and3300 GET/sec while retrieving the very same</p>
<p>0.088 seconds to fetch 30000 keys using "KEYS *".</td>
<td valign="top"></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>/*---------------------- Predis ----------------------------*/</p>
<p><strong>Predis</strong></p>
<p>Predis是一个灵活和特性完备（PHP&gt;5.3）的支持Redis的PHP客户端。当前版本为0.6.3，默认不支持PHP5.2。</p>
<p>主要特性如下：</p>
<p>完整的支持从1.2到2.4的Redis，并且支持当前正在开发的版本；</p>
<p>提供客户端实现的一致性哈希算法，支持自定义；</p>
<p>在单个或聚合连接中支持命令管道；（Command pipelining on single and aggregated connections）</p>
<p>能够通过TCP/IP或者Unix domain sockets连接到redis，支持持久连接；</p>
<p>自动连接Redis实例，使用“懒惰”方式，只在第一个命令发出时执行连接；</p>
<p>可以灵活定义客户端的命令集合；</p>
<p>&nbsp;</p>
<p>Predis安装</p>
<p>&nbsp;</p>
<p>/*----------------------- phpredis ---------------------------*/</p>
<p><strong>phpredis</strong></p>
<p>这是一个二进制版本的PHP客户端，按照的说法，效率要比Predis高。这个版本支持作为Session的Handler。这个扩展的有点在于无需加载任何外部文件，使用比较方便。缺点在于难于扩展，一般的PHP程序员无法对其做出扩展。考虑到Redis正在飞速发展过程中，缺乏扩展的特性还是有些影响的，需要维护过程中注意进行升级更新。</p>
<p>Max下整合XAMPP的安装（需要XAMPP的Dev环境）</p>
<blockquote><p>sudo /Applications/XAMPP/xamppfiles/bin/phpize</p>
<p>sudo MACOSX_DEPLOYMENT_TARGET=10.6 CFLAGS="-arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp" CCFLAGS="-arch i386 -arch x86_64 -g -Os -pipe" CXXFLAGS="-arch i386 -arch x86_64 -g -Os -pipe" LDFLAGS="-arch i386 -arch x86_64 -bind_at_load" ./configure --with-apxs=/Applications/XAMPP/xamppfiles/bin/apxs --with-php-config=/Applications/XAMPP/xamppfiles/bin/php-config</p>
<p>sudo make</p>
<p>sudo make install</p></blockquote>
<p>然后修改php.ini，重启服务就可以了。</p>
<p>对于Linux下安装phpRedis扩展模块教程,请参考:<a href="http://blog.haohtml.com/archives/10385" target="_blank">http://blog.haohtml.com/archives/10385</a></p>
<p>示例代码</p>
<blockquote><p>&lt;?php</p>
<p>echo 'phpredis sample:&lt;br /&gt;';</p>
<p>error_reporting(E_ALL);</p>
<p>ini_set('display_errors','ON');</p>
<p>$redis = new Redis();</p>
<p>$redis-&gt;connect('127.0.0.1',6379);</p>
<p>$redis-&gt;set('first_key_phpredis', 'Hello world');</p>
<p>);</p></blockquote>
<p>&nbsp;</p>
<p>/*------------------- Rediska -------------------------------*/</p>
<p><strong>Rediska</strong></p>
<p>rediska 目前还处于 beta 阶段。他的代码托管在github上，可以方便的获取。另外也提供了PEAR版本，所以获取和安装都非常方便。可以使用PEAR包安装。</p>
<p>本文使用的是 Mac 下的 XAMPP提供的PEAR进行安装。首先添加频道地址：</p>
<blockquote><p>localhost:bin shiqiang$ sudo ./pear channel-discover <a href="http://pear.geometria-lab.net/">pear.geometria-lab.net</a></p>
<p>Password:</p>
<p>Adding Channel "<a href="http://pear.geometria-lab.net/">pear.geometria-lab.net</a>" succeeded</p>
<p>Discovery of channel "<a href="http://pear.geometria-lab.net/">pear.geometria-lab.net</a>" succeeded</p></blockquote>
<p>&nbsp;</p>
<p>然后进行安装</p>
<blockquote><p>localhost:bin shiqiang$ sudo ./pear channel-discover <a href="http://pear.geometria-lab.net/">pear.geometria-lab.net</a></p>
<p>Password:</p>
<p>Adding Channel "<a href="http://pear.geometria-lab.net/">pear.geometria-lab.net</a>" succeeded</p>
<p>Discovery of channel "<a href="http://pear.geometria-lab.net/">pear.geometria-lab.net</a>" succeeded</p>
<p>localhost:bin shiqiang$ sudo ./pear install geometria-lab/Rediska-beta</p>
<p>Unknown remote channel: <a href="http://pear.zfcampus.org/">pear.zfcampus.org</a></p>
<p>Did not download optional dependencies: channel://pear.<a href="http://zfcampus.org/zf">zfcampus.org/zf</a>, use --alldeps to download automatically</p>
<p>geometria-lab/Rediska can optionally use package "channel://pear.<a href="http://zfcampus.org/zf">zfcampus.org/zf</a>" (recommended version 1)</p>
<p>downloading Rediska-0.5.6.tgz ...</p>
<p>Starting to download Rediska-0.5.6.tgz (116,203 bytes)</p>
<p>.........................done: 116,203 bytes</p>
<p>install ok: channel://pear.<a href="http://geometria-lab.net/Rediska-0.5.6">geometria-lab.net/Rediska-0.5.6</a></p></blockquote>
<p>&nbsp;</p>
<p>安装完成后，就可以看到本地的目录环境下已经有了Rediska的PEAR包</p>
<blockquote><p>localhost:XAMPP shiqiang$ sudo find . -name 'Redis*'</p>
<p>./xamppfiles/lib/php/pear/data/Rediska</p>
<p>./xamppfiles/lib/php/pear/doc/Rediska</p>
<p>./xamppfiles/lib/php/pear/Rediska</p>
<p>./xamppfiles/lib/php/pear/Rediska/Options/RediskaInstance.php</p>
<p>./xamppfiles/lib/php/pear/Rediska/Zend/Application/Resource/Rediska.php</p>
<p>./xamppfiles/lib/php/pear/Rediska/Zend/Auth/Adapter/Redis.php</p>
<p>./xamppfiles/lib/php/pear/Rediska/Zend/Cache/Backend/Redis.php</p>
<p>./xamppfiles/lib/php/pear/Rediska/Zend/Log/Writer/Redis.php</p>
<p>./xamppfiles/lib/php/pear/Rediska/Zend/Queue/Adapter/Redis.php</p>
<p>./xamppfiles/lib/php/pear/Rediska/Zend/Session/SaveHandler/Redis.php</p>
<p>./xamppfiles/lib/php/pear/Rediska.php</p>
<p>./xamppfiles/lib/php/pear/test/Rediska</p>
<p>./xamppfiles/lib/php/pear/test/Rediska/tests/library/Rediska</p>
<p>./xamppfiles/lib/php/pear/test/Rediska/tests/library/Rediska/Options/RediskaInstanceTest.php</p>
<p>./xamppfiles/lib/php/pear/test/Rediska/tests/library/RediskaTest.php</p>
<p>./xamppfiles/temp/pear/download/Rediska-0.5.6</p>
<p>./xamppfiles/temp/pear/download/Rediska-0.5.6/library/Rediska</p>
<p>./xamppfiles/temp/pear/download/Rediska-0.5.6/library/Rediska/Options/RediskaInstance.php</p>
<p>./xamppfiles/temp/pear/download/Rediska-0.5.6/library/Rediska/Zend/Application/Resource/Rediska.php</p>
<p>./xamppfiles/temp/pear/download/Rediska-0.5.6/library/Rediska/Zend/Auth/Adapter/Redis.php</p>
<p>./xamppfiles/temp/pear/download/Rediska-0.5.6/library/Rediska/Zend/Cache/Backend/Redis.php</p>
<p>./xamppfiles/temp/pear/download/Rediska-0.5.6/library/Rediska/Zend/Log/Writer/Redis.php</p>
<p>./xamppfiles/temp/pear/download/Rediska-0.5.6/library/Rediska/Zend/Queue/Adapter/Redis.php</p>
<p>./xamppfiles/temp/pear/download/Rediska-0.5.6/library/Rediska/Zend/Session/SaveHandler/Redis.php</p>
<p>./xamppfiles/temp/pear/download/Rediska-0.5.6/library/Rediska.php</p>
<p>./xamppfiles/temp/pear/download/Rediska-0.5.6/tests/library/Rediska</p>
<p>./xamppfiles/temp/pear/download/Rediska-0.5.6/tests/library/Rediska/Options/RediskaInstanceTest.php</p>
<p>./xamppfiles/temp/pear/download/Rediska-0.5.6/tests/library/RediskaTest.php</p>
<p>./xamppfiles/temp/pear/download/Rediska-0.5.6.tgz</p></blockquote>
<p>&nbsp;</p>
<p><strong>简单使用的示例</strong></p>
<blockquote><p>&lt;?php</p>
<p>error_reporting(E_ALL);</p>
<p>ini_set('display_errors','ON');</p>
<p>$options = array(</p>
<p>'namespace' =&gt; 'Application_',</p>
<p>'servers'   =&gt; array(</p>
<p>array('host' =&gt; '127.0.0.1', 'port' =&gt; 6379),</p>
<p>array('host' =&gt; '127.0.0.1', 'port' =&gt; 6380)</p>
<p>)</p>
<p>);</p>
<p>&nbsp;</p>
<p>require_once 'Rediska.php';</p>
<p>$rediska = new Rediska($options);//创建Rediska对象，连接服务器</p>
<p>&nbsp;</p>
<p>$key = new Rediska_Key('first_key');</p>
<p>$key-&gt;setValue('first_value');</p>
<p>&nbsp;</p>
<p>$get_value = new Rediska_Key('first_key');</p>
<p>print $get_value;//取回存储的值</p>
<p>?&gt;</p></blockquote>
<p><strong>相对于Memcache的区别</strong></p>
<p>1、支持的数据类型多样化。支持字符串、列表、集合、有序集合、Hash数组这几种数据类型。</p>
<p>2、可以灵活的指定key存储在哪台服务器上。</p>
<p><strong>参考资料：</strong></p>
<p>1、<a href="http://rediska.geometria-lab.net/">http://rediska.geometria-lab.net/</a></p>
<p>2、<a href="http://stackoverflow.com/questions/2001075/redis-which-php-module-to-use">Reids Which PHP Module to use</a></p>
<p>3、<a href="http://code.google.com/p/phpredis/">PHP Redis</a></p>
<p>4、<a href="http://hi.baidu.com/thinkinginlamp/blog/item/3358c93d174e35ce9f3d62bf.html">膜拜Redis</a></p>
<p>5、<a href="http://blog.csdn.net/lxzo123/archive/2011/05/12/6414458.aspx">redis客户端 predis与phpredis 比较</a></p>
<p>&nbsp;</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="在安装php的make时候,出现错误&quot;chmod: cannot access `ext/phar/phar.phar': No such file or directory&quot;的解决办法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12482&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F10199">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">在安装php的make时候,出现错误&quot;chmod: cannot access `ext/phar/phar.phar': No such file or directory&quot;的解决办法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="Redis作者谈Redis应用场景" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F10139&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F10199">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Redis作者谈Redis应用场景</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="深入理解 Redis 内部实现" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11942&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F10199">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">深入理解 Redis 内部实现</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="Redis系统性介绍" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11534&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F10199">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/09/25/34081663.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Redis系统性介绍</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/archives/10199/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Failed to initialize storage module解决方法</title>
		<link>http://blog.haohtml.com/archives/9999</link>
		<comments>http://blog.haohtml.com/archives/9999#comments</comments>
		<pubDate>Sat, 25 Jun 2011 11:32:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[程序开发]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=9999</guid>
		<description><![CDATA[今天更新了一下自己的cms，然后后台就提示登陆不了，报错如下：Failed to initialize storage module。 解决方法有两种如下： 1。在报错的文件里的session start();之前加入如下代码：ini_set(‘session.save_handler’, ‘files’); 。这种方法适合租用空间的用户使用。 2。在php.ini文件里，显式指定session的save_path(比如 c:/temp)然后重启web服务。如果服务器的管理权限属于你，那还是这样改比较方便。 原因分析：php5一个安全模式的bug，默认session的save_path是系统的临时目录，这样会要校验权限。 PHP中使用SESSION后出现Failed to initialize storage module错误的解决方法： 在session start之前加入以下这句话 ini_set('session.save_handler', 'files');<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="在安装php的make时候,出现错误&quot;chmod: cannot access `ext/phar/phar.phar': No such file or directory&quot;的解决办法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12482&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F9999">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">在安装php的make时候,出现错误&quot;chmod: cannot access `ext/phar/phar.phar': No such file or directory&quot;的解决办法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="404错误页面重定向 PHP使用HEADER头发送状态(Status)信息(一)" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3070&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F9999">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4028468.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">404错误页面重定向 PHP使用HEADER头发送状态(Status)信息(一)</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="PHP验证码：随机扭曲、旋转、变形（仿Google验证码）" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F4354&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F9999">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4027581.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">PHP验证码：随机扭曲、旋转、变形（仿Google验证码）</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="从php核心代码看require和include的区别" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F4311&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F9999">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4027588.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">从php核心代码看require和include的区别</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>今天更新了一下自己的cms，然后后台就提示登陆不了，报错如下：Failed to initialize storage module。</p>
<p>解决方法有两种如下：</p>
<p>1。在报错的文件里的session start();之前加入如下代码：ini_set(‘session.save_handler’, ‘files’); 。这种方法适合租用空间的用户使用。</p>
<p>2。在php.ini文件里，显式指定session的save_path(比如 c:/temp)然后重启web服务。如果服务器的管理权限属于你，那还是这样改比较方便。</p>
<p>原因分析：php5一个安全模式的bug，默认session的save_path是系统的临时目录，这样会要校验权限。</p>
<table>
<tbody>
<tr>
<td></td>
</tr>
</tbody>
</table>
<p>PHP中使用SESSION后出现Failed to initialize storage module错误的解决方法：<br />
在session start之前加入以下这句话<br />
ini_set('session.save_handler', 'files');</p>
<div><span style="font-size: 12px; line-height: normal;"><br />
</span></div>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="在安装php的make时候,出现错误&quot;chmod: cannot access `ext/phar/phar.phar': No such file or directory&quot;的解决办法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12482&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F9999">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">在安装php的make时候,出现错误&quot;chmod: cannot access `ext/phar/phar.phar': No such file or directory&quot;的解决办法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="404错误页面重定向 PHP使用HEADER头发送状态(Status)信息(一)" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3070&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F9999">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4028468.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">404错误页面重定向 PHP使用HEADER头发送状态(Status)信息(一)</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="PHP验证码：随机扭曲、旋转、变形（仿Google验证码）" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F4354&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F9999">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4027581.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">PHP验证码：随机扭曲、旋转、变形（仿Google验证码）</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="从php核心代码看require和include的区别" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F4311&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F9999">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4027588.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">从php核心代码看require和include的区别</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/archives/9999/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

