CGI - OS X problem

Ken Ray kray at
Tue Oct 17 01:38:18 EDT 2006

On 10/17/06 12:18 AM, "Sarah Reichelt" <sarah.reichelt at> 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?

Well, I don't think you can get that information from the CGI - I ran a
test, and although there were many globals available, none of them
identified the current logged in user.

I modified my "Hello.cgi" to return the list of globals for my OS X machine,
and here's what I got:

$SERVER_SOFTWARE=Apache/1.3.33 (Darwin)
$SERVER_SIGNATURE=[ADDRESS]Apache/1.3.33 Server at Port

$SERVER_ADMIN=[no address given]
$HTTP_USER_AGENT=Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US;
rv: Gecko/20060909 Firefox/

My user name on this machine is "kenray", and you can see that nowhere does
this appear. But perhaps one of these might help you...

Ken Ray
Sons of Thunder Software
Web site:
Email: kray at

More information about the Use-livecode mailing list