T
T
Talyan2019-08-09 11:47:35
linux
Talyan, 2019-08-09 11:47:35

Why is PHP unable to access the network?

The computer is online, the routes are correct. Ping goes anywhere - everything is ok.
I execute in PHP: error:
echo file_get_contents("http://ya.ru");

# php test_sms_hs.php 
PHP Warning:  file_get_contents(http://ya.ru): failed to open stream: Network is unreachable in /usr/local/bin/test_sms_hs.php on line 7

If you put localhost instead of Yandex, then there is no error.
Tried to open through lynx - the same problem. Applications do not have access to the network.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Talyan, 2019-08-09
@flapflapjack

the problem was in the sharewall, there was a ban

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question