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.

weird fsockopen() issue

Discussion in 'General Discussion' started by Snowman30, May 19, 2005.

  1. Snowman30

    Snowman30 Well-Known Member
    PartnerNOC

    Joined:
    Apr 7, 2002
    Messages:
    681
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    I have a weird fsockopen() issue on one of my servers.

    I have a php library for a merchant processor setup in /usr/lib and its all compiled correctly.

    The test script should connect to it using fsockopen() on 127.0.0.1 on port 3006 however hsi isnt working.

    It seems as thoug port 3006 isnt open.

    Ive added the port to my TCP and UDP setitngs of my firewall and added:

    iptables -A INPUT -p tcp --dport 3006 -j ACCEPT
    iptables -A OUTPUT -p tcp --dport 3006 -j ACCEPT

    to my iptables but still no joy.

    anyone have any ideas on what the problem could be?
     
  2. Snowman30

    Snowman30 Well-Known Member
    PartnerNOC

    Joined:
    Apr 7, 2002
    Messages:
    681
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    I know this is an old thread but i now have the same issue again this time on a server running PHP 5.0.5

    Im contantly getting an error saying i cant open loalhost again and i have allow_url_fopen set to On in the php.ini and php was not compiled with safe mode

    anyone have any ideas as this is doing my head in?
     
  3. Snowman30

    Snowman30 Well-Known Member
    PartnerNOC

    Joined:
    Apr 7, 2002
    Messages:
    681
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    anyone?

    Im getting desperate
     
  4. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    Since you believe that Port 3006 is not open, make sure it is open.
     
  5. Snowman30

    Snowman30 Well-Known Member
    PartnerNOC

    Joined:
    Apr 7, 2002
    Messages:
    681
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    sorry that was a typo

    the firewall has 3006 open both tcp and udp incoming and outgoing

    A bit of further research has also found that the dl() function in PHP isnt loading a module that it should be for this script

    Ive recompiled PHP twice now and the only difference between this server and the rest of our servers is that this ones running PHP 5.0.5 and the rest are still back on 4.4.2
     
  6. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    This is not the way to see if a port is open. Run this sommand:
    lsof -i
    or
    netstat --listen

    So, what's the problem, now?
     
  7. Snowman30

    Snowman30 Well-Known Member
    PartnerNOC

    Joined:
    Apr 7, 2002
    Messages:
    681
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    as i have already said the port is open ( im not stupid i just made a typo)

    I cannot connect via localhost using fsockopen() to port 3006 or 3007

    this appears to only be an issue on this particular server
     
Loading...

Share This Page