{"id":2411,"date":"2022-01-04T03:38:19","date_gmt":"2022-01-04T03:38:19","guid":{"rendered":"https:\/\/ownwebservers.com\/kb\/?p=2411"},"modified":"2022-01-04T11:12:50","modified_gmt":"2022-01-04T11:12:50","slug":"how-to-turn-off-php-error-reporting","status":"publish","type":"post","link":"https:\/\/ownwebservers.com\/kb\/how-to-turn-off-php-error-reporting\/","title":{"rendered":"How to Turn Off PHP Error Reporting"},"content":{"rendered":"<p>In this article, we are going to understand how to disable the PHP error reporting.<\/p>\n<p>PHP errors are generated by your websites and logged in error_log files within the directory wherever your PHP files are situated. If you are do not would like the error_log file you&#8217;ll disable PHP error logging.<\/p>\n<p>To turn off PHP error reporting, you need to add the line as follow to your .htaccess file to suppress any PHP error messages.<\/p>\n<pre>php_flag display_errors off<\/pre>\n<p>Follow the steps as below:<\/p>\n<p><strong>Step 1:<\/strong> Login into your cPanel account and from the <strong>Files section<\/strong> open <strong>File Manager<\/strong> .<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2412\" src=\"https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/errorphp-1-300x136.png\" alt=\"errorphp-1\" width=\"885\" height=\"400\" srcset=\"https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/errorphp-1-300x136.png 300w, https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/errorphp-1-768x347.png 768w, https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/errorphp-1.png 885w\" sizes=\"auto, (max-width: 885px) 100vw, 885px\" \/><\/p>\n<p><strong>Step 2: <\/strong>In File Manager Click on <strong>Settings<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2413\" src=\"https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/errorphp-2-300x116.png\" alt=\"errorphp-2\" width=\"650\" height=\"252\" srcset=\"https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/errorphp-2-300x116.png 300w, https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/errorphp-2.png 650w\" sizes=\"auto, (max-width: 650px) 100vw, 650px\" \/><\/p>\n<p><strong>Step 3: <\/strong>Mark tick the check box \u201c<strong>Show hidden files<\/strong>\u201d and click on the <strong>Save<\/strong> button.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2414\" src=\"https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/errorphp-3-300x200.png\" alt=\"errorphp-3\" width=\"630\" height=\"419\" srcset=\"https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/errorphp-3-300x200.png 300w, https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/errorphp-3.png 630w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/p>\n<p><strong>Step 4: <\/strong>Choose your<strong> .htaccess file<\/strong> and from the dashboard above click on the <strong>Edit<\/strong> option.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2415\" src=\"https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/errorphp-4-300x136.png\" alt=\"errorphp-4\" width=\"731\" height=\"331\" srcset=\"https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/errorphp-4-300x136.png 300w, https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/errorphp-4.png 731w\" sizes=\"auto, (max-width: 731px) 100vw, 731px\" \/><\/p>\n<p><strong>Step 5: <\/strong>Add the code \u201c<strong>php_flag display_errors off<\/strong>\u201d and press the <strong>Save<\/strong> Changes to update it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article, we are going to understand how to disable the PHP error reporting. PHP errors are generated by your websites and logged in error_log files within the directory wherever your PHP files are situated. If you are do not would like the error_log file you&#8217;ll disable PHP error logging. To turn off PHP [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[],"class_list":["post-2411","post","type-post","status-publish","format-standard","hentry","category-tutorials"],"_links":{"self":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/2411","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/comments?post=2411"}],"version-history":[{"count":3,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/2411\/revisions"}],"predecessor-version":[{"id":2418,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/2411\/revisions\/2418"}],"wp:attachment":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/media?parent=2411"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/categories?post=2411"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/tags?post=2411"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}