<?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>Creativz Lab &#187; PHP Optimize</title>
	<atom:link href="http://creativeslab.net/tag/php-optimize/feed" rel="self" type="application/rss+xml" />
	<link>http://creativeslab.net</link>
	<description>weblog for Developers &#38; Designers</description>
	<lastBuildDate>Sun, 18 Jul 2010 16:37:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Installing eAccelerator PHP Optimizer and Caching tool</title>
		<link>http://creativeslab.net/eaccelerator-php-optimizer-caching-tool</link>
		<comments>http://creativeslab.net/eaccelerator-php-optimizer-caching-tool#comments</comments>
		<pubDate>Wed, 01 Jul 2009 12:19:20 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[social web]]></category>
		<category><![CDATA[Caching Web Server]]></category>
		<category><![CDATA[eAccelerator]]></category>
		<category><![CDATA[eAccelerator Caching]]></category>
		<category><![CDATA[Enable Caching]]></category>
		<category><![CDATA[Memory Caching]]></category>
		<category><![CDATA[PHP Caching]]></category>
		<category><![CDATA[PHP encoding]]></category>
		<category><![CDATA[PHP Optimize]]></category>
		<category><![CDATA[PHP Programming]]></category>
		<category><![CDATA[Turck MMCache]]></category>

		<guid isPermaLink="false">http://creativeslab.net/?p=201</guid>
		<description><![CDATA[Installing instructions for eAccelerator. eAccelerator is dynamic content cache and optimizer for PHP. It also encodes PHP code and increases PHP script perfomance by caching them in compiled state thus eliminating overhead of compiling PHP script every time it is accessed.]]></description>
			<content:encoded><![CDATA[<p>eAccelerator is dynamic content cache and optimizer for PHP. It also encodes PHP code and increases PHP script perfomance by caching them in compiled state thus eliminating overhead of compiling PHP script every time it is accessed. It typically reduces server load and increases speed of PHP code by 1 &#8211; 10 times.</p>
<p>Born in December 2004, eAccelerator is a fork of <a href="http://sourceforge.net/projects/turck-mmcache" target="_blank">Turck MMCache</a> project.</p>
<p>you can download eAccelerator at <a href="http://eaccelerator.net/" target="_blank">http://eaccelerator.net/</a></p>
<p>Installation steps for eAccelerator on linux environment:</p>
<p><strong>Requirements</strong></p>
<p style="PADDING-LEFT: 30px">apache &gt;= 1.3, mod_php &gt;= 4.1, autoconf, automake, libtool, m4</p>
<p>Copy downloaded copy of your eAccelerator version onto any location of your server, (generally it will be /usr/local/src) and continue with following steps.</p>
<p>OR</p>
<p>Download and extract the source for eAccelerator.<br />
# cd /usr/local/src/<br />
# wget <a href="http://bart.eaccelerator.net/source/0.9.5.3/eaccelerator0.9.5.3.tar.bz2">http://bart.eaccelerator.net/source/0.9.5.3/eaccelerator0.9.5.3.tar.bz2</a><br />
# tar jxvf eaccelerator-0.9.5.3.tar.bz2<br />
# cd eaccele*<br />
<br />
<span style="color: #339966;"><strong>Step 1)</strong></span> <strong>Compiling eAccelerator</strong></p>
<p style="PADDING-LEFT: 30px">execute following commands in the order.<br />
a) export PHP_PREFIX=&#8221;/usr&#8221;<br />
b) $PHP_PREFIX/bin/phpize<br />
c) ./configure &#8211;enable-eaccelerator=shared &#8211;with-php-config=$PHP_PREFIX/bin/php-config<br />
d) make</p>
<p style="PADDING-LEFT: 30px"><strong>Note:</strong> You must specify the real prefix where PHP is installed in the &#8220;export&#8221; command. It may be &#8220;/usr&#8221; &#8220;/usr/local&#8221;, or something else.<br />
Know your PHP installed location on your server, by running phpinfo() script.</p>
<p style="PADDING-LEFT: 30px">On successfull compilation, there should be a &#8220;eaccelerator.so&#8221; file in the modules subdirectory of the eAccelerator source directory</p>
<p style="PADDING-LEFT: 30px">Note: (Only on Errors while installing eAccelerator)<br />
i) On some server PHP installations, phpize may not found, then error will come as &#8216;phpize: command not found&#8217;,</p>
<p style="PADDING-LEFT: 30px">in this case you need install phpize with following command. (Command may vary depending on version of linux)</p>
<p style="PADDING-LEFT: 30px">yum install php-devel</p>
<p style="PADDING-LEFT: 30px">ii) If you get following error while running command ./configure<br />
<em>configure: error: no acceptable C compiler found in $PATH</em><br />
you need to install c Compiler, run following command</p>
<p style="PADDING-LEFT: 30px"><strong><em>yum install gcc</em></strong></p>
<p>
<strong><span style="color: #339966;">Step 2)</span> Install eAccelerator</strong></p>
<p style="PADDING-LEFT: 30px">run following command</p>
<p style="PADDING-LEFT: 30px">a) make install</p>
<p style="PADDING-LEFT: 30px">This command will copy &#8220;eaccelerator.so&#8221; into PHP extensions directory.</p>
<p>
<strong><span style="color: #339966;">Step 3)</span> Configure eAccelerator</strong></p>
<p style="PADDING-LEFT: 30px">eAccelerator can be installed both as Zend or PHP extension.</p>
<p style="PADDING-LEFT: 30px">For eaccelerator &gt; 0.9.1, if you have /etc/php.d directory, you should copy eaccelerator.ini inside and modify default values if you need, otherwise edit your php.ini (/etc/php.ini)</p>
<p style="PADDING-LEFT: 30px"><strong>To install as Zend extension:</strong></p>
<p style="PADDING-LEFT: 60px"><span style="color: #ff9900;">zend_extension=&#8221;/usr/lib/php4/eaccelerator.so&#8221;<br />
eaccelerator.shm_size=&#8221;32&#8243;<br />
eaccelerator.cache_dir=&#8221;/tmp/eaccelerator&#8221;<br />
eaccelerator.enable=&#8221;1&#8243;<br />
eaccelerator.optimizer=&#8221;1&#8243;<br />
eaccelerator.check_mtime=&#8221;1&#8243;<br />
eaccelerator.debug=&#8221;0&#8243;<br />
eaccelerator.filter=&#8221;"<br />
eaccelerator.shm_max=&#8221;0&#8243;<br />
eaccelerator.shm_ttl=&#8221;0&#8243;<br />
eaccelerator.shm_prune_period=&#8221;0&#8243;<br />
eaccelerator.shm_only=&#8221;0&#8243;<br />
eaccelerator.compress=&#8221;1&#8243;<br />
eaccelerator.compress_level=&#8221;9&#8243;</span></p>
<p style="PADDING-LEFT: 30px">If you use thread safe build of PHP you must use &#8220;zend_extension_ts&#8221; instead<br />
of &#8220;zend_extension&#8221;.</p>
<p style="PADDING-LEFT: 30px"><strong>To install as PHP extension:</strong></p>
<p style="PADDING-LEFT: 60px"><span style="color: #ff9900;">extension=&#8221;eaccelerator.so&#8221;<br />
eaccelerator.shm_size=&#8221;32&#8243;<br />
eaccelerator.cache_dir=&#8221;/tmp/eaccelerator&#8221;<br />
eaccelerator.enable=&#8221;1&#8243;<br />
eaccelerator.optimizer=&#8221;1&#8243;<br />
eaccelerator.check_mtime=&#8221;1&#8243;<br />
eaccelerator.debug=&#8221;0&#8243;<br />
eaccelerator.filter=&#8221;"<br />
eaccelerator.shm_max=&#8221;0&#8243;<br />
eaccelerator.shm_ttl=&#8221;0&#8243;<br />
eaccelerator.shm_prune_period=&#8221;0&#8243;<br />
eaccelerator.shm_only=&#8221;0&#8243;<br />
eaccelerator.compress=&#8221;1&#8243;<br />
eaccelerator.compress_level=&#8221;9&#8243;</span></p>
<p style="PADDING-LEFT: 30px"><strong>Note:</strong> default value for eaccelerator.shm_size is &#8216;0&#8242;, in this case shared memory size will be taken as default value of OS. you can set it to any size you need.</p>
<p>
<strong><span style="color: #339966;">Step 4)</span> Creating Cache Directory</strong></p>
<p style="PADDING-LEFT: 30px">In this step you will create eaccelerator cache directory, that is configured in Step 3.<br />
Default value for this /tmp/eaccelerator&#8217;</p>
<p style="PADDING-LEFT: 30px">a) mkdir /tmp/eaccelerator<br />
b) chmod 0777 /tmp/eaccelerator</p>
<p><strong>Note:</strong> Generally it will be a good idea to use some other directory, otherthan &#8216;tmp/eaccelerator&#8217;, as this directory will be deleted on some servers while system reboot.<br />
<br />
<span style="color: #339966;"><strong>Step 5)</strong></span> <strong>restart the web server for eAccelerator to function</strong>.<br />
(generally command will be: service httpd restart)<br />
<br />
<span style="color: #339966;"><strong>Step 6)</strong></span> <strong>To monitor eAccelerator functioning, you can perform following steps</strong>.</p>
<p style="PADDING-LEFT: 30px">a) After restart web server, go into directory &#8216;/tmp/eaccelerator&#8217; you can see cache pages created under some directories in that folder.</p>
<p style="PADDING-LEFT: 30px">b) or you can perform phpinfo()</p>
<p style="PADDING-LEFT: 30px">c) or else you can copy &#8216;control.php&#8217; available in eAccelerator source folder on to your web document root.</p>
<p style="PADDING-LEFT: 30px">Change user name and password in control.php to access eAccelerator control panel.</p>
<p style="PADDING-LEFT: 30px">Change path of <strong>&#8216;eaccelerator.allowed_admin_path&#8217;</strong> to web document root to fully monitor eAccelerator functioning in Control Panel.</p>
<p style="PADDING-LEFT: 30px">Ex: if control.php is at location /var/vhost/aaayy.com/httpdocs/control.php, then</p>
<p style="PADDING-LEFT: 30px"><em>eaccelerator.allowed_admin_path = /var/vhost/aaayy.com/httpdocs</em></p>
<p style="PADDING-LEFT: 30px">you need to restart web server, for this change.</p>
]]></content:encoded>
			<wfw:commentRss>http://creativeslab.net/eaccelerator-php-optimizer-caching-tool/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
