{"id":3395,"date":"2020-06-01T13:18:52","date_gmt":"2020-06-01T18:18:52","guid":{"rendered":"http:\/\/www.incredigeek.com\/home\/?p=3395"},"modified":"2020-06-01T13:35:10","modified_gmt":"2020-06-01T18:35:10","slug":"cpanel-whm-enable-shell-exec","status":"publish","type":"post","link":"https:\/\/www.incredigeek.com\/home\/cpanel-whm-enable-shell-exec\/","title":{"rendered":"cPanel\/WHM enable shell_exec"},"content":{"rendered":"\n<p>SSH into WHM server<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ssh root@cpanel.host.com<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Modify Website php-fpm Config File<\/h2>\n\n\n\n<p>Edit the following config file.  Replace &#8220;website.com&#8221; with the website your enabling the shell_exec for<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">vi \/opt\/cpanel\/ea-php72\/root\/etc\/php-fpm.d\/<strong>website.com<\/strong>.conf<\/pre>\n\n\n\n<p>Locate the following line and remove shell_exec from the list of disabled_functions<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">php_admin_value[disable_functions] = exec,passthru,<strong>shell_exec<\/strong>,system<\/pre>\n\n\n\n<p>The line should look like the following<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">php_admin_value[disable_functions] = exec,passthru,system<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Restart Apache PHP FPM Service<\/h2>\n\n\n\n<p>Save the file and restart the apache_php_fpm service<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/scripts\/restartsrv_apache_php_fpm<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><em>Followed from<\/em><\/h2>\n\n\n\n<figure class=\"wp-block-embed-wordpress wp-block-embed is-type-wp-embed is-provider-slurp-ramen-com\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"UQRQBSLoyO\"><a href=\"https:\/\/www.slurp-ramen.com\/cpanel-whm\/enable-exec-with-php-fpm\/\">Enable exec() with PHP-FPM<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;Enable exec() with PHP-FPM&#8221; &#8212; Slurp-Ramen.com\" src=\"https:\/\/www.slurp-ramen.com\/cpanel-whm\/enable-exec-with-php-fpm\/embed\/#?secret=4cP5lNPvpF#?secret=UQRQBSLoyO\" data-secret=\"UQRQBSLoyO\" width=\"584\" height=\"329\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>SSH into WHM server ssh root@cpanel.host.com Modify Website php-fpm Config File Edit the following config file. Replace &#8220;website.com&#8221; with the website your enabling the shell_exec for vi \/opt\/cpanel\/ea-php72\/root\/etc\/php-fpm.d\/website.com.conf Locate the following line and remove shell_exec from the list of disabled_functions &hellip; <a href=\"https:\/\/www.incredigeek.com\/home\/cpanel-whm-enable-shell-exec\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[195],"tags":[501,196,1041,1040,445,1039,382],"class_list":["post-3395","post","type-post","status-publish","format-standard","hentry","category-cpanel","tag-config","tag-cpanel-2","tag-enable","tag-fpm","tag-php","tag-shell_exec","tag-whm"],"_links":{"self":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/3395","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/comments?post=3395"}],"version-history":[{"count":5,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/3395\/revisions"}],"predecessor-version":[{"id":3402,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/3395\/revisions\/3402"}],"wp:attachment":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/media?parent=3395"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/categories?post=3395"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/tags?post=3395"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}