Membership is FREE, giving all registered users unlimited access to every Acorn Domains feature, resource, and tool! Optional membership upgrades unlock exclusive benefits like profile signatures with links, banner placements, appearances in the weekly newsletter, and much more - customized to your membership level!

PHP Sockets Help

Status
Not open for further replies.
Joined
Aug 26, 2004
Posts
325
Reaction score
55
Hi all,

I'm just rewriting a couple of my PHP scripts and am trying to make use of 'socket_set_option($socket, IPPROTO_TCP,TCP_NODELAY,1)' (set just before socket_create()) for packet management. I'm not the greatest programmer in the world so does anyone have any idea why it doesn't seem to work and why I'm getting these messages:

PHP Notice: Use of undefined constant IPPROTO_TCP - assumed 'IPPROTO_TCP'
PHP Notice: Use of undefined constant TCP_NODELAY - assumed 'TCP_NODELAY'

With the very few examples that I have found, there seems to be nothing wrong with my use of socket_set_option so I just wondered if anyone had any ideas about it?

Thanks!

Chris
 
Thanks Dave but I'm on 5.3.2. I've just noticed that 5.3.3 was released two days ago - so I'll give that a try. Maybe it's a bug in 5.3.2.
 
Nope, that didn't do the trick either. It's dodgy coding and not a bug then! At least I'm up to date with PHP now though!
 
You do have sockets compiled into your php don't you? Most hosts do, but better to check! You''ll need a quick php page with phpinfo() or php -v from command line
 
Again thanks for the suggestion. I do have sockets set, yes. Sockets work fine; it's just the socket_set_option function that doesn't.
 
Status
Not open for further replies.

The Rule #1

Do not insult any other member. Be polite and do business. Thank you!

Members online

No members online now.

Premium Members

New Threads

Domain Forum Friends

Our Mods' Businesses

*the exceptional businesses of our esteemed moderators
General chit-chat
Help Users
  • No one is chatting at the moment.
      There are no messages in the current room.
      Top Bottom