<?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>linuxbuddies.com &#187; PHP</title>
	<atom:link href="http://linuxbuddies.com/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://linuxbuddies.com</link>
	<description>For linux documentations.</description>
	<lastBuildDate>Fri, 11 Sep 2009 10:11:58 +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>Disable/Enable safe_mode/register_globals value</title>
		<link>http://linuxbuddies.com/2009/01/18/283/</link>
		<comments>http://linuxbuddies.com/2009/01/18/283/#comments</comments>
		<pubDate>Sun, 18 Jan 2009 04:55:40 +0000</pubDate>
		<dc:creator>Riyesh</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Disable/Enable safe_mode/register_globals value]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[register_globals]]></category>
		<category><![CDATA[value]]></category>

		<guid isPermaLink="false">http://linuxbuddies.com/?p=283</guid>
		<description><![CDATA[You can disable/enable safe_mode either using .htaccess, php.ini or httpd.conf file. Selecting the right way depends on your php-apache configuration.
If php is compiled as a dso module for apache, you will have to use .htaccess method
If php-apache relationship is CGI, then php.ini file is used to disable safe_mode value
 If none ...]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-thumbnail wp-image-59" title="apache_1" src="http://linuxbuddies.com/wp-content/uploads/2008/12/apache_1-150x150.jpg" alt="apache_1" width="150" height="150" />You can disable/enable safe_mode either using .htaccess, php.ini or httpd.conf file. Selecting the right way depends on your php-apache configuration.<br />
If php is compiled as a dso module for apache, you will have to use .htaccess method</p>
<p>If php-apache relationship is CGI, then php.ini file is used to disable safe_mode value</p>
<p> If none of the above works, contact your hosting provider and ask them to disable safe_mode through the servers httpd.conf file. It can be done in your VirtualHost configuration inside httpd.conf file.</p>
<p><strong>.htaccess Code</strong></p>
<p style="padding-left: 60px; "><strong><span style="font-weight: normal;">php_admin_value safe_mode Off [OR]<br />
php_flag safe_mode Off</span></strong></p>
<p>edit php.ini ( use this command to find php.ini file location &#8211; &#8220;php -i | grep php.in&#8221; ) </p>
<p style="padding-left: 60px; ">safe_mode = Off</p>
<p>edit httpd.cof </p>
<p style="padding-left: 30px; ">php_admin_value safe_mode Off</p>
<p>Verify your settings</p>
<p> Create phpinfo page file  and put it on the document root and access the page to see if the defult value has been overrided with your defult value.</p>
<p>phpinfo sample. </p>
<p style="padding-left: 30px;">example <br />
vi  phpinfo.php</p>
<p style="padding-left: 30px;">&lt;?php<br />
phpinfo();<br />
?&gt;</p>
<p>You may use register_globals keyword instead of safe_mode to change values of register_globals variable [off/on values are accepted]</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxbuddies.com/2009/01/18/283/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>eAccelerator  installation</title>
		<link>http://linuxbuddies.com/2008/12/26/eaccelerator-installation/</link>
		<comments>http://linuxbuddies.com/2008/12/26/eaccelerator-installation/#comments</comments>
		<pubDate>Fri, 26 Dec 2008 19:01:31 +0000</pubDate>
		<dc:creator>Riyesh</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[eAccelerator]]></category>
		<category><![CDATA[load]]></category>
		<category><![CDATA[server load]]></category>

		<guid isPermaLink="false">http://linuxbuddies.com/?p=217</guid>
		<description><![CDATA[PHP eAccelerator is a free open source PHP accelerator, optimizer and dynamic content cache module that specially build to optimize php performance. According to php eaccelerator official site, php accelerator able to speed up the php code by 1-10 times and reduce server load.
 
Installing PHP eAccelerator from source
Requirements
     * php4 or php5
    * autoconf
    * automake
    * libtool
    ...]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-218" title="eacc" src="http://linuxbuddies.com/wp-content/uploads/2008/12/eacc.jpg" alt="eacc" width="111" height="64" /><span class="ilspan"><span>PHP </span></span><span><span>eAccelerator is a</span></span><span><span> </span></span><span><span>free open source</span></span><span><span> </span></span><span class="ilspan"><span>PHP</span></span><span><span> </span></span><span><span>accelerator, optimizer and dynamic content cache module that specially build to optimize</span></span><span><span> </span></span><span class="ilspan"><span>php </span></span><span><span>performance. According to</span></span><span><span> </span></span><span class="ilspan"><span>php</span></span><span><span> </span></span><span><span>eaccelerator official site,</span></span><span><span> </span></span><span class="ilspan"><span>php</span></span><span><span> </span></span><span><span>accelerator able to speed up the</span></span><span><span> </span></span><span class="ilspan"><span>php</span></span><span><span> </span></span><span><span>code by 1-10 times and reduce server load.</span></span></p>
<p> </p>
<p><span><span>Installing <span class="ilspan"><span>PHP </span></span><span><span>eAccelerator from source</span></span></span></span></p>
<p><span><span><span><span><span style="text-decoration: underline;">Requirements</span></span></span></span></span></p>
<blockquote><p><span><span><span><span><span style="text-decoration: underline;"><span>     * php4 or php5<br />
    * autoconf<br />
    * automake<br />
    * libtool<br />
    * m4 </span></span></span></span></span></span></p></blockquote>
<p><span><span><span><span><span style="text-decoration: underline;"><span><span>eAccelerator only works with mod_php or php in fastcgi mode. It can&#8217;t be used in cgi or cli because eAccelerator needs to set up shared memory, and this can only be done when all php instances that need to access it are forks of the first process.</span></span></span></span></span></span></span></p>
<p> </p>
<p><span><span><span><span><span style="text-decoration: underline;"><span><span><span style="text-decoration: underline;"><span>Installation </span></span><span><br />
download  eAccelerator</span></span></span></span></span></span></span></span></p>
<p>Download the tarball file from the source  </p>
<blockquote><p><strong><span>cd /usr/local/src/<br />
mkdir eacp<br />
cd eacp<br />
wget </span></strong><span><a href="http://bart.eaccelerator.net/source/0.9.5.2/eaccelerator-0.9.5.2.tar.bz2" target="_blank"><strong><span>http://bart.eaccelerator.net/source/0.9.5.2/eaccelerator-0.9.5.2.tar.bz2</span></strong></a></span><strong><span><br />
bunzip2 eaccelerator-0.9.5.2.tar.bz2<br />
tar xvf eaccelerator-0.9.5.2.tar<br />
cd eaccelerator-0.9.5.2 </span></strong></p></blockquote>
<p><span><span><span><span><span style="text-decoration: underline;"><span><span><span><br />
</span></span></span></span></span></span></span></span></p>
<blockquote><p><span><span><span><span><span style="text-decoration: underline;"><br />
</span></span></span></span></span></p></blockquote>
<p class="MsoNormal"><span> <span> Compiling eAccelerator </span></span></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><span><span><span>When you have more then one php install or the phpize and php-config scripts aren&#8217;t in your path then you should follow this procedure<br />
This example has php installed in /usr/bin/php (command to know the path &#8211; which php), this is the path of the &#8211;prefix option given to the php configuration script.</span></span></span></p>
<blockquote>
<p class="MsoNormal"><span><span><span><strong><span>export PHP_PREFIX=&#8221;/usr/&#8221;<br />
$PHP_PREFIX/bin/phpize</span></strong></span></span></span></p>
<p><strong>./configure &#8211;enable-eaccelerator=shared &#8211;with-php-config=$PHP_PREFIX/bin/php-config &#8211;with-eaccelerator-info</strong></p>
<p><strong> </strong><strong>make<br />
make install</strong></p></blockquote>
<p class="MsoNormal"><span><span><span><span><strong><span><span style="font-weight: normal;">copy the all php files under the eaccelerator-0.9.5.2 directory to the document root of server</span></span></strong></span></span></span></span></p>
<blockquote>
<p class="MsoNormal"><span><span><span><span><strong><span><span style="font-weight: normal;"><strong><span>cp *.php /usr/local/apache/htdocs/eacp</span></strong></span></span></strong></span></span></span></span></p>
</blockquote>
<p class="MsoNormal"><span><span><span><span><strong><span><span style="font-weight: normal;"><strong><span><span><span style="font-weight: normal;">Configuring eAccelerator</span></span></span></strong></span></span></strong></span></span></span></span></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><span><span><span><span><strong><span><span style="font-weight: normal;"><strong><span><span><span style="font-weight: normal;"><span>eAccelerator can be installed both as Zend or PHP extension. When you install eAccelerator as a zend_extension you need to give the full path to the eaccelerator.so library.</span></span></span></span></strong></span></span></strong></span></span></span></span></p>
<p><strong><strong> </strong></strong></p>
<p><strong><strong>To install as Zend extension: Add the follwing lines below the zend entries in the php.in file</strong></strong></p>
<blockquote>
<p class="MsoNormal"><span><span><span><span><strong><span><span style="font-weight: normal;"><strong><span><span><span style="font-weight: normal;"></span></span></span></strong></span></span></strong></span></span></span></span></p>
<p><strong><strong></p>
<table class="MsoNormalTable" border="0" cellpadding="0">
<tbody>
<tr>
<td valign="top"> </td>
</tr>
</tbody>
</table>
<p></strong></strong> </p></blockquote>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><span> <strong>/scripts/restartsrv_httpd</strong></span></p>
<p class="MsoNormal"><span><strong></strong></span></p>
<p> Verify if eAccelerator works</p>
<blockquote>
<p class="MsoNormal"><span><span><span><span><strong><span><span style="font-weight: normal;"><strong><span><span><span style="font-weight: normal;"><span><span><br />
<strong>php -v </strong></span><br />
</span></span></span></span></strong></span></span></strong></span></span></span></span></p></blockquote>
<blockquote>
<p class="MsoNormal"><span><span><span><span><strong><span><span style="font-weight: normal;"><span><br />
</span></span></span></strong></span></span></span></span></p>
<p class="MsoNormal"><span><strong>eaccelerator.allowed_admin_path=&#8221;/usr/local/apache/htdocs/eacp&#8221;<br />
zend_extension=&#8221;/usr/local/lib/php/extensions/no-debug-non-zts-20020429/eaccelerator.so&#8221;<br />
eaccelerator.shm_size=&#8221;16&#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;</strong></span></p></blockquote>
<p class="MsoNormal"><span><strong><span style="font-weight: normal;">restart the httpd</span></strong></span></p>
<blockquote>
<p class="MsoNormal"><span><strong><span style="font-weight: normal;"><strong><span>/scripts/restartsrv_httpd</span></strong></span></strong></span></p>
</blockquote>
<p class="MsoNormal"><span>Verify if eAccelerator works </span></p>
<blockquote>
<p class="MsoNormal"><span><strong><span>php -v </span></strong></span></p>
</blockquote>
<p class="MsoNormal"><span><strong><span><span><span style="font-weight: normal;">When eAccelerator is loaded successfully you will see something like:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies<br />
    with eAccelerator v0.9.5-beta2, Copyright (c) 2004-2006 eAccelerator, by eAccelerator<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
or check with phpinfo page</span></span></span></strong></span></p>
<p><strong><span style="text-decoration: underline;"><span style="font-weight: normal;">Using Web contrlol panel of eAccelerator</span></span></p>
<p></strong></p>
<p><strong>browse the pages under the default document root</strong></p>
<blockquote>
<p class="MsoNormal"><span><strong><span><span></span></span></strong></span></p>
<p><strong> </strong><strong> <span><a href="http://default.domain.com/eacp/control.php" target="_blank"><span><span style="font-weight: normal;">http://default.domain.com/eacp/control.php</span></span></a></span></strong></p></blockquote>
<p class="MsoNormal"><span><strong><span><span><span><span style="font-weight: normal;"><br />
</span></span></span></span></strong></span></p>
<p class="MsoNormal"><span><span>Finished</span></span></p>
<p class="MsoNormal"><span><strong><span style="font-weight: normal;"><strong><span><br />
</span></strong></span></strong></span></p>
<blockquote>
<p class="MsoNormal"><span><strong><br />
</strong></span></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://linuxbuddies.com/2008/12/26/eaccelerator-installation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>APC mem Cache installation</title>
		<link>http://linuxbuddies.com/2008/12/23/apc-mem-cache-installation/</link>
		<comments>http://linuxbuddies.com/2008/12/23/apc-mem-cache-installation/#comments</comments>
		<pubDate>Tue, 23 Dec 2008 13:27:24 +0000</pubDate>
		<dc:creator>Riyesh</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[APC]]></category>

		<guid isPermaLink="false">http://linuxbuddies.com/?p=209</guid>
		<description><![CDATA[   APC MM cache is an most commonly used php accelerators 

Please follow the steps to install APC mem Cache


1. cd /usr/local/src
2. wget http://pecl.php.net/get/APC-3.0.14.tgz
3. tar -xzvf APC-3.0.14.tgz
4. cd APC-3.0.14

 
 checking  the location of phpize and php-config paths

finding the  Phpize binary location


whereis phpize

output looks like:


phpize: /usr/bin/phpize /usr/local/bin/phpize


whereis php-config

output looks like:


php-config: /usr/bin/php-config /usr/local/bin/php-config

5. execute the command ...]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-210" title="php_snow_2008" src="http://linuxbuddies.com/wp-content/uploads/2008/12/php_snow_2008.gif" alt="php_snow_2008" width="120" height="64" />   APC MM cache is an most commonly used php accelerators </p>
<p class="MsoNormal"><span><br />
Please follow the steps to install APC mem Cache</span></p>
<blockquote>
<p class="MsoNormal"><span></p>
<p>1. cd /usr/local/src<br />
2. wget </span><a href="http://pecl.php.net/get/APC-3.0.14.tgz" target="_blank"><span>http://pecl.php.net/get/APC-3.0.14.tgz</span></a><span><br />
3. tar -xzvf APC-3.0.14.tgz<br />
4. cd APC-3.0.14</span></p></blockquote>
<p class="MsoNormal"><span><br />
 <br />
 checking  the location of phpize and php-config paths</span></p>
<p class="MsoNormal"><span></p>
<p>finding the  Phpize binary location</span></p>
<blockquote>
<p class="MsoNormal"><span></p>
<p>whereis phpize</span></p></blockquote>
<p class="MsoNormal"><span></p>
<p>output looks like:</span></p>
<blockquote>
<p class="MsoNormal"><span></p>
<p>phpize: /usr/bin/phpize /usr/local/bin/phpize</span></p></blockquote>
<blockquote>
<p class="MsoNormal"><span></p>
<p>whereis php-config</span></p></blockquote>
<p class="MsoNormal"><span></p>
<p>output looks like:</span></p>
<blockquote>
<p class="MsoNormal"><span></p>
<p>php-config: /usr/bin/php-config /usr/local/bin/php-config</span></p></blockquote>
<p class="MsoNormal"><span></p>
<p>5. execute the command to create the module</span></p>
<blockquote>
<p class="MsoNormal"><span><br />
/usr/bin/phpize  ( or the path you got )</span></p></blockquote>
<p class="MsoNormal"><span></p>
<p>6.  compile  the APC by running following command </span></p>
<blockquote>
<p class="MsoNormal"><span><br />
   ./configure &#8211;enable-apc &#8211;enable-apc-mmap &#8211;with-apxs=/usr/local/apache/bin/apxs    &#8211;with-php-config=/usr/bin/php-config<br />
  make<br />
 make test<br />
 make install </span></p></blockquote>
<p class="MsoNormal"><span><br />
Take note of where it copies apc.so file i.e.</span></p>
<blockquote>
<p class="MsoNormal"><span></p>
<p>/usr/lib/php/extensions/no-debug-non-zts-20020429/apc.so</span></p></blockquote>
<p class="MsoNormal"><span></p>
<p>10. Now locate php.ini type:</span></p>
<blockquote>
<p class="MsoNormal"><span><br />
     php -i | grep php.ini </span></p></blockquote>
<p class="MsoNormal"><span><br />
11. Edit php.ini </span></p>
<p class="MsoNormal"><span><br />
 Add these entries in the dynamic module section ( please note the extention path can be varied )  </span></p>
<blockquote>
<p class="MsoNormal"><span></p>
<p>extension=&#8221;/usr/lib/php/extensions/no-debug-non-zts-20020429/apc.so&#8221;<br />
apc.shm_size = 32 </span></p></blockquote>
<p class="MsoNormal"><span></p>
<p>restart webserver . Check the php info page you can see the apc module listed .</span></p>
]]></content:encoded>
			<wfw:commentRss>http://linuxbuddies.com/2008/12/23/apc-mem-cache-installation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FFmpeg Installation</title>
		<link>http://linuxbuddies.com/2008/12/23/ffmpeg-installation/</link>
		<comments>http://linuxbuddies.com/2008/12/23/ffmpeg-installation/#comments</comments>
		<pubDate>Tue, 23 Dec 2008 12:40:06 +0000</pubDate>
		<dc:creator>Riyesh</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[ffmpeg]]></category>

		<guid isPermaLink="false">http://linuxbuddies.com/?p=192</guid>
		<description><![CDATA[


 1. Create a directory to do our work 


mkdir ~/ffmpeg
cd ~/ffmpeg

2. Get all the source files


wget http://www3.mplayerhq.hu/MPlayer/releases/codecs/essential-20061022.tar.bz2
wget http://rubyforge.org/frs/download.php/9225/flvtool2_1.0.5_rc6.tgz
wget http://easynews.dl.sourceforge.net/sourceforge/lame/lame-3.97.tar.gz
wget http://superb-west.dl.sourceforge.net/sourceforge/ffmpeg-php/ffmpeg-php-0.5.0.tbz2
wget http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz
wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.1.2.tar.gz

3. Extract all the source files


bunzip2 essential-20061022.tar.bz2; tar xvf essential-20061022.tar
tar zxvf flvtool2_1.0.5_rc6.tgz
tar zxvf lame-3.97.tar.gz
bunzip2 ffmpeg-php-0.5.0.tbz2; tar xvf ffmpeg-php-0.5.0.tar
tar zxvf libogg-1.1.3.tar.gz
tar zxvf libvorbis-1.1.2.tar.gz

4. Create the codecs directory &#38; import them


mkdir /usr/local/lib/codecs/
mv ...]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-thumbnail wp-image-193" title="ffmpeg_mac" src="http://linuxbuddies.com/wp-content/uploads/2008/12/ffmpeg_mac-150x150.jpg" alt="ffmpeg_mac" width="150" height="150" /></p>
<p class="MsoNormal"><span><br />
</span></p>
<p class="MsoNormal"><span> 1. Create a directory to do our work </span></p>
<blockquote>
<p class="MsoNormal"><span><br />
mkdir ~/ffmpeg<br />
cd ~/ffmpeg</span></p></blockquote>
<p class="MsoNormal"><span></p>
<p>2. Get all the source files</span></p>
<blockquote>
<p class="MsoNormal"><span><br />
wget </span><a href="http://www3.mplayerhq.hu/MPlayer/releases/codecs/essential-20061022.tar.bz2" target="_blank"><span>http://www3.mplayerhq.hu/MPlayer/releases/codecs/essential-20061022.tar.bz2</span></a><span><br />
wget </span><a href="http://rubyforge.org/frs/download.php/9225/flvtool2_1.0.5_rc6.tgz" target="_blank"><span>http://rubyforge.org/frs/download.php/9225/flvtool2_1.0.5_rc6.tgz</span></a><span><br />
wget </span><a href="http://easynews.dl.sourceforge.net/sourceforge/lame/lame-3.97.tar.gz" target="_blank"><span>http://easynews.dl.sourceforge.net/sourceforge/lame/lame-3.97.tar.gz</span></a><span><br />
wget </span><a href="http://superb-west.dl.sourceforge.net/sourceforge/ffmpeg-php/ffmpeg-php-0.5.0.tbz2" target="_blank"><span>http://superb-west.dl.sourceforge.net/sourceforge/ffmpeg-php/ffmpeg-php-0.5.0.tbz2</span></a><span><br />
wget </span><a href="http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz" target="_blank"><span>http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz</span></a><span><br />
wget </span><a href="http://downloads.xiph.org/releases/vorbis/libvorbis-1.1.2.tar.gz" target="_blank"><span>http://downloads.xiph.org/releases/vorbis/libvorbis-1.1.2.tar.gz</span></a></p></blockquote>
<p class="MsoNormal"><a href="http://downloads.xiph.org/releases/vorbis/libvorbis-1.1.2.tar.gz" target="_blank"></a><span></p>
<p>3. Extract all the source files</span></p>
<blockquote>
<p class="MsoNormal"><span><br />
bunzip2 essential-20061022.tar.bz2; tar xvf essential-20061022.tar<br />
tar zxvf flvtool2_1.0.5_rc6.tgz<br />
tar zxvf lame-3.97.tar.gz<br />
bunzip2 ffmpeg-php-0.5.0.tbz2; tar xvf ffmpeg-php-0.5.0.tar<br />
tar zxvf libogg-1.1.3.tar.gz<br />
tar zxvf libvorbis-1.1.2.tar.gz</span></p></blockquote>
<p class="MsoNormal"><span></p>
<p>4. Create the codecs directory &amp; import them</span></p>
<blockquote>
<p class="MsoNormal"><span><br />
mkdir /usr/local/lib/codecs/<br />
mv essential-20061022/* /usr/local/lib/codecs/<br />
chmod -R 755 /usr/local/lib/codecs/</span></p></blockquote>
<p class="MsoNormal"><span></p>
<p>5. Install SVN/Ruby (Depends on OS, this is for RHEL/CentOS)</span></p>
<blockquote>
<p class="MsoNormal"><span><br />
yum install subversion<br />
yum install ruby<br />
yum install ncurses-devel</span></p></blockquote>
<p class="MsoNormal"><span></p>
<p>6. Get the latest FFMPEG/MPlayer from the subversion</span></p>
<blockquote>
<p class="MsoNormal"><span><br />
svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg<br />
svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer</span></p></blockquote>
<p class="MsoNormal"><span></p>
<p>7. Compile LAME</span></p>
<blockquote>
<p class="MsoNormal"><span><br />
cd ~/ffmpeg/lame-3.97<br />
./configure<br />
make<br />
make install</span></p></blockquote>
<p class="MsoNormal"><span></p>
<p>8. Compile libOGG</span></p>
<blockquote>
<p class="MsoNormal"><span><br />
cd ~/ffmpeg/libogg-1.1.3<br />
./configure<br />
make<br />
make install</span></p></blockquote>
<p class="MsoNormal"><span></p>
<p>9. Compile libVorbis</span></p>
<blockquote>
<p class="MsoNormal"><span><br />
cd ~/ffmpeg/libvorbis-1.1.2<br />
./configure<br />
make<br />
make install</span></p></blockquote>
<p class="MsoNormal"><span></p>
<p>10. Compile flvtool2</span></p>
<blockquote>
<p class="MsoNormal"><span><br />
cd ~/ffmpeg/flvtool2_1.0.5_rc6<br />
ruby setup.rb config<br />
ruby setup.rb setup<br />
ruby setup.rb install</span></p></blockquote>
<p class="MsoNormal"><span></p>
<p>11. Compile MPlayer</span></p>
<blockquote>
<p class="MsoNormal"><span><br />
cd ~/ffmpeg/mplayer<br />
./configure<br />
make<br />
make install</span></p></blockquote>
<p class="MsoNormal"><span></p>
<p>12. Compile FFMPEG</span></p>
<blockquote>
<p class="MsoNormal"><span><br />
cd ~/ffmpeg/ffmpeg<br />
./configure &#8211;enable-libmp3lame &#8211;enable-libogg &#8211;enable-libvorbis &#8211;disable-mmx &#8211;enable-shared<br />
echo &#8216;#define HAVE_LRINTF 1&#8242; &gt;&gt; config.h<br />
make<br />
make install</span></p></blockquote>
<p class="MsoNormal"><span></p>
<p>13. Finalize the codec setups</span></p>
<blockquote>
<p class="MsoNormal"><span><br />
ln -s /usr/local/lib/libavformat.so.50 /usr/lib/libavformat.so.50<br />
ln -s /usr/local/lib/libavcodec.so.51 /usr/lib/libavcodec.so.51<br />
ln -s /usr/local/lib/libavutil.so.49 /usr/lib/libavutil.so.49<br />
ln -s /usr/local/lib/libmp3lame.so.0 /usr/lib/libmp3lame.so.0<br />
ln -s /usr/local/lib/libavformat.so.51 /usr/lib/libavformat.so.51</span></p></blockquote>
<p class="MsoNormal"><span></p>
<p>14. Compile FFMPEG-PHP</span></p>
<blockquote>
<p class="MsoNormal"><span><br />
cd ~/ffmpeg/ffmpeg-php-0.5.0<br />
phpize<br />
./configure<br />
make<br />
make install</span></p></blockquote>
<p class="MsoNormal"><span></p>
<p>15. Install FFMPEG-PHP (make sure the php.ini path is correct.)</span></p>
<blockquote>
<p class="MsoNormal"><span><br />
echo &#8216;extension=/usr/local/lib/php/extensions/ no-debug-non-zts-20020429/ffmpeg.so&#8217; &gt;&gt; /usr/local/Zend/etc/php.ini</span></p></blockquote>
<p class="MsoNormal"><span></p>
<p>16. Restart Apache to load FFMPEG-PHP (Depends on OS, this is for RHEL/CentOS)</span></p>
<blockquote>
<p class="MsoNormal"><span><br />
service httpd restart</span></p></blockquote>
<p class="MsoNormal"><span></p>
<p>17. Verify if it works</span></p>
<blockquote>
<p class="MsoNormal"><span><br />
php -r &#8216;phpinfo();&#8217; | grep ffmpeg</span></p></blockquote>
<p class="MsoNormal"><span></p>
<p>If you get a few lines such as<br />
ffmpeg<br />
ffmpeg support (ffmpeg-php) =&gt; enabled<br />
ffmpeg-php version =&gt; 0.5.0<br />
ffmpeg.allow_persistent =&gt; 0 =&gt; 0</p>
<p>Then everything is installed and working. FFMPEG, FFMPEG-PHP, MPlayer, MEncoder, flv2tool, LAME MP3 encoder &amp; libOGG.<br />
 <span><!--[if gte vml 1]><v:shape id="Picture_x0020_9"  o:spid="_x0000_i1026" type="#_x0000_t75" alt="Roll Eyes" style='width:11.25pt;  height:11.25pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtmlclip1\01\clip_image008.gif" mce_src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtmlclip1\01\clip_image008.gif"   o:title="Roll Eyes" /> </v:shape><![endif]--><img src="file:///C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtmlclip1/01/clip_image008.gif" border="0" alt="Roll Eyes" width="15" height="15" /></span></span></p>
<p class="MsoNormal"> </p>
]]></content:encoded>
			<wfw:commentRss>http://linuxbuddies.com/2008/12/23/ffmpeg-installation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
