1. Rob: CGI Question
- Posted by euphoriCK <euphoric at cklester.com> Oct 22, 2003
- 514 views
In my httpd-error.conf file, I'm getting "Can't create error log ex.err" (or somesuch message). Where would exu try to create that? Okay, here's the exact message: [Tue Oct 21 22:24:59 2003] [error] [client 127.0.0.1] Premature end of script headers: test.esp [Tue Oct 21 22:24:59 2003] [error] [client 127.0.0.1] Can't create error message file: ex.err
2. Re: Rob: CGI Question
- Posted by Robert Craig <rds at RapidEuphoria.com> Oct 22, 2003
- 501 views
C. K. Lester wrote: > In my httpd-error.conf file, I'm getting "Can't create error log ex.err" > (or somesuch message). Where would exu try to create that? > > Okay, here's the exact message: > > [Tue Oct 21 22:24:59 2003] [error] [client 127.0.0.1] Premature end of > script headers: test.esp > [Tue Oct 21 22:24:59 2003] [error] [client 127.0.0.1] Can't create error > message file: ex.err "Can't create ..." is an error that exu issues when it tries to open ex.err for writing, but fails. Check to see if there is already an ex.err file (in cgi-bin ?) that does not have write permissions set correctly. I've occasionally run into the situation where the process that runs my CGI program fails to create an ex.err because there is already one there that belongs to me (i.e. a different user id). The solution is just to delete that ex.err (or chmod +w ex.err) and try the CGI program again. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com
3. Re: Rob: CGI Question
- Posted by EUPHORiCK <euphoric at cklester.com> Oct 23, 2003
- 507 views
Robert Craig wrote: > > C. K. Lester wrote: > >> [Tue Oct 21 22:24:59 2003] [error] [client 127.0.0.1] Premature end >> of script headers: test.esp >> [Tue Oct 21 22:24:59 2003] [error] [client 127.0.0.1] Can't create >> error message file: ex.err > > > "Can't create ..." is an error that exu issues when it tries > to open ex.err for writing, but fails. > > Check to see if there is already an ex.err file (in cgi-bin ?) > that does not have write permissions set correctly. 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? I'm so close to having this working!!!
4. Re: Rob: CGI Question
- Posted by Robert Craig <rds at RapidEuphoria.com> Oct 23, 2003
- 551 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
5. Re: Rob: CGI Question
- Posted by "euphoric" <euphoric at cklester.com> Oct 23, 2003
- 483 views
> 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. Well, I can run the file fine (no errors) from the command line, so I know there's no errors. I only get the attempted write to ex.err when trying it via the browser (running it as an Apache CGI). > 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. Yes, it's www:www. > 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. That's a '7' isn't it, as in chmod 775? > 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. That's what I was doing when running this stuff at my host. I'll try it with my box at home as well... I just thought there was a way to keep my system "clean" and not have to do that. Thanks, Rob. -ck