<?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>Fly together Forever 比翼恒飞 &#187; PHP</title>
	<atom:link href="http://www.liucougar.net/blog/archives/category/php/feed" rel="self" type="application/rss+xml" />
	<link>http://www.liucougar.net/blog</link>
	<description></description>
	<lastBuildDate>Fri, 19 Feb 2010 21:27:35 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9-rare</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Wedding photos are uploaded to Gallery</title>
		<link>http://www.liucougar.net/blog/archives/73</link>
		<comments>http://www.liucougar.net/blog/archives/73#comments</comments>
		<pubDate>Tue, 28 Aug 2007 14:45:06 +0000</pubDate>
		<dc:creator>liucougar</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.liucougar.net/blog/archives/73</guid>
		<description><![CDATA[I got married several months ago, but did not have time to put up all the photos to share with my families and friends all over the world.
Just installed   
Gallery 2 and   
WPG2 for Wordpress and all   
wedding photos are all uploaded. However, you do need a login/password to [...]]]></description>
			<content:encoded><![CDATA[I got married several months ago, but did not have time to put up all the photos to share with my families and friends all over the world.
<p>Just installed   
<a href="http://gallery.menalto.com/">Gallery 2</a> and   
<a href="http://wpg2.galleryembedded.com/">WPG2</a> for Wordpress and all   
<a href="http://www.liucougar.net/gallery/v/7/">wedding photos</a> are all uploaded. However, you do need a login/password to access them. If you know me personally, please ask me for that.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.liucougar.net/blog/archives/73/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>libphp5.so: undefined symbol: _efree</title>
		<link>http://www.liucougar.net/blog/archives/71</link>
		<comments>http://www.liucougar.net/blog/archives/71#comments</comments>
		<pubDate>Sun, 26 Aug 2007 04:54:08 +0000</pubDate>
		<dc:creator>liucougar</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.liucougar.net/blog/archives/71</guid>
		<description><![CDATA[After re-installing php 5, I got a wired error when starting apache 2:
Cannot load /.../libphp5.so into server: /.../libphp5.so: undefined symbol: _efree
Google suggested that, lots of people have the exact error, but not a single page contains what caused this error or how to solve it. In addition, this error also happens with php 4 and [...]]]></description>
			<content:encoded><![CDATA[<p>After re-installing php 5, I got a wired error when starting apache 2:</p>
<pre>Cannot load /.../libphp5.so into server: /.../libphp5.so: undefined symbol: _efree</pre>
<p>Google suggested that, lots of people have the exact error, but not a single page contains what caused this error or how to solve it. In addition, this error also happens with php 4 and apache 1.</p>
<p>After some hard time Trial and error, I found the issue: due to some reasons, the   <span class="Code">make install</span> to install php 5 does not actually copy over the libphp5.la files to the right place. After manually copying the la file, apache 2 can be started happily with php 5 enabled.</p>
<p><strong>Edit</strong>: Ivan reported that instead of the above,</p>
<pre>make clean</pre>
<p>will make it work for his case. Thanks. &#8211; Dec 21 2008</p>
]]></content:encoded>
			<wfw:commentRss>http://www.liucougar.net/blog/archives/71/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>eZ publish with fastcgi (lighttpd)</title>
		<link>http://www.liucougar.net/blog/archives/69</link>
		<comments>http://www.liucougar.net/blog/archives/69#comments</comments>
		<pubDate>Tue, 26 Dec 2006 22:17:36 +0000</pubDate>
		<dc:creator>liucougar</dc:creator>
				<category><![CDATA[eZ Publish]]></category>

		<guid isPermaLink="false">http://www.liucougar.net/blog/archives/69</guid>
		<description><![CDATA[
Sometime ago I talked about
making eZ publish 3.x happy with fastcgi. The original approach is to patch eZ Publish so that it works with fastcgi correctly. However, Xavier Dutoit pointed out that, given some special treatment in lighttpd config files, no modification is required to eZ publish.
The trick is the following block:
url.rewrite-once = (
"^/.*\.(css&#124;html&#124;htm&#124;pdf&#124;js&#124;png&#124;gif&#124;jpe?g)$" => [...]]]></description>
			<content:encoded><![CDATA[
<p>Sometime ago I talked about
<a href="post:setup-ez-publish-with-lighttpd">making eZ publish 3.x happy with fastcgi</a>. The original approach is to patch eZ Publish so that it works with fastcgi correctly. However, Xavier Dutoit pointed out that, given some special treatment in lighttpd config files, no modification is required to eZ publish.</p>
<p>The trick is the following block:</p>
<pre>url.rewrite-once = (
"^/.*\.(css|html|htm|pdf|js|png|gif|jpe?g)$" => "$0",
"^/.*?(\?.*)?$" => "/index.php$1"
)</pre>
<p>For more about lighttpd and php4/php5 config instructions, please consult  
<a href="http://forum.lighttpd.net/topic/1189">this thread</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.liucougar.net/blog/archives/69/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Convert wordpress 2.1 from mysql 4.0 to 4.1</title>
		<link>http://www.liucougar.net/blog/archives/68</link>
		<comments>http://www.liucougar.net/blog/archives/68#comments</comments>
		<pubDate>Mon, 18 Dec 2006 16:48:57 +0000</pubDate>
		<dc:creator>liucougar</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.liucougar.net/blog/archives/68</guid>
		<description><![CDATA[
Mysql 4.1 is available in the new server from           
migration. The transition from 4.0 to 4.1 is quite transparent as long as I do not try to set the default encodings of the db/tables to UTF-8.
However, as the        [...]]]></description>
			<content:encoded><![CDATA[
<p>Mysql 4.1 is available in the new server from           
<a href="post:yaah-new-server">migration</a>. The transition from 4.0 to 4.1 is quite transparent as long as I do not try to set the default encodings of the db/tables to UTF-8.</p>
<p>However, as the           
<a href="http://dev.mysql.com/tech-resources/articles/4.1/unicode.html">proper way</a> is to set the encodings in mysql 4.1 correctly, I decided to do it sooner rather than later.</p>
<p>According to           
<a href="http://dev.mysql.com/doc/refman/4.1/en/charset-conversion.html">the document</a>, if UTF-8 was saved in the mysql 4.0 db although the default encoding is not UTF-8, then:</p>
<blockquote>However, you         should avoid trying to convert directly from                   
<code class="literal">latin1</code> to the &quot;real&quot; character set. This may         result in data loss. Instead, convert the column to a binary         data type, and then from the binary type to a non-binary type         with the desired character set. Conversion to and from binary         involves no attempt at character value conversion and preserves         your data intact.</blockquote>
<p>As it turns out, wordpress 2.1-alpha actually just save the text as latin1 strings, so no need to convert the fields to BINARY first, setting charset to UTF-8 on those fields is sufficient.</p>
<p>          
<a href="attachment:67">An sql file</a> is prepared for doing this. (Proceed at your own risk and always backup first)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.liucougar.net/blog/archives/68/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FCKeditor 2.3 was released</title>
		<link>http://www.liucougar.net/blog/archives/33</link>
		<comments>http://www.liucougar.net/blog/archives/33#comments</comments>
		<pubDate>Wed, 21 Jun 2006 23:19:06 +0000</pubDate>
		<dc:creator>liucougar</dc:creator>
				<category><![CDATA[SJSD]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[eZ Publish]]></category>

		<guid isPermaLink="false">http://liucougar.scim-im.org/blog/archives/33</guid>
		<description><![CDATA[
I have been really busy lately, so I hadn&#8217;t noticed that   
FCKeditor 2.3 finaly was released a week ago until yesterday.
It seems it is now the time for a new release of SJSD which supports the latest FCKeditor: The svn trunk of SJSD supports 2.3 already, but no public release yet. I will [...]]]></description>
			<content:encoded><![CDATA[
<p>I have been really busy lately, so I hadn&#8217;t noticed that   
<a href="http://sourceforge.net/forum/forum.php?forum_id=580251">FCKeditor 2.3 finaly was released</a> a week ago until yesterday.</p>
<p>It seems it is now the time for a new release of SJSD which supports the latest FCKeditor: The svn trunk of SJSD supports 2.3 already, but no public release yet. I will try to make a release if I can find some time to sort it out.</p>
<p>In addition, a new patched EditMonkey would be nice as well, but as I haven&#8217;t ported the FCKeditor plugin for wordpress to FCKeditor 2.3 yet, it requires much more time, which I probably won&#8217;t do until some time later when I am not so occupied.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.liucougar.net/blog/archives/33/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Anonymous users can not access anything in eZ!</title>
		<link>http://www.liucougar.net/blog/archives/27</link>
		<comments>http://www.liucougar.net/blog/archives/27#comments</comments>
		<pubDate>Mon, 29 May 2006 19:00:58 +0000</pubDate>
		<dc:creator>liucougar</dc:creator>
				<category><![CDATA[eZ Publish]]></category>

		<guid isPermaLink="false">http://liucougar.scim-im.org/blog/archives/27</guid>
		<description><![CDATA[
After update the database in the local testing mirror of SCIM project website, anonymous users can not access any pages, even the frontpage. However, any registered users can access it as usual after login. I encountered the exact behavior when I upgraded the SCIM project website from eZ 3.5 to 3.8 by uploading the local [...]]]></description>
			<content:encoded><![CDATA[
<p>After update the database in the local testing mirror of SCIM project website, anonymous users can not access any pages, even the frontpage. However, any registered users can access it as usual after login. I encountered the exact behavior when I upgraded the SCIM project website from eZ 3.5 to 3.8 by uploading the local testing files to the server. I fixed it but I can not remember how!?? I am forced to re-investigate and fix it again in my local server. This time I write it down here in case I forget it once more</p><span id="more-27"></span>
<p>Go to admin interface -&gt; User accounts -&gt; Roles and policies, click into Role Anonymous. Everything seems fine, except this line:</p>
<table width="" cellspacing="0" cellpadding="" border="1" align="" class="list" summary="">
<tbody>
<tr class="bgdark">
<td>                     user             </td>
<td>                     login             </td>
<td>                                     SiteAccess()</td>
</tr>
</tbody>
</table>
<p>SiteAccess is empty! Uhm, after adding the default siteaccess home to it, anonymous users can access public areas normally.</p>
<p>The empty                                      SiteAccess is caused by the different default siteaccess name in the two installation: in the SCIM server, the default one is home, while in my locale copy it is eng.</p>
<p>I must say this is a bit counter-intuitive: as anonymous already has this rule:</p>
<table width="" cellspacing="0" cellpadding="" border="1" align="" class="list" summary="">
<tbody>
<tr class="bglight">
<td>                     content             </td>
<td>                     read             </td>
<td>                                     Section(                                     Standard                                     ,                     Media                                     ,                     Wiki                                     )</td>
</tr>
</tbody>
</table>
<p>It should have enough privilege to at least read the files in these sections. It turned out that granting of user/login is necessary for content/read!</p>
<p>Although, in this particular case, I want anonymous users to have the grant of user/login function, I don&#8217;t think content/read should depend on user/login!</p>
<p>Is this a bug? Is it worth to report to eZ?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.liucougar.net/blog/archives/27/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>eZ rewrite rules in apache</title>
		<link>http://www.liucougar.net/blog/archives/26</link>
		<comments>http://www.liucougar.net/blog/archives/26#comments</comments>
		<pubDate>Mon, 29 May 2006 06:24:16 +0000</pubDate>
		<dc:creator>liucougar</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[eZ Publish]]></category>

		<guid isPermaLink="false">http://liucougar.scim-im.org/blog/archives/26</guid>
		<description><![CDATA[
After fixing a SJSD svn trunk regression bug reported in the bug tracking system, I tried to make eZ installed in a subdir work with rewrite rules in apache 1.3 (not virtual host setup), as I already    
achieved it in lighttpd, it must be feasible in apache as well: the mod_rewrite can [...]]]></description>
			<content:encoded><![CDATA[
<p>After fixing a SJSD svn trunk regression bug reported in the bug tracking system, I tried to make eZ installed in a subdir work with rewrite rules in apache 1.3 (not virtual host setup), as I already    
<a href="post:ez-rewrite-rule-with-lighttpd">achieved it in lighttpd</a>, it must be feasible in apache as well: the mod_rewrite can achieve almost anything as long as you can come up with. (PHP-CGI is used in the apache)</p><span id="more-26"></span>
<p>This is the .htaccess (I have eZ installed in /ez38, so this .htaccess is under /ez38) required to have eZ work with apache rewrite properly in a subdir:</p>
<pre>RewriteEngine On
RewriteRule !\.(gif|jpe?g|png|css|js|html|xml|ico)|var(.+)storage.pdf(.+)\.pdf$ index.php

DirectoryIndex index.php</pre>
<p>In order for apache to read .htaccess in each dir, something like this has to be set in the httpd.conf file for apache:</p>
<pre>&lt;Directory /&gt;
    Options FollowSymLinks
    AllowOverride All
&lt;/Directory&gt;</pre>
<p>UPDATE (29/May/2006): *.ico should not be rewriten to index.php</p>
]]></content:encoded>
			<wfw:commentRss>http://www.liucougar.net/blog/archives/26/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CaptCha! does not work anymore?</title>
		<link>http://www.liucougar.net/blog/archives/25</link>
		<comments>http://www.liucougar.net/blog/archives/25#comments</comments>
		<pubDate>Mon, 29 May 2006 01:13:55 +0000</pubDate>
		<dc:creator>liucougar</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://liucougar.scim-im.org/blog/archives/25</guid>
		<description><![CDATA[
Have no clue, but since several days ago, my blog had kept having comment spams, although 
CaptCha! is enabled. I have no choice but to try to activate 
Akismet instead.
As this is a 2.1-alpha (svn) of wordpress, it refused to store the 
WordPress.com API key. However, after a svn up of wordpress, it got fixed.
I [...]]]></description>
			<content:encoded><![CDATA[
<p>Have no clue, but since several days ago, my blog had kept having comment spams, although 
<a href="http://www.boriel.com/?page_id=17">CaptCha!</a> is enabled. I have no choice but to try to activate 
<a href="http://akismet.com/">Akismet</a> instead.</p>
<p>As this is a 2.1-alpha (svn) of wordpress, it refused to store the 
<a href="http://wordpress.com/api-keys/">WordPress.com API key</a>. However, after a svn up of wordpress, it got fixed.</p>
<p>I deactivated plugin CaptCha! and went and saw how well Akismet could do its job. So far, Akismet caught 8 spams perfectly without missing a single one. I guess I will stick with Akismet then.</p>
<p>I just did not come up how can the spammer bot work around the Captcha challenge&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.liucougar.net/blog/archives/25/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>eZ rewrite rule with lighttpd</title>
		<link>http://www.liucougar.net/blog/archives/23</link>
		<comments>http://www.liucougar.net/blog/archives/23#comments</comments>
		<pubDate>Tue, 23 May 2006 23:22:04 +0000</pubDate>
		<dc:creator>liucougar</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[eZ Publish]]></category>

		<guid isPermaLink="false">http://liucougar.scim-im.org/blog/archives/23</guid>
		<description><![CDATA[Since setup of lighttpd in my test server, it seems working pretty fine. However, without the index.php specified in the url, it does not work. Lighttpd definitely supports rewrite rules, as I see an module named mod_rewrite in lighttpd config file.
After a bit of searching around and failure and trial, I finally got it working.
The [...]]]></description>
			<content:encoded><![CDATA[Since setup of lighttpd in my test server, it seems working pretty fine. However, without the index.php specified in the url, it does not work. Lighttpd definitely supports rewrite rules, as I see an module named mod_rewrite in lighttpd config file.
<p>After a bit of searching around and failure and trial, I finally got it working.</p><span id="more-23"></span>
<p>The key point is that rewrite rules in lighttpd does not work under $HTTP[&quot;url&quot;], so this is what I got working finally:</p>
<pre>url.rewrite-once = (
&quot;^/ez38/.*\.(css|html|htm|pdf|js|png|gif|jpe?g|ico)(\?.*)?&quot; =&gt; &quot;$0&quot;,
&quot;^/ez38/.*&quot; =&gt; &quot;/ez38/index.php&quot;
)</pre>
<p>Note: the ez publish is installed under /ez38/ of the document root, and you may want to change it. If you install ez under your root, just replace &quot;/ez38/&quot; with &quot;/&quot;.</p>
<p>if you want to use SJSD with lighttpd, then you should have something like this:</p>
<pre>url.rewrite-once = (
&quot;^/ez38/.*\.(css|html|htm|pdf|js|png|gif|jpe?g|ico|xml)(\?.*)?&quot; =&gt; &quot;$0&quot;,
&quot;^/ez38/.*&quot; =&gt; &quot;/ez38/index.php&quot;
)</pre>
<p>UPDATE (29/May/2006): *.ico should not be rewriten to index.php</p>
]]></content:encoded>
			<wfw:commentRss>http://www.liucougar.net/blog/archives/23/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>FCKeditor 2.3 support in SJSD</title>
		<link>http://www.liucougar.net/blog/archives/19</link>
		<comments>http://www.liucougar.net/blog/archives/19#comments</comments>
		<pubDate>Thu, 18 May 2006 02:24:52 +0000</pubDate>
		<dc:creator>liucougar</dc:creator>
				<category><![CDATA[Project]]></category>
		<category><![CDATA[SJSD]]></category>
		<category><![CDATA[eZ Publish]]></category>

		<guid isPermaLink="false">http://liucougar.scim-im.org/blog/archives/19</guid>
		<description><![CDATA[
FCKeditor has released its beta version for upcoming 2.3 one day ago. It introduced       
several advanced features, most notably        
Extremely Fast Loading,       
FitWindow/AutoGrow plugin and       
improved context menu/toolbar, which seems [...]]]></description>
			<content:encoded><![CDATA[
<p>FCKeditor has released its beta version for upcoming 2.3 one day ago. It introduced       
<a href="http://www.fckeditor.net/whatsnew/default.html">several advanced features</a>, most notably        
<strong>Extremely Fast Loading</strong>,       
<strong>FitWindow/AutoGrow plugin</strong> and       
<strong>improved context menu/toolbar</strong>, which seems to me very promising, thus today I tried to port SJSD trunk to it.</p>
<p>As a result, the trunk of SJSD svn now only works with FCKeditor 2.3 beta or its svn, and a branch was created to host the old FCKeditor 2.2 version on which future SJSD 0.3.x releases will be based. SJSD trunk will be released as 0.4.0.   </p><span id="more-19"></span>
<p>If you want to stick with FCKeditor 2.2 and currently you are using SJSD svn, then you should issue this command under your checked out copy:   </p>
<pre>svn switch https://svn.sourceforge.net/svnroot/sjsd/sjsd/branches/fckeditor_2_2</pre>
<p>after this, svn up will not update your copy to trunk.</p>
<p>On the other hand if you want to adventure, you may want to give SJSD trunk and FCKeditor 2.3 beta (its SVN is       
<strong>highly recommanded</strong>) a try.</p>
<p>The porting did take some time, due to the new framework of toolbar and context menu, and some other API modification. However with the help of       
<a href="http://addons.mozilla.org/firefox/1843/">Firebug</a> and       
<a href="http://addons.mozilla.org/firefox/60/">Web Developer</a>, I can pin down the problem really quickly.   </p>
<p>The current status about the SJSD trunk is that it is working reasonably well (at least in Firefox) now with FCKeditor svn, except some known minor issues.</p>
<p>One of the issues I&#8217;d like to mention is       
<a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1490610&amp;group_id=75348&amp;atid=543653">this reported bug</a>. If you use the default eZ admin css style sheets, you have to modify one line in       
<code>design/admin/stylesheets/site.css</code>:</p>
<pre>div.content-edit div.box-content {
   position: relative; 
}</pre>
<p>Remove the line begining with position or comment this line out. Otherwise the FitWindow new feature introduced in FCKeditor 2.3 will not function properly.</p>
<p>Another update about SJSD is that I finally decided to rewrite the XML input handler based on the new simplified xml input handler in eZ 3.8. However, as keeping in mind of EditMonkey, I will ensure that the DOM processor is extensible and as standalone as possible so that it can be incorporated in other project easily, such as future release of EditMonkey.   </p>
]]></content:encoded>
			<wfw:commentRss>http://www.liucougar.net/blog/archives/19/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
