{"id":6560,"date":"2021-10-02T17:29:27","date_gmt":"2021-10-02T11:59:27","guid":{"rendered":"https:\/\/pheonixsolutions.com\/blog\/?p=6560"},"modified":"2021-10-02T19:33:16","modified_gmt":"2021-10-02T14:03:16","slug":"how-to-enable-exec-function-in-php-fpm","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/blog\/how-to-enable-exec-function-in-php-fpm\/","title":{"rendered":"How to enable exec() function in PHP-FPM"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">How to enable exec() function in PHP-FPM<\/h4>\n\n\n\n<h4 class=\"wp-block-heading\">Date: 02-10-2021<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 1:<\/strong> Log in to the server via SSH.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 2:<\/strong> Check the PHP version of the server by using the below command.<br><strong><code># php -v<\/code><\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 3:<\/strong> If your domain using PHP version 7.3, open the PHP-FPM configuration file. <br><strong><code># vi \/opt\/cpanel\/ea-php73\/root\/etc\/php-fpm.d\/domainname.conf <\/code><\/strong><br>Note: &#8211; domainname.conf &#8211; Your domain name config file.<br><br>Search the disabled function list in the config file and find the exec function.<br><br><strong><code>php_admin_value[disable_functions] = exec,passthru,shell_exec,system<br><\/code><\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 4:<\/strong> Remove that <code><strong>exec<\/strong> <\/code>function from the above line and keep like below.<br><meta charset=\"utf-8\"><strong><code>php_admin_value[disable_functions] = passthru,shell_exec,system<\/code><\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Step 5: Restart the PHP-FPM service by using the below command and then exec function should works.<br><strong><code># \/scripts\/restartsrv_apache_php_fpm<\/code><\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thank you!<br><br><br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to enable exec() function in PHP-FPM Date: 02-10-2021 Step 1: Log in to the server via SSH. Step 2: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"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":"","ast-disable-related-posts":"","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":"default","ast-page-background-enabled":"default","ast-page-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":"","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-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":"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":""},"mobile":{"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":""}},"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1022],"tags":[273,922,329],"class_list":["post-6560","post","type-post","status-publish","format-standard","hentry","category-web-architecture","tag-php","tag-php-exec-function","tag-php-fpm","psol-cat-web-architecture"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/phn2x7-1HO","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/6560","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=6560"}],"version-history":[{"count":0,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/6560\/revisions"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=6560"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=6560"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=6560"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}