Help with php and different ports on CentOS

  • rdx321
  • Born
  • Born
  • rdx321
  • Posts: 3

Post 3+ Months Ago

Guys, I'm having an issue with php when ever it uses a different port.

For example, I have a curl function on a php script, the function works fine as long as the port for the connection is 80, when I change it to a different port, it doesn't work. Even though I have open both the tcp in & out for that port on the CSF firewall.

When I do a curl command in the linux shell with that same port, it works..


It's also happening with a whois script that I have, the script queries the whois server on port 43, I have open the port on CSF and when I use whois on the linux shell, it works just fine.

For some reason, php can't make any connections outside of port 80.

Do any of you guys have an idea of what can be preventing php from making connections outside port 80?


I have, CentOS 5.6, Apache 2.2.3 and PHP 5.2.10
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Zealous
  • Guru
  • Guru
  • User avatar
  • Posts: 1244
  • Loc: Sydney

Post 3+ Months Ago

http://centos.org/modules/newbb/viewtop ... 2&forum=43

haha found your other post while searching for some doc's for ya, i will keep looking :P
  • rdx321
  • Born
  • Born
  • rdx321
  • Posts: 3

Post 3+ Months Ago

Lol. I'm going crazy with this. I have been trying to find out what's causing this for two days already. It's been driving me crazy..
  • Zealous
  • Guru
  • Guru
  • User avatar
  • Posts: 1244
  • Loc: Sydney

Post 3+ Months Ago

have not found much and with my lack of linux know how i am sure iptables config the access, there is a new nix addicts here i am sure one will read it within the next 24 hours.
  • Daemonguy
  • Moderator
  • Web Master
  • User avatar
  • Posts: 2700
  • Loc: Somewhere outside the box in Sarasota, FL.

Post 3+ Months Ago

Why not make php exec a shell command using shell_exec?
  • rdx321
  • Born
  • Born
  • rdx321
  • Posts: 3

Post 3+ Months Ago

Thanks for the help guys, but i finally figured it out, a user on a different forum helped me out with it. It was actually selinux that was causing the problem.

Post Information

  • Total Posts in this topic: 6 posts
  • Users browsing this forum: No registered users and 35 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.