--- Sarah Reichelt <[EMAIL PROTECTED]> wrote: > 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 >
The tricky part is that the cgi-engine is started from the Apache process, which in turn is running as the 'httpd' user - not the user currently logged on to your computer. This 'httpd' user has no home directory. I'm afraid you'll have to find a way to transfer the user id in your query, or read it from a configuration file in a fixed location. Hope this helped, Jan Schenkel. Quartam Reports & PDF Library for Revolution <http://www.quartam.com> ===== "As we grow older, we grow both wiser and more foolish at the same time." (La Rochefoucauld) __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ use-revolution mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
