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?
2 years 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 路 2 years 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? 路 2 years 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 路 2 years 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! 路 2 years 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. 路 2 years ago
Looks like Agate only serves static files, if you're still using that. You need a server that supports CGI. 路 2 years ago
@oofbar how can i fix that? 路 2 years ago
Looks like it's serving the script rather than running it and returning its output. 路 2 years ago
happy to help. what鈥檚 the URL? 路 2 years ago