471,072 Members | 1,549 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,072 software developers and data experts.

Unable to create socket

HI all,

I have PHP5.1.2 & Apache on my PC and I'm trying to connect PHP via a
socket to a java app acting as a server.

I'm failing at the first PHP hurdle.

The following line returns fatal error : Call to undefined function
socket_create() in <filename>.php
$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);

Configuration: Php.ini lines
default_socket_timeout = 60
extension_dir = "./"
; tried with "./ext" same result... so I coppied php_sockets.dll
to php5 root folder
enable_dl = On ;maybe not relevant

The only socket related items I can find are
Registered Stream Socket Transports | tcp, udp
default_socket_timeout | 60

Does anybody know what I'm doing wrong?

Thanks for reading this.

Aug 14 '06 #1
1 4215
The answer is simple.

It's the damn firewall... there are no warnings or notices when the
module doesn't show.

If you are using zone alarm or the likes, add php to the program list
and specifically allow internet access.

This goes for the hundreds of other people who have posted similar
messages and can get no explantaion.

Aug 14 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Paul.Net | last post: by
3 posts views Thread by tshad | last post: by
3 posts views Thread by ros | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.