LiveCode Linux Server - Debian 10.9 and LC 9.6.2 - “end of script output before headers” error

Are you using LiveCode to create server scripts or CGIs?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Stryder
Posts: 36
Joined: Fri Jul 21, 2006 12:05 pm
Location: r/MrFahrenheit_451

LiveCode Linux Server - Debian 10.9 and LC 9.6.2 - “end of script output before headers” error

Post by Stryder » Wed Jun 02, 2021 3:52 am

Hi everyone,

I’m hoping someone here can help me. I tried following the tutorial for installing LiveCode Server under Linux but it seems horribly outdated.

I presently have servers running the old Runtime Revolution 3.5 server on Debian Linux 7. It’s time to migrate.

I’ve setup a VM with Debian 10.9 as a test. Default Apache which is 2.4 something.

I have the Linux server engine, 64 bit, version 9.6.2 in my /use/lib/cgi-bin

The engine is chmod 755. I have a test.lc file in cgi-bin, also chmod 755. When run through terminal, it works as expected. When trying to execute in a browser, it errors 500. Apache log complains “End of script output before headers: test.lc”.

Can anybody help? What am I doing wrong ?

Stryder
Posts: 36
Joined: Fri Jul 21, 2006 12:05 pm
Location: r/MrFahrenheit_451

Re: LiveCode Linux Server - Debian 10.9 and LC 9.6.2 - “end of script output before headers” error

Post by Stryder » Wed Jun 02, 2021 4:11 am

Ok. I’ve been working on this project on and off for almost 7 years and finally decided to move forward now that LiveCode server is very very stable on 64 bit.

I ran into the above problem and I decided to look over my past posts here and I found the solution to my problem, even though it’s not the same problem, the solution worked!

viewtopic.php?t=21064

Instead of <?lc at the start and ?> at the end, you put a shebang and path to LiveCode server at the first line and then directly the code to execute:

!#/usr/lib/cgi-bin/livecode-server

It runs perfectly now.

istech
Posts: 194
Joined: Thu Sep 19, 2013 10:08 am

Re: LiveCode Linux Server - Debian 10.9 and LC 9.6.2 - “end of script output before headers” error

Post by istech » Mon May 08, 2023 11:10 am

Hi there,

This is mainly a post for anyone looking for help with this error and how to resolve it. I have just been battling this error for a couple of days after a server migration to Debian 11.7.

With this error "500" first check you have allocated the correct permissions to "livecode-server" 755

Then if you are sure you have allocated the correct permissions look at this log, at location "/var/log/apache2/suexec" for the actual error message you are having. Fix whatever error message is in this log.

When you are just getting "cmd Livecode-server" in the log with no error message. You are normally ready to go.

However, in my case, I kept getting the same error. After days of checking my settings and trying multiple other setups. I decided to check and run all of the .lc files over the command line which actually lead to solving my problem.

I was receiving segmentation fault with all the test outputs which turned out to be a corrupt LiveCode binary. So downloaded and copied a new livecode server zip to my server, unzipped on command line and made it executable on the command line fixed my issue in 10 mins but with days of sorrow. 8) Most likely during the migration the file became corrupted somehow.

Again this is a post to help someone save some time trying to fix this error.

P.S It is not needed to add "!#/usr/lib/cgi-bin/livecode-server" to the .lc files. If you need to do this there is another issue with your server config you need to look at.

Post Reply

Return to “CGIs and the Server”