Jikdor Posted December 24, 2011 Share Posted December 24, 2011 My host (https://www.loopia.se/) have turned off allow_url_fopen for security reasons so I can not see update notifications witch is really anoying and they wont turn it on for me, they refer me to use cURL instead. i have no idea how allow_url_fopen or cURL and I'm not really up for some core prestashop moding... Is there some other module that will use cURL instead or do I simply have to change host? Link to comment Share on other sites More sharing options...
pogiputi Posted May 22, 2012 Share Posted May 22, 2012 I have exactly the same issue...any idea how we can do automatic updates using cURL instead? Link to comment Share on other sites More sharing options...
correadde Posted August 4, 2012 Share Posted August 4, 2012 Hi! I have same problem did any of you find any solution on this? Link to comment Share on other sites More sharing options...
Guest Posted September 5, 2012 Share Posted September 5, 2012 Anyone help with this? I have the same issue (Namesco) it stops me from auto upgrading, from installing new localisations etc Link to comment Share on other sites More sharing options...
Bejo Posted September 10, 2012 Share Posted September 10, 2012 i have same problem ... waiting for answer^^ Link to comment Share on other sites More sharing options...
gen_2000 Posted October 30, 2012 Share Posted October 30, 2012 I also have this problem. Furthermore the hosting provider doesn't allow to have custom php.ini for my site. Anyone can help this? Link to comment Share on other sites More sharing options...
dannunz Posted November 8, 2012 Share Posted November 8, 2012 i have same problem ... Link to comment Share on other sites More sharing options...
Christiaan_01 Posted November 8, 2012 Share Posted November 8, 2012 I had the same problem. My hosting provider recommended me to do the following: 1. Open a new file with notepad 2. Write this line: allow_url_fopen = 1 3. Save as: php.ini 4. Upload with Filezilla, or any other file-transfer program, in your public_html file, or simply the root folder of your website. Now it should work / Hope it helps Link to comment Share on other sites More sharing options...
dannunz Posted November 8, 2012 Share Posted November 8, 2012 Your solution isn't good for me: my hosting provider recommended me to let disabled allow_url_fopen for security reasons Link to comment Share on other sites More sharing options...
Christiaan_01 Posted November 8, 2012 Share Posted November 8, 2012 Well, in that case I wouldn't know. My provider had it turned off by default as well for security reasons, but allowed me to enable it if I'd really need it. Link to comment Share on other sites More sharing options...
Bejo Posted November 9, 2012 Share Posted November 9, 2012 my hosting provider is cgi so can not detect by ps code.hiks Link to comment Share on other sites More sharing options...
sw1ft25 Posted November 20, 2013 Share Posted November 20, 2013 Please answer this, I have same problem Link to comment Share on other sites More sharing options...
delete Posted November 20, 2013 Share Posted November 20, 2013 Hello, You should use the native Prestashop function : Tools::file_get_contents() This function verify if fopen is disabled, if it is, the function will use cURL to fetch the data, the result will be the same than with fopen(url) Enjoy Link to comment Share on other sites More sharing options...
Josevivas Posted March 10, 2014 Share Posted March 10, 2014 Hello, You should use the native Prestashop function : Tools::file_get_contents() This function verify if fopen is disabled, if it is, the function will use cURL to fetch the data, the result will be the same than with fopen(url) Enjoy Hello Delete, can you or someone please, give some more information about how to "use the native Prestashop function : Tools::file_get_contents()" My hosting also, and many others have killed the fopen function for security reasons, is there any way to make prestashop work with Curl only? Please someboy help ! Link to comment Share on other sites More sharing options...
vekia Posted March 10, 2014 Share Posted March 10, 2014 you can use function public function load_curl($url) { $curl = curl_init($url); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); $result = curl_exec($curl); curl_close($curl); return $result; } 2 Link to comment Share on other sites More sharing options...
trevorgilligan Posted January 26, 2015 Share Posted January 26, 2015 you can use function public function load_curl($url) { $curl = curl_init($url); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); $result = curl_exec($curl); curl_close($curl); return $result; } hi vekia, im looking to set f url open in order to use the google analytics api module... where exactly do i paste this code? and what do i set as the URL? thanks Link to comment Share on other sites More sharing options...
RokA Posted March 16, 2015 Share Posted March 16, 2015 (edited) I would also like to know how to change from fopen to curl, because the fopen is turned off by host. Could anyone write, where to change the code, so all will know what to do, please. Thank you. Edited March 16, 2015 by RokA (see edit history) 1 Link to comment Share on other sites More sharing options...
trevorgilligan Posted March 24, 2015 Share Posted March 24, 2015 you can use function public function load_curl($url) { $curl = curl_init($url); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); $result = curl_exec($curl); curl_close($curl); return $result; } hi vekia sorry for disturbing you again, where to put this code? thanks trev Link to comment Share on other sites More sharing options...
Kadenian Posted September 30, 2015 Share Posted September 30, 2015 (edited) This is the kind of support you give to the community and users in general? Well it is too damn sad.Actually, Prestashop has the worst support forum that I know until now.He is the answer my friends:You have to go and edit login_addons.tpl, that is in the next folder: admin/themes/default/template/controllers/modules The only thing you have to do is delete the next lines: {if $check_url_fopen eq 'ko' OR $check_openssl eq 'ko'} <div class="alert alert-warning"> {l s='If you want to be able to fully use the AdminModules panel and have free modules available, you should enable the following configuration on your server:'} <br /> {if $check_url_fopen eq 'ko'}- {l s='Enable PHP\'s allow_url_fopen setting'}<br />{/if} {if $check_openssl eq 'ko'}- {l s='Enable PHP\'s OpenSSL extension'}<br />{/if} </div> {else} And One of this at the bottom: {/if} That's all. Edited September 30, 2015 by Kadenian (see edit history) Link to comment Share on other sites More sharing options...
mgsg Posted November 13, 2015 Share Posted November 13, 2015 Hi, new Prestashop user here, currently on version 1.6.1.1 A number of searches has brought me to this thread and hopefully some advice regarding the "allow_url_fopen" problem. So, for example, when trying to configure the Ebay module in Modules and Services, I get the following error message:"...ebay: you must enable allow_url_fopen option on your server if you want to use this module..." also when I log in to the Addons site: "...If you want to be able to fully use the AdminModules panel and have free modules available, you should enable the following configuration on your server:- Enable PHP's allow_url_fopen setting..." I contacted my hosting company (Namesco) to ask about this and below is their reply and a possible solution(?): ===================== allow_url_fopen is disabled across all our shared hosting platform, as it poses a security risk from badly-written or malicious scripts. This is a platform-wide setting and cannot be modified.If you want to include files from third-party sites, then you need to change the code to use PHP's curl() functions instead.For example:$file = file_get_contents("http://www.example.com/page.html");would become$url = 'http://www.example.com/page.html"';$ch = curl_init();curl_setopt($ch, CURLOPT_URL, $url);curl_setopt($ch, CURLOPT_HEADER, false);curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);$file = curl_exec($ch);curl_close($ch); ====================== I wanted to ask anybody here if they may have tried changing the code as described above, whether this worked and, if so, the location of the file that needs to be changed. Thanks for any help and advice. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now