3

I have a php question about fsockopen

Server:

VPS CentOS 6.3 (Final) PLESK 11

Problem:

If i use FastCGI the function fsockopen is not working. I get: Warning: fsockopen(): unable to connect to xx.xx.xx.xx:80 (Permission denied)

If i edit the website (for testing) in plesk 11 and set it to apache it works.

I can't find the fix for this problem. Somebody has a clue?

Mike
  • 51
  • 1
  • 5

1 Answers1

8

Disable selinux or add a new rule to let apache open remote connections

to add a rule use

setsebool -P httpd_can_network_connect 1

to disable selinux or set it in permissive mode edit your

/etc/selinux/config
Dario
  • 81
  • 2