Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    358
    Likes Received:
    4
    Trophy Points:
    168
    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?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,460
    Likes Received:
    21
    Trophy Points:
    463
    Location:
    Go on, have a guess
    Have you enabled the WHM > Tweak Security > SMTP Tweak? If so, that would prevent it from working.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. anton_latvia

    anton_latvia Well-Known Member
    PartnerNOC

    Joined:
    May 11, 2004
    Messages:
    358
    Likes Received:
    4
    Trophy Points:
    168
    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?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,460
    Likes Received:
    21
    Trophy Points:
    463
    Location:
    Go on, have a guess
    Not easily, AFAIK.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice