file_get_contents Remote Server Access Your server is blocking "Remote Server Connection"

June 5, 2019 205 views
PHP WordPress

Getting the following error:
filegetcontents Remote Server Access
Your server is blocking “Remote Server Connection”. Please contact your host provider to allow “filegetcontents” php function.

Wordpress, trying to get a YouTube gallery working.

Thanks for any input!

1 Answer

You would generally need to adjust your php configuration to allow_url_fopen.

https://www.php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen

There is a DO Community Tutorial that may assist you.

https://www.digitalocean.com/community/tutorials/how-to-change-your-php-settings-on-ubuntu-14-04

by Jon Schwenn
PHP is a server side scripting language used by many popular CMS and blog platforms like WordPress and Drupal. It is also part of the popular LAMP and LEMP stacks. Updating the PHP configuration settings is a common task when setting up a PHP-based website. This guide will show how to view the current PHP configuration settings of your web server and how to make updates to the PHP settings.
Have another answer? Share your knowledge.