<?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>DBAlife &#187; php</title>
	<atom:link href="http://www.dbalife.com/archives/tag/php/feed" rel="self" type="application/rss+xml" />
	<link>http://www.dbalife.com</link>
	<description>网站系统架构实践</description>
	<lastBuildDate>Wed, 27 Jul 2011 09:57:10 +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>64位centOS编译php5.3时的小问题</title>
		<link>http://www.dbalife.com/archives/389.html</link>
		<comments>http://www.dbalife.com/archives/389.html#comments</comments>
		<pubDate>Wed, 07 Jul 2010 05:48:33 +0000</pubDate>
		<dc:creator>skywalker</dc:creator>
				<category><![CDATA[操作系统]]></category>
		<category><![CDATA[系统管理]]></category>
		<category><![CDATA[64bit]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[libmysqlclient]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.dbalife.com/?p=389</guid>
		<description><![CDATA[64位CentOS5.5在编译php5.3时，提示找不到libmysqlclient， checking for MING support... no checking for mSQL support... no checking for MSSQL support via FreeTDS... no checking for MySQL support... yes, shared checking for specified location of the MySQL UNIX socket... no checking for MySQL UNIX socket location... no configure: error: Cannot find libmysqlclient under /usr. Note that the MySQL client library is [...]
Related posts:<ol>
<li><a href='http://www.dbalife.com/archives/133.html' rel='bookmark' title='PIX logging Architecture所需perl module的几点注意'>PIX logging Architecture所需perl module的几点注意</a></li>
<li><a href='http://www.dbalife.com/archives/409.html' rel='bookmark' title='heartbeat ha.cf 中文注解'>heartbeat ha.cf 中文注解</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>64位CentOS5.5在编译php5.3时，提示找不到libmysqlclient，</p>
<p>checking for MING support... no<br />
checking for mSQL support... no<br />
checking for MSSQL support via FreeTDS... no<br />
checking for MySQL support... yes, shared<br />
checking for specified location of the MySQL UNIX socket... no<br />
checking for MySQL UNIX socket location... no<br />
configure: error: Cannot find libmysqlclient under /usr.<br />
Note that the MySQL client library is not bundled anymore!</p>
<p>这是由于搜索路径有误，需在编译时增加一个参数： "--with-libdir=lib64"</p>
<p>Related posts:<ol>
<li><a href='http://www.dbalife.com/archives/133.html' rel='bookmark' title='PIX logging Architecture所需perl module的几点注意'>PIX logging Architecture所需perl module的几点注意</a></li>
<li><a href='http://www.dbalife.com/archives/409.html' rel='bookmark' title='heartbeat ha.cf 中文注解'>heartbeat ha.cf 中文注解</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.dbalife.com/archives/389.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Mysql中的STRICT_TRANS_TABLES</title>
		<link>http://www.dbalife.com/archives/339.html</link>
		<comments>http://www.dbalife.com/archives/339.html#comments</comments>
		<pubDate>Fri, 15 Jan 2010 19:39:52 +0000</pubDate>
		<dc:creator>skywalker</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[数据库管理]]></category>
		<category><![CDATA[软件开发]]></category>
		<category><![CDATA[my.ini]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[STRICT_TRANS_TABLES]]></category>
		<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://www.dbalife.com/?p=339</guid>
		<description><![CDATA[在调试php symfony，加载fixture数据时，遇到了错误： SQLSTATE[HY000]: General error: 1366 Incorrect integer value: 'log' for column 'tasklog_id' at row 1 这是因为mysql5.5中默认启用了STRICT_TRANS_TABLES参数。 STRICT_TRANS_TABLES的工作方式： 　　· 对于事务性存储引擎，在语句中任何地方出现的不良数据值均会导致放弃语句并执行回滚。         · 对于非事务性存储引擎，如果错误出现在要插入或更新的第1行，将放弃语句。（在这种情况下，可以认为语句未改变表，就像事务表一样）。首行后出现的错误不会导致放弃语句。取而代之的是，将调整不良数据值，并给出告警，而不是错误。换句话讲，使用STRICT_TRANS_TABLES后，错误值会导致MySQL执行回滚操作，如果可以，所有更新到此为止。 　　要想执行更严格的检查，请启用STRICT_ALL_TABLES。除了非事务性存储引擎，它与STRICT_TRANS_TABLES等同，即使当不良数据出现在首行后的其他行，所产生的错误也会导致放弃语句。这意味着，如果错误出现在非事务性表多行插入或更新过程的中途，仅更新部分结果。前面的行将完成插入或更新，但错误出现点后面的行则不然。 因此，解决方法就是在my.ini里把STRICT_TRANS_TABLES关掉 ?View Code C#Set the SQL mode to strict #sql-mode=&#34;STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION&#34; sql-mode=&#34;NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION&#34; No related posts.
No related posts.]]></description>
			<content:encoded><![CDATA[<p>在调试php symfony，加载fixture数据时，遇到了错误：</p>
<blockquote><p>SQLSTATE[HY000]: General error: 1366 Incorrect integer value: 'log' for column 'tasklog_id' at row 1</p></blockquote>
<p>这是因为mysql5.5中默认启用了<em>STRICT_TRANS_TABLES</em>参数。</p>
<p>STRICT_TRANS_TABLES的工作方式：<br />
　　· 对于事务性存储引擎，在语句中任何地方出现的不良数据值均会导致放弃语句并执行回滚。<br />
        · 对于非事务性存储引擎，如果错误出现在要插入或更新的第1行，将放弃语句。（在这种情况下，可以认为语句未改变表，就像事务表一样）。首行后出现的错误不会导致放弃语句。取而代之的是，将调整不良数据值，并给出告警，而不是错误。换句话讲，使用STRICT_TRANS_TABLES后，错误值会导致MySQL执行回滚操作，如果可以，所有更新到此为止。</p>
<p>　　要想执行更严格的检查，请启用STRICT_ALL_TABLES。除了非事务性存储引擎，它与STRICT_TRANS_TABLES等同，即使当不良数据出现在首行后的其他行，所产生的错误也会导致放弃语句。这意味着，如果错误出现在非事务性表多行插入或更新过程的中途，仅更新部分结果。前面的行将完成插入或更新，但错误出现点后面的行则不然。</p>
<p>因此，解决方法就是在my.ini里把STRICT_TRANS_TABLES关掉</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p339code2'); return false;">View Code</a> C</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p3392"><td class="code" id="p339code2"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">#Set the SQL mode to strict</span>
<span style="color: #339933;">#sql-mode=&quot;STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION&quot;</span>
sql<span style="color: #339933;">-</span>mode<span style="color: #339933;">=</span><span style="color: #ff0000;">&quot;NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION&quot;</span></pre></td></tr></table></div>

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.dbalife.com/archives/339.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>caucho-request的范围</title>
		<link>http://www.dbalife.com/archives/200.html</link>
		<comments>http://www.dbalife.com/archives/200.html#comments</comments>
		<pubDate>Tue, 16 Dec 2008 08:20:31 +0000</pubDate>
		<dc:creator>skywalker</dc:creator>
				<category><![CDATA[Web服务器]]></category>
		<category><![CDATA[addhandler]]></category>
		<category><![CDATA[caucho-request]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[resin]]></category>
		<category><![CDATA[sethandler]]></category>

		<guid isPermaLink="false">http://www.dbalife.com/archives/200.html</guid>
		<description><![CDATA[在为Apache+Resin环境添加php支持的时候，php编译安装一切顺利，但是apache不能解析php页面。 发现有这样一些现象： 在任意一个404页面中，服务器信息仅显示Resin，而没有Apache 注释掉httpd.conf中的Resin条目，php可以被解析 说明apache将任意请求都发送给了Resin，而这个resin3.0不能解析php 检查httpd.conf，将SetHandler caucho-request注释掉，重启apache，php解析正常。 当前的httpd.conf中resin部分： LoadModule caucho_module /opt/apache/modules/mod_caucho.so ResinConfigServer localhost 6802 CauchoConfigCacheDirectory /tmp AddHandler caucho-request jsp 在Resin非常模糊的联机文档中提到了caucho-request "caucho-request&#160; Dispatch a request to Resin" 而在给出的例子中 &#60;Location /foo/*&#62; &#160;&#160; SetHandler caucho-request &#60;/Location&#62; 将caucho-request的范围限定在/foo/ Blogged with the Flock Browser Tags: resin, caucho-request, addhandler, sethandler, php, jsp Related posts: Apache2与Resin2整合虚拟主机的配置 resin的优化 vmware server 2.0 安装要点
Related posts:<ol>
<li><a href='http://www.dbalife.com/archives/126.html' rel='bookmark' title='Apache2与Resin2整合虚拟主机的配置'>Apache2与Resin2整合虚拟主机的配置</a></li>
<li><a href='http://www.dbalife.com/archives/7.html' rel='bookmark' title='resin的优化'>resin的优化</a></li>
<li><a href='http://www.dbalife.com/archives/327.html' rel='bookmark' title='vmware server 2.0 安装要点'>vmware server 2.0 安装要点</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>在为Apache+Resin环境添加php支持的时候，php编译安装一切顺利，但是apache不能解析php页面。</p>
<p>发现有这样一些现象：</p>
<ul>
<li>在任意一个404页面中，服务器信息仅显示Resin，而没有Apache</li>
<li>注释掉httpd.conf中的Resin条目，php可以被解析</li>
</ul>
<p>说明apache将任意请求都发送给了Resin，而这个resin3.0不能解析php</p>
<p>检查httpd.conf，将SetHandler caucho-request注释掉，重启apache，php解析正常。</p>
<p>当前的httpd.conf中resin部分：</p>
<div style="margin-left: 40px;">LoadModule caucho_module /opt/apache/modules/mod_caucho.so<br />
ResinConfigServer localhost 6802<br />
CauchoConfigCacheDirectory /tmp<br />
AddHandler caucho-request jsp
</div>
<p>在Resin非常模糊的联机文档中提到了caucho-request</p>
<div style="margin-left: 40px;">"caucho-request&nbsp; Dispatch a request to Resin"
</div>
<p>而在给出的例子中</p>
<div style="margin-left: 40px;">&lt;Location /foo/*&gt;<br />
&nbsp;&nbsp;  SetHandler caucho-request<br />
&lt;/Location&gt;
</div>
<p>将caucho-request的范围限定在/foo/</p>
<div class="flockcredit" style="text-align: right; color: #CCC; font-size: x-small;">Blogged with the <a href="http://www.flock.com/blogged-with-flock" style="color: #999; font-weight: bold;" target="_new" title="Flock Browser">Flock Browser</a></div>
<p><!-- technorati tags begin -->
<p style="font-size:10px;text-align:right;">Tags: <a href="http://technorati.com/tag/resin" rel="tag">resin</a>, <a href="http://technorati.com/tag/caucho-request" rel="tag">caucho-request</a>, <a href="http://technorati.com/tag/addhandler" rel="tag">addhandler</a>, <a href="http://technorati.com/tag/sethandler" rel="tag">sethandler</a>, <a href="http://technorati.com/tag/php" rel="tag">php</a>, <a href="http://technorati.com/tag/jsp" rel="tag">jsp</a></p>
<p><!-- technorati tags end --></p>
<p>Related posts:<ol>
<li><a href='http://www.dbalife.com/archives/126.html' rel='bookmark' title='Apache2与Resin2整合虚拟主机的配置'>Apache2与Resin2整合虚拟主机的配置</a></li>
<li><a href='http://www.dbalife.com/archives/7.html' rel='bookmark' title='resin的优化'>resin的优化</a></li>
<li><a href='http://www.dbalife.com/archives/327.html' rel='bookmark' title='vmware server 2.0 安装要点'>vmware server 2.0 安装要点</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.dbalife.com/archives/200.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>linux php 扩展库编译——添加cURL模块</title>
		<link>http://www.dbalife.com/archives/109.html</link>
		<comments>http://www.dbalife.com/archives/109.html#comments</comments>
		<pubDate>Mon, 28 Apr 2008 06:39:50 +0000</pubDate>
		<dc:creator>skywalker</dc:creator>
				<category><![CDATA[操作系统]]></category>
		<category><![CDATA[curl]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.dbalife.com/archives/109</guid>
		<description><![CDATA[在Wordpress中启用插件Flickr Photo Album for WordPress时，需要系统支持cURL。 大多数资料里都是比较简单的方法，即在编译php时加上cURL支持 但由于我的系统里已经安装有php，并且有一些其他配置，重新安装太麻烦 于是找到了这篇《linux php 扩展库编译》，验证通过，转载以记录一下 以php curl 扩展库编译为例。 假如原先编译的php目录在/oracle/php4目录下;apache在/oracle/apache2目录下；php源代码在/home/wugw目录下。如果实际目录与假定的目录不一致，则在下面的命令中做调整。 1. 找到当前运行的php版本的源代码目录，如 php-4.4.7。进入curl扩展库目录。 $cd /home/wugw/php-4.4.7/ext/curl 2. 调用phpize程序生成编译配置文件。 $/oracle/php4/bin/phpize 3. 编译扩展库，分别执行下面的configure和make命令。 $./configure –with-php-config=/oracle/php4/bin/php-config ##configure这一步执行通过后，再执行make命令，如果configure执行不通过，则查找错误原因。 $make ##make成功执行后，生成的扩展库文件在当前目录的 modules 子目录下，如 /home/wugw/php-4.4.7/ext/curl/modules/curl.so 4. 配置php.ini文件 ##将编译好的扩展库文件复制到apache2 modules目录下。 $cp /home/wugw/php-4.4.7/ext/curl/modules/curl.so /oracle/apache2/modules/. ##找到php.ini文件所在目录位置，然后编辑。可以通过查看phpinfo信息来确定php.ini文件位置。 ##在php.ini文件中找到设置扩展目录的位置，然后将扩展路径设置到apache2 modules目录下 extension_dir = “/oracle/apache2/modules/” ##在php.ini的设置扩展库位置，设置要添加的扩展库。 extension=curl.so ##以后如果还要添加别的扩展库的话，则只需先将php扩展库编译好，然后copy到apache2 modules目录下， ##然后再在这个位置，另取一行将编译后的扩展库文件名加上即可 5. 重启apache，查看phpinfo信息，即可看到刚才添加进去的curl扩展库。 Blogged with the [...]
Related posts:<ol>
<li><a href='http://www.dbalife.com/archives/135.html' rel='bookmark' title='PIX Logging Architecture 2 安装教程'>PIX Logging Architecture 2 安装教程</a></li>
<li><a href='http://www.dbalife.com/archives/91.html' rel='bookmark' title='Opera for Linux 不能使用中文输入法的解决方法'>Opera for Linux 不能使用中文输入法的解决方法</a></li>
<li><a href='http://www.dbalife.com/archives/82.html' rel='bookmark' title='ubuntu7.10 JDK手动安装'>ubuntu7.10 JDK手动安装</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>在Wordpress中启用插件<a title="Permanent Link to Flickr Photo Album for WordPress" rel="bookmark" href="http://tantannoodles.com/toolkit/photo-album/">Flickr Photo Album for WordPress</a>时，需要系统支持cURL。<br />
大多数资料里都是比较简单的方法，即在编译php时加上cURL支持<br />
但由于我的系统里已经安装有php，并且有一些其他配置，重新安装太麻烦<br />
于是找到了这篇《<a title="linux php 扩展库编译" rel="bookmark" href="http://www.goodluck4u.com/?p=72">linux php 扩展库编译</a>》，验证通过，转载以记录一下</p>
<hr style="width: 100%; height: 2px;" />以php curl 扩展库编译为例。</p>
<p>假如原先编译的php目录在/oracle/php4目录下;apache在/oracle/apache2目录下；php源代码在/home/wugw目录下。如果实际目录与假定的目录不一致，则在下面的命令中做调整。</p>
<p>1. 找到当前运行的php版本的源代码目录，如 php-4.4.7。进入curl扩展库目录。<br />
$cd /home/wugw/php-4.4.7/ext/curl</p>
<p>2. 调用phpize程序生成编译配置文件。<br />
$/oracle/php4/bin/phpize</p>
<p>3. 编译扩展库，分别执行下面的configure和make命令。<br />
$./configure –with-php-config=/oracle/php4/bin/php-config</p>
<p>##configure这一步执行通过后，再执行make命令，如果configure执行不通过，则查找错误原因。<br />
$make</p>
<p>##make成功执行后，生成的扩展库文件在当前目录的 modules 子目录下，如 /home/wugw/php-4.4.7/ext/curl/modules/curl.so</p>
<p>4. 配置php.ini文件<br />
##将编译好的扩展库文件复制到apache2 modules目录下。<br />
$cp /home/wugw/php-4.4.7/ext/curl/modules/curl.so /oracle/apache2/modules/.</p>
<p>##找到php.ini文件所在目录位置，然后编辑。可以通过查看phpinfo信息来确定php.ini文件位置。<br />
##在php.ini文件中找到设置扩展目录的位置，然后将扩展路径设置到apache2 modules目录下<br />
extension_dir = “/oracle/apache2/modules/”</p>
<p>##在php.ini的设置扩展库位置，设置要添加的扩展库。<br />
extension=curl.so</p>
<p>##以后如果还要添加别的扩展库的话，则只需先将php扩展库编译好，然后copy到apache2 modules目录下，<br />
##然后再在这个位置，另取一行将编译后的扩展库文件名加上即可</p>
<p>5. 重启apache，查看phpinfo信息，即可看到刚才添加进去的curl扩展库。</p>
<div class="flockcredit" style="text-align: right; color: #CCC; font-size: x-small;">Blogged with the <a style="color: #999; font-weight: bold;" title="Flock Browser" href="http://www.flock.com/blogged-with-flock" target="_new">Flock Browser</a></div>
<p><!-- technorati tags begin --></p>
<p style="font-size:10px;text-align:right;">Tags: <a rel="tag" href="http://technorati.com/tag/php">php</a>, <a rel="tag" href="http://technorati.com/tag/linux">linux</a>, <a rel="tag" href="http://technorati.com/tag/curl">curl</a>, <a rel="tag" href="http://technorati.com/tag/Flickr">Flickr</a>, <a rel="tag" href="http://technorati.com/tag/PhotoAlbum">PhotoAlbum</a>, <a rel="tag" href="http://technorati.com/tag/WordPress">WordPress</a></p>
<p><!-- technorati tags end --></p>
<p>Related posts:<ol>
<li><a href='http://www.dbalife.com/archives/135.html' rel='bookmark' title='PIX Logging Architecture 2 安装教程'>PIX Logging Architecture 2 安装教程</a></li>
<li><a href='http://www.dbalife.com/archives/91.html' rel='bookmark' title='Opera for Linux 不能使用中文输入法的解决方法'>Opera for Linux 不能使用中文输入法的解决方法</a></li>
<li><a href='http://www.dbalife.com/archives/82.html' rel='bookmark' title='ubuntu7.10 JDK手动安装'>ubuntu7.10 JDK手动安装</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.dbalife.com/archives/109.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

