💾 Archived View for station.martinrue.com › jo › e27abd7ff9554f40b2cf035b04bf01a6 captured on 2023-03-20 at 19:18:00. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-01-29)

➡️ Next capture (2023-04-20)

🚧 View Differences

-=-=-=-=-=-=-

👽 jo

hey everyone I'd welcome some help from the people who know stuff about programming

I've been meaning to put a guestbook on my capsule but I can't really get it to work? Lagrange keeps saying the content type isn't supported (got the script from someone who's been so kind to feature it in their capsule so that can't be it).

There must be some basic step I'm missing?

8 months ago

Actions

👋 Join Station

9 Replies

👽 jo

@krixano i use agate (which doesn't support cgi scripts as it turns out) but atm i'm working on setting up jetforce. the permission thing is actually pretty helpful, i hadn't even thought of that, thanks · 8 months ago

👽 krixano

To expand on what @acidus said, if your server supports CGI, then it can simply detect whether a file's permissions are set to executable, and if it is, then the server will act as if that file is a CGI script, run it, and then return the standard out to the gemini client. What server are you using? · 8 months ago

👽 acidus

I've had a lot of success with Jetforce. Its rock solid and has CGI support. It runs on python and installs with pip which is available or super easy to install on most systems. I've set it up on both macOS and Ubuntu without any problems · 8 months ago

👽 jo

@acidus thanks, I thought it might be something like that but I understand it now.

@oofbar ah man I was afraid that'd be it. thanks to both of you tho! · 8 months ago

👽 acidus

Hi Jo, you are close. You need to put that test.sh script into your CGI folder for the server (assuming your server supporst CGI). Right now, when someone accesses test.sh, your server is just sending the contents of the file. CGI is where the server executes a script (like test.sh) and sends the output of that script to the client. Because you are sending the file test.sh (instead of the output its generates when it runs), your server is also sending the "application/x-sh" MIME, which is why you are getting the "unsupported content type" error. Your gemini client doesn't know what to do with application/x-sh. · 8 months ago

👽 oofbar

Looks like Agate only serves static files, if you're still using that. You need a server that supports CGI. · 8 months ago

👽 jo

@oofbar how can i fix that? · 8 months ago

👽 oofbar

Looks like it's serving the script rather than running it and returning its output. · 8 months ago

👽 acidus

happy to help. what’s the URL? · 8 months ago