{"id":1792,"date":"2019-10-16T19:18:59","date_gmt":"2019-10-16T19:18:59","guid":{"rendered":"https:\/\/www.copahost.com\/blog\/?p=1792"},"modified":"2024-10-31T14:42:47","modified_gmt":"2024-10-31T14:42:47","slug":"allow-url-fopen-in-cpanel","status":"publish","type":"post","link":"https:\/\/www.copahost.com\/blog\/allow-url-fopen-in-cpanel\/","title":{"rendered":"How to allow URL fopen in cPanel"},"content":{"rendered":"<p>It&#8217;s very common to have the PHP directive allow_url_fopen not working in a cPanel server. This is a security directive, which is disabled by default. It&#8217;s very easy to have it enabled, as cPanel allows us to fully customize php.ini. We will show with <a href=\"https:\/\/www.copahost.com\/blog\/html-image\/\">images and examples<\/a> on how to allow URL fopen in cPanel.<\/p>\n<p>This is normally useful for shared hosting <a href=\"https:\/\/www.copahost.com\/blog\/6-tips-for-a-perfect-backup-in-your-cpanel-server\/\">servers with cPanel<\/a>. This can also be applied to VPS or <a href=\"https:\/\/www.copahost.com\/blog\/is-it-possible-to-run-a-web-server-in-a-raspberry-pi-3-as-a-dedicated-server\/\">Dedicated Servers<\/a> with WHM. MultiPHP INI Editor is a tool that allows us to edit the server configuration, and customize the php.ini file. This directive is similar to file_get_contents: it can also be allowed via MultiPHP INI Editor.<\/p>\n<p>Firstly, you have to access your <a href=\"https:\/\/cpanel.net\/\" target=\"_blank\" rel=\"noopener noreferrer\">cPanel<\/a> control panel. Then, find the option <strong>MultiPHP INI Editor<\/strong>.<\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone wp-image-1793 size-full\" src=\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2019\/10\/blog-cpanel-allow-url-fopen.jpg\" alt=\"php.ini file editor in cPanel\" width=\"834\" height=\"467\" \/><\/p>\n<p>Now, you have to click in the tab <strong>Editor Mode<\/strong>.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-1794 size-full\" src=\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2019\/10\/blog-cpanel-allow-url-fopen2.jpg\" alt=\"\" width=\"548\" height=\"449\" \/><\/p>\n<p>Then, select the <a href=\"https:\/\/www.copahost.com\/blog\/create-addon-parked-domains-cpanel\/\">domain where you wish to enable allow_url_fopen in cPanel<\/a>.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-1795 size-full\" src=\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2019\/10\/blog-cpanel-allow-url-fopen3.jpg\" alt=\"domain name in web hosting\" width=\"491\" height=\"359\" \/><\/p>\n<p>After that, you will be redirected to the php.ini file. Now you need to find the line containing allow_url_fopen. In our sample, this line is located at #509. This can vary from server to server.<\/p>\n<p>You need to set this line, just like:<\/p>\n<pre class=\"lang:default decode:true \">allow_url_fopen = On<\/pre>\n<p>Afterwards, click Save.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1796 size-full\" src=\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2019\/10\/blog-cpanel-allow-url-fopen4.jpg\" alt=\"how to allow url fopen in cPanel\" width=\"728\" height=\"411\" \/><\/p>\n<p>Finally, you will see this Success message.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1797 size-full\" src=\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2019\/10\/blog-cpanel-allow-url-fopen5.jpg\" alt=\"\" width=\"365\" height=\"73\" \/><\/p>\n<h3>Conclusion<\/h3>\n<p>Any php.ini file directive can be customized per domain in cPanel. It&#8217;s very easy to allow <a href=\"https:\/\/www.copahost.com\/blog\/url\/\">URL<\/a> fopen in cPanel using these quick steps. Other PHP directives can also be changed, just like file_get_contents.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It&#8217;s very common to have the PHP directive allow_url_fopen not working in a cPanel server. This is a security directive, which is disabled by default. It&#8217;s very easy to have it enabled, as cPanel allows us to fully customize php.ini. We will show with images and examples on how to allow URL fopen in cPanel. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-1792","post","type-post","status-publish","format-standard","hentry","category-cpanel"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to allow URL fopen in cPanel - Copahost<\/title>\n<meta name=\"description\" content=\"Enable allow_url_fopen and file_get_contents in cPanel or WHM via php.ini file. Applies to shared web hosting servers. How to edit php.ini file in cPanel.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.copahost.com\/blog\/allow-url-fopen-in-cpanel\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to allow URL fopen in cPanel - Copahost\" \/>\n<meta property=\"og:description\" content=\"Enable allow_url_fopen and file_get_contents in cPanel or WHM via php.ini file. Applies to shared web hosting servers. How to edit php.ini file in cPanel.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.copahost.com\/blog\/allow-url-fopen-in-cpanel\/\" \/>\n<meta property=\"og:site_name\" content=\"Copahost\" \/>\n<meta property=\"article:published_time\" content=\"2019-10-16T19:18:59+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-10-31T14:42:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2019\/10\/blog-cpanel-allow-url-fopen.jpg\" \/>\n<meta name=\"author\" content=\"Gustavo Gallas\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Gustavo Gallas\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.copahost.com\/blog\/allow-url-fopen-in-cpanel\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/allow-url-fopen-in-cpanel\/\"},\"author\":{\"name\":\"Gustavo Gallas\",\"@id\":\"https:\/\/www.copahost.com\/blog\/#\/schema\/person\/386b3f1f79299d43f4ceb33d26428246\"},\"headline\":\"How to allow URL fopen in cPanel\",\"datePublished\":\"2019-10-16T19:18:59+00:00\",\"dateModified\":\"2024-10-31T14:42:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/allow-url-fopen-in-cpanel\/\"},\"wordCount\":260,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/allow-url-fopen-in-cpanel\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2019\/10\/blog-cpanel-allow-url-fopen.jpg\",\"articleSection\":[\"cPanel\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.copahost.com\/blog\/allow-url-fopen-in-cpanel\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.copahost.com\/blog\/allow-url-fopen-in-cpanel\/\",\"url\":\"https:\/\/www.copahost.com\/blog\/allow-url-fopen-in-cpanel\/\",\"name\":\"How to allow URL fopen in cPanel - Copahost\",\"isPartOf\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/allow-url-fopen-in-cpanel\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/allow-url-fopen-in-cpanel\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2019\/10\/blog-cpanel-allow-url-fopen.jpg\",\"datePublished\":\"2019-10-16T19:18:59+00:00\",\"dateModified\":\"2024-10-31T14:42:47+00:00\",\"description\":\"Enable allow_url_fopen and file_get_contents in cPanel or WHM via php.ini file. Applies to shared web hosting servers. How to edit php.ini file in cPanel.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/allow-url-fopen-in-cpanel\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.copahost.com\/blog\/allow-url-fopen-in-cpanel\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.copahost.com\/blog\/allow-url-fopen-in-cpanel\/#primaryimage\",\"url\":\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2019\/10\/blog-cpanel-allow-url-fopen.jpg\",\"contentUrl\":\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2019\/10\/blog-cpanel-allow-url-fopen.jpg\",\"width\":834,\"height\":467},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.copahost.com\/blog\/allow-url-fopen-in-cpanel\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.copahost.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to allow URL fopen in cPanel\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.copahost.com\/blog\/#website\",\"url\":\"https:\/\/www.copahost.com\/blog\/\",\"name\":\"Copahost\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.copahost.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.copahost.com\/blog\/#organization\",\"name\":\"Copahost\",\"url\":\"https:\/\/www.copahost.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.copahost.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2016\/03\/copahostlogo.png\",\"contentUrl\":\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2016\/03\/copahostlogo.png\",\"width\":223,\"height\":40,\"caption\":\"Copahost\"},\"image\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.copahost.com\/blog\/#\/schema\/person\/386b3f1f79299d43f4ceb33d26428246\",\"name\":\"Gustavo Gallas\",\"description\":\"Graduated in Computing at PUC-Rio, Brazil. Specialized in IT, networking, systems administration and human and organizational development\u200b. Also have brewing skills.\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/gustavo-gallas-107926196\/\"],\"url\":\"https:\/\/www.copahost.com\/blog\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to allow URL fopen in cPanel - Copahost","description":"Enable allow_url_fopen and file_get_contents in cPanel or WHM via php.ini file. Applies to shared web hosting servers. How to edit php.ini file in cPanel.","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:\/\/www.copahost.com\/blog\/allow-url-fopen-in-cpanel\/","og_locale":"en_US","og_type":"article","og_title":"How to allow URL fopen in cPanel - Copahost","og_description":"Enable allow_url_fopen and file_get_contents in cPanel or WHM via php.ini file. Applies to shared web hosting servers. How to edit php.ini file in cPanel.","og_url":"https:\/\/www.copahost.com\/blog\/allow-url-fopen-in-cpanel\/","og_site_name":"Copahost","article_published_time":"2019-10-16T19:18:59+00:00","article_modified_time":"2024-10-31T14:42:47+00:00","og_image":[{"url":"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2019\/10\/blog-cpanel-allow-url-fopen.jpg"}],"author":"Gustavo Gallas","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Gustavo Gallas","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.copahost.com\/blog\/allow-url-fopen-in-cpanel\/#article","isPartOf":{"@id":"https:\/\/www.copahost.com\/blog\/allow-url-fopen-in-cpanel\/"},"author":{"name":"Gustavo Gallas","@id":"https:\/\/www.copahost.com\/blog\/#\/schema\/person\/386b3f1f79299d43f4ceb33d26428246"},"headline":"How to allow URL fopen in cPanel","datePublished":"2019-10-16T19:18:59+00:00","dateModified":"2024-10-31T14:42:47+00:00","mainEntityOfPage":{"@id":"https:\/\/www.copahost.com\/blog\/allow-url-fopen-in-cpanel\/"},"wordCount":260,"commentCount":0,"publisher":{"@id":"https:\/\/www.copahost.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.copahost.com\/blog\/allow-url-fopen-in-cpanel\/#primaryimage"},"thumbnailUrl":"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2019\/10\/blog-cpanel-allow-url-fopen.jpg","articleSection":["cPanel"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.copahost.com\/blog\/allow-url-fopen-in-cpanel\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.copahost.com\/blog\/allow-url-fopen-in-cpanel\/","url":"https:\/\/www.copahost.com\/blog\/allow-url-fopen-in-cpanel\/","name":"How to allow URL fopen in cPanel - Copahost","isPartOf":{"@id":"https:\/\/www.copahost.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.copahost.com\/blog\/allow-url-fopen-in-cpanel\/#primaryimage"},"image":{"@id":"https:\/\/www.copahost.com\/blog\/allow-url-fopen-in-cpanel\/#primaryimage"},"thumbnailUrl":"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2019\/10\/blog-cpanel-allow-url-fopen.jpg","datePublished":"2019-10-16T19:18:59+00:00","dateModified":"2024-10-31T14:42:47+00:00","description":"Enable allow_url_fopen and file_get_contents in cPanel or WHM via php.ini file. Applies to shared web hosting servers. How to edit php.ini file in cPanel.","breadcrumb":{"@id":"https:\/\/www.copahost.com\/blog\/allow-url-fopen-in-cpanel\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.copahost.com\/blog\/allow-url-fopen-in-cpanel\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.copahost.com\/blog\/allow-url-fopen-in-cpanel\/#primaryimage","url":"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2019\/10\/blog-cpanel-allow-url-fopen.jpg","contentUrl":"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2019\/10\/blog-cpanel-allow-url-fopen.jpg","width":834,"height":467},{"@type":"BreadcrumbList","@id":"https:\/\/www.copahost.com\/blog\/allow-url-fopen-in-cpanel\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.copahost.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to allow URL fopen in cPanel"}]},{"@type":"WebSite","@id":"https:\/\/www.copahost.com\/blog\/#website","url":"https:\/\/www.copahost.com\/blog\/","name":"Copahost","description":"","publisher":{"@id":"https:\/\/www.copahost.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.copahost.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.copahost.com\/blog\/#organization","name":"Copahost","url":"https:\/\/www.copahost.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.copahost.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2016\/03\/copahostlogo.png","contentUrl":"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2016\/03\/copahostlogo.png","width":223,"height":40,"caption":"Copahost"},"image":{"@id":"https:\/\/www.copahost.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.copahost.com\/blog\/#\/schema\/person\/386b3f1f79299d43f4ceb33d26428246","name":"Gustavo Gallas","description":"Graduated in Computing at PUC-Rio, Brazil. Specialized in IT, networking, systems administration and human and organizational development\u200b. Also have brewing skills.","sameAs":["https:\/\/www.linkedin.com\/in\/gustavo-gallas-107926196\/"],"url":"https:\/\/www.copahost.com\/blog\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/posts\/1792","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/comments?post=1792"}],"version-history":[{"count":6,"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/posts\/1792\/revisions"}],"predecessor-version":[{"id":4120,"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/posts\/1792\/revisions\/4120"}],"wp:attachment":[{"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/media?parent=1792"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/categories?post=1792"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/tags?post=1792"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}