How to enable file_get_contents in Plesk Onyx?

David Beroff

Well-known member
Registered
Joined
Jun 14, 2016
Messages
1,510
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,510
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.
 
Latest Threads
Replies
0
Views
544
Replies
2
Views
519
Replies
1
Views
457
Replies
2
Views
1,039
Replies
1
Views
672
Recommended Threads
Replies
2
Views
2,799
Replies
0
Views
2,012
Replies
2
Views
4,811
jms
Replies
5
Views
5,680
Replies
4
Views
17,647

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