<?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>php &#8211; Luxing Huang</title>
	<atom:link href="https://luxing.im/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>https://luxing.im</link>
	<description>Thoughs and things</description>
	<lastBuildDate>Sat, 19 Dec 2015 20:18:32 +0000</lastBuildDate>
	<language>en-CA</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.2</generator>
<site xmlns="com-wordpress:feed-additions:1">58771605</site>	<item>
		<title>Enable Memcached on Remi based PHP install for WordPress</title>
		<link>https://luxing.im/enable-memcached-on-remi-based-php-install-for-wordpress/</link>
					<comments>https://luxing.im/enable-memcached-on-remi-based-php-install-for-wordpress/#respond</comments>
		
		<dc:creator><![CDATA[Luxing Huang]]></dc:creator>
		<pubDate>Thu, 10 Dec 2015 00:39:10 +0000</pubDate>
				<category><![CDATA[Techie Stuff]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[memcached]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress]]></category>
		<guid isPermaLink="false">https://luxing.im/?p=558</guid>

					<description><![CDATA[The php stack I am using for blogs and other hosted php websites is from Remi. I am on PHP version 5.6. The memcached plugin was enabled and I never checked its status. I only found out that the memcached is not enabled at all on my websites. OK I figured this will be a &#8230; <p class="link-more"><a href="https://luxing.im/enable-memcached-on-remi-based-php-install-for-wordpress/" class="more-link">Continue reading<span class="screen-reader-text"> "Enable Memcached on Remi based PHP install for WordPress"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>The php stack I am using for blogs and other hosted php websites is from <a href="http://rpms.famillecollet.com/" target="_blank">Remi</a>. I am on PHP version 5.6. The <a href="https://wordpress.org/plugins/memcached-is-your-friend/" target="_blank">memcached plugin</a> was enabled and I never checked its status. I only found out that the memcached is not enabled at all on my websites.</p>
<p>OK I figured this will be a simple task. It is. There are a few things that you need to be cautious about if you are using Remi as php base. The modules will not be loaded magically.<br />
<span id="more-558"></span></p>
<p>Three steps:<br />
1. Copy or link the module to your system library, you need to do the same for 3 files for PHP 5.x: <code>igbinary.so</code>, <code>memcached.so</code> and <code>msgpack.so</code></p>
<pre lang="bash">
for i in igbinary.so memcached.so msgpack.so
do
  ln -s /opt/remi/php56/root/usr/lib64/php/modules/$i /usr/lib64/php/modules/$i
done
</pre>
<p>For PHP 7 you do not need the igbinary file.</p>
<p>2. Add the following modules to /etc/php.d directory using ordering, each of the file contains only a line of <code>extension = xxx.so</code><br />
20-msgpack.ini</p>
<pre>extension = msgpack.so</pre>
<p>20-igbinary.ini</p>
<pre>extension = igbinary.so</pre>
<p>30-memcached.ini</p>
<pre>extension = memcached.so</pre>
<p>3. Restart php-fpm<br />
Depend on your configuration, you might not be using php-fpm. Restart it so that the changes can apply to your website.</p>
<p>When you go to Tools -> Memcached in WordPress, you shall see this line:<br />
<code>Using the PHP Memcached class to interact with Memcached</code></p>
<p>It proves that you are using Memcached!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://luxing.im/enable-memcached-on-remi-based-php-install-for-wordpress/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">558</post-id>	</item>
		<item>
		<title>MediaWiki behind CloudFlare</title>
		<link>https://luxing.im/mediawiki-behind-cloudflare/</link>
					<comments>https://luxing.im/mediawiki-behind-cloudflare/#respond</comments>
		
		<dc:creator><![CDATA[Luxing Huang]]></dc:creator>
		<pubDate>Sat, 19 Apr 2014 16:51:04 +0000</pubDate>
				<category><![CDATA[Techie Stuff]]></category>
		<category><![CDATA[cdn]]></category>
		<category><![CDATA[cloudflare]]></category>
		<category><![CDATA[mediawiki]]></category>
		<category><![CDATA[php]]></category>
		<guid isPermaLink="false">http://blog.luxing.im/?p=363</guid>

					<description><![CDATA[When you set up with CloudFlare with MediaWiki, the IP won&#8217;t be showing correctly. Here is the how-to derived from CloudFlare&#8217;s official MediaWiki FAQ. The official document is old and doesn&#8217;t work for the latest version of MediaWiki. The modifications below are based on version MediaWiki 1.22.4 First edit includes/GlobalFunctions.php: Around line 1201 from $forward &#8230; <p class="link-more"><a href="https://luxing.im/mediawiki-behind-cloudflare/" class="more-link">Continue reading<span class="screen-reader-text"> "MediaWiki behind CloudFlare"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>When you set up with CloudFlare with MediaWiki, the IP won&#8217;t be showing correctly. Here is the how-to derived from CloudFlare&#8217;s official <a href="https://support.cloudflare.com/hc/en-us/articles/200170806-How-do-I-restore-original-visitor-IP-with-MediaWiki-" target="_blank">MediaWiki FAQ</a>. The official document is old and doesn&#8217;t work for the latest version of MediaWiki.</p>
<p><span id="more-363"></span><br />
The modifications below are based on version MediaWiki 1.22.4<br />
First edit <strong>includes/GlobalFunctions.php</strong>:</p>
<p>Around line 1201 from</p>
<pre>$forward = "\t(proxied via {$_SERVER['REMOTE_ADDR']}{$forward})";</pre>
<p>Change to</p>
<pre>$forward = "\t(proxied via {$_SERVER['HTTP_CF_CONNECTING_IP']}{$forward})";</pre>
<p>Edit <strong>WebRequest.php</strong>, find line near </p>
<pre>$ipchain = $_SERVER['REMOTE_ADDR'];</pre>
<p>Around line 1097 to 1108, change all <em>REMOTE_ADDR</em> to <strong>HTTP_CF_CONNECTING_IP</strong>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://luxing.im/mediawiki-behind-cloudflare/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">363</post-id>	</item>
	</channel>
</rss>
