{"id":14226,"date":"2026-07-15T00:34:44","date_gmt":"2026-07-15T06:34:44","guid":{"rendered":"https:\/\/www.supportpro.com\/blog\/?p=14226"},"modified":"2026-07-15T00:34:47","modified_gmt":"2026-07-15T06:34:47","slug":"mastering-custom-php-module-installation-on-runcloud-a-step-by-step-guide","status":"publish","type":"post","link":"https:\/\/www.supportpro.com\/blog\/mastering-custom-php-module-installation-on-runcloud-a-step-by-step-guide\/","title":{"rendered":"Mastering Custom PHP Module Installation on RunCloud: A Step-by-Step Guide"},"content":{"rendered":"\n<p>RunCloud provides its own PHP versions, which are different from Ubuntu\u2019s default ones. So, instead of using apt-get install php-* to install PHP modules, which can cause conflicts with RunCloud&#8217;s setup, it\u2019s recommended that the modules be manually compiled and installed for compatibility.<\/p>\n\n\n\n<p>Below are the complete instructions for compiling and installing custom PHP modules on <strong><a href=\"https:\/\/www.supportpro.com\/blog\/is-runcloud-worth-it-cost-benefit-analysis\/\" title=\"\">RunCloud<\/a> Nginx<\/strong> servers.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>Before getting started, ensure that you have root access to the server. You can authenticate using either the root password or an SSH key.<\/p>\n\n\n\n<p><strong>Step 1:<\/strong><\/p>\n\n\n\n<p>The first step is to install the necessary development tools. The command below installs <strong>autoconf<\/strong> for configuration scripts and <strong>libpcre3-dev<\/strong> for developing regular expressions.<\/p>\n\n\n\n<p>apt-get install autoconf libpcre3-dev<\/p>\n\n\n\n<p>apt-get install libmcrypt-dev libreadline-dev<\/p>\n\n\n\n<p><strong>Step 2:<\/strong><\/p>\n\n\n\n<p>Next, download the necessary extension from PECL\u2014a repository for PHP extensions. You&#8217;ll need the source code archive to compile and install the extension on your system. Use the wget command to download the archived files.<\/p>\n\n\n\n<p>wget&nbsp; <a href=\"https:\/\/pecl.php.net\/get\/mcrypt-1.0.4.tgz\">https:\/\/pecl.php.net\/get\/<strong>e<\/strong><\/a><strong>xtension.version.tgz<\/strong><\/p>\n\n\n\n<p>Replace extension.version.tgz with the specific module and version you need. For example:<\/p>\n\n\n\n<p><strong>wget&nbsp; <\/strong><a href=\"https:\/\/pecl.php.net\/get\/mcrypt-1.0.4.tgz\"><strong>https:\/\/pecl.php.net\/get\/mcrypt-1.0.4.tgz<\/strong><\/a><\/p>\n\n\n\n<p>In the example above, <strong>mcrypt<\/strong> is the module name, and <strong>1.0.4<\/strong> is the version.<\/p>\n\n\n\n<p><strong>Step 3:<\/strong><\/p>\n\n\n\n<p>Change the directory to the extracted module directory.<\/p>\n\n\n\n<p><strong>cd extension.version.tgz<\/strong><\/p>\n\n\n\n<p><strong>&nbsp;<\/strong><strong>Step 4:<\/strong><\/p>\n\n\n\n<p><strong>Installing the module:<\/strong><\/p>\n\n\n\n<p><strong><em>#<\/em><\/strong><em>Clean Previous Builds:<\/em><\/p>\n\n\n\n<p>make clean<\/p>\n\n\n\n<p><strong><em>#<\/em><\/strong><em>Clean the PHPize Build Environment<\/em><\/p>\n\n\n\n<p>\/RunCloud\/Packages\/<strong>phpXXrc<\/strong>\/bin\/phpize &#8211;clean<\/p>\n\n\n\n<p><em>#Prepare the Build Environment with PHPize<\/em><\/p>\n\n\n\n<p>\/RunCloud\/Packages\/<strong>phpXXrc<\/strong>\/bin\/phpize<\/p>\n\n\n\n<p><em>#Configure the Build<\/em><\/p>\n\n\n\n<p>.\/configure &#8211;with-php-config=\/RunCloud\/Packages\/<strong>phpXXrc<\/strong>\/bin\/php-config &#8211;with-libdir=lib64 CFLAGS=&#8217;-O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -Wall -pedantic -fsigned-char -fno-strict-aliasing&#8217;<\/p>\n\n\n\n<p><strong>Note:<\/strong> The &#8216;<strong>XX&#8217;<\/strong> in the commands above should be replaced with the PHP version for which you need the module installed. For example, if you&#8217;re working with PHP 7.4, use &#8216;php74rc,&#8217; and for PHP 8.3, use &#8216;php83rc.<\/p>\n\n\n\n<p><em>#Compile and Install the Extension<\/em><\/p>\n\n\n\n<p>make install<\/p>\n\n\n\n<p><em>#Enable the Extension in PHP<\/em><\/p>\n\n\n\n<p>echo &#8220;extension=<strong>extension.so<\/strong>&#8221; &gt; \/etc\/php<strong>XX<\/strong>rc\/conf.d\/mcrypt.ini<\/p>\n\n\n\n<p>Change the \u201cextension\u201d in the above command to the name of the extension. For example:<\/p>\n\n\n\n<p>echo &#8220;extension=<strong>mcrypt.so<\/strong>&#8221; &gt; \/etc\/ph<strong>p74rc<\/strong>\/conf.d\/mcrypt.ini<\/p>\n\n\n\n<p><strong>Step 5:<\/strong><\/p>\n\n\n\n<p>Final step of the installation procedure, restart the PHP-fpm service and verify the installation.<\/p>\n\n\n\n<p>systemctl restart php<strong>XX<\/strong>rc-fpm&nbsp;&nbsp;<\/p>\n\n\n\n<p>\/RunCloud\/Packages\/php<strong>XX<\/strong>rc\/bin\/php -m&nbsp;<\/p>\n\n\n\n<p>Remember to replace the \u201cXX\u201d with the correct PHP version.<\/p>\n\n\n\n<p>Example:<\/p>\n\n\n\n<p>systemctl restart php<strong>74<\/strong>rc-fpm&nbsp;&nbsp;<\/p>\n\n\n\n<p>\/RunCloud\/Packages\/php74rc\/bin\/php -m | mcrypt<\/p>\n\n\n\n<div class=\"wp-block-media-text alignwide has-media-on-the-right is-stacked-on-mobile is-vertically-aligned-center has-white-background-color has-background\"><div class=\"wp-block-media-text__content\">\n<p class=\"has-large-font-size\">Facing issues? <\/p>\n\n\n\n<p class=\"has-large-font-size\">Our technical support<br>engineers can solve it. <\/p>\n\n\n\n<!--HubSpot Call-to-Action Code --><span class=\"hs-cta-wrapper\" id=\"hs-cta-wrapper-3350a795-db50-482f-9911-301930d1b1be\"><span class=\"hs-cta-node hs-cta-3350a795-db50-482f-9911-301930d1b1be\" id=\"hs-cta-3350a795-db50-482f-9911-301930d1b1be\"><!--[if lte IE 8]><div id=\"hs-cta-ie-element\"><\/div><![endif]--><a href=\"https:\/\/cta-redirect.hubspot.com\/cta\/redirect\/2725694\/3350a795-db50-482f-9911-301930d1b1be\" ><img class=\"hs-cta-img\" id=\"hs-cta-img-3350a795-db50-482f-9911-301930d1b1be\" style=\"border-width:0px;\" src=\"https:\/\/no-cache.hubspot.com\/cta\/default\/2725694\/3350a795-db50-482f-9911-301930d1b1be.png\"  alt=\"Contact Us today!\"\/><\/a><\/span><script charset=\"utf-8\" src=\"https:\/\/js.hscta.net\/cta\/current.js\"><\/script><script type=\"text\/javascript\"> hbspt.cta.load(2725694, '3350a795-db50-482f-9911-301930d1b1be', {\"useNewLoader\":\"true\",\"region\":\"na1\"}); <\/script><\/span><!-- end HubSpot Call-to-Action Code -->\n<\/div><figure class=\"wp-block-media-text__media\"><img width=\"904\" height=\"931\" src=\"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup.png\" alt=\"guy server checkup\" class=\"wp-image-12943 size-full\" srcset=\"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup.png 904w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup-291x300.png 291w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup-768x791.png 768w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup-585x602.png 585w\" sizes=\"(max-width: 904px) 100vw, 904px\" \/><\/figure><\/div>\n","protected":false},"excerpt":{"rendered":"<p>RunCloud provides its own PHP versions, which are different from Ubuntu\u2019s default ones. So, instead of using apt-get install php-* to install PHP modules, which can cause conflicts with RunCloud&#8217;s&hellip;<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/14226"}],"collection":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/comments?post=14226"}],"version-history":[{"count":2,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/14226\/revisions"}],"predecessor-version":[{"id":17769,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/14226\/revisions\/17769"}],"wp:attachment":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/media?parent=14226"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/categories?post=14226"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/tags?post=14226"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}