{"id":1508,"date":"2023-01-24T01:30:58","date_gmt":"2023-01-23T20:00:58","guid":{"rendered":"https:\/\/trysiteprice.com\/blog\/?p=1508"},"modified":"2023-01-24T01:30:58","modified_gmt":"2023-01-23T20:00:58","slug":"file_get_contents-https-wrapper-is-disabled-in-the-server-configuration","status":"publish","type":"post","link":"https:\/\/trysiteprice.com\/blog\/file_get_contents-https-wrapper-is-disabled-in-the-server-configuration\/","title":{"rendered":"file_get_contents(): https:\/\/ wrapper is disabled in the server configuration"},"content":{"rendered":"<p>The &#8220;file_get_contents(): https:\/\/ wrapper is disabled in the server configuration&#8221; error message occurs when the function file_get_contents() is used to access a file over HTTPS, but the server configuration does not have the https wrapper enabled.<\/p>\n<p>This error occurs because PHP needs to access the file over a secure connection, but the server does not have the necessary configuration to do so.<\/p>\n<p>To resolve this issue, you will need to make sure that the https wrapper is enabled in your server&#8217;s PHP configuration. This can typically be done by editing the php.ini file and setting the following value:<\/p>\n<div class=\"bg-black mb-4 rounded-md\">\n<div class=\"flex items-center relative text-gray-200 bg-gray-800 px-4 py-2 text-xs font-sans\"><\/div>\n<div class=\"p-4 overflow-y-auto\"><code class=\"!whitespace-pre-wrap hljs language-graphql\">allow_url_fopen <span class=\"hljs-punctuation\">=<\/span> <span class=\"hljs-keyword\">On<\/span><br \/>\n<\/code><\/div>\n<\/div>\n<p>You can also enable the https wrapper by adding this line of code in your script:<\/p>\n<div class=\"bg-black mb-4 rounded-md\">\n<div class=\"flex items-center relative text-gray-200 bg-gray-800 px-4 py-2 text-xs font-sans\"><\/div>\n<div class=\"p-4 overflow-y-auto\"><code class=\"!whitespace-pre-wrap hljs language-python\">ini_set(<span class=\"hljs-string\">'allow_url_fopen'<\/span>, <span class=\"hljs-string\">'On'<\/span>);<br \/>\n<\/code><\/div>\n<\/div>\n<p>Also, you can check if the cURL extension is enabled in your PHP installation, it is another way to make HTTP requests and it can be used as an alternative to file_get_contents.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The &#8220;file_get_contents(): https:\/\/ wrapper is disabled in the server configuration&#8221; error message occurs when the function file_get_contents() is used to access a file over HTTPS, but the server configuration does not have the https wrapper enabled. This error occurs because PHP needs to access the file over a secure connection, but the server does not &#8230; <a title=\"file_get_contents(): https:\/\/ wrapper is disabled in the server configuration\" class=\"read-more\" href=\"https:\/\/trysiteprice.com\/blog\/file_get_contents-https-wrapper-is-disabled-in-the-server-configuration\/\" aria-label=\"Read more about file_get_contents(): https:\/\/ wrapper is disabled in the server configuration\">Read more<\/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],"tags":[],"class_list":["post-1508","post","type-post","status-publish","format-standard","hentry","category-best-tutorial"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>file_get_contents(): https:\/\/ wrapper is disabled in the server configuration - TrySitePrice<\/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:\/\/trysiteprice.com\/blog\/file_get_contents-https-wrapper-is-disabled-in-the-server-configuration\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"file_get_contents(): https:\/\/ wrapper is disabled in the server configuration - TrySitePrice\" \/>\n<meta property=\"og:description\" content=\"The &#8220;file_get_contents(): https:\/\/ wrapper is disabled in the server configuration&#8221; error message occurs when the function file_get_contents() is used to access a file over HTTPS, but the server configuration does not have the https wrapper enabled. This error occurs because PHP needs to access the file over a secure connection, but the server does not ... Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/trysiteprice.com\/blog\/file_get_contents-https-wrapper-is-disabled-in-the-server-configuration\/\" \/>\n<meta property=\"og:site_name\" content=\"TrySitePrice\" \/>\n<meta property=\"article:published_time\" content=\"2023-01-23T20:00:58+00:00\" \/>\n<meta name=\"author\" content=\"Rahul Sahu\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/trysiteprice.com\/blog\/file_get_contents-https-wrapper-is-disabled-in-the-server-configuration\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/trysiteprice.com\/blog\/file_get_contents-https-wrapper-is-disabled-in-the-server-configuration\/\"},\"author\":{\"name\":\"Rahul Sahu\",\"@id\":\"https:\/\/trysiteprice.com\/blog\/#\/schema\/person\/358e04eeea4281deacad2f30c58e67f4\"},\"headline\":\"file_get_contents(): https:\/\/ wrapper is disabled in the server configuration\",\"datePublished\":\"2023-01-23T20:00:58+00:00\",\"dateModified\":\"2023-01-23T20:00:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/trysiteprice.com\/blog\/file_get_contents-https-wrapper-is-disabled-in-the-server-configuration\/\"},\"wordCount\":164,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/trysiteprice.com\/blog\/#organization\"},\"articleSection\":[\"Best\/Tutorial\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/trysiteprice.com\/blog\/file_get_contents-https-wrapper-is-disabled-in-the-server-configuration\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/trysiteprice.com\/blog\/file_get_contents-https-wrapper-is-disabled-in-the-server-configuration\/\",\"url\":\"https:\/\/trysiteprice.com\/blog\/file_get_contents-https-wrapper-is-disabled-in-the-server-configuration\/\",\"name\":\"file_get_contents(): https:\/\/ wrapper is disabled in the server configuration - TrySitePrice\",\"isPartOf\":{\"@id\":\"https:\/\/trysiteprice.com\/blog\/#website\"},\"datePublished\":\"2023-01-23T20:00:58+00:00\",\"dateModified\":\"2023-01-23T20:00:58+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/trysiteprice.com\/blog\/file_get_contents-https-wrapper-is-disabled-in-the-server-configuration\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/trysiteprice.com\/blog\/file_get_contents-https-wrapper-is-disabled-in-the-server-configuration\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/trysiteprice.com\/blog\/file_get_contents-https-wrapper-is-disabled-in-the-server-configuration\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/trysiteprice.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"file_get_contents(): https:\/\/ wrapper is disabled in the server configuration\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/trysiteprice.com\/blog\/#website\",\"url\":\"https:\/\/trysiteprice.com\/blog\/\",\"name\":\"TrySitePrice\",\"description\":\"Free Website Value Calculator Tool\",\"publisher\":{\"@id\":\"https:\/\/trysiteprice.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/trysiteprice.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/trysiteprice.com\/blog\/#organization\",\"name\":\"TrySitePrice\",\"url\":\"https:\/\/trysiteprice.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/trysiteprice.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/trysiteprice.com\/blog\/wp-content\/uploads\/2021\/12\/cropped-trysiteprice-logo.png\",\"contentUrl\":\"https:\/\/trysiteprice.com\/blog\/wp-content\/uploads\/2021\/12\/cropped-trysiteprice-logo.png\",\"width\":395,\"height\":268,\"caption\":\"TrySitePrice\"},\"image\":{\"@id\":\"https:\/\/trysiteprice.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/trysiteprice.com\/blog\/#\/schema\/person\/358e04eeea4281deacad2f30c58e67f4\",\"name\":\"Rahul Sahu\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/trysiteprice.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/51f0f95f7b95665f62baed2211572165?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/51f0f95f7b95665f62baed2211572165?s=96&d=mm&r=g\",\"caption\":\"Rahul Sahu\"},\"sameAs\":[\"https:\/\/trysiteprice.com\/blog\"],\"url\":\"https:\/\/trysiteprice.com\/blog\/author\/rsahu4242_trysiteprice\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"file_get_contents(): https:\/\/ wrapper is disabled in the server configuration - TrySitePrice","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:\/\/trysiteprice.com\/blog\/file_get_contents-https-wrapper-is-disabled-in-the-server-configuration\/","og_locale":"en_US","og_type":"article","og_title":"file_get_contents(): https:\/\/ wrapper is disabled in the server configuration - TrySitePrice","og_description":"The &#8220;file_get_contents(): https:\/\/ wrapper is disabled in the server configuration&#8221; error message occurs when the function file_get_contents() is used to access a file over HTTPS, but the server configuration does not have the https wrapper enabled. This error occurs because PHP needs to access the file over a secure connection, but the server does not ... Read more","og_url":"https:\/\/trysiteprice.com\/blog\/file_get_contents-https-wrapper-is-disabled-in-the-server-configuration\/","og_site_name":"TrySitePrice","article_published_time":"2023-01-23T20:00:58+00:00","author":"Rahul Sahu","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/trysiteprice.com\/blog\/file_get_contents-https-wrapper-is-disabled-in-the-server-configuration\/#article","isPartOf":{"@id":"https:\/\/trysiteprice.com\/blog\/file_get_contents-https-wrapper-is-disabled-in-the-server-configuration\/"},"author":{"name":"Rahul Sahu","@id":"https:\/\/trysiteprice.com\/blog\/#\/schema\/person\/358e04eeea4281deacad2f30c58e67f4"},"headline":"file_get_contents(): https:\/\/ wrapper is disabled in the server configuration","datePublished":"2023-01-23T20:00:58+00:00","dateModified":"2023-01-23T20:00:58+00:00","mainEntityOfPage":{"@id":"https:\/\/trysiteprice.com\/blog\/file_get_contents-https-wrapper-is-disabled-in-the-server-configuration\/"},"wordCount":164,"commentCount":0,"publisher":{"@id":"https:\/\/trysiteprice.com\/blog\/#organization"},"articleSection":["Best\/Tutorial"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/trysiteprice.com\/blog\/file_get_contents-https-wrapper-is-disabled-in-the-server-configuration\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/trysiteprice.com\/blog\/file_get_contents-https-wrapper-is-disabled-in-the-server-configuration\/","url":"https:\/\/trysiteprice.com\/blog\/file_get_contents-https-wrapper-is-disabled-in-the-server-configuration\/","name":"file_get_contents(): https:\/\/ wrapper is disabled in the server configuration - TrySitePrice","isPartOf":{"@id":"https:\/\/trysiteprice.com\/blog\/#website"},"datePublished":"2023-01-23T20:00:58+00:00","dateModified":"2023-01-23T20:00:58+00:00","breadcrumb":{"@id":"https:\/\/trysiteprice.com\/blog\/file_get_contents-https-wrapper-is-disabled-in-the-server-configuration\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/trysiteprice.com\/blog\/file_get_contents-https-wrapper-is-disabled-in-the-server-configuration\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/trysiteprice.com\/blog\/file_get_contents-https-wrapper-is-disabled-in-the-server-configuration\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/trysiteprice.com\/blog\/"},{"@type":"ListItem","position":2,"name":"file_get_contents(): https:\/\/ wrapper is disabled in the server configuration"}]},{"@type":"WebSite","@id":"https:\/\/trysiteprice.com\/blog\/#website","url":"https:\/\/trysiteprice.com\/blog\/","name":"TrySitePrice","description":"Free Website Value Calculator Tool","publisher":{"@id":"https:\/\/trysiteprice.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/trysiteprice.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/trysiteprice.com\/blog\/#organization","name":"TrySitePrice","url":"https:\/\/trysiteprice.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/trysiteprice.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/trysiteprice.com\/blog\/wp-content\/uploads\/2021\/12\/cropped-trysiteprice-logo.png","contentUrl":"https:\/\/trysiteprice.com\/blog\/wp-content\/uploads\/2021\/12\/cropped-trysiteprice-logo.png","width":395,"height":268,"caption":"TrySitePrice"},"image":{"@id":"https:\/\/trysiteprice.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/trysiteprice.com\/blog\/#\/schema\/person\/358e04eeea4281deacad2f30c58e67f4","name":"Rahul Sahu","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/trysiteprice.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/51f0f95f7b95665f62baed2211572165?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/51f0f95f7b95665f62baed2211572165?s=96&d=mm&r=g","caption":"Rahul Sahu"},"sameAs":["https:\/\/trysiteprice.com\/blog"],"url":"https:\/\/trysiteprice.com\/blog\/author\/rsahu4242_trysiteprice\/"}]}},"_links":{"self":[{"href":"https:\/\/trysiteprice.com\/blog\/wp-json\/wp\/v2\/posts\/1508","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/trysiteprice.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/trysiteprice.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/trysiteprice.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/trysiteprice.com\/blog\/wp-json\/wp\/v2\/comments?post=1508"}],"version-history":[{"count":1,"href":"https:\/\/trysiteprice.com\/blog\/wp-json\/wp\/v2\/posts\/1508\/revisions"}],"predecessor-version":[{"id":1509,"href":"https:\/\/trysiteprice.com\/blog\/wp-json\/wp\/v2\/posts\/1508\/revisions\/1509"}],"wp:attachment":[{"href":"https:\/\/trysiteprice.com\/blog\/wp-json\/wp\/v2\/media?parent=1508"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/trysiteprice.com\/blog\/wp-json\/wp\/v2\/categories?post=1508"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/trysiteprice.com\/blog\/wp-json\/wp\/v2\/tags?post=1508"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}