CGI - OS X problem
kray at sonsothunder.com
Tue Oct 17 01:38:18 EDT 2006
On 10/17/06 12:18 AM, "Sarah Reichelt" <sarah.reichelt at gmail.com> 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_SIGNATURE=[ADDRESS]Apache/1.3.33 Server at 127.0.0.1 Port
$SERVER_ADMIN=[no address given]
$HTTP_USER_AGENT=Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US;
rv:126.96.36.199) Gecko/20060909 Firefox/188.8.131.52
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...
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: kray at sonsothunder.com
More information about the Use-livecode