Could you use AppleScript? That might get you out of the sandbox where the CGI is running. What is probably stopping you is that Apache typically is run by a different user than the current "logged in" user, for security purposes.

tell application "System Events"
        set username to the current user's name
        return username
end tell

Hi All,

I've run into this problem before and solved it with Ken Ray's help,
but now (with Leopard) the old solution doesn't work.

I need to find the name of the current user on the web server
computer. The cgi stacks need to be able to find a file in the current
user's public folder, but I can't get to it if I don't know the name
of the user. I've tried my previous solution using the shell command
"who", but although "who" works fine in Terminal, it doesn't return
anything when used in a CGI script. I've also tried "whoami" and even
specialFolderPath().

Any ideas? I can't use a different file arrangement because that isn't
mine to control.

Cheers,
Sarah

---
Brian Yennie


_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to