{"id":62,"date":"2011-03-22T08:18:32","date_gmt":"2011-03-22T08:18:32","guid":{"rendered":"http:\/\/pixert.com\/blog\/?p=62"},"modified":"2011-08-11T06:09:14","modified_gmt":"2011-08-11T06:09:14","slug":"how-to-disable-phpinfo","status":"publish","type":"post","link":"https:\/\/pixert.com\/blog\/how-to-disable-phpinfo\/","title":{"rendered":"How to disable phpinfo"},"content":{"rendered":"<p><a href=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/php.gif\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"64\" data-permalink=\"https:\/\/pixert.com\/blog\/how-to-check-what-php-version-running-on-linux\/php\/\" data-orig-file=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/php.gif?fit=120%2C67&amp;ssl=1\" data-orig-size=\"120,67\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"php\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/php.gif?fit=120%2C67&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/php.gif?fit=120%2C67&amp;ssl=1\" class=\"alignright size-full wp-image-64\" title=\"php\" src=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/php.gif?resize=120%2C67\" alt=\"\" width=\"120\" height=\"67\" \/><\/a>The phpinfo() function is a very powerful one, \u00a0you can learn quite a  lot about your PHP installation.\u00a0Some server administrators may choose to disable the PHP function <code>phpinfo()<\/code> for security reasons, because it displays information  which can be used to compromise the server that your site is running on.  You can completely disable phpinfo(). First find the php.ini file :<\/p>\n<pre class=\"brush: bash; title: Code Block; notranslate\" title=\"Code Block\">php -i| grep php.ini<\/pre>\n<p>Open php.ini with VI or Pico.<\/p>\n<pre class=\"brush: bash; title: Code Block; notranslate\" title=\"Code Block\">#vi php.ini <\/pre>\n<p>change the line that includes the <code>disable_functions<\/code> directive so  that it says <span style=\"font-family: monospace;\">:<\/span><\/p>\n<pre class=\"brush: bash; title: Code Block; notranslate\" title=\"Code Block\">disable_functions = phpinfo<\/pre>\n<p>&#8211; If you have access to <span style=\"color: #800000;\">WHM<\/span>, login to WHM. See Service Configuration on the Right Sidebar. Click PHP Configuration Editor. Click Switch to Advanced Mode. Find\u00a0the\u00a0<code>disable_functions<\/code> directive, add the following in that directive<\/p>\n<pre class=\"brush: plain; title: Code Block; notranslate\" title=\"Code Block\">phpinfo<\/pre>\n<p>&#8211; If you only have access to <span style=\"color: #800000;\">.htaccess<\/span>, you can use the following  In .htaccess, add a line that says<\/p>\n<pre class=\"brush: plain; title: Code Block; notranslate\" title=\"Code Block\">php_value disable_functions phpinfo<\/pre>\n<p>Note: disable phpinfo means that you <strong>cannot<\/strong> <a title=\"How to Check What PHP version on Linux\" href=\"http:\/\/pixert.com\/blog\/how-to-check-what-php-version-running-on-linux\/\" target=\"_blank\">check PHP version with phpinfo()<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The phpinfo() function is a very powerful one, \u00a0you can learn quite a lot about your PHP installation.\u00a0Some server administrators may choose to disable the PHP function phpinfo() for security reasons, because it displays information which can be used to compromise the server that your site is running on. You can completely disable phpinfo(). First [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[8,13],"tags":[9,10,39],"class_list":["post-62","post","type-post","status-publish","format-standard","hentry","category-centos","category-cpanel","tag-centos-2","tag-linux","tag-php"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1pvi1-10","jetpack-related-posts":[{"id":53,"url":"https:\/\/pixert.com\/blog\/how-to-check-what-php-version-running-on-linux\/","url_meta":{"origin":62,"position":0},"title":"How to check what PHP version running on Linux?","author":"Pixel Insert \/ Pixert","date":"March 21, 2011","format":false,"excerpt":"It's very simple to check PHP version 1. PHP Info You can use the following to yield PHP version number via Command Line [bash]php -i[\/bash] or You can create a php file contain the following, upload it to your website [php]phpinfo();[\/php] Note: if your sys admin disabled phpinfo, you cannot\u2026","rel":"","context":"In &quot;CentOS&quot;","block_context":{"text":"CentOS","link":"https:\/\/pixert.com\/blog\/category\/centos\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/php.gif?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":358,"url":"https:\/\/pixert.com\/blog\/increase-file-upload-size-wordpress\/","url_meta":{"origin":62,"position":1},"title":"Increase File Upload Size WordPress","author":"Pixel Insert \/ Pixert","date":"April 17, 2014","format":false,"excerpt":"We see this error when we upload a file that bigger\u00a0than upload limit size , the error look like this \"exceeds the maximum upload size for this site\" The web hosting company may set \u00a0limit to file upload size, fortunately we could workaround this problem and increase file upload size\u2026","rel":"","context":"In &quot;WordPress&quot;","block_context":{"text":"WordPress","link":"https:\/\/pixert.com\/blog\/category\/wordpress\/"},"img":{"alt_text":"fileuploadsize","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2014\/04\/fileuploadsize.jpg?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2014\/04\/fileuploadsize.jpg?resize=350%2C200 1x, https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2014\/04\/fileuploadsize.jpg?resize=525%2C300 1.5x"},"classes":[]},{"id":162,"url":"https:\/\/pixert.com\/blog\/web-page-compression-enable-gzip-encoding-and-caching\/","url_meta":{"origin":62,"position":2},"title":"Web Page Compression: Enable gzip Encoding and Caching","author":"Pixel Insert \/ Pixert","date":"November 10, 2011","format":false,"excerpt":"Website load is one factor Google been considered to rank websites in their search engine. The next tutorial explain a step to improve loading time in your website.\u00a0This step is focusing on gzip encoding and caching, it compress the content from your server to the client browser. The reduced file\u2026","rel":"","context":"In &quot;CentOS&quot;","block_context":{"text":"CentOS","link":"https:\/\/pixert.com\/blog\/category\/centos\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":111,"url":"https:\/\/pixert.com\/blog\/how-to-disable-directory-browsing\/","url_meta":{"origin":62,"position":3},"title":"How to disable directory browsing?","author":"Pixel Insert \/ Pixert","date":"June 3, 2011","format":false,"excerpt":"One of the must do on setting a secure Apache webserver is to disable directory browsing. This could prevent the server from showing a listing of the existing files if there's no index in one folder. Disable directory browsing via .htaccess Add in the .htaccess file the following [bash] Options\u2026","rel":"","context":"In &quot;CentOS&quot;","block_context":{"text":"CentOS","link":"https:\/\/pixert.com\/blog\/category\/centos\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/feather-small.gif?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":74,"url":"https:\/\/pixert.com\/blog\/how-to-find-centos-or-redhat-version\/","url_meta":{"origin":62,"position":4},"title":"How to find CentOS or RedHat version?","author":"Pixel Insert \/ Pixert","date":"March 25, 2011","format":false,"excerpt":"Most Red Hat-based distributions, like CentOS, should have a file called redhat-release which will contain the CentOS version Run the following to see what version running on your system [bash]tail \/etc\/redhat-release[\/bash] or [bash]cat \/etc\/redhat-release[\/bash] or [bash]cat \/etc\/*release*[\/bash] or [bash]rpm -q centos-release[\/bash] Using your redhat-release file, you can find your distribution,\u2026","rel":"","context":"In &quot;CentOS&quot;","block_context":{"text":"CentOS","link":"https:\/\/pixert.com\/blog\/category\/centos\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/centos.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":32,"url":"https:\/\/pixert.com\/blog\/compress-files-with-gzip-and-zip-in-centos\/","url_meta":{"origin":62,"position":5},"title":"Compress files with Gzip and Zip in CentOS","author":"Pixel Insert \/ Pixert","date":"March 7, 2011","format":false,"excerpt":"Gzip Type the following command to compress a file at a shell prompt [bash]gzip filename.ext[\/bash] -> The file will be compressed and saved as filename.ext.gz Type the following command to expand a compressed file [bash]<\/code><code>gunzip filename.ext.gz<\/code><code>[\/bash] -> The filename.ext.gz is deleted and replaced with filename.ext Type the following command to\u2026","rel":"","context":"In &quot;CentOS&quot;","block_context":{"text":"CentOS","link":"https:\/\/pixert.com\/blog\/category\/centos\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/centos.jpg?resize=350%2C200","width":350,"height":200},"classes":[]}],"jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/posts\/62","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/comments?post=62"}],"version-history":[{"count":0,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/posts\/62\/revisions"}],"wp:attachment":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/media?parent=62"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/categories?post=62"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/tags?post=62"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}