<?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>Unix Surgeon &#187; php</title>
	<atom:link href="http://www.unixsurgeon.com/kb/category/php/feed" rel="self" type="application/rss+xml" />
	<link>http://www.unixsurgeon.com/kb</link>
	<description>Linux Hosting Solution, Linux Web Hosting Solution, Learn Linux, How to, Server Management , Web Hosting Solution , Linux Solution , KnowledgeBase , Linux Tutorial</description>
	<lastBuildDate>Mon, 06 Feb 2012 10:42:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>What is the PHP/Java Bridge?</title>
		<link>http://www.unixsurgeon.com/kb/what-is-the-phpjava-bridge.html</link>
		<comments>http://www.unixsurgeon.com/kb/what-is-the-phpjava-bridge.html#comments</comments>
		<pubDate>Mon, 12 Sep 2011 12:28:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Linux tutorials]]></category>
		<category><![CDATA[Open Source Applications]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php-java]]></category>
		<category><![CDATA[php-java-bridge]]></category>
		<category><![CDATA[phpjavabridge]]></category>

		<guid isPermaLink="false">http://www.unixsurgeon.com/kb/?p=289</guid>
		<description><![CDATA[The php-java bridge is the php extension for using the java code in php files . You can access Java classes etc from within your PHP code.
Basically the PHP/Java Bridge is an implementation of a streaming, XML-based network protocol which can be used to connect a native script engine, for example PHP, Scheme or Python, [...]]]></description>
			<content:encoded><![CDATA[<p>The php-java bridge is the php extension for using the java code in php files . You can access Java classes etc from within your PHP code.</p>
<p>Basically the PHP/Java Bridge is an implementation of a streaming, XML-based network protocol which can be used to connect a native script engine, for example PHP, Scheme or Python, with a Java virtual machine. It is up to 50 times faster than local RPC via SOAP, requires less resources on the web-server side. It is faster and more reliable than direct communication via the Java Native Interface, and it requires no additional components to invoke Java procedures from PHP or PHP procedures from Java.</p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-7877248176171699";
google_ad_slot = "4635030684";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<h1>How it works :-</h1>
<p>A PHP Front end contained in, and associated with, a Java <em>back end</em>. The invoked Front end uses simple HTTP or XML to invoke Java procedures/methods/classes of the running back end. Both, the front end and the back end establish a continuation which may be called at any time from the other continuation.</p>
<p>This mechanism can also be used programmatically: the JAVA interface can be used to invoke PHP methods within a running PHP/Apache server so that Java components can invoke PHP instances and PHP scripts can call Java based applications or transfer control back to the environment where the request came from.</p>
<h1>Use for :-</h1>
<p>It’s mandatory requirement for all type of payment gateway integration. (Like :- HDFC,ICICI etc.)</p>
<p>For more information :- http://php-java-bridge.sourceforge.net/pjb</p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-7877248176171699";
google_ad_slot = "4635030684";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.unixsurgeon.com/kb/what-is-the-phpjava-bridge.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to upgrade php 5.1 to 5.2</title>
		<link>http://www.unixsurgeon.com/kb/how-to-upgrade-php-5-1-to-5-2.html</link>
		<comments>http://www.unixsurgeon.com/kb/how-to-upgrade-php-5-1-to-5-2.html#comments</comments>
		<pubDate>Tue, 29 Mar 2011 14:31:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux tutorials]]></category>
		<category><![CDATA[Open Source Applications]]></category>
		<category><![CDATA[lamp server]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php upgrade]]></category>
		<category><![CDATA[php upgrade through yum]]></category>
		<category><![CDATA[php upgrade via yum]]></category>
		<category><![CDATA[upgrade php 5.1 to 5.2]]></category>

		<guid isPermaLink="false">http://www.unixsurgeon.com/kb/?p=266</guid>
		<description><![CDATA[CentOS &#8211; Upgrade PHP 5.1 To 5.2
Today I was encountered with one problem,I have successfully install LAMP server on my CentOS 5 box,but when I installed drupal 7.0 on it,it throws an error like the minimum requirement to install the drupal 7.0 is php should be at least 5.2.4 .
These instructions were created using CentOS [...]]]></description>
			<content:encoded><![CDATA[<p><strong>CentOS &#8211; Upgrade PHP 5.1 To 5.2</strong></p>
<p>Today I was encountered with one problem,I have successfully install LAMP server on my CentOS 5 box,but when I installed drupal 7.0 on it,it throws an error like the minimum requirement to install the drupal 7.0 is php should be at least 5.2.4 .<br />
These instructions were created using CentOS 5.3 32-bit server :-<br />
<strong>First check which version of php you have installed:-</strong></p>
<p># rpm -qa |grep php</p>
<p>php-mcrypt-5.1.6-15.el5.i386<br />
php-common-5.1.6-15.el5.i386<br />
php-cli-5.1.6-15.el5.i386<br />
php-5.1.6-15.el5.i386<br />
php-pdo-5.1.6-15.el5.i386<br />
php-bcmath-5.1.6-15.el5.i386<br />
php-ldap-5.1.6-15.el5.i386<br />
php-devel-5.1.6-15.el5.i386<br />
php-gd-5.1.6-15.el5.i386<br />
php-xml-5.1.6-15.el5.i386<br />
php-mbstring-5.1.6-15.el5.i386<br />
php-mysql-5.1.6-15.el5.i386<br />
php-dba-5.1.6-15.el5.i386</p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-7877248176171699";
google_ad_slot = "4635030684";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p><strong>Add the new repositories:-</strong></p>
<p>First thing we need to do is add the new repositories to yum. When we add the this repository to configure it so it only pulls PHP packages. To start we&#8217;ll need create a new yum repository configuration file :<br />
# vi /etc/yum.repos.d/CentOS-Testing.repo<br />
<strong>Copy/paste the following into this file:</strong></p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p><strong>[c5-testing]<br />
name=CentOS-5 Testing<br />
baseurl=http://dev.centos.org/centos/$releasever/testing/$basearch/<br />
enabled=1<br />
gpgcheck=1<br />
gpgkey=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing<br />
includepkgs=php*</strong><br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>Make sure that there is no spaces at the start of each line, then save and close the file.<br />
<strong>Update PHP packages :-</strong><br />
Now you can use yum to update the PHP packages on your system:<br />
# yum update<br />
You should be shown a list of new packages that are going to be updated. Compare it to the list of your previously installed PHP packages . Note any packages that are not in the list. You&#8217;ll need to remove these packages or find updates for them because they won&#8217;t work after you update to PHP 5.2.x. If that is acceptable type &#8220;y&#8221; to continue and let yum update the packages.<br />
<strong>Once yum has completed restart Apache:</strong><br />
# service httpd restart<br />
To verify the update is working create a simple <strong>phpinfo.php</strong> in your documentroot or www directory with the following source code:</p>
<p>and open it in a web browser. The new PHP version should be reflected at the top of the page.<br />
<strong>Result:-</strong><br />
You should now have PHP 5.2.10 running on CentOS 5.3 32-bit.<br />
# rpm -qa |grep php</p>
<p>php-mcrypt-5.2.9-2.el5.centos.3<br />
php-gd-5.2.10-1.el5.centos<br />
php-devel-5.2.10-1.el5.centos<br />
php-mysql-5.2.10-1.el5.centos<br />
php-pdo-5.2.10-1.el5.centos<br />
php-5.2.10-1.el5.centos<br />
php-xml-5.2.10-1.el5.centos<br />
php-ldap-5.2.10-1.el5.centos<br />
php-common-5.2.10-1.el5.centos<br />
php-cli-5.2.10-1.el5.centos<br />
php-mbstring-5.2.10-1.el5.centos</p>
<p># php -v</p>
<p>PHP 5.2.10 (cli) (built: Nov 13 2009 11:24:03)<br />
Copyright (c) 1997-2009 The PHP Group<br />
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies</p>
<p>Enjoy Linux…!!!</p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-7877248176171699";
google_ad_slot = "4635030684";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.unixsurgeon.com/kb/how-to-upgrade-php-5-1-to-5-2.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Diffrence between EAccelerator &amp; APC (Alternative PHP Cache)</title>
		<link>http://www.unixsurgeon.com/kb/diffrence-between-eaccelerator-apc-alternative-php-cache.html</link>
		<comments>http://www.unixsurgeon.com/kb/diffrence-between-eaccelerator-apc-alternative-php-cache.html#comments</comments>
		<pubDate>Wed, 09 Mar 2011 12:17:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cpanel]]></category>
		<category><![CDATA[Linux tutorials]]></category>
		<category><![CDATA[Open Source Applications]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[APC]]></category>
		<category><![CDATA[Diffrence between EAccelerator & APC]]></category>
		<category><![CDATA[EAccelerator]]></category>

		<guid isPermaLink="false">http://www.unixsurgeon.com/kb/?p=248</guid>
		<description><![CDATA[Diffrence between EAccelerator &#38; APC :-
EAccelerator  is faster than APC. EAccelerator is &#8220;just&#8221; an opcode cache. It transparently caches PHP opcodes; all you have to do to use it is download, compile and enable and never worry about it again. APC, on the other hand, does a bit more. While APC also caches opcodes, it [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Diffrence between EAccelerator &amp; APC :-</strong></p>
<p>EAccelerator  is faster than APC. EAccelerator is &#8220;just&#8221; an opcode cache. It transparently caches PHP opcodes; all you have to do to use it is download, compile and enable and never worry about it again. APC, on the other hand, does a bit more. While APC also caches opcodes, it performs worse than EAC or xcache does (there&#8217;s a bit of debate as to which is better, for my particular needs, EAC was marginally faster, but both outperformed APC) for opcode caching. APC, on the other hand, also has some useful features that aren&#8217;t related to opcode caching, but rather apc_store, apc_fetch and apc_define_constants .Using PHP cache system will greatly increase your whole system performance, as you can with Pure PHP ned 209.58ms and using PHP cache system only need around 60ms. So it will boost your server response up to 4 times faster. And between XCache, APC and eAccelerator there are no significant different only 1ms-2ms different between them. So which one you choose is up to you, but if you use Zend Optimizer don’t use APC as they are not working together.</p>
<p><a href="http://www.unixsurgeon.com/kb/how-to-enable-the-apc-extension-in-php-alternative-php-cache.html">To install/Enable the APC please use this post.</a></p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-7877248176171699";
google_ad_slot = "4635030684";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p style="text-align: center;">
]]></content:encoded>
			<wfw:commentRss>http://www.unixsurgeon.com/kb/diffrence-between-eaccelerator-apc-alternative-php-cache.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>make: *** [apc.lo] Error 1 (APC Installation)</title>
		<link>http://www.unixsurgeon.com/kb/make-apc-lo-error-1-apc-installation.html</link>
		<comments>http://www.unixsurgeon.com/kb/make-apc-lo-error-1-apc-installation.html#comments</comments>
		<pubDate>Wed, 09 Mar 2011 12:09:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cpanel]]></category>
		<category><![CDATA[Open Source Applications]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[APC via pecl]]></category>
		<category><![CDATA[make: *** [apc.lo] Error 1]]></category>

		<guid isPermaLink="false">http://www.unixsurgeon.com/kb/?p=244</guid>
		<description><![CDATA[Today  when i try to install APC instead of EAccelerator via pecl install APC-3.1.5 or even WHM /Cpanel &#62;&#62; module installers &#62;&#62; php pecl &#62;&#62; manage
I get following error when the package comes to the make command:-
&#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;&#8211;
running: make
/var/tmp/APC/apc.c:463: error: &#8216;apc_regex&#8217; has no member named &#8216;preg&#8217;
/var/tmp/APC/apc.c:463: error: &#8216;apc_regex&#8217; has no member named &#8216;preg&#8217;
/var/tmp/APC/apc.c:464: error: &#8216;apc_regex&#8217; [...]]]></description>
			<content:encoded><![CDATA[<p>Today  when i try to install APC instead of EAccelerator via pecl install APC-3.1.5 or even WHM /Cpanel &gt;&gt; module installers &gt;&gt; php pecl &gt;&gt; manage</p>
<p>I get following error when the package comes to the make command:-</p>
<p>&#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;&#8211;</p>
<p>running: make</p>
<p>/var/tmp/APC/apc.c:463: error: &#8216;apc_regex&#8217; has no member named &#8216;preg&#8217;</p>
<p>/var/tmp/APC/apc.c:463: error: &#8216;apc_regex&#8217; has no member named &#8216;preg&#8217;</p>
<p>/var/tmp/APC/apc.c:464: error: &#8216;apc_regex&#8217; has no member named &#8216;nreg&#8217;</p>
<p>/var/tmp/APC/apc.c:464: error: &#8216;apc_regex&#8217; has no member named &#8216;nreg&#8217;</p>
<p><strong>make: *** [apc.lo] Error 1</strong></p>
<p><strong>ERROR: `make&#8217; failed</strong></p>
<p><strong>&#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;&#8211; </strong></p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-7877248176171699";
google_ad_slot = "4635030684";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p>To resolve this and reinstall the APC(make sure that EAccelerator removed from php),before reinstall the APC install the following packages :-</p>
<p><strong># yum install pcre-devel</strong></p>
<p>before installing APC.</p>
<p>On Debian use</p>
<p><strong># aptitude install libpcre3-dev</strong></p>
<p>Then  you will get the following response when you reinstall the APC  :-</p>
<p>&#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;-</p>
<p>unixsurg [~]# cd /usr/lib/php/extensions/no-debug-non-zts-20090626/</p>
<p>unixsurg [/usr/lib/php/extensions/no-debug-non-zts-20090626]# ls</p>
<p>./ ../ apc.so</p>
<p>unixsurg [/usr/lib/php/extensions/no-debug-non-zts-20090626]# cat /usr/lib/php.ini |grep apc</p>
<p>extension=&#8221;apc.so&#8221;</p>
<p>unixsurg [/usr/lib/php/extensions/no-debug-non-zts-20090626]#</p>
<p>&#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;&#8211;</p>
<p><a href="http://unixsurgeon.com/apc.JPG"><img class="alignnone" title="apc" src="http://unixsurgeon.com/apc.JPG" alt="" width="640" height="643" /></a></p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-7877248176171699";
google_ad_slot = "4635030684";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p style="text-align: center;">
]]></content:encoded>
			<wfw:commentRss>http://www.unixsurgeon.com/kb/make-apc-lo-error-1-apc-installation.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>make: *** [ffmpeg_frame.lo] Error 1</title>
		<link>http://www.unixsurgeon.com/kb/make-ffmpeg_frame-lo-error-1.html</link>
		<comments>http://www.unixsurgeon.com/kb/make-ffmpeg_frame-lo-error-1.html#comments</comments>
		<pubDate>Sat, 26 Feb 2011 20:27:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[FFMPEG]]></category>
		<category><![CDATA[Open Source Applications]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[FFMPEG-PHP]]></category>
		<category><![CDATA[ffmpeg_frame]]></category>
		<category><![CDATA[ffmpeg_frame.lo]]></category>
		<category><![CDATA[PIX_FMT_RGB32]]></category>

		<guid isPermaLink="false">http://www.unixsurgeon.com/kb/?p=226</guid>
		<description><![CDATA[Friends Today i have installed the ffmpeg through yum on my LAMP server,i got that error when i compile/install ffmpeg with php :-
Install FFMPEG-PHP Extension :-

FFmpeg-php is a very good extension and wrapper for PHP which can  pull useful information about video through API interface. Inorder to  install it you will need to [...]]]></description>
			<content:encoded><![CDATA[<p>Friends Today<strong> </strong>i have installed the ffmpeg through yum on my LAMP server,i got that error when i compile/install ffmpeg with php :-</p>
<p><span style="text-decoration: underline;"><strong>Install FFMPEG-PHP Extension :-</strong><br />
</span></p>
<p>FFmpeg-php is a very good extension and wrapper for PHP which can  pull useful information about video through API interface. Inorder to  install it you will need to download the source file and then compile  and install extension in your server.</p>
<p><strong># cd /usr/local/src</strong></p>
<p><strong>wget http://downloads.sourceforge.net/project/ffmpeg-php/ffmpeg-php/0.6.0/ffmpeg-php-0.6.0.tbz2?use_mirror=nchc</strong></p>
<p><strong>tar -xjf ffmpeg-php-0.6.0.tbz2</strong></p>
<p><strong>phpize</strong></p>
<p><strong># ./configure</strong><strong><br />
<strong># make</strong></strong></p>
<p>I got the following error when run the command make to compile Ffmpeg-php:<br />
make: *** [ffmpeg_frame.lo] Error 1<br />
<strong>There are two ways to fix this problem:-</strong></p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-7877248176171699";
google_ad_slot = "4635030684";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p><strong>*** First solution (highly recommended)</strong><br />
In the latest version of ffmpeg-php (0.6.0), you need to modify the file: ffmpeg_frame.c and replace every instance of PIX_FMT_RGBA32 with PIX_FMT_RGB32<br />
Using Linux text editor, vi run the following commands:<br />
<strong># vi ffmpeg_frame.c</strong></p>
<p>then use the below syntax to search &amp; replace the string</p>
<p><strong>:%s/PIX_FMT_RGBA32/PIX_FMT_RGB32</strong></p>
<p>Then save</p>
<p><strong>:wq!</strong><br />
Here, you should be back to the command line. Run these commands to compile and install FFmpeg-Php:<br />
<strong># ./configure</strong><br />
<strong># make</strong><br />
<strong># make install</strong><br />
Then it will install all the shared libraries related to ffmpeg in to php extensions directory:-<br />
Installing shared extensions:     /usr/local/lib/php/extensions/no-debug-non-zts-20090626/<br />
You can check the ffmpeg.so file through :-<br />
<strong># cd  /usr/local/lib/php/extensions/no-debug-non-zts-20090626</strong><br />
./  ../  eaccelerator.so*  ffmpeg.so*</p>
<p>________________________________________<br />
________________________________________<br />
<strong>*** Second solution</strong><br />
Run the following commands:<br />
<strong># cd /path/to/ffmpeg-php-0.6.0</strong><br />
<strong># cp -aP ffmpeg_frame.loT ffmpeg_frame.lo</strong><br />
<strong># make clean</strong><br />
<strong>#./configure</strong><br />
Then recompile and install ffmpeg.<br />
Here, you should be back to the command line. Run these commands to compile and install FFmpeg-Php:<br />
<strong># ./configure</strong><br />
<strong>#  make</strong><br />
<strong>#   make install</strong></p>
<p><a href="http://www.unixsurgeon.com/kb/how-to-install-ffmpeg-on-centosrhel-through-yum.html">Related post :- How to install ffmpeg on CentOS/RHEL throuhg YUM</a></p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-7877248176171699";
google_ad_slot = "4635030684";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.unixsurgeon.com/kb/make-ffmpeg_frame-lo-error-1.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to install ffmpeg on CentOS/RHEL through YUM</title>
		<link>http://www.unixsurgeon.com/kb/how-to-install-ffmpeg-on-centosrhel-through-yum.html</link>
		<comments>http://www.unixsurgeon.com/kb/how-to-install-ffmpeg-on-centosrhel-through-yum.html#comments</comments>
		<pubDate>Sat, 26 Feb 2011 18:34:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[FFMPEG]]></category>
		<category><![CDATA[Linux tutorials]]></category>
		<category><![CDATA[Open Source Applications]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[ffmpeg on centos via yum]]></category>
		<category><![CDATA[ffmpeg on RHEL via yum]]></category>
		<category><![CDATA[Yum]]></category>

		<guid isPermaLink="false">http://www.unixsurgeon.com/kb/?p=211</guid>
		<description><![CDATA[How to install ffmpeg on CentOS/RHELvia YUM :-
FFmpeg is very  important if you are planning to run a website with streaming with conversion of video files to different video formats. This post  provide you a walk through  for Centos/Redhat versions of Linux where user can install ffmpeg without compiling the source which is a more [...]]]></description>
			<content:encoded><![CDATA[<p><strong>How to install ffmpeg on CentOS/RHELvia YUM :-</strong></p>
<p><strong>FFmpeg</strong> is very  important if you are planning to run a website with streaming with conversion of video files to different video formats. This post  provide you a walk through  for <a href="http://www.mysql-apache-php.com/ffmpeg-install.htm">Centos</a>/Redhat versions of Linux where user can install ffmpeg without compiling the source which is a more traditional way of installing the FFmpeg software on linux servers. In this tutorial i will show you the easy way to install ffmpeg and ffmpeg-php (php extension) with just yum rather than compiling ffmpeg from source files.<strong> </strong></p>
<p>First we will have to install the DAG RPM repositories which contains huge amount of rpm packages. It’s very easy. Just install the latest rpmforge-release package for your distribution and architecture.</p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-7877248176171699";
google_ad_slot = "4635030684";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p>This will automatically install the configuration and GPG keys that are for safely installing RPMforge packages.</p>
<p>First :-</p>
<p># nano -w /etc/yum.repos.d/dag.repo</p>
<p>Insert :-</p>
<p>[dag]<br />
name=Dag RPM Repository for Red Hat Enterprise Linux<br />
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag<br />
gpgcheck=1<br />
enabled=1</p>
<p>Then save the repo file also you can update RPM through rpmforge :-</p>
<p>Please select the correct command from the following list:</p>
<p>* Supported Red Hat Enterprise Linux 5 / i386:</p>
<p><strong># rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm</strong></p>
<p>* Red Hat Enterprise Linux 5 / x86_64:</p>
<p><strong># rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS//rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm</strong></p>
<p>* Red Hat Enterprise Linux 4 / i386:</p>
<p><strong># rpm -Uhv http://apt.sw.be/redhat/el4/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el4.rf.i386.rpm</strong></p>
<p>* Red Hat Enterprise Linux 4 / x86_64:</p>
<p><strong># rpm -Uhv http://apt.sw.be/redhat/el4/en/x86_64/rpmforge/RPMS/rpmforge-release-0.3.6-1.el4.rf.x86_64.rpm</strong></p>
<p>* Red Hat Enterprise Linux 3 / i386:</p>
<p><strong># rpm -Uhv http://apt.sw.be/redhat/el3/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el3.rf.i386.rpm</strong></p>
<p>* Red Hat Enterprise Linux 3 / x86_64:</p>
<p><strong># rpm -Uhv http://apt.sw.be/redhat/el3/en/x86_64/rpmforge/RPMS/rpmforge-release-0.3.6-1.el3.rf.x86_64.rpm</strong></p>
<p>Then yum update and search for ffmpeg and install all ffmpeg packages including devel.</p>
<p>#  <strong>yum update</strong></p>
<p><span style="text-decoration: underline;">Installing FFMPEG.:-</span></p>
<p><strong># yum install ffmpeg ffmpeg-devel</strong></p>
<p>If Seems there is some lib problems along the way so in /etc/ld.so.conf add</p>
<p>/usr/local/lib</p>
<p>also check <strong>/etc/ld.so.conf.d</strong> and make sure there are no .conf files that may be loading other files.</p>
<p>then</p>
<p># <strong>ldconfig -v</strong></p>
<p><span style="text-decoration: underline;">Install FFMPEG-PHP Extension</span></p>
<p>FFmpeg-php is a very good extension and wrapper for PHP which can pull useful information about video through API interface. Inorder to install it you will need to download the source file and then compile and install extension in your server.</p>
<p><strong># cd /usr/local/src</strong></p>
<p><strong>wget http://downloads.sourceforge.net/project/ffmpeg-php/ffmpeg-php/0.6.0/ffmpeg-php-0.6.0.tbz2?use_mirror=nchc</strong></p>
<p><strong>tar -xjf ffmpeg-php-0.6.0.tbz2</strong></p>
<p><strong>phpize</strong></p>
<p><strong>./configure</strong><strong><br />
<strong>make</strong><br />
<strong>make install</strong></strong></p>
<p>Once you have done that without any problems then you will see the php extension file /usr/local/lib/php/extensions/no-debug-non-zts-20060613/ffmpeg.so and you will need mention that extension in php.ini file.</p>
<p><strong># nano /usr/local/lib/php.ini </strong></p>
<p><strong>or </strong></p>
<p><strong># Vi /usr/local/lib/php.ini</strong></p>
<p>Put the below two lines at the end of the php.ini file</p>
<p><strong>[ffmpeg]</strong><strong><br />
<strong>extension=ffmpeg.so</strong></strong></p>
<p>Then restart apache using — service httpd restart</p>
<p><span style="text-decoration: underline;">Installing Mplayer + Mencoder</span></p>
<p>Just issue the following yum commands to install the rest of the packages.</p>
<p><strong># yum install mplayer mencoder</strong></p>
<p><span style="text-decoration: underline;">Installing FlvTool2</span></p>
<p>Flvtool2 is a flash video file manipulation tool. It can calculate metadata and can cut and edit cue points for flv files.</p>
<p>If you are on Centos 5 try yum install flvtool2 with dag repository and if you get package not found you will need to manually download and compile the flvtool2. You can download latest version of flvtool2 from:-  <a title="http://rubyforge.org/projects/flvtool2/" href="http://rubyforge.org/projects/flvtool2/" target="_blank">http://rubyforge.org/projects/flvtool2/</a></p>
<p><strong># wget &lt;url-link&gt;</strong></p>
<p><strong># ruby setup.rb config</strong><strong><br />
<strong># ruby setup.rb setup</strong><br />
<strong># sudo ruby setup.rb install</strong></strong></p>
<p>If you get command not found error, it probably means that you dont have ruby installed. Being a cpanel server you can do that using <strong>/scripts/installruby OR yum install ruby</strong></p>
<p><strong>At last :- </strong><strong>Please restart the apache web server with the following command :-</strong></p>
<p><strong># /etc/init.d/httpd restart</strong></p>
<h2>To check the FFmpeg working:</h2>
<p>Finally, check the ffmpeg whether it is working or not.</p>
<p># <strong>ffmpeg</strong><br />
# <strong>ffmpeg -formats</strong></p>
<p># <strong>ffmpeg &#8211;help</strong> ( This lists path of mpeg, its modules and other path information)<br />
# <strong>ffmpeg -i Input.file Output.file</strong></p>
<h2>To check what audi/video formats are supported :-</h2>
<p>ffmpeg -formats &gt; ffmpeg-format.txt</p>
<p>Open the <strong>ffmpeg-formats.txt</strong> to see the ooutput</p>
<p>D means decode<br />
E means encode<br />
V means video<br />
A means audio<br />
T = Truncated</p>
<p><strong>To check whether FFMPEG integrated/enabled with PHP or not through phpinfo page</strong> :-</p>
<p><a href="http://www.unixsurgeon.com/ffmpeg-php-pic.JPG"><img alt="" src="http://www.unixsurgeon.com/ffmpeg-php-pic.JPG" title="ffmpeg.jpg" class="alignleft" width="631" height="246" /></a></p>
<p>Enjoy Linux !!!!</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-7877248176171699";
google_ad_slot = "4635030684";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.unixsurgeon.com/kb/how-to-install-ffmpeg-on-centosrhel-through-yum.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to enable the APC extension in php (Alternative PHP Cache).</title>
		<link>http://www.unixsurgeon.com/kb/how-to-enable-the-apc-extension-in-php-alternative-php-cache.html</link>
		<comments>http://www.unixsurgeon.com/kb/how-to-enable-the-apc-extension-in-php-alternative-php-cache.html#comments</comments>
		<pubDate>Mon, 10 Jan 2011 17:32:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[Alternative PHP Cache;APC;apc]]></category>

		<guid isPermaLink="false">http://www.unixsurgeon.com/kb/?p=199</guid>
		<description><![CDATA[Alternative PHP Cache (APC) is a free, open source framework that optimizes PHP intermediate code and caches data and compiled code from the PHP bytecode compiler in shared memory. What this means is that APC reads your PHP files, parses them into a more efficient binary format and then caches them in memory so that [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Alternative PHP Cache (APC)</strong> is a free, open source framework that optimizes PHP intermediate code and caches data and compiled code from the PHP bytecode compiler in shared memory. What this means is that APC reads your PHP files, parses them into a more efficient binary format and then caches them in memory so that each request for your PHP files and PHP library files can be fetch from the parsed cache. This will generally lead to a speed increase when serving a PHP site, especially one with a lot of library files. APC, allows your web server to save the compiled PHP so it can skip that compiling step. This can give your server a huge performance boost.</p>
<p>Please take the backup of php directory first because if anything goes wrong you can revert your configuration and then use the following steps to install the apc extension  :-</p>
<p>First of all we need to download the APC code from the PHP PECL library. So change directory to somewhere like /home or /usr/local/ and then get the latest version like so:</p>
<p># wget <a href="http://pecl.php.net/get/APC">http://pecl.php.net/get/APC</a></p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-7877248176171699";
google_ad_slot = "4635030684";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p>This will always get the latest version, downloaded APC-3.0.16.tgz like so:</p>
<p>Then you need to extract the files:</p>
<p># tar -zxvf APC-3.0.16.tgz</p>
<p>and change into the APC directory:</p>
<p># cd APC-3.0.16</p>
<p>The next step is to run the &#8220;phpize&#8221; command. This requires that you have PHP development package installed(Php-devel,. Installed by running &#8220;yum install php-devel&#8221;).</p>
<p># phpize</p>
<p>Then configure APC, telling it where the executable file php-config is. If you don&#8217;t know where this is, then do this:</p>
<p># whereis php-config</p>
<p>which will return something like:</p>
<p>phpize: /usr/bin/phpize</p>
<p>and then run the configure command like :-</p>
<p># ./configure &#8211;enable-apc &#8211;enable-apc-mmap &#8211;with-apxs=/usr/sbin/apxs(your apache apxs path) &#8211;with-php-config=/usr/bin/php-config(your php-config path)</p>
<p>Now that configure is done, it&#8217;s just a matter of running make :</p>
<p># make</p>
<p>&#8230;<br />
Libraries have been installed in:</p>
<p>/usr/local/APC-3.0.16/modules</p>
<p>and then make install:</p>
<p># make install</p>
<p>check your php.ini location by</p>
<p># php -i | grep php.ini</p>
<p>then open it with :-</p>
<p>#vi /www/apache-lms/php.ini</p>
<p>and go to the last line and paste the following :-</p>
<p>extension=&#8221;apc.so&#8221;</p>
<p>and restarting the Apache web server:</p>
<p># /etc/init.d/httpd restart</p>
<p>The APC cache will now be enabled. You can verify this by creating a script or custom page which calls the phpinfo() command and looking for the APC section. It will have been switched on by default by adding a &#8220;extension=apc.so&#8221; line to your /etc/php.ini file.</p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-7877248176171699";
google_ad_slot = "4635030684";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.unixsurgeon.com/kb/how-to-enable-the-apc-extension-in-php-alternative-php-cache.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>symbol lookup error: suhosin.so: undefined symbol: zend_atol</title>
		<link>http://www.unixsurgeon.com/kb/symbol-lookup-error-suhosin-so-undefined-symbol-zend_atol.html</link>
		<comments>http://www.unixsurgeon.com/kb/symbol-lookup-error-suhosin-so-undefined-symbol-zend_atol.html#comments</comments>
		<pubDate>Mon, 20 Sep 2010 11:30:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cpanel]]></category>
		<category><![CDATA[lamp server]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php: symbol lookup error]]></category>
		<category><![CDATA[symbol lookup error: suhosin.so]]></category>
		<category><![CDATA[undefined symbol: zend_atol]]></category>

		<guid isPermaLink="false">http://www.unixsurgeon.com/kb/?p=112</guid>
		<description><![CDATA[HI,
Today after updating my php and apache on the server. I was getting 500 internal error my website and i got below error on my server apache error logs.
“/usr/bin/php: symbol lookup error: /usr/local/lib/php/extensions/no-debug-non-zts-20060613/suhosin.so: undefined symbol: zend_atol”
The error message appears when an old application or software is upgraded to latest version. It may not cause issues [...]]]></description>
			<content:encoded><![CDATA[<p>HI,</p>
<p>Today after updating my php and apache on the server. I was getting 500 internal error my website and i got below error on my server apache error logs.</p>
<p>“/usr/bin/php: symbol lookup error: /usr/local/lib/php/extensions/no-debug-non-zts-20060613/suhosin.so: undefined symbol: zend_atol”</p>
<p>The error message appears when an old application or software is upgraded to latest version. It may not cause issues with all the applications but definitely does affect some of them.<br />
<script type="text/javascript"><!--
google_ad_client = "pub-7877248176171699";
google_ad_slot = "4635030684";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p>The only works when you enable suhosin.simulation for the account instead of disabling suhosin on the server.</p>
<p>You can perform this task by following ways :-</p>
<p>1.  By enabling suhosin.simulation in .htaccess file. If  susphp is not enabled on the server.</p>
<p>php_flag suhosin.simulation On</p>
<p>2.  By creating php.ini file under public_html/ directory. If  susphp is  enabled on the server.</p>
<p>suhosin.simulation On</p>
<p>If you are getting same error under wp-admin login page then copy your php.ini file under wp-admin/ directory and check once again.</p>
<p>Now you can check your application, Also there is no need to restart any service like apache&#8230;.It will work&#8230;!!!</p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-7877248176171699";
google_ad_slot = "4635030684";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.unixsurgeon.com/kb/symbol-lookup-error-suhosin-so-undefined-symbol-zend_atol.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to install JpGraph on linux server.</title>
		<link>http://www.unixsurgeon.com/kb/how-to-install-jpgraph.html</link>
		<comments>http://www.unixsurgeon.com/kb/how-to-install-jpgraph.html#comments</comments>
		<pubDate>Sat, 20 Dec 2008 12:48:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[jpgraph]]></category>
		<category><![CDATA[php & jpgraph]]></category>

		<guid isPermaLink="false">http://unixsurgeon.com/?p=5</guid>
		<description><![CDATA[I use JpGraph for some websites I run. It&#8217;s a PHP package that produces good-looking graphs.
Installing JpGraph
We&#8217;re going to need to be able to extract some stuff from some CAB files for starters.
Re-enable the yum Dag repository by setting enabled=1 in /etc/yum.repos.d/Dag.repo or  /etc/yum.repos.d/rhel-debuginfo.repo
Once that&#8217;s done, continue on. First we need to install cabextract, then [...]]]></description>
			<content:encoded><![CDATA[<p>I use JpGraph for some websites I run. It&#8217;s a PHP package that produces good-looking graphs.</p>
<p>Installing JpGraph</p>
<p>We&#8217;re going to need to be able to extract some stuff from some CAB files for starters.<br />
Re-enable the yum Dag repository by setting enabled=1 in /etc/yum.repos.d/Dag.repo or  /etc/yum.repos.d/rhel-debuginfo.repo<br />
Once that&#8217;s done, continue on. First we need to install cabextract, then get some Microsoft TT fonts or TTF fonts. See <a href="http://corefonts.sourceforge.net/" target="_new">http://corefonts.sourceforge.net/</a><br />
for updated instructions on that, otherwise:</p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-7877248176171699";
google_ad_slot = "4635030684";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p>[root@p-root /]# yum install cabextract<br />
[root@p-root /]# mkdir /usr/src/msttcorefonts<br />
[root@p-root /]# cd /usr/src/msttcorefonts<br />
[root@p-root /]# wget http://corefonts.sourceforge.net/msttcorefonts-2.0-1.spec<br />
[root@p-root /]# rpmbuild -bb msttcorefonts-2.0-1.spec</p>
<p>The fonts should be downloaded from SourceForge and compiled into an RPM. The new RPM will reside under the standard RPM build architecture. Install it:</p>
<p>[root@proot /]# rpm -ivh /usr/src/redhat/RPMS/noarch/msttcorefonts-2.0-1.noarch.rpm</p>
<p>Now for Jpgraph. Go to <a href="http://www.aditus.nu/jpgraph/jpdownload.php/" target="_new">http://www.aditus.nu/jpgraph/jpdownload.php/</a><br />
and get the download link for the latest version.</p>
<p>[root@proot /]# cd /srv/www<br />
[root@proot /]# wget <a href="http://www.aditus.nu/jpgraph/jpdownload.php/" target="_new">http://www.aditus.nu/jpgraph/jpdownload.php/</a><br />
[root@proot /]# tar zxvf jpgraph-[version].tar.gz<br />
[root@proot /]# ln -s jpgraph-[version]/ jpgraph<br />
[root@proot /]# rm jpgraph-[version].tar.gz</p>
<p>The JpGraph code sits above any website document roots I might have set up. I can include Jpgraph into my web code and use it there, but the code itself is not directly accessible from the web.</p>
<p>Disable the Dag repository again by setting enabled=0 in /etc/yum.repos.d/Dag.repo</p>
<p>Configure JpGraph:)</p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-7877248176171699";
google_ad_slot = "4635030684";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p>Edit /srv/www/jpgraph/src/jpg-config.inc.php and set the following line:<br />
DEFINE(&#8221;TTF_DIR&#8221;,&#8221;/usr/share/fonts/msttcorefonts/&#8221;);</p>
<p>Note: If fonts aren&#8217;t appearing in your graphs, make sure that you compiled PHP with the &#8220;-dir&#8221; options pointing to the right lib*.so files (/usr/lib)&#8230;:)</p>
<p>Enjoy linux&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;:)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.unixsurgeon.com/kb/how-to-install-jpgraph.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

