<?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; Arun&#8217;s blog</title>
	<atom:link href="https://arunns.net/category/development/php/feed/" rel="self" type="application/rss+xml" />
	<link>https://arunns.net</link>
	<description>Arun&#039;s blog</description>
	<lastBuildDate>Sat, 20 Apr 2013 12:29:44 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.4.2</generator>
	<item>
		<title>Virus scanning for file uploads with clamav/php</title>
		<link>https://arunns.net/virus-scanning-for-file-uploads-with-clamavphp/</link>
					<comments>https://arunns.net/virus-scanning-for-file-uploads-with-clamavphp/#comments</comments>
		
		<dc:creator><![CDATA[Arun N.]]></dc:creator>
		<pubDate>Sat, 20 Apr 2013 12:29:44 +0000</pubDate>
				<category><![CDATA[Clamav]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[integrate antivirus with uploads]]></category>
		<category><![CDATA[LibClamAV Error: cl_load(): Can't get status of /var/lib/clamav]]></category>
		<category><![CDATA[php-clamav]]></category>
		<guid isPermaLink="false">http://arunnsblog.com/?p=751</guid>

					<description><![CDATA[Download and install the following packages, in case your repository has those package just use the management tool to install. Ubuntu/Debian/Mint # apt-get install clamav clamav-db clamd clamav-devel php-devel Redhat # yum install php-devel # wget http://pkgs.repoforge.org/clamav/clamav-0.97.7-1.el5.rf.i386.rpm # wget http://pkgs.repoforge.org/clamav/clamav-db-0.97.7-1.el5.rf.i386.rpm # wget http://pkgs.repoforge.org/clamav/clamd-0.97.7-1.el5.rf.i386.rpm # wget http://pkgs.repoforge.org/clamav/clamav-devel-0.97.7-1.el5.rf.i386.rpm # rpm -Uvh clam* # freshclam # service clamd [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Download and install the following packages, in case your repository has those package just use the management tool to install.</p>
<p>Ubuntu/Debian/Mint</p>
<blockquote><p># apt-get install clamav clamav-db clamd clamav-devel php-devel</p></blockquote>
<p>Redhat</p>
<blockquote><p># yum install php-devel<br />
# wget http://pkgs.repoforge.org/clamav/clamav-0.97.7-1.el5.rf.i386.rpm<br />
# wget http://pkgs.repoforge.org/clamav/clamav-db-0.97.7-1.el5.rf.i386.rpm<br />
# wget http://pkgs.repoforge.org/clamav/clamd-0.97.7-1.el5.rf.i386.rpm<br />
# wget http://pkgs.repoforge.org/clamav/clamav-devel-0.97.7-1.el5.rf.i386.rpm<br />
# rpm -Uvh clam*<br />
# freshclam<br />
# service clamd start</p></blockquote>
<p><strong>Configure php-clamav</strong></p>
<p>Download php-clamav from from sf.net</p>
<blockquote><p># wget http://downloads.sourceforge.net/project/php-clamav/0.15/php-clamav_0.15.7.tar.gz<br />
# tar xvzf php-clamav_0.15.7.tar.gz<br />
# cd php-clamav-0.15.7/<br />
# phpize<br />
#./configure &#8211;with-clamav<br />
# make<br />
# cp modules/clamav.so /usr/lib/php/modules/</p></blockquote>
<p>Add the modules to php.ini if required.</p>
<blockquote><p>extension=clamav.so</p></blockquote>
<p>Make sure the module is loaded</p>
<blockquote><p># php -i | grep -i clam<br />
clamav</p></blockquote>
<p>Incase you see the following error create a symlink to clamav path<br />
LibClamAV Error: cl_load(): Can&#8217;t get status of /var/lib/clamav</p>
<blockquote><p># ln -s /var/clamav /var/lib/clamav</p></blockquote>
<p>Test script<br />
Get the testing virus file from http://www.eicar.org/86-0-Intended-use.html and save it on a file (eg: /tmp/virus.txt)</p>
<p>Create a php script:<br />
cat &gt; check_virus.php<br />
<!--?php $file = '/tmp/virus.txt'; $retcode = cl_scanfile($file, $virusname); if ($retcode == CL_VIRUS) { echo ."Virus found name : ".$virusname; } else { echo .cl_pretcode($retcode); } ?--></p>
<blockquote><p>&lt;?php<br />
$file = &#8216;/tmp/testing.txt&#8217;;<br />
$retcode = cl_scanfile($file, $virusname);<br />
if ($retcode == CL_VIRUS) {<br />
echo .&#8221;Virus found name : &#8220;.$virusname;<br />
} else {<br />
echo .cl_pretcode($retcode);<br />
}<br />
?&gt;</p>
<p>$ php check_virus.php<br />
Virus found name : Eicar-Test-Signature</p></blockquote>
<p>./arun</p>
]]></content:encoded>
					
					<wfw:commentRss>https://arunns.net/virus-scanning-for-file-uploads-with-clamavphp/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Upgrading php to 5.2 or 5.3 in Redhat EL 5</title>
		<link>https://arunns.net/upgrading-php-to-5-2-or-5-3-in-redhat-el-5/</link>
					<comments>https://arunns.net/upgrading-php-to-5-2-or-5-3-in-redhat-el-5/#respond</comments>
		
		<dc:creator><![CDATA[Arun N.]]></dc:creator>
		<pubDate>Sun, 14 Aug 2011 13:22:13 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHP 5.2 in Redhat Enterprise Linux 5]]></category>
		<guid isPermaLink="false">http://arunnsblog.com/?p=553</guid>

					<description><![CDATA[Unfortunately RHEL 5 does not have php.5.2 package, which is required by most of the applications including latest wordpress and drupal. First thought of compiling php from source, but hard to keep it uptodate. So decided to make the life easier with EPEL/IUS repositories. Remove all existing php related packages: # rpm -e php php-mysql [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Unfortunately RHEL 5 does not have php.5.2 package, which is required by most of the applications including latest wordpress and drupal.</p>
<p>First thought of compiling php from source, but hard to keep it uptodate. So decided to make the life easier with EPEL/IUS repositories.</p>
<p>Remove all existing php related packages:</p>
<blockquote><p># rpm -e php php-mysql php-cli php-pdo php-common</p>
<p>Download and install the EPEL/IUS RPMs</p>
<p># wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/i386/epel-release-1-1.ius.el5.noarch.rpm</p>
<p># wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/i386/ius-release-1.0-8.ius.el5.noarch.rpm</p></blockquote>
<p>incase if the list not working just browse and find the rpm.</p>
<p>Install the RPMs</p>
<blockquote><p># rpm -Uvh *-release-*.rpm</p></blockquote>
<p>Now you can install php 5.2 or 5.3 like:</p>
<blockquote><p># yum install php52 php52-mysql</p></blockquote>
<p>./arun</p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://arunns.net/upgrading-php-to-5-2-or-5-3-in-redhat-el-5/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
