socket_connect() fails only when called from apache

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • monac3@gmail.com

    socket_connect() fails only when called from apache

    Hello.

    I have made a php network client module which connect to an internal
    server and retrieve data using php socket functions. It worked fine but
    in some systems, it socket_connect( ) fails with 'Permission denied'
    error.

    There is no firewall or any network problem in that machine. Weird
    thing is that the error happens only when I call the php file from
    apache server. When I just execute the php code with php command line,
    it works fine. It looks just like apache blocks outgoing TCP/IP
    connection.

    System of the problem is Fedora Core 4 with httpd 2.0.54 and php 5.0.4
    installed.
    Any idea is welcomed.

Working...