I searched through the archive, there are similar questions, but I didn't have luck finding an answer.
Whenever I call fopen, file, readfile, or a filesystem function to open a http connection I receive that error:
$fp = fopen("http://example.com/");
Warning: Bad file descriptor on line X
Any ideas on how I can solve it?