PHP - file get contents(): https:// wrapper is disabled in the server configuration by allow url fopen: различия между версиями
Материал из Wiki - Iphoster - the best ever hosting and support. 2005 - 2024
Admin iph (обсуждение | вклад) (Новая страница: «=== PHP - file get contents(): https:// wrapper is disabled in the server configuration by allow url fopen === Ошибка при пополнении счет...») |
Admin iph (обсуждение | вклад) |
||
Строка 1: | Строка 1: | ||
+ | [[Файл:B_1.gif |link=https://bit.ly/3tbFsd6| Доступная цена]] | ||
+ | |||
=== PHP - file get contents(): https:// wrapper is disabled in the server configuration by allow url fopen === | === PHP - file get contents(): https:// wrapper is disabled in the server configuration by allow url fopen === | ||
Текущая версия на 12:10, 29 октября 2021
PHP - file get contents(): https:// wrapper is disabled in the server configuration by allow url fopen
Ошибка при пополнении счет на сайте:
PHP Warning: file_get_contents(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /home/user1/public_html/site.io/test.php on line 3 PHP Warning: file_get_contents(https://currency.paykassa.pro/index.php?currency_in=BNB¤cy_out=USD): failed to open stream: no suitable wrapper could be found in /home/user1/public_html/site.io/test.php on line 3
Означает, что не включена опция allow_url_fopen
https://www.php.net/manual/ru/filesystem.configuration.php#ini.allow-url-fopen Данная директива включает поддержку обёрток URL (URL wrappers), которые позволяют работать с объектами URL как с обычными файлами. Обёртки, доступные по умолчанию, служат для работы с удалёнными файлами с использованием ftp или http протокола. Некоторые модули, например, zlib, могут регистрировать собственные обёртки.
Для Cpanel включаем через php.ini конкретного сайта:
# egrep -r allow /home/user1/public_html/site.io/php.ini allow_url_fopen = On