<?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</title>
	<atom:link href="https://wiki.centos-webpanel.com/category/php/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 Installation Failing</title>
		<link>https://wiki.centos-webpanel.com/php-installation-failing</link>
		<comments>https://wiki.centos-webpanel.com/php-installation-failing#comments</comments>
		<pubDate>Tue, 27 Sep 2022 18:07:39 +0000</pubDate>
		<dc:creator><![CDATA[publisher]]></dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://wiki.centos-webpanel.com/?p=1827</guid>
		<description><![CDATA[If you're experiencing PHP build failing you need to check the following requirements in order to fix the issue 1st case : you've low on RAM we recommend adding at least 1.5-2 Gb of available ram to compile PHP 7.xx and 8.xx as the compiler needs more memory for this version of PHP you can [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>If you're experiencing PHP build failing you need to check the following requirements in order to fix the issue</p>
<h2>1st case :</h2>
<p>you've low on RAM we recommend adding at least 1.5-2 Gb of available ram to compile PHP 7.xx and 8.xx as the compiler needs more memory for this version of PHP</p>
<p>you can check if you've sufficient RAM by this command :</p>
<pre>free -h
</pre>
<p>example output :</p>
<pre>root@server:~# free -h
               total        used        free      shared  buff/cache   available
Mem:           1.9Gi       328Mi        90Mi        56Mi       1.4Gi       1.5Gi
Swap:          2.0Gi        38Mi       1.9Gi
</pre>
<p>here you can see <strong>Mem</strong> which indicates the total RAM and you need to check the `<strong>available</strong>` memory which should be more than <strong>1.5Gb listed</strong></p>
<p>Also for low memory servers, we always recommend adding at least <strong>2Gb of Swap memory to prevent OOM</strong> (Out of memory) incidents.</p>
<h2>2nd Case :</h2>
<p>You're using an outdated OS that is already ON EOL period</p>
<p>Like Centos 6 and Centos 8 which are already in the EOL period and many repositories are disabled in this OS and you may experience non-availability of packages and dependencies which are required to build the PHP.</p>
<p>We always recommend upgrading you to Following OS :</p>
<p><strong>Centos 7</strong><br />
<strong>Centos 8 stream</strong><br />
<b>AlmaLinux 8</b><br />
<b>Rocky Linux 8</b><br />
<strong>Oracle Linux 7 and 8</strong></p>
<h2>3rd Case :</h2>
<p>Internet issue/Resolver issue</p>
<p>We've seen some cases where the OS resolver is not correctly set and many packages are not downloading due to the resolver failing.<br />
Ensure you have the correct resolver added in /etc/resolv.conf</p>
<p>you can add this lines at the end of the file in <strong>/etc/resolv.conf</strong> :</p>
<pre>nameserver 1.1.1.1
nameserver 8.8.8.8</pre>
<p>* Your server provider might also have some custom resolvers</p>
<p>Now lock the file :</p>
<pre>chattr +i /etc/resolv.conf</pre>
<p>The next step is to reboot the server :</p>
<pre>reboot</pre>
<p>Make sure you check the logs as it can be also any other reason</p>
]]></content:encoded>
			<wfw:commentRss>https://wiki.centos-webpanel.com/php-installation-failing/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Defender - Snuffleupagus</title>
		<link>https://wiki.centos-webpanel.com/php-defender-snuffleupagus</link>
		<comments>https://wiki.centos-webpanel.com/php-defender-snuffleupagus#comments</comments>
		<pubDate>Sun, 06 Feb 2022 19:51:55 +0000</pubDate>
		<dc:creator><![CDATA[publisher]]></dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[PHP Defender]]></category>
		<category><![CDATA[Snuffleupagus]]></category>

		<guid isPermaLink="false">http://wiki.centos-webpanel.com/?p=1732</guid>
		<description><![CDATA[PHP Defender - Snuffleupagus This is a PHP security module that has a custom configuration for each PHP version Supported PHP versions are PHP 7 and PHP 8. Configuration locations MAIN PHP-CGI /usr/local/php/php.d/snuffleupagus.ini Configuration locations PHP-FPM /opt/alt/php-fpm70/usr/php/php.d/snuffleupagus.ini /opt/alt/php-fpm71/usr/php/php.d/snuffleupagus.ini /opt/alt/php-fpm72/usr/php/php.d/snuffleupagus.ini /opt/alt/php-fpm73/usr/php/php.d/snuffleupagus.ini /opt/alt/php-fpm74/usr/php/php.d/snuffleupagus.ini /opt/alt/php-fpm80/usr/php/php.d/snuffleupagus.ini /opt/alt/php-fpm81/usr/php/php.d/snuffleupagus.ini Configuration locations PHP-CGI /opt/alt/php70/usr/php/php.d/snuffleupagus.ini /opt/alt/php72/usr/php/php.d/snuffleupagus.ini /opt/alt/php74/usr/php/php.d/snuffleupagus.ini /opt/alt/php71/usr/php/php.d/snuffleupagus.ini /opt/alt/php73/usr/php/php.d/snuffleupagus.ini /opt/alt/php80/usr/php/php.d/snuffleupagus.ini /opt/alt/php81/usr/php/php.d/snuffleupagus.ini Configuration files [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><strong>PHP Defender - Snuffleupagus</strong><br />
This is a PHP security module that has a custom configuration for each PHP version<br />
Supported PHP versions are PHP 7 and PHP 8.</p>
<p><strong>Configuration locations MAIN PHP-CGI</strong><br />
/usr/local/php/php.d/snuffleupagus.ini</p>
<p><strong>Configuration locations PHP-FPM</strong><br />
/opt/alt/php-fpm70/usr/php/php.d/snuffleupagus.ini<br />
/opt/alt/php-fpm71/usr/php/php.d/snuffleupagus.ini<br />
/opt/alt/php-fpm72/usr/php/php.d/snuffleupagus.ini<br />
/opt/alt/php-fpm73/usr/php/php.d/snuffleupagus.ini<br />
/opt/alt/php-fpm74/usr/php/php.d/snuffleupagus.ini<br />
/opt/alt/php-fpm80/usr/php/php.d/snuffleupagus.ini<br />
/opt/alt/php-fpm81/usr/php/php.d/snuffleupagus.ini</p>
<p><strong>Configuration locations PHP-CGI</strong><br />
/opt/alt/php70/usr/php/php.d/snuffleupagus.ini<br />
/opt/alt/php72/usr/php/php.d/snuffleupagus.ini<br />
/opt/alt/php74/usr/php/php.d/snuffleupagus.ini<br />
/opt/alt/php71/usr/php/php.d/snuffleupagus.ini<br />
/opt/alt/php73/usr/php/php.d/snuffleupagus.ini<br />
/opt/alt/php80/usr/php/php.d/snuffleupagus.ini<br />
/opt/alt/php81/usr/php/php.d/snuffleupagus.ini</p>
<p><strong>Configuration files are located in the folder</strong><br />
/usr/local/cwp/.conf/phpdefender</p>
<p><strong>Predefined rules are in the folder</strong><br />
/usr/local/cwp/.conf/phpdefender/rules/</p>
<p><strong>More info about it</strong></p>
<p>https://snuffleupagus.readthedocs.io/</p>
<p><strong>Module file location</strong> (depends on the PHP version)<br />
PHP-FPM: /opt/alt/php-fpm72/usr/lib/php/extensions/no-debug-non-zts-20151012/snuffleupagus.so<br />
PHP-CGI: /opt/alt/php72/usr/lib/php/extensions/no-debug-non-zts-20151012/snuffleupagus.so</p>
]]></content:encoded>
			<wfw:commentRss>https://wiki.centos-webpanel.com/php-defender-snuffleupagus/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache Proxy Timeout with PHP-FPM</title>
		<link>https://wiki.centos-webpanel.com/apache-proxy-timeout-with-php-fpm</link>
		<comments>https://wiki.centos-webpanel.com/apache-proxy-timeout-with-php-fpm#comments</comments>
		<pubDate>Wed, 28 Oct 2020 20:31:34 +0000</pubDate>
		<dc:creator><![CDATA[publisher]]></dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[proxy timeout]]></category>

		<guid isPermaLink="false">http://wiki.centos-webpanel.com/?p=1500</guid>
		<description><![CDATA[Apache has a default timeout of 60 seconds, you can increase it by creating a custom template in cwp. Follow this basic steps to increase the php timeout when using php-fpm : Copy the default templates and save/create it as timeout tpl and stpl: cd /usr/local/cwpsrv/htdocs/resources/conf/web_servers/vhosts/httpd/php-fpm/ cp default.stpl timeout.stpl cp default.tpl timeout.tpl Now you need [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Apache has a default timeout of 60 seconds, you can increase it by creating a custom template in cwp.<br />
Follow this basic steps to increase the php timeout when using php-fpm :</p>
<p><strong>Copy the default templates and save/create it as timeout tpl and stpl:</strong></p>
<pre>cd /usr/local/cwpsrv/htdocs/resources/conf/web_servers/vhosts/httpd/php-fpm/
cp default.stpl timeout.stpl
cp default.tpl timeout.tpl</pre>
<p>Now you need to edit the both templates "<strong>timeout.tpl</strong>" and "<strong>timeout.stpl</strong>" and add this line: </p>
<pre>ProxyTimeout 90</pre>
<p> under
<pre>&lt;IfModule proxy_fcgi_module&gt;</pre>
<p> and save it.</p>
<p>** ProxyTimeout 90 is the limit that allows the script to run for 90 seconds before it gets hit with the timeout threshold.<br />
Increase it according to your needs, please don't use too high numbers to avoid server overloads.</p>
<p>eg :</p>
<pre>&lt;IfModule proxy_fcgi_module&gt;
    ProxyTimeout 90
    &lt;FilesMatch \.php$&gt;
        SetHandler "proxy:%backend_fcgi%|fcgi://localhost"
    &lt;/FilesMatch&gt;
&lt;/IfModule&gt;</pre>
<p>Now all you need is to create a custom configuration under webserver domain config and select the template or choose this template as a default in the webserver main config.</p>
<p>More info about the custom templates can be found <a href="/webservers-vhost-templates" title="Webserver custom templates" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://wiki.centos-webpanel.com/apache-proxy-timeout-with-php-fpm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Configure PHP options under CWP-Admin and CWP-User</title>
		<link>https://wiki.centos-webpanel.com/how-to-configure-php-options-under-cwp-admin-and-cwp-user</link>
		<comments>https://wiki.centos-webpanel.com/how-to-configure-php-options-under-cwp-admin-and-cwp-user#comments</comments>
		<pubDate>Mon, 07 Sep 2020 19:44:58 +0000</pubDate>
		<dc:creator><![CDATA[publisher]]></dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHP configuration]]></category>

		<guid isPermaLink="false">http://wiki.centos-webpanel.com/?p=1438</guid>
		<description><![CDATA[In cwp there are two PHP configuration files i.e. "php.ini" and ".user.ini" for configuring user side PHP values/options. For ADMIN/root you can always adjust PHP options in respected PHP modules i.e. PHP edit option are added in the switcher, selector, and php-fpm selector. How to Edit root side php configuration file : Login to CWP [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>In cwp there are two PHP configuration files i.e. "php.ini" and ".user.ini" for configuring user side PHP values/options.<br />
For ADMIN/root you can always adjust PHP options in respected PHP modules i.e. PHP edit option are added in the switcher, selector, and php-fpm selector.</p>
<h2>How to Edit root side php configuration file :</h2>
<p>Login to CWP admin and navigate to <strong> cwpAdmin &gt;&gt; Php settings</strong> find the module name &gt;&gt; <strong>PHP.ini Configuration </strong>here you can edit php options, this module is only for <strong>php switcher/main php</strong></p>
<p>To edit php.ini for <strong>php-fpm</strong> selector navigate to <strong>cwpAdmin</strong> &gt;&gt; <strong>Php settings</strong> find the module name &gt;&gt; <strong>PHP-FPM Selector</strong>  and in this module you will be showed multi php version and for each version there is an "<strong>[Edit php.ini]</strong>" option you can do necessary changes there. Don't forget to reload/restart the fpm service after php options are modified.</p>
<p>To edit php.ini for <strong>php-cgi</strong> selector navigate to <strong>cwpAdmin</strong> &gt;&gt; <strong>Php settings</strong> find the module name &gt;&gt; <strong>PHP Selector 2</strong> and in this module you will be showed multi php version and for each version there is an "<strong>[Edit php.ini]</strong>" option you can do necessary changes there.</p>
<h2>How to create User side php configuration file :</h2>
<p>We have two options either the user needs to create the files manually (via file manager, FTP or sFTP) or edit the PHP options from the user panel option.</p>
<p><strong>Login to user panel find Edit php.ini option :</strong></p>
<p><img src="https://i.imgur.com/cK6pABY.png" alt="" /></p>
<p><strong>Now choose the desired domain name for which you want to create php.ini or .user.ini for in the doc root path, also you can disable some option by clicking on "tick mark" to toggle disable and enable options:</strong></p>
<p><img src="https://i.imgur.com/YBe6zDR.png" alt="" /></p>
<p>Once you edited the config click on the update changes button to save it.</p>
<p><strong>Also you can directly write your own PHP config in advanced php.ini editor :</strong></p>
<p><img src="https://i.imgur.com/fMOXvvB.png" alt="" /></p>
<p><strong>when creating manual PHP configuration</strong> via FTP, sFTP or file manager always create two .ini files with the same contents i.e. php.ini and .user.ini so when you switch fpm and CGI PHP respectively, so you don't need to come back to create them again.</p>
]]></content:encoded>
			<wfw:commentRss>https://wiki.centos-webpanel.com/how-to-configure-php-options-under-cwp-admin-and-cwp-user/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install MSSQL Freetds extension with PHP 5.x.x</title>
		<link>https://wiki.centos-webpanel.com/install-mssql-freetds-extension-with-php-5-x-x</link>
		<comments>https://wiki.centos-webpanel.com/install-mssql-freetds-extension-with-php-5-x-x#comments</comments>
		<pubDate>Mon, 07 Sep 2020 19:33:06 +0000</pubDate>
		<dc:creator><![CDATA[publisher]]></dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[MSSQL Freetds]]></category>

		<guid isPermaLink="false">http://wiki.centos-webpanel.com/?p=1436</guid>
		<description><![CDATA[These PHP functions allow you to access MS SQL Server database by using freetds. This tutorial will work with php 5.3.29 - php 5.6.40 only. For php 7.x use sqlsrv which is already in php options. To build MSSQL with php 5.6/5.x.x just follow this steps : Run this commands one by one (this will [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>These PHP functions allow you to access MS SQL Server database by using freetds.</p>
<blockquote><p><strong>This tutorial will work with php 5.3.29 - php 5.6.40 only.<br />
For php 7.x use sqlsrv which is already in php options.</strong></p></blockquote>
<p>To build MSSQL with php 5.6/5.x.x just follow this steps :</p>
<p>Run this commands one by one (this will install freetds and its header files) :</p>
<pre>yum install -y freetds freetds-devel freetds-libs
ln -s /usr/lib64/libsybdb.so.5.1.0 /usr/lib/libsybdb.so
ln -s /usr/lib64/libsybdb.so.5.1.0 /usr/lib64/libsybdb.so</pre>
<p>Now go to <strong><span style="color: #008000;">php selector/php-fpm selector</span></strong> and hit "<strong>Reset options</strong>" under <strong>php 5.6 (or 5.x.x)</strong> and add this to "<strong>Manual options</strong>" config then save it :</p>
<pre>[mssql]
default=0
option="--with-mssql"
info-file=config-path.txt
</pre>
<p>Next step is to choose the mssql option with your desired php ext options from "<strong>Select Options</strong>" and hit save custom config go "<strong>Back</strong>" and click on "<strong>Start Compiler (build &amp; install)</strong>" wait for the php build and check php info.</p>
]]></content:encoded>
			<wfw:commentRss>https://wiki.centos-webpanel.com/install-mssql-freetds-extension-with-php-5-x-x/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install MSSQL Freetds extension with PHP 5.x</title>
		<link>https://wiki.centos-webpanel.com/install-mssql-freetds-extension-with-php-5-x</link>
		<comments>https://wiki.centos-webpanel.com/install-mssql-freetds-extension-with-php-5-x#comments</comments>
		<pubDate>Mon, 17 Aug 2020 07:55:38 +0000</pubDate>
		<dc:creator><![CDATA[publisher]]></dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[MSSQL Freetds]]></category>

		<guid isPermaLink="false">http://wiki.centos-webpanel.com/?p=1428</guid>
		<description><![CDATA[These PHP functions allow you to access MS SQL Server database by using freetds. This tutorial will work with php 5.3.29 - php 5.6.40 only for php 7.x use sqlsrv which is already in php options. To build MSSQL with php 5.6/5.x.x just follow this steps : Run this commands one by one (this will [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>These PHP functions allow you to access MS SQL Server database by using freetds.</p>
<blockquote><p><strong>This tutorial will work with php 5.3.29 - php 5.6.40 only for php 7.x use sqlsrv which is already in php options.</strong></p></blockquote>
<p>To build MSSQL with php 5.6/5.x.x just follow this steps :</p>
<p>Run this commands one by one (this will install freetds and its header files) :</p>
<pre>yum install -y freetds freetds-devel freetds-libs
ln -s /usr/lib64/libsybdb.so.5.1.0 /usr/lib/libsybdb.so
ln -s /usr/lib64/libsybdb.so.5.1.0 /usr/lib64/libsybdb.so</pre>
<p>Now go to <strong><span style="color: #008000;">php selector/php-fpm selector</span></strong> and hit "<strong>Reset options</strong>" under <strong>php 5.6 (or 5.x.x)</strong> and add this to "<strong>Manual options</strong>" config then save it :</p>
<pre>[mssql]
default=0
option="--with-mssql"
info-file=config-path.txt
</pre>
<p>Next step is to choose the mssql option with your desired php ext options from "<strong>Select Options</strong>" and hit save custom config go "<strong>Back</strong>" and click on "<strong>Start Compiler (build &amp; install)</strong>" wait for the php build and check php info.</p>
]]></content:encoded>
			<wfw:commentRss>https://wiki.centos-webpanel.com/install-mssql-freetds-extension-with-php-5-x/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to disable dangerous php functions</title>
		<link>https://wiki.centos-webpanel.com/how-to-disable-dangerous-php-functions</link>
		<comments>https://wiki.centos-webpanel.com/how-to-disable-dangerous-php-functions#comments</comments>
		<pubDate>Wed, 06 May 2020 10:56:21 +0000</pubDate>
		<dc:creator><![CDATA[publisher]]></dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[disable dangerous php functions]]></category>

		<guid isPermaLink="false">http://wiki.centos-webpanel.com/?p=1363</guid>
		<description><![CDATA[These functions can be potentially dangerous in some scenarios for the security of your scripts and server you can always disable them. Run the below command for the PHP versions you need to disable those functions. PHP switcher : echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /usr/local/php/php.d/disabled_function.ini PHP-CGI selector : echo [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>These functions can be potentially dangerous in some scenarios for the security of your scripts and server you can always disable them.<br />
Run the below command for the PHP versions you need to disable those functions.</p>
<p><strong>PHP switcher :</strong></p>
<pre>
echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /usr/local/php/php.d/disabled_function.ini
</pre>
<p><strong>PHP-CGI selector :</strong></p>
<pre>
echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php53/usr/php/php.d/disabled_function.ini

echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php54/usr/php/php.d/disabled_function.ini

echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php55/usr/php/php.d/disabled_function.ini

echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php56/usr/php/php.d/disabled_function.ini

echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php70/usr/php/php.d/disabled_function.ini

echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php71/usr/php/php.d/disabled_function.ini

echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php72/usr/php/php.d/disabled_function.ini

echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php73/usr/php/php.d/disabled_function.ini
</pre>
<p><strong>PHP_FPM Selector :</strong><br />
<em>** Don't forget to restart php-fpm after changes</em></p>
<pre>
echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php-fpm53/usr/php/php.d/disabled_function.ini &#038;& service php-fpm53 restart

echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php-fpm54/usr/php/php.d/disabled_function.ini &#038;& service php-fpm54 restart

echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php-fpm55/usr/php/php.d/disabled_function.ini &#038;& service php-fpm55 restart

echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php-fpm56/usr/php/php.d/disabled_function.ini &#038;& service php-fpm56 restart

echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php-fpm70/usr/php/php.d/disabled_function.ini &#038;& service php-fpm70 restart

echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php-fpm71/usr/php/php.d/disabled_function.ini &#038;& service php-fpm71 restart

echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php-fpm72/usr/php/php.d/disabled_function.ini &#038;& service php-fpm72 restart

echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php-fpm73/usr/php/php.d/disabled_function.ini &#038;& service php-fpm73 restart
</pre>
<p>To enable it back, simply delete disabled_function.ini file for the PHP version you want and restart apache/php-fpm.</p>
]]></content:encoded>
			<wfw:commentRss>https://wiki.centos-webpanel.com/how-to-disable-dangerous-php-functions/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install Composer - PHP dependency manager</title>
		<link>https://wiki.centos-webpanel.com/install-composer-php-dependency-manager</link>
		<comments>https://wiki.centos-webpanel.com/install-composer-php-dependency-manager#comments</comments>
		<pubDate>Thu, 16 Apr 2020 21:39:22 +0000</pubDate>
		<dc:creator><![CDATA[publisher]]></dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHP Composer]]></category>

		<guid isPermaLink="false">http://wiki.centos-webpanel.com/?p=1351</guid>
		<description><![CDATA[Composer can be installed in your server quickly and it's very easy to install: First update the server : yum -y update Switch into the /usr/local/src directory. cd /usr/local/src Install Composer by using cURL curl -sS https://getcomposer.org/installer &#124; php To use Composer globally run this below command ensure to use as user and user should [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Composer can be installed in your server quickly and it's very easy to install:</p>
<p>First update the server :</p>
<pre>yum -y update</pre>
<p>Switch into the /usr/local/src directory.</p>
<pre>cd /usr/local/src</pre>
<p>Install Composer by using cURL</p>
<pre>curl -sS https://getcomposer.org/installer | php</pre>
<p>To use Composer globally run this below command ensure to use as user and user should have full shell access in order to use it :</p>
<pre>mv -f composer.phar /usr/local/bin/composer</pre>
<p>to check composer version :</p>
<pre>composer -V</pre>
<p>to run composer via different php version use full path of php bin and composer path eg :</p>
<pre>/usr/local/bin/php /usr/local/bin/composer command</pre>
<p>All selectors php bin path can be found in /opt/alt</p>
<p>eg :</p>
<pre>/opt/alt/php73/usr/bin/php /usr/local/bin/composer command
</pre>
]]></content:encoded>
			<wfw:commentRss>https://wiki.centos-webpanel.com/install-composer-php-dependency-manager/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to disable php/php-fpm selector</title>
		<link>https://wiki.centos-webpanel.com/how-to-disable-phpphp-fpm-selector</link>
		<comments>https://wiki.centos-webpanel.com/how-to-disable-phpphp-fpm-selector#comments</comments>
		<pubDate>Mon, 14 Oct 2019 11:02:45 +0000</pubDate>
		<dc:creator><![CDATA[publisher]]></dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[disable php selector]]></category>

		<guid isPermaLink="false">http://wiki.centos-webpanel.com/?p=1304</guid>
		<description><![CDATA[If you don't have CWPpro then you would need to deactivate php/php-fpm selector for all your sites. PHP-FPM Selector in CWP.admin left menu go to WebServer Settings --> Select WebServers at bottom uncheck "Force Apache to use PHP-FPM Selector" If you have used per domain conf then you would also need to make changes there [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>If you don't have CWPpro then you would need to deactivate php/php-fpm selector for all your sites.</p>
<p><strong>PHP-FPM Selector</strong><br />
in CWP.admin left menu go to WebServer Settings --> Select WebServers<br />
at bottom uncheck "Force Apache to use PHP-FPM Selector"</p>
<p>If you have used per domain conf then you would also need to make changes there<br />
in CWP.admin left menu go to WebServer Settings --> WebServers Domain Conf</p>
<p>select users who have active fpm and use button "Delete Configuration" or make changes to not use php-fpm by selecting php-cgi-</p>
<p><strong>PHP(cgi) Selector</strong><br />
Edit all .htaccess files and remove the custom lines starting like<br />
AddHandler application/x-httpd-phpXXX</p>
<p>Info:<br />
<a href="/php-selector" title="PHP Selector" target="_blank">http://wiki.centos-webpanel.com/php-selector</a></p>
]]></content:encoded>
			<wfw:commentRss>https://wiki.centos-webpanel.com/how-to-disable-phpphp-fpm-selector/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How many php versions I can run on the single server</title>
		<link>https://wiki.centos-webpanel.com/how-many-php-versions-i-can-run-on-the-single-server</link>
		<comments>https://wiki.centos-webpanel.com/how-many-php-versions-i-can-run-on-the-single-server#comments</comments>
		<pubDate>Fri, 25 Jan 2019 09:05:22 +0000</pubDate>
		<dc:creator><![CDATA[publisher]]></dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://wiki.centos-webpanel.com/?p=1089</guid>
		<description><![CDATA[With cwp we give you these 3 main tools to run php in many different ways. - PHP Switcher - PHP Selector - PHP-FPM Selector PHP Switcher This is the main PHP version in cwp which is used as a default for all new clients and domains. You can have only a single version active [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><object width="700" height="425"><param name="movie" value="https://www.youtube.com/v/SMbNIYdNTuk?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/SMbNIYdNTuk?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>With cwp we give you these 3 main tools to run php in many different ways.</p>
<p>- PHP Switcher<br />
- PHP Selector<br />
- PHP-FPM Selector</p>
<p><strong>PHP Switcher</strong><br />
This is the main PHP version in cwp which is used as a default for all new clients and domains.<br />
You can have only a single version active at the same time but you can select which you want to use, versions: 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3</p>
<p>More info: http://wiki.centos-webpanel.com/php-version-switcher</p>
<p><strong>PHP Selector</strong><br />
This are additional PHP versions which users can run all at the same time even as a different per folder, so you can run all versions at the same time and unlimited as a different per folder, versions: 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3</p>
<p>More info: http://wiki.centos-webpanel.com/php-selector</p>
<p><strong>PHP-FPM Selector</strong><br />
This are PHP-FPM versions, you need to activate them via "WebServers Domain Conf" from the left menu in the cwp.admin.<br />
You can run only a single PHP-FPM version per domain/subdomain but you can select any of the following versions: 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3<br />
Interesting here is that via "WebServers Domain Conf" you can run a different version for each domain/subdomain under the same account.</p>
<p>The best of all is that you combine almost all of them, here are the few examples:</p>
<p><strong>EXAMPLE</strong><br />
- domain cwp.com running main php version via PHP Switcher which is set to 5.6.<br />
- subfolder of domain cwp.com/admin/ is running PHP Selector with version 5.4<br />
- subfolder of domain cwp.com/admin/demo/ is running PHP Selector with version 5.3<br />
- subfolder of domain cwp.com/test/ is running PHP Selector with version 7.0<br />
- subdomain forum.cwp.com is running PHP-FPM Selector with version 7.2 via "WebServers Domain Conf"<br />
- subdomain demosite.cwp.com is running PHP-FPM Selector with version 7.1 via "WebServers Domain Conf"</p>
<p>* Important thing is that if you use "WebServers Domain Conf" to activate php-fpm for that domain then all subfolders will use that version, but you can add multiple domains or subdomains to the same folder/path location and then again use a different php/php-fpm version for each of them.</p>
<p>* Don't forget that via "WebServers Domain Conf" you can also use different WebServers setup, an example is to activate Nginx with php-fpm or to use nginx/apache with php-fpm...and many other options.</p>
<p>More detailed:<br />
<a href="http://forum.centos-webpanel.com/high-performance/cwp-webservers-detailed-info/" title="CWP - High-Performance WebServers" target="_blank">http://forum.centos-webpanel.com/high-performance/cwp-webservers-detailed-info/</a></p>
]]></content:encoded>
			<wfw:commentRss>https://wiki.centos-webpanel.com/how-many-php-versions-i-can-run-on-the-single-server/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
