{"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"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v15.2.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Turn Off PHP Error Reporting - OWS KB<\/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:\/\/ownwebservers.com\/kb\/how-to-turn-off-php-error-reporting\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Turn Off PHP Error Reporting - OWS KB\" \/>\n<meta property=\"og:description\" content=\"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;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ownwebservers.com\/kb\/how-to-turn-off-php-error-reporting\/\" \/>\n<meta property=\"og:site_name\" content=\"OWS KB\" \/>\n<meta property=\"article:published_time\" content=\"2022-01-04T03:38:19+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-01-04T11:12:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/errorphp-1-300x136.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\">\n\t<meta name=\"twitter:data1\" content=\"admin\">\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\":\"WebSite\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/#website\",\"url\":\"https:\/\/ownwebservers.com\/kb\/\",\"name\":\"OWS KB\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/ownwebservers.com\/kb\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/how-to-turn-off-php-error-reporting\/#primaryimage\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/ownwebservers.com\/kb\/wp-content\/uploads\/2021\/09\/errorphp-1.png\",\"width\":885,\"height\":400,\"caption\":\"errorphp-1\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/how-to-turn-off-php-error-reporting\/#webpage\",\"url\":\"https:\/\/ownwebservers.com\/kb\/how-to-turn-off-php-error-reporting\/\",\"name\":\"How to Turn Off PHP Error Reporting - OWS KB\",\"isPartOf\":{\"@id\":\"https:\/\/ownwebservers.com\/kb\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/ownwebservers.com\/kb\/how-to-turn-off-php-error-reporting\/#primaryimage\"},\"datePublished\":\"2022-01-04T03:38:19+00:00\",\"dateModified\":\"2022-01-04T11:12:50+00:00\",\"author\":{\"@id\":\"https:\/\/ownwebservers.com\/kb\/#\/schema\/person\/4a40fe3fe17a08ddd1d7c113668e75f2\"},\"breadcrumb\":{\"@id\":\"https:\/\/ownwebservers.com\/kb\/how-to-turn-off-php-error-reporting\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ownwebservers.com\/kb\/how-to-turn-off-php-error-reporting\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/how-to-turn-off-php-error-reporting\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/\",\"url\":\"https:\/\/ownwebservers.com\/kb\/\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"position\":2,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/how-to-turn-off-php-error-reporting\/\",\"url\":\"https:\/\/ownwebservers.com\/kb\/how-to-turn-off-php-error-reporting\/\",\"name\":\"How to Turn Off PHP Error Reporting\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/#\/schema\/person\/4a40fe3fe17a08ddd1d7c113668e75f2\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ba5db5841d48bd7517bb2583e13983e6d2fa56a4099a0b3c61ad2daefc321303?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"https:\/\/ownwebservers.com\/kb\"]}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","_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}]}}