What to replace php with on a iMac localhost web app

I developed a web app that ran on a Mac localhost.

It used php solely to maintain the sqlite database.

The html file loaded the js which loaded all the database tables into arrays and when a table record was altered, added or deleted the php would handle it.

Apple no longer supports php so I need something to replace php.

Any recommendations?

Hi,

Apple only removed the bundled PHP installation from macOS. PHP itself is still fully supported and works fine on a Mac.

So the easiest option is just to reinstall PHP and keep your existing architecture.

E.g.: using Homebrew:

brew install php

You can then either use PHP’s built-in development server:

php -S localhost:8000

Or integrate back into whatever local server setup you were already using.


If you do want a more modern replacement, Node.js with Express and SQLite would be a fairly common modern alternative, especially since your frontend is already JavaScript.

I do a reasonable amount with JavaScript, so I’d be happy to help if you decide to go down that route.

Why are you using your custom PHP code to maintain a database?. There are a lot of free SQL clients outhere that will be more powerfull than your app.
I personally use https://dbeaver.io/, community version. I can connect not just Sqlite, but Oracle, MySQL, etc.

I understood that more as “interact with” the database. E.g. the client requests that a record be added, updated, or deleted, and the PHP script carries out the operation.

I used php because it was what I knew many years ago.

I looked briefly at DBeaver and it looks like what I need.
I assume that no server or web server is necessary.

It will be installed on my Mac desktop and MacBook and run in Safari and Chrome.

Is this correct?

You will of course require the database server, but DBeaver is a desktop app, so does not require a server itself to run. Unlike something like phpMyAdmin which runs in a browser requireing Apache and PHP to be run via server.
There are actually several desktop tools for databases like this. Just choose one you like.

Your post here inspired me to release a small webserver that I have been using for years…