CGI - OS X problem

Andre Garzia soapdog at
Tue Oct 17 01:45:43 EDT 2006


CGIs will run as a special user, not the logged user, usualy they  
will run as nobody/nobody. This is a secure measure.

You can try to trap for the shell command known as who with

get shell("who")

this will echo que current logged users. The current user in the GUI  
session will be logged on ttyp1. After parsing it, you can just set  
the folder to /Users/<username>/Documents

hope this solves your trouble!


On Oct 17, 2006, at 3:18 AM, Sarah Reichelt wrote:

> Hi All,
> I'm just getting started with CGI under OS X. Many thanks to Jacque
> for the wonderful tutorial which has got me a long way.
> Now I have a problem because my cgi script has to access a folder in
> the Documents folder of the computer running the script. When testing
> the Rev stack, I had no problem because I used
> specialFolderPath("docs") and got there every time. In the cgi, this
> function call gives an error.
> Trying to use $USER or $HOME to get enough data to build the folder
> path myself doesn't work either. It doesn't cause an error, but
> doesn't give my any data.
> So does anyone know how I can get the path to the Documents folder, or
> the current users name when running Rev as a cgi?
> TIA,
> Sarah
> P.S. Just in case others run into the same problems I did, stacks
> saved in Rev 2.7 format will not work as CGI stacks because the Darwin
> Rev CGI stack is an older version. You have to save in legacy format
> before they will work.
> _______________________________________________
> use-revolution mailing list
> use-revolution at
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:

More information about the use-livecode mailing list