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
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!
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;
}
Any ideas? I'm going crazy!