flat assembler
Message board for the users of flat assembler.

Index > Linux > Flatassembler as CGI [HOW TO - NEED HELP]

Thread Post new topic Reply to topic

Joined: 27 Apr 2006
Posts: 339
sylwek32 16 Aug 2006, 05:50
if i try to put the Linux version of FASM Compiler into my CGI-BIN
and CHMOD IT TO 777 it shows me:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@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.
A litte error.log cutout:

[Tue Aug 15 13:21:01 2006] [error] [client XXX.XXX.XXX.XXX] malformed header from script. Bad header=flat assembler version 1.66: /usr/lib/cgi-bin/fasm

Can somebody make a CGI version of FASM?
Wourld be great..
Post 16 Aug 2006, 05:50
View user's profile Send private message Reply with quote

Joined: 10 Aug 2006
Posts: 17
Location: Denmark
lsa 17 Aug 2006, 16:37
First of all you probably want to compile your program and then put the executable in the cgi directory.
The problem is probably that your "script" doens`t start with the header:
db "Content.-type: text/html",10,10

This needs to be send as the _first_ thing.
Ofcourse this could be text/plain or any other format you want to send.

This header needs to be send to STDOUT(fd 1), without the db and " ofcourse..

You may need/want to read the HTTP 1/0 and 1/1 to learn about all the headers which can be send.

CGI script only needs execute permissions in normal cases, but you probably know this.

If this didn`t solve your problem - post your code or some of it (the importent part).
Post 17 Aug 2006, 16:37
View user's profile Send private message Reply with quote

Joined: 30 Sep 2009
Posts: 10
codesz 18 Nov 2009, 08:33

change this


_logo db 'Content-Type: text/plain',13,10,13,10
db 'flat assembler version ',VERSION_STRING,0


mov [con_handle],1 ;2
call display_user_messages

mov [con_handle],1 ;2
Post 18 Nov 2009, 08:33
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum

Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.