1. Valid Euphoria Web Page?
- Posted by cklester <cklester at yahoo.com> Aug 26, 2004
- 452 views
Shouldn't this work from an Apache server on Linux? I'm getting the mysterious "Premature end of script headers:" error message. How do I troubleshoot this? Thank! :) --code starts below #!exu puts(1,"Content-type: text/html; charset=iso-8859-1\n\n") puts(1,"<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.1//EN\">\n\n") puts(1,"<html>\n") puts(1,"<head>Header</head>\n") puts(1,"<body>Hello</body>\n") puts(1,"</html>\n") --code ends -=ck "Programming in a state of EUPHORIA." http://www.cklester.com/euphoria/
2. Re: Valid Euphoria Web Page?
- Posted by CoJaBo <cojabo at suscom.net> Aug 26, 2004
- 476 views
Try this: #!exu puts(1,"Content-type: text/html\n\n")--; charset=iso-8859-1\n\n") puts(1,"<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.1//EN\">\n\n") puts(1,"<html>\n") puts(1,"<head>Header</head>\n") puts(1,"<body>Hello</body>\n") puts(1,"</html>\n") --code ends I can't test it since I don't use Apache(I use my CJBN webserver). cklester wrote: > > Shouldn't this work from an Apache server on Linux? I'm getting > the mysterious "Premature end of script headers:" error message. > > How do I troubleshoot this? Thank! :) > > --code starts below > #!exu > > puts(1,"Content-type: text/html; charset=iso-8859-1\n\n") > puts(1,"<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.1//EN\">\n\n") > > puts(1,"<html>\n") > puts(1,"<head>Header</head>\n") > puts(1,"<body>Hello</body>\n") > puts(1,"</html>\n") > --code ends > > -=ck > "Programming in a state of EUPHORIA." > <a > href="http://www.cklester.com/euphoria/">http://www.cklester.com/euphoria/</a> >
3. Re: Valid Euphoria Web Page?
- Posted by Jonas Temple <jtemple at yhti.net> Aug 26, 2004
- 487 views
- Last edited Aug 27, 2004
cklester wrote: > > Shouldn't this work from an Apache server on Linux? I'm getting > the mysterious "Premature end of script headers:" error message. > > How do I troubleshoot this? Thank! :) > > --code starts below > #!exu > > puts(1,"Content-type: text/html; charset=iso-8859-1\n\n") > puts(1,"<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.1//EN\">\n\n") > > puts(1,"<html>\n") > puts(1,"<head>Header</head>\n") > puts(1,"<body>Hello</body>\n") > puts(1,"</html>\n") > --code ends > > -=ck > "Programming in a state of EUPHORIA." > <a > href="http://www.cklester.com/euphoria/">http://www.cklester.com/euphoria/</a> > CK, When I was getting these strange errors I found it helpful to look at the Apache server logs. I can't remember off the top of my head where the server logs are, though. Maybe /etc/logs? Jonas
4. Re: Valid Euphoria Web Page?
- Posted by Andy Serpa <ac at onehorseshy.com> Aug 26, 2004
- 445 views
- Last edited Aug 27, 2004
cklester wrote: > > Shouldn't this work from an Apache server on Linux? I'm getting > the mysterious "Premature end of script headers:" error message. > > How do I troubleshoot this? Thank! :) > > --code starts below > #!exu > > puts(1,"Content-type: text/html; charset=iso-8859-1\n\n") > puts(1,"<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.1//EN\">\n\n") > > puts(1,"<html>\n") > puts(1,"<head>Header</head>\n") > puts(1,"<body>Hello</body>\n") > puts(1,"</html>\n") > --code ends > > Don't forget to set the permissions correctly so that it is executable...
5. Re: Valid Euphoria Web Page?
- Posted by Andy Serpa <ac at onehorseshy.com> Aug 26, 2004
- 448 views
- Last edited Aug 27, 2004
Also, uploading in Binary mode instead of ASCII can cause that...
6. Re: Valid Euphoria Web Page?
- Posted by cklester <cklester at yahoo.com> Aug 26, 2004
- 425 views
- Last edited Aug 27, 2004
CoJaBo wrote: > > Try this: > > #!exu > > puts(1,"Content-type: text/html\n\n")--; charset=iso-8859-1\n\n") Nope, that didn't work. What else should I try? :) -=ck "Programming in a state of EUPHORIA." http://www.cklester.com/euphoria/
7. Re: Valid Euphoria Web Page?
- Posted by cklester <cklester at yahoo.com> Aug 26, 2004
- 440 views
- Last edited Aug 27, 2004
Jonas Temple wrote: > > cklester wrote: > > > > Shouldn't this work from an Apache server on Linux? I'm getting > > the mysterious "Premature end of script headers:" error message. > > When I was getting these strange errors I found it helpful to look at the > Apache server logs. I can't remember off the top of my head where the > server logs are, though. Maybe /etc/logs? Yes, that's where I find the "Premature end of script" error message. Unfortunately, I can't find an ex.err to see if my program is crashing in the midst of execution. However, I don't think it is because it runs from the prompt just fine. -=ck "Programming in a state of EUPHORIA." http://www.cklester.com/euphoria/
8. Re: Valid Euphoria Web Page?
- Posted by cklester <cklester at yahoo.com> Aug 26, 2004
- 444 views
- Last edited Aug 27, 2004
Andy Serpa wrote: > > cklester wrote: > > > > Shouldn't this work from an Apache server on Linux? I'm getting > > the mysterious "Premature end of script headers:" error message. > > > > How do I troubleshoot this? Thank! :) > > Don't forget to set the permissions correctly so that it is executable... I verified that the permissions are set to "execute" for everyone. That didn't resolve the problem... Thanks! -=ck "Programming in a state of EUPHORIA." http://www.cklester.com/euphoria/
9. Re: Valid Euphoria Web Page?
- Posted by cklester <cklester at yahoo.com> Aug 26, 2004
- 446 views
- Last edited Aug 27, 2004
Andy Serpa wrote: > > Also, uploading in Binary mode instead of ASCII can cause that... I really thought this might be it, because I remember last time saving from Windows to Linux caused problems. Then I went and edited it on the Linux box and saved it and it worked fine! Alas, that wasn't the problem this time. Drat!!! :) -=ck "Programming in a state of EUPHORIA." http://www.cklester.com/euphoria/
10. Re: Valid Euphoria Web Page?
- Posted by irv mullins <irvm at ellijay.com> Aug 26, 2004
- 458 views
- Last edited Aug 27, 2004
cklester wrote: > > CoJaBo wrote: > > > > Try this: > > > > #!exu > > > > puts(1,"Content-type: text/html\n\n")--; charset=iso-8859-1\n\n") > > Nope, that didn't work. What else should I try? :) > Try setting up crash_file(). include machine.e crash_file("/some_directory/cgi_error") -- then rest of includes. Point crash_file to a directory which is owned by Apache. Then monitor that directory and see what happens. Irv
11. Re: Valid Euphoria Web Page?
- Posted by Andy Serpa <ac at onehorseshy.com> Aug 26, 2004
- 432 views
- Last edited Aug 27, 2004
cklester wrote: > > Andy Serpa wrote: > > > > cklester wrote: > > > > > > Shouldn't this work from an Apache server on Linux? I'm getting > > > the mysterious "Premature end of script headers:" error message. > > > > > > How do I troubleshoot this? Thank! :) > > > > Don't forget to set the permissions correctly so that it is executable... > > I verified that the permissions are set to "execute" for everyone. That > didn't resolve the problem... > > Thanks! Here's everything I can think of to double-check: -- make sure you uploaded the interpreter in Binary mode, and it is in the same directory as the script or your EUDIR variable is set properly. -- make sure you upload the scripts in ASCII mode -- scripts & the directory they are in should be chmod'd to 755 -- the interpreter itself & the directory it is in should be chmod'd to 755 (did you check that?) -- the script must output a "Content-type" line (looks like you've got that) -- use a ".cgi" extension on the scripts, or set an Apache handler for the extension you are using to "cgi-script" -- try to get it working first in your cgi-bin directory -- some servers don't allow cgi scripts just anywhere (although this is rare these days)
12. Re: Valid Euphoria Web Page?
- Posted by cklester <cklester at yahoo.com> Aug 27, 2004
- 471 views
Andy Serpa wrote: > > > cklester wrote: > > > > Shouldn't this work from an Apache server on Linux? I'm getting > > > > the mysterious "Premature end of script headers:" error message. > > > > How do I troubleshoot this? Thank! :) > > Here's everything I can think of to double-check: > > -- make sure you uploaded the interpreter in Binary mode, and it is in the > same directory > as the script or your EUDIR variable is set properly. I'm telnetting into my server. The interpreter ("exu") is in a directory called /var/www/interpreters. If I go to that directory and type "exu," it says command not found. If I type "./exu," it does nothing. Shouldn't I get the prompt that asks me for the filename to run? > -- make sure you upload the scripts in ASCII mode Check. > -- scripts & the directory they are in should be chmod'd to 755 Check. > -- the interpreter itself & the directory it is in should be chmod'd to 755 > (did you > check that?) Check. > -- the script must output a "Content-type" line (looks like you've got that) Got it. > -- use a ".cgi" extension on the scripts, or set an Apache handler for the > extension > you are using to "cgi-script" I've got an .htaccess file in my directory consisting of this: AddHandler cgi-script .esp Options +ExecCGI DirectoryIndex index.esp index.html index.htm > -- try to get it working first in your cgi-bin directory -- some servers don't > allow > cgi scripts just anywhere (although this is rare these days) I've run my .esp scripts in the past with no problem. I switched to a different directory to run some test code and now can't get it to work again! sheesh!!! This should be easier for us dummies. :/ -=ck "Programming in a state of EUPHORIA." http://www.cklester.com/euphoria/
13. Re: Valid Euphoria Web Page?
- Posted by CoJaBo <cojabo at suscom.net> Aug 27, 2004
- 435 views
cklester wrote: > > Andy Serpa wrote: > > > > cklester wrote: > > > > > Shouldn't this work from an Apache server on Linux? I'm getting > > > > > the mysterious "Premature end of script headers:" error message. > > > > > How do I troubleshoot this? Thank! :) > > > > Here's everything I can think of to double-check: > > > > -- make sure you uploaded the interpreter in Binary mode, and it is in the > > same directory > > as the script or your EUDIR variable is set properly. > > I'm telnetting into my server. > > The interpreter ("exu") is in a directory called /var/www/interpreters. If > I go to that directory and type "exu," it says command not found. If I > type "./exu," it does nothing. Shouldn't I get the prompt that asks me > for the filename to run? > > > -- make sure you upload the scripts in ASCII mode > > Check. > > > -- scripts & the directory they are in should be chmod'd to 755 > > Check. > > > -- the interpreter itself & the directory it is in should be chmod'd to 755 > > (did > you > > check that?) > > Check. > > > -- the script must output a "Content-type" line (looks like you've got that) > > Got it. > > > -- use a ".cgi" extension on the scripts, or set an Apache handler for the > > extension > > you are using to "cgi-script" > > I've got an .htaccess file in my directory consisting of this: > > AddHandler cgi-script .esp > Options +ExecCGI > DirectoryIndex index.esp index.html index.htm > > > -- try to get it working first in your cgi-bin directory -- some servers > > don't allow > > cgi scripts just anywhere (although this is rare these days) > > I've run my .esp scripts in the past with no problem. I switched to a I noiticed that http://www.cklester.com/esp/hello_world.esp generates a 500 error... > different directory to run some test code and now can't get it to work > again! sheesh!!! This should be easier for us dummies. :/ > > -=ck > "Programming in a state of EUPHORIA." > <a > href="http://www.cklester.com/euphoria/">http://www.cklester.com/euphoria/</a> >
14. Re: Valid Euphoria Web Page?
- Posted by cklester <cklester at yahoo.com> Aug 27, 2004
- 439 views
CoJaBo wrote: > I noiticed that <a > href="http://www.cklester.com/esp/hello_world.esp">http://www.cklester.com/esp/hello_world.esp</a> > generates a 500 error... Yeah, and it worked fine before! WAAAAAAAAAHHHH!!! :( -=ck "Programming in a state of EUPHORIA." http://www.cklester.com/euphoria/