The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

fsockopen() problem.

Discussion in 'General Discussion' started by anton_latvia, Mar 17, 2005.

  1. anton_latvia

    anton_latvia Well-Known Member
    PartnerNOC

    Joined:
    May 11, 2004
    Messages:
    348
    Likes Received:
    3
    Trophy Points:
    18
    Location:
    Latvia
    cPanel Access Level:
    Root Administrator
    Here is the problem - client is unable to use fsockopen() PHP function on port 25 to connect to remote SMTP server. Both servers are running WHM, safe mode in PHP is disabled, all functions in PHP are allowed, firewall is not blocking any outgoing traffic and I can telnet on port 25. Here is what client gets from PHP...

    Warning: fsockopen(): unable to connect to remote.whm-server.com:25 in /home/<home>/public_html/demo/class.smtp.php on line 105
    SMTP -> ERROR: Failed to connect to server: Connection refused (111)
    SMTP Error: Could not connect to SMTP host.

    Any ideas what could be wrong?
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Have you enabled the WHM > Tweak Security > SMTP Tweak? If so, that would prevent it from working.
     
  3. anton_latvia

    anton_latvia Well-Known Member
    PartnerNOC

    Joined:
    May 11, 2004
    Messages:
    348
    Likes Received:
    3
    Trophy Points:
    18
    Location:
    Latvia
    cPanel Access Level:
    Root Administrator
    Uf, yes it is enabled. Is there any option to keep this tweak enabled for the whole server, except few clients?
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Not easily, AFAIK.
     
Loading...

Share This Page