{"id":3545,"date":"2016-03-02T08:08:22","date_gmt":"2016-03-02T08:08:22","guid":{"rendered":"https:\/\/cpanelplesk.com\/wp62\/?p=3545"},"modified":"2021-02-06T06:56:40","modified_gmt":"2021-02-06T06:56:40","slug":"how-to-hide-php-version-in-linux","status":"publish","type":"post","link":"https:\/\/cpanelplesk.com\/wp62\/how-to-hide-php-version-in-linux\/","title":{"rendered":"How to hide PHP version in Linux"},"content":{"rendered":"<p><span style=\"color: #000000;\">Most of the web server software has been installed with default settings that will lead to information leakage. One of them is a PHP software. Later this information can be used by hackers to try to exploit any vulnerabilities in the PHP version you are running, especially if you are running an older version with known weaknesses. In this article we will show you how to hide PHP version in Linux.<!--more--><\/span><\/p>\n<p><span style=\"color: #000000;\">First make a backup copy of your php.ini file<\/span><\/p>\n<div class=\"cpanel-files\"><\/div>\n<pre class=\"lang:default decode:true \">cp -p \/etc\/php.ini \/etc\/php.ini.orig<\/pre>\n<p><span style=\"color: #000000;\">Edit the php.ini and search for keyword expose_php and make it off by using your favorite editor:<\/span><\/p>\n<div class=\"cpanel-files\"><\/div>\n<pre class=\"lang:default decode:true \">nano \/etc\/php.ini\r\n\r\nexpose_php = Off<\/pre>\n<p><span style=\"color: #000000;\">Now restart the apache web server:<\/span><\/p>\n<div class=\"command-sh\">\n<pre class=\"lang:default decode:true \">systemctl restart httpd<\/pre>\n<\/div>\n<p><span style=\"color: #000000;\">Done, We have successfully hide PHP version.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Most of the web server software has been installed with default settings that will lead to information leakage. One of them is a PHP software. Later this information can be used by hackers to try to exploit any vulnerabilities in the PHP version you are running, especially if you are running an older version with [&#8230;]<\/p>\n<p><a class=\"understrap-read-more-link\" href=\"https:\/\/cpanelplesk.com\/wp62\/how-to-hide-php-version-in-linux\/\">Continue Reading&#8230;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,14],"tags":[],"class_list":["post-3545","post","type-post","status-publish","format-standard","hentry","category-cpanel","category-linux"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to hide PHP version in Linux - cPanel Plesk<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/cpanelplesk.com\/wp62\/how-to-hide-php-version-in-linux\/\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"How to hide PHP version in Linux - cPanel Plesk\" \/>\n<meta name=\"twitter:description\" content=\"Most of the web server software has been installed with default settings that will lead to information leakage. One of them is a PHP software. Later this information can be used by hackers to try to exploit any vulnerabilities in the PHP version you are running, especially if you are running an older version with [...]Continue Reading...\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Farooq Omer\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/how-to-hide-php-version-in-linux\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/how-to-hide-php-version-in-linux\/\"},\"author\":{\"name\":\"Farooq Omer\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13\"},\"headline\":\"How to hide PHP version in Linux\",\"datePublished\":\"2016-03-02T08:08:22+00:00\",\"dateModified\":\"2021-02-06T06:56:40+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/how-to-hide-php-version-in-linux\/\"},\"wordCount\":120,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13\"},\"articleSection\":[\"Cpanel\",\"Linux\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/how-to-hide-php-version-in-linux\/\",\"url\":\"https:\/\/cpanelplesk.com\/wp62\/how-to-hide-php-version-in-linux\/\",\"name\":\"How to hide PHP version in Linux - cPanel Plesk\",\"isPartOf\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#website\"},\"datePublished\":\"2016-03-02T08:08:22+00:00\",\"dateModified\":\"2021-02-06T06:56:40+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/how-to-hide-php-version-in-linux\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cpanelplesk.com\/wp62\/how-to-hide-php-version-in-linux\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/how-to-hide-php-version-in-linux\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/cpanelplesk.com\/wp62\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to hide PHP version in Linux\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#website\",\"url\":\"https:\/\/cpanelplesk.com\/wp62\/\",\"name\":\"cPanel Plesk\",\"description\":\"Blog on famous hosting control panels\",\"publisher\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/cpanelplesk.com\/wp62\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13\",\"name\":\"Farooq Omer\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2020\/11\/cpanelplesk.png\",\"contentUrl\":\"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2020\/11\/cpanelplesk.png\",\"width\":300,\"height\":44,\"caption\":\"Farooq Omer\"},\"logo\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/image\/\"},\"url\":\"https:\/\/cpanelplesk.com\/wp62\/author\/fokado\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to hide PHP version in Linux - cPanel Plesk","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/cpanelplesk.com\/wp62\/how-to-hide-php-version-in-linux\/","twitter_card":"summary_large_image","twitter_title":"How to hide PHP version in Linux - cPanel Plesk","twitter_description":"Most of the web server software has been installed with default settings that will lead to information leakage. One of them is a PHP software. Later this information can be used by hackers to try to exploit any vulnerabilities in the PHP version you are running, especially if you are running an older version with [...]Continue Reading...","twitter_misc":{"Written by":"Farooq Omer","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/cpanelplesk.com\/wp62\/how-to-hide-php-version-in-linux\/#article","isPartOf":{"@id":"https:\/\/cpanelplesk.com\/wp62\/how-to-hide-php-version-in-linux\/"},"author":{"name":"Farooq Omer","@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13"},"headline":"How to hide PHP version in Linux","datePublished":"2016-03-02T08:08:22+00:00","dateModified":"2021-02-06T06:56:40+00:00","mainEntityOfPage":{"@id":"https:\/\/cpanelplesk.com\/wp62\/how-to-hide-php-version-in-linux\/"},"wordCount":120,"commentCount":0,"publisher":{"@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13"},"articleSection":["Cpanel","Linux"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/cpanelplesk.com\/wp62\/how-to-hide-php-version-in-linux\/","url":"https:\/\/cpanelplesk.com\/wp62\/how-to-hide-php-version-in-linux\/","name":"How to hide PHP version in Linux - cPanel Plesk","isPartOf":{"@id":"https:\/\/cpanelplesk.com\/wp62\/#website"},"datePublished":"2016-03-02T08:08:22+00:00","dateModified":"2021-02-06T06:56:40+00:00","breadcrumb":{"@id":"https:\/\/cpanelplesk.com\/wp62\/how-to-hide-php-version-in-linux\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cpanelplesk.com\/wp62\/how-to-hide-php-version-in-linux\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/cpanelplesk.com\/wp62\/how-to-hide-php-version-in-linux\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cpanelplesk.com\/wp62\/"},{"@type":"ListItem","position":2,"name":"How to hide PHP version in Linux"}]},{"@type":"WebSite","@id":"https:\/\/cpanelplesk.com\/wp62\/#website","url":"https:\/\/cpanelplesk.com\/wp62\/","name":"cPanel Plesk","description":"Blog on famous hosting control panels","publisher":{"@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cpanelplesk.com\/wp62\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13","name":"Farooq Omer","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/image\/","url":"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2020\/11\/cpanelplesk.png","contentUrl":"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2020\/11\/cpanelplesk.png","width":300,"height":44,"caption":"Farooq Omer"},"logo":{"@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/image\/"},"url":"https:\/\/cpanelplesk.com\/wp62\/author\/fokado\/"}]}},"_links":{"self":[{"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/posts\/3545","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/comments?post=3545"}],"version-history":[{"count":0,"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/posts\/3545\/revisions"}],"wp:attachment":[{"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/media?parent=3545"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/categories?post=3545"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/tags?post=3545"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}