3 ms·
>PHP made web development accessible to the masses. Because PHP is embedded in the HTML itself, it is way easier to work with than Perl or Java, especially in t
by dispose13432 10y ago
>PHP made web development accessible to the masses. Because PHP is embedded in the HTML itself, it is way easier to work with than Perl or Java, especially in the context of The Web In 1999.
PHP didn't make it easy. It made it possible.
Until fairly recently, getting a VPS was insanely expensive, so any learner, hobby, startup went to shared hosting.
As a result, any tech which required starting servers or elevated permissions was out, so Java and ISAPI (remember that?) were out.
So the only choice was PHP/ASP or perl/C/tcl cgi scripts.
cgi scripts had to be located in the /cgi-bin directory, so they looked ugly in the URL and simply wasn't designed for the web (so no url_parsing libraries (but no register_globals!)) and no git/github/blogs/stackoverflow whee to just go and download them.
So one had a choice between PHP and ASP.
ASP costed quite a bit more for the license, so PHP took over the internet.
- kalleboo 10y agoCGI scripts were also a lot harder to secure on shared hosting. I remember the hosts supporting them required security review before being installation. Then PHP came along with safe_mode and open_basedir, and if there were commonly-deployed solutions for CGI after that, I sure didn't see them because everyone was already using PHP.
- dispose13432 10y agoI was lucky. I was able to upload cgi myself. It was just too much hassle for little gain (whatever security exploits you'd get in PHP, you'd get writing your own C code). Oh, and how can I forget, mod rewrites were a terrible pain, so if you wanted your website to be dynamic (so you can have, say, your login name at the top corner), you'd have to make your website look like http://www.example.com/cgi-bin/main.pl?url=/directory/page5 http://www.example.com/cgi-bin/main.pl?url=/directory/page5
- 500carrots 10y agoNo. You could give CGIs any filename, in any directory, on many shared hosting environments in the 90s. I know because I did it. Some shared hosting providers allowed persistent processes. Also, in the 90s, many small businesses self-hosted on tower PCs connected by fractional T1s. Many hobbyists self-hosted on dorm Ethernet (which had publically routed static IPs then) or got a corporate network administrator buddy to give them bootleg colocation. PHP was successful because it was embedded in the HTML which lowered the barrier of entry. That's the only reason.
- dispose13432 10y ago>Also, in the 90s, many small businesses self-hosted on tower PCs connected by fractional T1s You were lucky you weren't on a 14.4 kbps modem sharing a phone line with the family, on a dynamic IP, and had an extra PC to devote to hosting a website which could stay on 24/7. Oh, and weren't scared that someone would hack into your home network just for fun. > Some shared hosting providers allowed persistent processes Most didn't. > PHP was successful because it was embedded in the HTML which lowered the barrier of entry. That's the only reason. No. That's not the _only_ reason. Right now, unless $5/10 a month is too much, you can get root on a VPS on DO. How much did these features cost back then?
- dispose13432 10y ago>PHP was successful because it was embedded in the HTML which lowered the barrier of entry. That's the only reason. JSP also allowed Java code in HTML (The new syntax came later). Yet, it never took off (though being a memory hog back then definitely didn't help it).
- aindhaden 10y agoThere were a few CGI script websites around, like Matt's Script Archive and his (in)famous FormMail.pl. There were also URL libs, eventually, as well as other CGI-specific tools, like counters, banners etc. You are right that PHP was the logical simpler choice, and it did take off in the second half of the 90s. But for the best part of the decade the web was built on CGI. I would argue that the CGI era was a good one. Writing a CGI required low-level knowledge of HTTP, HTML, how web servers worked, and very likely knowing your way around a UNIX system. Solid skills, that are still useful today, marked a high bar which raised the overall level. Furthermore, the nature of CGIs made for better architectures. Simple entry and exit points, dedicated services. Connecting them to something else required careful consideration. They made you gravitate naturally towards KISS, REST and other best practices which are still observed today. I would also add that there were several other hobbyist fields popular at the same time, like MUDs (usually built in C) or IRC servers/clients/bots (also Perl/C/TCL) to name just a couple. Knowledge gained in one of them lent itself fairly easily to another.