{"id":1970,"date":"2015-10-12T17:25:55","date_gmt":"2015-10-12T15:25:55","guid":{"rendered":"http:\/\/codingexplained.com\/?p=1970"},"modified":"2017-11-15T14:40:16","modified_gmt":"2017-11-15T13:40:16","slug":"enabling-php-error-reporting-mamp","status":"publish","type":"post","link":"https:\/\/codingexplained.com\/dev-ops\/mac\/enabling-php-error-reporting-mamp","title":{"rendered":"Enabling PHP Error Reporting in MAMP"},"content":{"rendered":"<p>While developing PHP applications with MAMP on OS X, it is very useful to be able to see errors being printed directly in the browser. By default, this is disabled with MAMP, but it is very easy to enable error reporting in MAMP. All you have to do is to follow the simple steps below.<\/p>\n<ol>\n<li>Navigate to <span class=\"code\">\/Applications\/MAMP\/conf\/php{your-version}<\/span> and open <span class=\"code\">php.ini<\/span>. If you are unsure which PHP version you are using, then\u00a0open the preferences within MAMP and check the PHP tab.<\/li>\n<li>Search for\u00a0<span class=\"code\">display_errors<\/span> and change the value from <span class=\"code\">Off<\/span> to <span class=\"code\">On<\/span>. Just above this, you can also configure which errors you want to be displayed by configuring <span class=\"code\">error_reporting<\/span>, but it is recommended leaving this to <span class=\"code\">E_ALL<\/span> for development environments.<\/li>\n<li>Restart\u00a0your Apache web server by stopping and starting your servers in MAMP.<\/li>\n<\/ol>\n<p>If you are using MAMP Pro, you should enable this in the user interface by\u00a0checking the &#8220;To: Display&#8221; option within the error handling configuration. <a title=\"For MAMP Pro\" href=\"http:\/\/stackoverflow.com\/questions\/14581460\/why-mamp-doesnt-display-errors#answer-19951357\" target=\"_blank\" rel=\"external nofollow\">See more about that here<\/a>.<\/p>\n<p>You will now see errors printed on the screen if you run a PHP script that triggers errors, warnings or notices.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>While developing PHP applications with MAMP on OS X, it is very useful to be able to see errors being printed directly in the browser. By default, this is disabled with MAMP, but it is very easy to enable error reporting in MAMP. All you have to do is to follow the simple steps below.&hellip; <a href=\"https:\/\/codingexplained.com\/dev-ops\/mac\/enabling-php-error-reporting-mamp\" class=\"more-link\">read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"jetpack_post_was_ever_published":false,"jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[51],"tags":[130,82,40],"series":[],"jetpack_publicize_connections":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Enabling PHP Error Reporting in MAMP<\/title>\n<meta name=\"description\" content=\"Enabling PHP error reporting in MAMP on OS X is easy. By following these simple steps, your PHP errors and warnings will be printed on the screen.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/codingexplained.com\/dev-ops\/mac\/enabling-php-error-reporting-mamp\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Enabling PHP Error Reporting in MAMP\" \/>\n<meta property=\"og:description\" content=\"Enabling PHP error reporting in MAMP on OS X is easy. By following these simple steps, your PHP errors and warnings will be printed on the screen.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/codingexplained.com\/dev-ops\/mac\/enabling-php-error-reporting-mamp\" \/>\n<meta property=\"og:site_name\" content=\"Coding Explained\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/codingexplained\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/codingexplained\" \/>\n<meta property=\"article:published_time\" content=\"2015-10-12T15:25:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-11-15T13:40:16+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/codingexplained.com\/wp-content\/uploads\/2015\/11\/codingexplained-fb-promote.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"444\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Bo Andersen\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@codingexplained\" \/>\n<meta name=\"twitter:site\" content=\"@codingexplained\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Bo Andersen\" \/>\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\":\"WebPage\",\"@id\":\"https:\/\/codingexplained.com\/dev-ops\/mac\/enabling-php-error-reporting-mamp\",\"url\":\"https:\/\/codingexplained.com\/dev-ops\/mac\/enabling-php-error-reporting-mamp\",\"name\":\"Enabling PHP Error Reporting in MAMP\",\"isPartOf\":{\"@id\":\"https:\/\/codingexplained.com\/#website\"},\"datePublished\":\"2015-10-12T15:25:55+00:00\",\"dateModified\":\"2017-11-15T13:40:16+00:00\",\"author\":{\"@id\":\"https:\/\/codingexplained.com\/#\/schema\/person\/e19c92ec991f571605f047cefeaa950d\"},\"description\":\"Enabling PHP error reporting in MAMP on OS X is easy. By following these simple steps, your PHP errors and warnings will be printed on the screen.\",\"breadcrumb\":{\"@id\":\"https:\/\/codingexplained.com\/dev-ops\/mac\/enabling-php-error-reporting-mamp#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/codingexplained.com\/dev-ops\/mac\/enabling-php-error-reporting-mamp\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/codingexplained.com\/dev-ops\/mac\/enabling-php-error-reporting-mamp#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/codingexplained.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Enabling PHP Error Reporting in MAMP\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/codingexplained.com\/#website\",\"url\":\"https:\/\/codingexplained.com\/\",\"name\":\"Coding Explained\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/codingexplained.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/codingexplained.com\/#\/schema\/person\/e19c92ec991f571605f047cefeaa950d\",\"name\":\"Bo Andersen\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/codingexplained.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/28f5826f9d5d544b0c5e1ec321dfdfb8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/28f5826f9d5d544b0c5e1ec321dfdfb8?s=96&d=mm&r=g\",\"caption\":\"Bo Andersen\"},\"description\":\"I am a back-end web developer with a passion for open source technologies. I have been a PHP developer for many years, and also have experience with Java and Spring Framework. I currently work full time as a lead developer. Apart from that, I also spend time on making online courses, so be sure to check those out!\",\"sameAs\":[\"https:\/\/codingexplained.com\",\"https:\/\/www.facebook.com\/codingexplained\",\"https:\/\/www.linkedin.com\/in\/ba0708\",\"https:\/\/twitter.com\/codingexplained\",\"https:\/\/www.youtube.com\/c\/codingexplained\"],\"url\":\"https:\/\/codingexplained.com\/author\/andy\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Enabling PHP Error Reporting in MAMP","description":"Enabling PHP error reporting in MAMP on OS X is easy. By following these simple steps, your PHP errors and warnings will be printed on the screen.","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:\/\/codingexplained.com\/dev-ops\/mac\/enabling-php-error-reporting-mamp","og_locale":"en_US","og_type":"article","og_title":"Enabling PHP Error Reporting in MAMP","og_description":"Enabling PHP error reporting in MAMP on OS X is easy. By following these simple steps, your PHP errors and warnings will be printed on the screen.","og_url":"https:\/\/codingexplained.com\/dev-ops\/mac\/enabling-php-error-reporting-mamp","og_site_name":"Coding Explained","article_publisher":"https:\/\/www.facebook.com\/codingexplained","article_author":"https:\/\/www.facebook.com\/codingexplained","article_published_time":"2015-10-12T15:25:55+00:00","article_modified_time":"2017-11-15T13:40:16+00:00","og_image":[{"width":1200,"height":444,"url":"https:\/\/codingexplained.com\/wp-content\/uploads\/2015\/11\/codingexplained-fb-promote.png","type":"image\/png"}],"author":"Bo Andersen","twitter_card":"summary_large_image","twitter_creator":"@codingexplained","twitter_site":"@codingexplained","twitter_misc":{"Written by":"Bo Andersen","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/codingexplained.com\/dev-ops\/mac\/enabling-php-error-reporting-mamp","url":"https:\/\/codingexplained.com\/dev-ops\/mac\/enabling-php-error-reporting-mamp","name":"Enabling PHP Error Reporting in MAMP","isPartOf":{"@id":"https:\/\/codingexplained.com\/#website"},"datePublished":"2015-10-12T15:25:55+00:00","dateModified":"2017-11-15T13:40:16+00:00","author":{"@id":"https:\/\/codingexplained.com\/#\/schema\/person\/e19c92ec991f571605f047cefeaa950d"},"description":"Enabling PHP error reporting in MAMP on OS X is easy. By following these simple steps, your PHP errors and warnings will be printed on the screen.","breadcrumb":{"@id":"https:\/\/codingexplained.com\/dev-ops\/mac\/enabling-php-error-reporting-mamp#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/codingexplained.com\/dev-ops\/mac\/enabling-php-error-reporting-mamp"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/codingexplained.com\/dev-ops\/mac\/enabling-php-error-reporting-mamp#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/codingexplained.com\/"},{"@type":"ListItem","position":2,"name":"Enabling PHP Error Reporting in MAMP"}]},{"@type":"WebSite","@id":"https:\/\/codingexplained.com\/#website","url":"https:\/\/codingexplained.com\/","name":"Coding Explained","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/codingexplained.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/codingexplained.com\/#\/schema\/person\/e19c92ec991f571605f047cefeaa950d","name":"Bo Andersen","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codingexplained.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/28f5826f9d5d544b0c5e1ec321dfdfb8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/28f5826f9d5d544b0c5e1ec321dfdfb8?s=96&d=mm&r=g","caption":"Bo Andersen"},"description":"I am a back-end web developer with a passion for open source technologies. I have been a PHP developer for many years, and also have experience with Java and Spring Framework. I currently work full time as a lead developer. Apart from that, I also spend time on making online courses, so be sure to check those out!","sameAs":["https:\/\/codingexplained.com","https:\/\/www.facebook.com\/codingexplained","https:\/\/www.linkedin.com\/in\/ba0708","https:\/\/twitter.com\/codingexplained","https:\/\/www.youtube.com\/c\/codingexplained"],"url":"https:\/\/codingexplained.com\/author\/andy"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p3mJkW-vM","_links":{"self":[{"href":"https:\/\/codingexplained.com\/wp-json\/wp\/v2\/posts\/1970"}],"collection":[{"href":"https:\/\/codingexplained.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codingexplained.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codingexplained.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codingexplained.com\/wp-json\/wp\/v2\/comments?post=1970"}],"version-history":[{"count":4,"href":"https:\/\/codingexplained.com\/wp-json\/wp\/v2\/posts\/1970\/revisions"}],"predecessor-version":[{"id":3418,"href":"https:\/\/codingexplained.com\/wp-json\/wp\/v2\/posts\/1970\/revisions\/3418"}],"wp:attachment":[{"href":"https:\/\/codingexplained.com\/wp-json\/wp\/v2\/media?parent=1970"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codingexplained.com\/wp-json\/wp\/v2\/categories?post=1970"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codingexplained.com\/wp-json\/wp\/v2\/tags?post=1970"},{"taxonomy":"series","embeddable":true,"href":"https:\/\/codingexplained.com\/wp-json\/wp\/v2\/series?post=1970"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}