• Welcome to AcornDomains.co.uk, a friendly community for UK domain investors, developers and anyone interested in domain names.

    Whether you're looking to buy or sell domains, learn more about the UK domain market, get feedback on your names, or simply chat with other domainers, you're in the right place. AcornDomains has been bringing together people from across the UK domain industry for many years, from complete beginners to experienced investors.

    Have a look around, join the discussions and, if you haven't already, create a free account and introduce yourself.

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.
Top Bottom