Apache+PHP equivalent for Gemini?

Is there any Gemini server software that allows for serving pages, but also allows for server-side scripting? I'm looking for whatever the equivalent to PHP might be in Gemini. I'd rather like to avoid having to modify the web server code itself.

=> Posted in: s/AskGemini | 😎 bababooey

2024-11-25 Β· 8 weeks ago

4 Comments ↓

=> πŸ’€ requiem Β· Nov 25 at 19:50:

I use gmid as a server which can work with CGI sockets (using fastgi or slowcgi). You could use PHP on the backend as long as you use it as a CGI script, ie. something that prints to stdout, I don’t think that you could do similar things to html/php β€œmixins” like with Apache. I personally use Python and Shell scripts to deliver dynamic content. But you could use anything, really, that has fastcgi support. Even compiled C code or whatever.

=> πŸ€ gritty Β· Nov 25 at 19:57:

Agree. there was a rather long thread here about the best gemini language not long ago. it's probably still on the front page.

=> πŸ‘» ps Β· Nov 25 at 22:45:

Wrote some PHP 8 / Composer server-side before. I even had started GTK client implementation in PHP, lol. Checkout these links to get code examples:

=> β€” yggverse.cities.yesterweb.org

Also, take a look at Ratchet library that provides well featured async socket API - it would cover 99% of your server-side needs:

=> β€” https://github.com/ratchetphp/Ratchet

=> πŸ’Ž pista Β· Nov 26 at 14:20:

gmcapsule or anything else with CGI support. All you need to do is make your PHP scripts executable and start the file with a shebang pointing to the PHP binary.

The guestbook and text image generators at gemini://brainsocks.xyz all run on PHP.

Proxy Information
Original URL
gemini://bbs.geminispace.org/s/AskGemini/22181
Status Code
Success (20)
Meta
text/gemini; charset=utf-8
Capsule Response Time
89.645575 milliseconds
Gemini-to-HTML Time
0.395885 milliseconds

This content has been proxied by September (ba2dc).