{"id":67,"date":"2015-04-27T10:19:22","date_gmt":"2015-04-27T10:19:22","guid":{"rendered":"http:\/\/betakb.veeble.org\/?p=67"},"modified":"2025-04-28T12:01:29","modified_gmt":"2025-04-28T06:31:29","slug":"recompiling-apachephp-easyapache","status":"publish","type":"post","link":"https:\/\/www.veeble.com\/kb\/recompiling-apachephp-easyapache\/","title":{"rendered":"How to Recompile Apache\/PHP and Manage Modules in cPanel"},"content":{"rendered":"<p>In servers without any control panel you might have installed Apache\/PHP modules after downloading the source files. However, in cPanel servers, you can upgrade\/downgrade Apache\/PHP or add\/remove it&#8217;s modules using EasyApache via WHM or using script via back-end (shell).<\/p>\n<div id=\"toc\" class=\"toc\">\n<div id=\"toctitle\">\n<h2>Contents<\/h2>\n<\/div>\n<ul>\n<li class=\"toclevel-1 tocsection-1\"><a href=\"#Before_recompiling_Apache.2FPHP\"><span class=\"tocnumber\">1<\/span> <span class=\"toctext\">Before recompiling Apache\/PHP<\/span><\/a><\/li>\n<li class=\"toclevel-1 tocsection-2\"><a href=\"#Via_WHM_interface\"><span class=\"tocnumber\">2<\/span> <span class=\"toctext\">Via WHM interface<\/span><\/a><\/li>\n<li class=\"toclevel-1 tocsection-3\"><a href=\"#Via_back-end_.28shell.29\"><span class=\"tocnumber\">3<\/span> <span class=\"toctext\">Via back-end (shell)<\/span><\/a><\/li>\n<li class=\"toclevel-1 tocsection-4\"><a href=\"#Post_Recompilation\"><span class=\"tocnumber\">4<\/span> <span class=\"toctext\">Post Recompilation<\/span><\/a><\/li>\n<li class=\"toclevel-1 tocsection-5\"><a href=\"#Related_files\"><span class=\"tocnumber\">5<\/span> <span class=\"toctext\">Related files<\/span><\/a><\/li>\n<li class=\"toclevel-1 tocsection-6\"><a href=\"#Advanced\"><span class=\"tocnumber\">6<\/span> <span class=\"toctext\">Advanced<\/span><\/a><\/li>\n<\/ul>\n<\/div>\n<h2><span id=\"Before_recompiling_Apache.2FPHP\" class=\"mw-headline\">Before recompiling Apache\/PHP<\/span><\/h2>\n<p>You should take precautions before proceeding with the recompilation. Make sure you do the following before initiating the recompilation.<\/p>\n<p>1. Take a backup of apache and php configuration files.<\/p>\n<pre>mkdir \/root\/back\ncp -a \/usr\/local\/apache\/conf \/root\/back\ncp -a \/usr\/local\/lib\/php.ini \/root\/back\n<\/pre>\n<p>2. Keep a list if the Apache and php modules enabled in the server.<\/p>\n<pre>touch \/root\/back\/modules_list\nphp -v &gt;&gt; \/root\/back\/modules_list\nphp -m &gt;&gt; \/root\/back\/modules_list\nhttpd -v &gt;&gt; \/root\/back\/modules_list\nhttpd -M &gt;&gt; \/root\/back\/modules_list\n<\/pre>\n<p>3. If you plan to upgrade the PHP on the server, make sure that the scripts present in the server are compatible with the new version. Some functions may be deprecated in the new version. For example, if you upgrade PHP to the version 5.3 [these INI directives\/features\/functions are deprecated <a class=\"external free\" href=\"http:\/\/php.net\/manual\/en\/migration53.deprecated.php\" rel=\"nofollow noopener\" target=\"_blank\">http:\/\/php.net\/manual\/en\/migration53.deprecated.php<\/a> ]<\/p>\n<h2><span id=\"Via_WHM_interface\" class=\"mw-headline\">Via WHM interface<\/span><\/h2>\n<p>1. Login to WHM (http:\/\/<i>ipaddress<\/i>:2086\/) using the root login credentials.<\/p>\n<p>2. Select <b>Software &gt;&gt; EasyApache (Apache Update)<\/b>.<\/p>\n<p><a href=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2015\/04\/ss5.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-69 aligncenter\" src=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2015\/04\/ss5-300x167.png\" alt=\"ss5\" width=\"632\" height=\"352\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2015\/04\/ss5-300x167.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2015\/04\/ss5-1024x569.png 1024w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2015\/04\/ss5.png 1138w\" sizes=\"auto, (max-width: 632px) 100vw, 632px\" \/><\/a><\/p>\n<p>3. Select <b>start customizing based on a profile<\/b>.<\/p>\n<p>4. Select Apache version.<\/p>\n<p>5. Select PHP version.<\/p>\n<p>6. Select <b>Exhaustive Options List<\/b><\/p>\n<p>7. Tick\/un-tick appropriate modules and press &#8216;Save and Build&#8217;.<\/p>\n<p>8. Save and Build\u00a0!!<\/p>\n<h2><span id=\"Via_back-end_.28shell.29\" class=\"mw-headline\">Via back-end (shell)<\/span><\/h2>\n<p>1. Login to the server as root.<\/p>\n<pre>ssh root@<i>ipaddress<\/i> -p<i>port<\/i>\n<\/pre>\n<p>2. Run the script easyapache<\/p>\n<pre>\/scripts\/easyapache\n<\/pre>\n<p>3. Now select appropriate versions and modules as mentioned before.<\/p>\n<h2><span id=\"Post_Recompilation\" class=\"mw-headline\">Post Recompilation<\/span><\/h2>\n<p>1. Check the versions of apache and PHP.<\/p>\n<p>2. Crosscheck whether the modules are enabled.<\/p>\n<p>3. Check whether the sites are loading fine.<\/p>\n<h2><span id=\"Related_files\" class=\"mw-headline\">Related files<\/span><\/h2>\n<p>The script:<\/p>\n<pre>\/usr\/local\/cpanel\/scripts\/easyapache\n<\/pre>\n<p>The files related to EasyApache are located in the following directories.<\/p>\n<pre>\/var\/cpanel\/easy\/apache\n\/home\/cpeasyapache\n\n<\/pre>\n<p>Logs\u00a0:<\/p>\n<pre>\/usr\/local\/cpanel\/logs\/easy\/apache\/\n<\/pre>\n<h2><span id=\"Advanced\" class=\"mw-headline\">Advanced<\/span><\/h2>\n<p>If you do not see the module you need in the easyapache, you can add custom modules to easy apache. Follow the <a class=\"external text\" href=\"http:\/\/docs.cpanel.net\/twiki\/bin\/view\/EasyApache3\/CustomMods\" rel=\"nofollow noopener\" target=\"_blank\">steps mentioned here<\/a>.<\/p>\n<p>You can read about saving custom options in EasyApache, <a class=\"external text\" href=\"http:\/\/docs.cpanel.net\/twiki\/bin\/view\/EasyApache3\/SavingCustomOptions\" rel=\"nofollow noopener\" target=\"_blank\">from here<\/a>.<\/p>\n\n\n<div style=\"height:25px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-uagb-call-to-action uagb-block-945cbce9 wp-block-button\"><div class=\"uagb-cta__wrap\"><h3 class=\"uagb-cta__title\">Expert Magento Support 24\/7<\/h3><p class=\"uagb-cta__desc\">Need help? Our Magento-savvy support team is available around the clock via chat, phone, and ticket to solve issues fast.<\/p><\/div><div class=\"uagb-cta__buttons\"><a href=\"https:\/\/www.veeble.com\/in\/magento-hosting\/\" class=\"uagb-cta__button-link-wrapper wp-block-button__link\" target=\"_blank\" rel=\"noopener noreferrer\">Choose Your Plan<svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\"><path d=\"M504.3 273.6l-112.1 104c-6.992 6.484-17.18 8.218-25.94 4.406c-8.758-3.812-14.42-12.45-14.42-21.1L351.9 288H32C14.33 288 .0002 273.7 .0002 255.1S14.33 224 32 224h319.9l0-72c0-9.547 5.66-18.19 14.42-22c8.754-3.809 18.95-2.075 25.94 4.41l112.1 104C514.6 247.9 514.6 264.1 504.3 273.6z\"><\/path><\/svg><\/a><\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>In servers without any control panel you might have installed Apache\/PHP modules after downloading the source files. However, in cPanel servers, you can upgrade\/downgrade [&hellip;]<\/p>\n","protected":false},"author":10,"featured_media":8754,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[4],"tags":[],"class_list":["post-67","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cpanel"],"uagb_featured_image_src":{"full":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2015\/04\/How-to-Recompile-ApachePHP-and-Manage-Modules-in-cPanel.jpg",1366,768,false],"thumbnail":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2015\/04\/How-to-Recompile-ApachePHP-and-Manage-Modules-in-cPanel-150x150.jpg",150,150,true],"medium":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2015\/04\/How-to-Recompile-ApachePHP-and-Manage-Modules-in-cPanel-300x169.jpg",300,169,true],"medium_large":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2015\/04\/How-to-Recompile-ApachePHP-and-Manage-Modules-in-cPanel-768x432.jpg",768,432,true],"large":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2015\/04\/How-to-Recompile-ApachePHP-and-Manage-Modules-in-cPanel-1024x576.jpg",1024,576,true],"1536x1536":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2015\/04\/How-to-Recompile-ApachePHP-and-Manage-Modules-in-cPanel.jpg",1366,768,false],"2048x2048":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2015\/04\/How-to-Recompile-ApachePHP-and-Manage-Modules-in-cPanel.jpg",1366,768,false]},"uagb_author_info":{"display_name":"Vipin Raj","author_link":"https:\/\/www.veeble.com\/kb\/author\/vipin\/"},"uagb_comment_info":0,"uagb_excerpt":"In servers without any control panel you might have installed Apache\/PHP modules after downloading the source files. However, in cPanel servers, you can upgrade\/downgrade [&hellip;]","_links":{"self":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/67","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/comments?post=67"}],"version-history":[{"count":5,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/67\/revisions"}],"predecessor-version":[{"id":8755,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/67\/revisions\/8755"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/media\/8754"}],"wp:attachment":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/media?parent=67"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/categories?post=67"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/tags?post=67"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}