4 ms·
php runs securely in 5minutes in any web server 3-10$/month. Every other tech, it's complicated servers or complicated billing, not to mention depencies and bu
by anonymous344 3y ago
php runs securely in 5minutes in any web server 3-10$/month.
Every other tech, it's complicated servers or complicated billing, not to mention depencies and build tools.
thats why php
- quickthrower2 3y agoNot sure why it is downvoted as this is true. That said it is more to do with shared hosts culture choosing PHP than PHP itself. (They tend to support Ruby and Node but not as well)
- nasretdinov 3y agoPHP is also pretty easy to support for shared hosting, as what they essentially need is just an Apache module (+ nginx probably), some clever filesystem permissions and they're done. For node, Python, etc, you actually need to keep the application servers running, which has to stay running even when they're completely idle. So I think PHP is a natural choice for shared hosting for those reasons too.
- oaiey 3y agoThis is exactly to the reason why PHP and before perl are successful in this space. When you extrapolate that to modern tech, you could create a shared hoster with a configured reverse proxy and per customer docker images. But that is so much expensive to build, operate and bill than an apache. And looks very close to AWS and friends.
- azlev 3y agoI worked 10+ years in a web hosting company. PHP was chosen not because it was easy, it's because most people just use a CMS or something in PHP. Keep a shared host secure, PHP or something else was not an easy task, most people installed unsecure versions or misconfigure something. Also it was a pain to support PHP versions after EOL (yes, money), and multiple versions .
- xigoi 3y ago> For node, Python, etc, you actually need to keep the application servers running Not with CGI.
- nasretdinov 3y agoYou're technically right, however I imagine performance would be really poor, especially for Node. PHP has transparent opcache support and it's generally fairly efficient when run as Apache module, so it's usually preferred. You can of run PHP as CGI as well, however it's much slower.
- 1023bytes 3y agoWell it's not exactly secure by default. I was deploying an app to a new server and some bot grabbed my .env file before I finished the Apache config. Ultimately it's my own stupidity, but you don't have to worry about that with most other languages
- gumballindie 3y agoYes but that’s a framework specific issue. And usually your documentroot would point to a directory below that which holds .env. Oh the memories of apache and php.
- tacker2000 3y agoYour comment makes no sense. How is that framework or PHP specific? Its simply a misconfiguration the server.
- gumballindie 3y agoSome frameworks in the old days of PHP relied on .htaccess files to restrict access to unwanted files. Properly implemented frameworks would load everything from a directory above the documentroot to avoid these issues.
- tacker2000 3y ago.htaccess is a config file type used by the Apache web server. The server software reads the config file and then decides if the folder can be accessed externally or not. It has nothing to do with PHP what framework or any other language you are running.
- gumballindie 3y ago> .htaccess is a config file type used by the Apache web server. Yup. That's why I am saying that in the past .htaccess used to be used, but modern php frameworks no longer rely on it. Poor phrasing on my end.
- prfssnl 3y agoTrue. I setup a woocommerce site for someone 3 years ago, still makes around $1000 a month (pretty good for a small biz in India) and I just helped them downgrade from a $10 digitalocean VPS to a $3 cpanel hosting.
- throwmeout123 3y agoClassic php ecommmerce customer: miserable cheapskate that thinks saving 80 dollars a year is great, had my fair share of these
- timeon 3y agoI wish cheap server hostings allowed loading php modules or at least had FFI module. Imagine thin php API-layer with rust-or-whatever-module under the hood. Easy deploying toys without need of VPS.
- todotask 3y agoDoesn't cPanel supported several langauge including NodeJS runtime? I think most projects use composer or PHP packages. Thanks to cPanel (written in Perl) this make life easier for developers to set up websites and skipped the ceremony but why is cPanel written in Perl instead of PHP? But Go language has it own security implementations which are more secure and easier to deploy as a static binary. I did tried to write entire Go app using only built-in or some dev use Chi for routing. I didn't have to install Go runtime on VPS that you need for PHP. Go built-in HTML template is quite secure, rare seen some fix to html/template make it easier to deploy new app, but our website has evolved with Astro web framework that require NodeJS since none of the server side language can solve client-side issues.