Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

For me it wasn't cultural.

Perl was my first language because I wanted to make interactive websites and that was the most common way to do it in the late 90s. Shortly after, everyone switched to PHP because mod_php was much faster than Perl CGI scripts.





Surely the people who had purely performance problems with Perl CGI scripts moved to mod_perl? I didn't figure out when mod_php was introduced from casual searching, but given that mod_perl is only a year younger than PHP it must've been available to almost anyone who was considering rewriting their app in PHP. So I have to imagine there were additional reasons.

Wikipedia says that this source [1] claims early versions of PHP were built on top of mod_perl, but I can't access the archive right now for some reason so I can't confirm.

[1] https://web.archive.org/web/20130625070202/http://www.theper...


mod_php was distributed w/ Apache httpd, so it was "already installed". mod_perl needed to be installed manually, so it posed immediate friction, if not a complete freeze-out, depending on the situ. I believe that was why PHP became popular.

Systems with mod_perl (or just Perl allowing normal CGI) installed, especially shared hosting was so common as to be the norm in the late 90s and early 00s.

I think instead the biggest reason PHP took off was it had far less deployment friction and better aesthetics than Perl did on machines where you didn't have admin access, basically ever shared web hosting ever.

Typically CGI scripts on shared hosting were limited to explicit cgi-bin directories that had +ExecCGI. At the same time hosts would often not enable mod_rewrite because it could get computationally expensive on hardware of the era.

This all meant that all your dynamic content had to live at some "/cgi-bin/" path. It could be difficult to have a main landing page be dynamic without an empty index HTML just having an HTTP-Refresh meta tag to your "/cgi-bin/" path.

Contrast with PHP which would be processed from any directory path and was its own built-in templating language. It was also usually included in the DirectoryIndex list so an index.php would act as a directory index leading to cleaner URLs.

In the era when deployment mean MPUT in an FTP client those small differences made a difference for people trying to make their first dynamic website and look "professional".




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: