💾 Archived View for station.martinrue.com › jo › e27abd7ff9554f40b2cf035b04bf01a6 captured on 2023-07-22 at 18:05:12. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2023-05-24)
-=-=-=-=-=-=-
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?
1 year ago
@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 · 1 year ago
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? · 1 year ago
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 · 1 year ago
@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! · 1 year ago
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. · 1 year ago
Looks like Agate only serves static files, if you're still using that. You need a server that supports CGI. · 1 year ago
@oofbar how can i fix that? · 1 year ago
Looks like it's serving the script rather than running it and returning its output. · 1 year ago
happy to help. what’s the URL? · 1 year ago