Re: Rob: CGI Question
- Posted by Robert Craig <rds at RapidEuphoria.com> Oct 23, 2003
- 474 views
C. K. Lester wrote: > I don't know what folder to check. It can't be cgi-bin because I don't > have it in there. The only place I have an executable exu is > /usr/local/euphoria/bin. The place where my CGI file resides is > /usr/local/www/data/MPG. I created an ex.err and chmod +w it, but I > still get the "Can't create" message. > > Does it create an ex.err for trace(3), or is it buggy reporting that? I > can run my file and receive no errors, but it does have a trace(3) > command in it. In fact... let me try something real quick... Okay, I'm > thinking that the "Can't create error message ex.err" should in fact be > "Can't create log file ctrace.out." Could that be right? If you turn on trace(3), exu will try to create a "ctrace.out" file in the current directory. ex.err is only produced when there's an error. File permissions on Linux/FreeBSD can be tricky. The process that runs your Euphoria CGI program probably runs as a different user id than you. On RapidEuphoria.com (FreeBSD) CGI programs run under user "nobody" with the group set to one that both "nobody" and my user id belong to. I don't know what permissions files in /usr/local/www might have, but to write a new file in a directory, the CGI program will need write permission on the directory itself. For me, all my CGI programs are in cgi-bin, and that's where ex.err, ex.pro and ctrace.out appear. There's a file called .htaccess in cgi-bin that gives permission for CGI programs to run from cgi-bin. I believe .htaccess is an Apache-defined thing. I store a copy of exu plus the .e files from euphoria/include in cgi-bin, because "nobody" doesn't know about "EUDIR", nor does it have euphoria/bin on its path. I don't own the machine that runs RapidEuphoria.com, I'm just an ordinary user. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com