<?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>Control WebPanel Wiki &#187; php switcher</title>
	<atom:link href="https://wiki.centos-webpanel.com/tag/php-switcher/feed" rel="self" type="application/rss+xml" />
	<link>https://wiki.centos-webpanel.com</link>
	<description>CentOS WebPanel Wiki</description>
	<lastBuildDate>Wed, 12 Feb 2025 20:38:16 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.1.1</generator>
	<item>
		<title>PHP Version Switcher</title>
		<link>https://wiki.centos-webpanel.com/php-version-switcher</link>
		<comments>https://wiki.centos-webpanel.com/php-version-switcher#comments</comments>
		<pubDate>Tue, 24 Feb 2015 01:19:46 +0000</pubDate>
		<dc:creator><![CDATA[publisher]]></dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[php switcher]]></category>

		<guid isPermaLink="false">http://wiki.centos-webpanel.com/?p=30</guid>
		<description><![CDATA[Now CWP has a PHP Switch option where you can very easily switch to other PHP versions and recompile it with desired modules. How to use it? - Click on PHP Version Switcher (here you will get server PHP version and compiled modules that your server has now compiled). - Select PHP Version you wish [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><object width="700" height="425"><param name="movie" value="https://www.youtube.com/v/lCkAnJwLQ3w?version=3&amp;showinfo=0&amp;theme=light&amp;fs=1&amp;rel=0&amp;iv_load_policy=3&amp;modestbranding=1"></param><param name="allowScriptAccess" value="always"></param><param name="allowFullScreen" value="true"></param><embed src="https://www.youtube.com/v/lCkAnJwLQ3w?version=3&amp;showinfo=0&amp;theme=light&amp;fs=1&amp;rel=0&amp;iv_load_policy=3&amp;modestbranding=1" type="application/x-shockwave-flash" allowScriptAccess="always" allowfullscreen="true" width="700" height="425"></embed></object></p>
<p>Now CWP has a PHP Switch option where you can very easily switch to other PHP versions and recompile it with desired modules.<br />
<strong><br />
How to use it?</strong><br />
- Click on PHP Version Switcher (here you will get server PHP version and compiled modules that your server has now compiled).<br />
- Select PHP Version you wish to compile in the drop-down menu and click next.<br />
- In PHP compiler you can add or remove modules you want.<br />
- Click on the Start compiler and the compiler will start to work in the background.</p>
<p>The compiler needs from 5 to 20 minutes to finish, depending on modules you are installing and your CPU power.<br />
You can return in eg. 15 minutes and in CWP - PHP Version Switch check which version of PHP and modules you have now.</p>
<p>Your websites and CWP will work during the compiler process and PHP will be updated when the compiler is completed.</p>
<p>You can check for PHP compile logs in the file:<br />
<code>/var/log/php-rebuild.log</code></p>
<p>If you wish to monitor compiler then use this command from the shell:<br />
<code>tail -f /var/log/php-rebuild.log</code></p>
<p><strong>How to add custom build flags to php switcher?</strong><br />
This can be done by editing configuration files, configuration files are located here:<br />
CentOS 7: /usr/local/cwpsrv/htdocs/resources/conf/el7/php_switcher/<br />
CentOS 8: /usr/local/cwpsrv/htdocs/resources/conf/el8/php_switcher/</p>
<p>Example:<br />
/usr/local/cwpsrv/htdocs/resources/conf/el7/php_switcher/7.0.ini</p>
<p>And at end of this file we add:</p>
<pre>[shmop-test]
default=0
option="--enable-shmop"</pre>
<p>Under square brackets <strong>[shmop-test]</strong> you create the name you will use for build, must be unique and not previously defined in the file.<br />
Under <strong>option</strong> you need to define build flags.</p>
<p>After editing you are ready to build your new PHP from CWP PHP switcher.</p>
<p><em>** Please note that cwp update will overwrite this files!</em></p>
]]></content:encoded>
			<wfw:commentRss>https://wiki.centos-webpanel.com/php-version-switcher/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
