The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

    Joined:
    Oct 12, 2009
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    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 200.186.179.53] 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.
    Alexandre
     
  2. larwilliams

    larwilliams Active Member

    Joined:
    Apr 14, 2008
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    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
     
Loading...

Share This Page