Re: Apache, Euphoria, and include files
- Posted by "Kat" <gertie at visionsix.com> May 30, 2004
- 464 views
On 30 May 2004, at 11:25, Greg Haberek wrote: > > > posted by: Greg Haberek <ghaberek at wowway.com> > > > Ok, so I've installed RedHat 9.0 (text-mode) on my laptop for testing > purposes. > I setup Apache 2.0.4 and installed Euphoria 2.4. I wrote a quick little script > and threw it into the /var/www/cgi-bin directory. > > }}} <eucode> > #!/euphoria/bin/exu > > constant text = > "Content-type: text/html\n\n" & > "<HTML>\n" & > "<HEAD>\n" & > " <TITLE>Hello World!</TITLE>\n" & > "</HEAD>\n" & > "\n" & > "<BODY>\n" & > " <CENTER>\n" & > " <H1>Hello World!</H1>\n" & > " </CENTER>\n" & > "</BODY>\n" & > "\n" & > "</HTML>\n" > > puts(1, text) > </eucode> {{{ > > So, there you have it, a simple "Hello World!" page. No problem, right? Right. > Here's my problem: I'm trying to write a little library to assist me in my > HTML > endeavors, called html.e. If I insert a line "include html.e" then the script > doesn't run. Instead, from my web brower (on another computer on my network) I > get a "Server error!" "Error Message: Premature end of script headers: > test.exu" > I've looked through Rob's code for asearch.exu (for the Archive) and he has > plenty of include files, so where am I going wrong? If I have no inlude files > the script runs fine, the second there is an include file the script crashes. I don't know *nix, but can i suggest the script crashes once it sees the first /n? You don't need any of them in html. Maybe keep one at the end so the server knows you are done. But you are right, the \n should be all acceptable. Kat