Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

PHP Warning: socket_write()- unable to write to socket [1]: Operation not permitted

Discussion in 'General Discussion' started by awshima, Oct 12, 2009.

  1. awshima

    awshima Registered

    Oct 12, 2009
    Likes Received:
    Trophy Points:

    I'm new to cPanel, and I'm configuring my first cPanel server.

    I'm having problems though with the first site I tried to migrate from Plesk to cPanel.

    This site have a PHP page that uses the socket_write() function, and it's not working.

    I receive error messages like this:

    [Mon Oct 12 12:44:37 2009] [error] [client] PHP Warning: socket_write() [<a href='function.socket-write'>function.socket-write</a>]: unable to write to socket [1]: Operation not permitted in /home/zooming/public_html/avail_client.php on line 316

    The same page works fine in Plesk.

    All I've found in the internet says that this function can only be used by root.

    My problem is that it was working in Plesk (I'm getting worried about that, but that's another history), and now it's not working in the new server, and I can't figure out why.

    Can anyone help me?

    Thank you.
  2. larwilliams

    larwilliams Active Member

    Apr 14, 2008
    Likes Received:
    Trophy Points:
    Check /usr/local/lib/php.ini for "disable_functions" and see if socket_write is in the comma-separated list.

    I've never seen anything saying that socket_write works for root only. There is no mention of this on the PHP site page:

    PHP: socket_write - Manual

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice