{"id":29886,"date":"2021-01-17T18:47:34","date_gmt":"2021-01-17T10:47:34","guid":{"rendered":"https:\/\/web.mwwsb.com.my\/pjci\/?post_type=kb&p=29886"},"modified":"2023-01-18T11:52:18","modified_gmt":"2023-01-18T03:52:18","slug":"security-update-secure-and-update-your-php","status":"publish","type":"kb","link":"https:\/\/www.casbay.com\/guide\/kb\/security-update-secure-and-update-your-php","title":{"rendered":"SECURITY UPDATE: Secure and Update your PHP"},"content":{"rendered":"\t\t
It is extremely important to secure your PHP and to keep your PHP version up to date in order to minimize security vulnerability. Therefore, here are the security enhancements we recommend you to apply: <\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
ModSecurity is an open source for web applications intrusion detection \/ prevention engine. In other words, as an Apache Web server module, the purpose of ModSecurity is to increase web application security and protect web applications from known and unknown attacks.<\/p>
Step of installation for ModSecurity: 2) Then, Download apply the ModSecurity rules.<\/strong> 3) Next, Remove unwanted rules. <\/strong> 4) Lastly, Restart apache service.<\/strong> The hardenedPHP patch is a patch that adds security hardening features to PHP to protect your servers from a number of well-known issues in PHP applications. It also safeguards the servers from potential unknown vulnerabilities within those applications or the PHP core itself.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t ** NOTE: mod_security and Suhosin were not fully tested with Plesk Sitebuilder. Therefore, if you are using Plesk Sitebuilder, it is recommended to disable mod_security and Suhosin on the publishing server.<\/p> Installation steps for Suhosin: 2) Secondly, Add a load directive to php.ini.<\/strong> 3) Then, Restart apache service.<\/strong> << PLESK Users >><\/strong><\/p> Mod_security and Suhosin were not fully tested with Plesk Sitebuilder. In addition, if you are using Plesk Sitebuilder, it is recommended to disable mod_security and Suhosin on the publishing server.<\/p> << CPANEL\/WHM Users >><\/strong><\/p> For server pre-installed with cPanel, you will only need to enable the ModSecurity module and Suhosin module from the EasyApache and recompile the Apache.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
1) Firstly, Download yum repo and install the ModSecurity using yum.<\/strong>#wget -q -O \u2013| sh<\/code>#yum install mod_security<\/code><\/p>#cd\/etc\/httpd\/modsecurity.d && wget
#tar \u2013xvvzf modsec-2.5-free-latest.tar.gz<\/code><\/p>#cd\/etc\/httpd\/modsecurity.d && rm -Rf 00_asl_rbl.conf 00_asl_whitelist.conf<\/code><\/p>#\/etc\/init.d\/httpd restart<\/code><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t2) Install PHP HardenedPHP patch<\/h3>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
3) Keep your Plesk version and application version up to date<\/h3>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
1) Firstly, Download suhosin and install it.<\/strong>#cd\/usr\/local\/<\/code?
\n#wget<\/code>#tar-zxvf suhosin-0.9.18.tgz<\/code>#cd suhosin-0.9.18<\/code>#phpize<\/code>#.\/configure<\/code>#make && make install<\/code><\/code><\/p>#extension=suhosin.so<\/code><\/p>#\/etc\/init.d\/httpd restart<\/code><\/p>