socket_bind()[function.socket-bind]:无法绑定地址[13]:权限被拒绝 [英] socket_bind() [function.socket-bind]: unable to bind address [13]: Permission denied

查看:504
本文介绍了socket_bind()[function.socket-bind]:无法绑定地址[13]:权限被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在基于websocket协议构建一个聊天应用程序.我将其上传到apache服务器上并且出现此错误:

I am building a chat application based on websocket protocol.I am uploading this on an apache server and i am getting this error :

警告:socket_bind()[function.socket-bind]:无法绑定地址[98]:地址已在使用中"

"Warning: socket_bind() [function.socket-bind]: unable to bind address [98]: Address already in use"

我正在使用端口号. 12346.当我检查此端口的状态时,我得到"12346没有响应".

I am using port no. 12346. When i checked this port's status i got "12346 is not responding".

我检查了远程服务器上的许多端口,但没有一个响应.所以请告诉我如何检查是否有可用的端口?

I have checked many ports on my remote server ,none of them is responding.So please tell me how to check if there is a usable port which i can use??

我也使用了端口80和443,但出现错误:

I have also used port 80 and 443 but i am getting the error:

Permission Denied

推荐答案

我看到您正在使用apache-这很可能是问题所在.您需要将脚本作为守护进程运行,或者至少从外壳程序运行,除非您在Windows主机上,否则您将需要root权限来访问1024以下的端口.

I see that that you're using apache - this is most likely the problem. You need to run the script as a deamon or at least from a shell, and you will need root privileges for ports under 1024 unless you're on a windows host.

这篇关于socket_bind()[function.socket-bind]:无法绑定地址[13]:权限被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆