How to enable file_get_contents in Plesk Onyx?

David Beroff

Well-known member
Registered
Joined
Jun 14, 2016
Messages
1,411
Points
63
My website requires file_get_contents to work but it is getting this error when I tried to with this command

Code:
<?php
ini_set("display_errors", "1");
error_reporting(E_ALL);
echo file_get_contents("https://www.google.com/search?q=something");
?>

Code:
Warning: file_get_contents(https://www.google.com/search?q=something): failed to open stream: HTTP request failed! HTTP/1.0 429 Too Many Requests in /var/www/vhosts/example.com/httpdocs/filegetcontents-test.php on line 5
I checked PHP Settings in Plesk admin and allow_url_fopen is still enabled but file_get_contents is being disabled.

My question is: How to enable file_get_contents in Plesk Onyx?

Thanks in advance.
 

David Beroff

Well-known member
Registered
Joined
Jun 14, 2016
Messages
1,411
Points
63
@cochinweb
I waited for a long time but its still be there.
Where to change adjust its setting for this issue?
A strange thing is, when I change to other sites then it worked, just with Google.com then it showed that error.
 
Recommended Threads

Latest postsNew threads

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top