posix_setuid() is broken on snow leopard. why?!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hazelfelix
    New Member
    • Apr 2010
    • 1

    #1

    posix_setuid() is broken on snow leopard. why?!

    posix_setuid() is broken for me on snow leopard.
    I can't get this code snippet to return anything other than Error when executed in PHP 5.3.1 / Apache 2.2.14 on OSX 10.6.3

    Code:
    // Set our real user ID to root
        $success = posix_setuid(0);
        if (!$success)
        {
            print "Error: Cannot setuid().\n";
            return 1;
        }
    I know this same code snippet works on my other machine running PHP 5.3.1 / Apache 2.2.12 on Ubuntu 9.10.

    Any ideas? I'm going crazy!
Working...