💾 Archived View for bbs.geminispace.org › s › AskGemini › 22181 captured on 2024-12-17 at 15:09:18. Gemini links have been rewritten to link to archived content

View Raw

More Information

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

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

Nov 25 · 3 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.