Hi, sorry for my english and i hope to post in the right place.
My question is simple (i hope). I had wrote an interpreted line command web language based on C.
I had configured Apache cgi-bin to execute scripts. In the cgi-bin dir, Perl and Python scripts working fine but my own scripts show always this error:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, admin@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
The first line that run the language interpreter I'm sure is correct... what's wrong? What I must to set or send to the browser exactly?
2 replies to this topic
#1
Posted 02 February 2012 - 02:59 PM
|
|
|
#2
Posted 03 February 2012 - 02:10 AM
Some more info....
this is the error line in the Apache Log:
[Fri Feb 03 10:54:50 2012] [error] [client 127.0.0.1] malformed header from script. Bad header=ciao: demo.bpl
(I understand something wrong with header but I don't know what and what to pass to...)
This is the first line I use to execute the script:
My lang: #!c:/NEWLANG/compiler.exe
Perl: #!c:/Perl64/bin/perl.exe
Python: #!c:/Python27/python.exe
My script use 1 only line after first one:
Like web server I use WAMP in localhost with Apache 2.2.11.
:cursing:
this is the error line in the Apache Log:
[Fri Feb 03 10:54:50 2012] [error] [client 127.0.0.1] malformed header from script. Bad header=ciao: demo.bpl
(I understand something wrong with header but I don't know what and what to pass to...)
This is the first line I use to execute the script:
My lang: #!c:/NEWLANG/compiler.exe
Perl: #!c:/Perl64/bin/perl.exe
Python: #!c:/Python27/python.exe
My script use 1 only line after first one:
#!c:/NEWLANG/compiler.exe echo "ciao"
Like web server I use WAMP in localhost with Apache 2.2.11.
:cursing:
#3
Posted 03 February 2012 - 05:48 AM
I found the problem! :thumbup:
At the end of my function, inside the compiler, I add only 1 "\n" line feed. I need to add 2 line feed "\n\n" between the "Content type..." and the commands lines of the script (echo).
Now in the compiler I have this:
at the end of function echo.
This because CGI Content needs an empty line after "Content type..." command ... ;)
ty
At the end of my function, inside the compiler, I add only 1 "\n" line feed. I need to add 2 line feed "\n\n" between the "Content type..." and the commands lines of the script (echo).
Now in the compiler I have this:
printf("\n\n");
at the end of function echo.
This because CGI Content needs an empty line after "Content type..." command ... ;)
ty
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account

Back to top









