3 ms·
Not 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
by quickthrower2 3y ago
Not 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.