<?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>Hello, SA &#187; php</title>
	<atom:link href="http://blog.helosa.org/tag/php/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.helosa.org</link>
	<description>Could u fix the problem for me ?</description>
	<lastBuildDate>Mon, 06 Sep 2010 06:23:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>debian 下nginx 快速搭建FCGI环境</title>
		<link>http://blog.helosa.org/2010/05/14/nginx-fcgi.html</link>
		<comments>http://blog.helosa.org/2010/05/14/nginx-fcgi.html#comments</comments>
		<pubDate>Fri, 14 May 2010 06:41:51 +0000</pubDate>
		<dc:creator>Chan Cham Chung</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blog.helosa.org/?p=256</guid>
		<description><![CDATA[我的想法是。。。快点，快点，再快点！！ apt-get install spawn-fcgi php5-cgi 用 spawn-fcgi 启动 fcgi ， spawn-fcgi -a 127.0.0.1 -p 8000 -u nobody -f /usr/bin/php-cgi -C 5 ; 在 nginx 里配置加一句： location ~ \.php$ { fastcgi_pass 127.0.0.1:8000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /home/nginx/html$fastcgi_script_name; include fastcgi_params; } 然后把一个 php 放在 /home/nginx/html 里，就可以使用了。]]></description>
			<content:encoded><![CDATA[<p>我的想法是。。。快点，快点，再快点！！</p>
<p>apt-get install spawn-fcgi php5-cgi</p>
<p>用 spawn-fcgi 启动 fcgi ，</p>
<p>spawn-fcgi -a 127.0.0.1 -p 8000 -u nobody -f /usr/bin/php-cgi -C 5 ;</p>
<p>在 nginx 里配置加一句：<br />
location ~ \.php$ {<br />
fastcgi_pass   127.0.0.1:8000;<br />
fastcgi_index  index.php;<br />
fastcgi_param  SCRIPT_FILENAME  /home/nginx/html$fastcgi_script_name;<br />
include        fastcgi_params;<br />
}</p>
<p>然后把一个 php 放在 /home/nginx/html 里，就可以使用了。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.helosa.org/2010/05/14/nginx-fcgi.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>新搭建的nagios+pnp爆的一个错误</title>
		<link>http://blog.helosa.org/2010/01/19/nagios-pnp-php.html</link>
		<comments>http://blog.helosa.org/2010/01/19/nagios-pnp-php.html#comments</comments>
		<pubDate>Tue, 19 Jan 2010 11:33:10 +0000</pubDate>
		<dc:creator>Chan Cham Chung</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[nagios]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://lazybug.me/?p=31</guid>
		<description><![CDATA[部门明天要上一个大项目啊，我今天赶紧搭监控。 原谅我这个古董，21 世纪了，还在搭nagios。。。web 环境，我也还是很古董地选用apache + php_module 的方式。。。其实监控系统来说，没什么性能要求，apache和nagios 也符合我的需求了，好，开始！！ 首先爆了一堆这样的错： Deprecated: Assigning the return value of new by reference is deprecated in /data/nagios/share/pnp/include/function.inc.php on line 1029 Warning: date() [function.date]: It is not safe to rely on the system&#8217;s timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used [...]]]></description>
			<content:encoded><![CDATA[<p>部门明天要上一个大项目啊，我今天赶紧搭监控。</p>
<p>原谅我这个古董，21 世纪了，还在搭nagios。。。web 环境，我也还是很古董地选用apache + php_module 的方式。。。其实监控系统来说，没什么性能要求，apache和nagios 也符合我的需求了，好，开始！！</p>
<p>首先爆了一堆这样的错：</p>
<p><strong>Deprecated</strong>:  Assigning the return value of new by reference is deprecated in <strong>/data/nagios/share/pnp/include/function.inc.php</strong> on line <strong>1029</strong></p>
<p><strong>Warning</strong>:  date() [<a href="http://60.191.80.115:8163/nagios/pnp/function.date">function.date</a>]: It is not safe to rely on the system&#8217;s timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected &#8216;Asia/Chongqing&#8217; for &#8216;CST/8.0/no DST&#8217; instead in <strong>/data/nagios/share/pnp/include/function.inc.php</strong> on line <strong>560</strong></p>
<p>貌似 5.3.0 才报这样的错，5.2.9 也没有爆啊。。。没错，我是很懒，但一般我都会追求真相的。但是，项目明天就要上线了啊，时间不允许我这样玩了，我还是懒一点吧。。。以解决问题为最终目标！！</p>
<p>让我设timezone。。。不太会php啊。。。也没研究过nagios的架构。。。直接一点吧，见到什么改什么！！</p>
<p>function.inc.php 貌似是一个基础函数，每个函数都会include它的，我在里面显式地指定timezone总可以吧，于是在function.inc.php 里加一句</p>
<p>date_default_timezone_set(&#8216;Asia/Chongqing&#8217;);</p>
<p>哈哈，timezone 的 warning 解决了！但问题随之又来了。。。又报错。。。</p>
<p><strong>Deprecated</strong>:  Function eregi() is deprecated in <strong>/data/nagios/share/pnp/include/function.inc.php</strong> on line <strong>1505</strong></p>
<p>函数 deprecated 了。。。算了，我决定改php.ini，屏蔽错误和warning！</p>
<p>打开 phpinfo() 看一下php.ini 在哪里，找不到。。。</p>
<p>在 httpd.conf 里加一句：</p>
<p><strong>PHPIniDir &#8220;/data/apache/conf&#8221;</strong></p>
<p>随便copy一个php.ini过来，刚才google了一下，好像是 error_reporting 的问题，但不管我怎么改error_reporting的组合，都无法成功。。。突然被我看到这样的字眼：</p>
<p>display_errors = On</p>
<p>哈哈，还不是你！！把你关了总可以了吧！！</p>
<p>display_errors = Off</p>
<p>apachectl graceful 一下，哈哈，问题解决了！！！可以用了！！继续配置监控。。。</p>
<p>唉，LAMP 如此经典的组合，我了解得还是不够啊！！</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.helosa.org/2010/01/19/nagios-pnp-php.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
