Outbound port open on firewall, how to unblock for PHP?

痴心易碎 提交于 2019-11-29 12:56:50

As far as I know it is not possible to block any specific ports using PHP. (Maybe using suhosin, but I've never heard of this option.)

Could you ask your hosting provider if SELinux is enabled? SELinux allows the operating system to deny certain users/processes to bind/connect to a certain port. This could be the reason why they can connect to the SMTP server using telnet as root, but the PHP process under your own user is not able to. I've experienced CentOS servers in which I was unable to connect to port 80 with PHP/Apache, but when I executed curl/wget as root everything went great.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!