hosting server will not permit "allow url fopen enabled"

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
newvision
Forum Members
Forum Members
Posts: 77
Joined: Wed Jun 10, 2009 11:57 am

hosting server will not permit "allow url fopen enabled"

Post by newvision »

I am installing CMS 1.9.4.2 Full on a server that previously ran 1.6.5. My templates_c folder was invaded and bogus emails were sent out creating phishing. My site was suspended. I've been trying to get my site restored. When asked if the php.ini be modified to show enabled, this is the response that I got:

Please wait for an operator to respond.

You are now connected.

Live24x7: Welcome to 24x7 Technical Support Chat, my name is Paul, please hold for a moment, I am reviewing your question.

Live24x7: Hello,

Amy Adams: hi

Live24x7: The php function "allow_url_fopen" cannot be enabled since it is one of the main reasons for server hacking hence we have disabled it.

Live24x7: Since URL file-access is disabled you may get some error like "URL file-access is disabled in the server configuration filename.php". But you can use a function in curl instead of file_get_contents()" which will perform the same task for you.

Live24x7: Please contact your developer and modify the code in your filename.php as follows.

Live24x7: Instead of:

Live24x7: ---------------------------------------------------------------------------------------------

Live24x7: $file_contents = file_get_contents('http://example.com/ ');

Live24x7: display file

Live24x7: echo $file_contents;

Live24x7: ?>

Live24x7: ---------------------------------------------------------------------------------------------

Live24x7: Use this:

Live24x7: ---------------------------------------------------------------------------------------------

Live24x7: $ch = curl_init();

Live24x7: $timeout = 5; // set to zero for no timeout

Live24x7: curl_setopt ($ch, CURLOPT_URL, 'http://example.com ');

Live24x7: curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);

Live24x7: curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);

Live24x7: $file_contents = curl_exec($ch);

Live24x7: curl_close($ch);

Live24x7: // display file

Live24x7: echo $file_contents;

Live24x7: ?>

Live24x7:


I have no idea how to fix this. Can this be fixed or do I need to find another server?
newvision
Forum Members
Forum Members
Posts: 77
Joined: Wed Jun 10, 2009 11:57 am

[SOLVED] Re: hosting server will not permit "allow url

Post by newvision »

I went to anaother hosting company that permitted 'allow url fopen' enabled.
Locked

Return to “[locked] Installation, Setup and Upgrade”