5 ms·
One thing I still love about PHP is that it's so easy to deploy. No need for fancy Amazon Web Shmervices, no need for Jamstack jumping through the hoops. Just
by bouncycastle 6y ago
One thing I still love about PHP is that it's so easy to deploy.
No need for fancy Amazon Web Shmervices, no need for Jamstack jumping through the hoops.
Just find any host that supports PHP, upload your file, and done.
- shash7 6y agoEasy to get started.. nightmare to maintain aftewards.
- raspasov 6y agoI don't use PHP anymore, but I used it for years in production. Was pretty easy to maintain (via Apache's mod_php).
- hermanradtke 6y agoIt is a problem to maintain. Simple example: how do you remove sessions in a multi server environment? Well, you can set a config to do that at random which imposes a cost for that particular request. Or you can run a corn job. This is not a decision in most other scripting languages. Don’t get me started on concurrency either...
- bawolff 6y agoWhy is this not an issue in other scripting languages? You either delete at runtime or delete in a separate process. What other options are there?
- bouncycastle 6y agoThis is a decision in all scripting languages. PHP solves concurrency very well - it just passes the problem to the web server. If you need multithreading to service a http request then you are either doing something wrong, or over-engineering the problem. Other language platforms also service requests in a single thread, including Node.
- ec109685 6y agoNode though multiplexes more than one request at a time to a single thread / process and no built in ability to clean up after itself.
- cdmckay 6y agoIt’s easy to maintain if you don’t change versions. If you upgrade, have fun finding all the pages throwing new warnings. Contrast that with going up one major version in Scala where all I need to do is fix the compile errors and then I’m confident it won’t surprise me with runtime errors.
- azangru 6y ago> no need for Jamstack jumping through the hoops. "Jamstack" sites, in their simple form, or even combined with a modest number of lambda functions, can be deployed to github pages / netlify / vercel and a number of other platforms for free. Push a commit to github, get an automatic deployment going, boom, done. I am not aware of any analogues in the php ecosystem.
- bouncycastle 6y agoYou dont need to sign up to multiple sites and maintain multiple accounts. You don't even need to use Git or lambda functions. That's what I mean by jumping through hoops. With PHP I just upload the file and done. Nothing beats this simplicity. For simple stuff, it's my favorite.
- revskill 6y agoYou need rent the hosting, login, access control panel, retrieve FPT authentication, then upload stuff. For JAMStack, just git push and done. I don't see PHP is easier ;)
- bouncycastle 6y agobut sometimes I don't even want/need to use git. Or any fancy deployment. I just want to upload my file and done.
- andykx 6y agoI agree with your core point, but the comparison to JAMStack is misguided. Push to GitHub, sign in to Netlify (or one of countless similar services), pick the repo to deploy, and you’re done.
- didibus 6y agoThat's not just PHP, you can use anything that supports CGI, and lots of shared hosting have pre-installed Perl and Python as well as PHP.
- bouncycastle 6y agoYeah, I remember fiddling with the cgi-bin directories back in the day, with the permissions and what not. With PHP you can just drop it anywhere in the htdocs and done.
- TazeTSchnitzel 6y agoCGI isn't quite as efficient as PHP with, say, FastCGI. PHP has inherited a CGI-like model but improved it.
- Kwpolska 6y agoShared hostings might offer Python, but it’s probably neglected (outdated, missing database connection libraries, etc.) and nobody really uses that. Effectively all Python web development is done using WSGI frameworks (or more recently, ASGI), and those frameworks expect to be in long-running processes, usually behind a reverse-proxy. Starting up the Django dev server takes about one second on a blank site, and it increases with code size. The `cgi` module exists, but it’s badly designed, mostly forgotten, and there were plans to remove it (PEP 594).
- sawirricardo 6y agoI agree. I deploy my apps mostly just by copy pasting the code