Snowman30

Well-Known Member
PartnerNOC
Apr 7, 2002
679
0
316
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?
 

Snowman30

Well-Known Member
PartnerNOC
Apr 7, 2002
679
0
316
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?
 

AndyReed

Well-Known Member
PartnerNOC
May 29, 2004
2,221
4
193
Minneapolis, MN
Snowman30 said:
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.
Since you believe that Port 3006 is not open, make sure it is open.
 

Snowman30

Well-Known Member
PartnerNOC
Apr 7, 2002
679
0
316
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
 

AndyReed

Well-Known Member
PartnerNOC
May 29, 2004
2,221
4
193
Minneapolis, MN
Snowman30 said:
the firewall has 3006 open both tcp and udp incoming and outgoing
This is not the way to see if a port is open. Run this sommand:
lsof -i
or
netstat --listen

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
So, what's the problem, now?
 

Snowman30

Well-Known Member
PartnerNOC
Apr 7, 2002
679
0
316
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