Skip to main content

Thread: Can't connect to local socket, connection refused


i've been @ few days , can't crack problem. have local socket in /tmp/mysockets create in php script--

code:
if (($sock = socket_create(af_unix, sock_stream,0)) === false)   {      echo "socket_create() failed: reason: " . socket_strerror(socket_last_error()) . "\n";          exit();  }
but cannot connect, via

code:
if (socket_connect($sock, $sock_str) === false)   {          echo "socket_connect() on " . $sock_str . " failed: reason: " . socket_strerror(socket_last_$          socket_close($sock);          exit();  }
this gives me

warning: socket_connect(): unable connect [111]: connection refused in /var/www/myscript.php on line 66 socket_connect() on /tmp/mysockets/sock failed: reason: connection refused
now, sounds permissions issue, i've chmod 777'ed /tmp, mysockets, , sock, , doesn't matter. problem?

matt



Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [ubuntu] Can't connect to local socket, connection refused


Ubuntu

Comments

Popular posts from this blog

Joomla 3.3 Installation Error message - Joomla! Forum - community, help and support

Multilanguage infinite redirect loop error. - Joomla! Forum - community, help and support

trim media limit reached