Live data from Hacker News

Facebook PHP Source Code from August 2007

gist.github.com

151–154 of 154 posts

Re: Facebook PHP Source Code from August 2007

#151
post #142
post #98

Earlier quoted context omitted.

It is a myth. High load has nothing to do with it. However if you configure apache wrongly, it will serve .php files as text. Only connection to load is if you have one broken server among N proper ones, a number of times that the broken one is hit depends on load - I.e. on low load, it may be configured so that it is never hit at all. I guess the story about apache serving php source under high load came from the id…

this was a real issue, here is the bug: https://bugs.php.net/bug.php?id=26810 there were many related bugs as well. it didn't get fixed for a while, and when it was fixed it was over a number of revisions and wasn't tagged.

That issue was fixed 3 years before (Jan 2004) and from what I can see only happened in configs which use +x bit or config values to turn php engine on and off, and didn't really depend on load on these too much either - it's just load made it more probable you will hit the right sequence in the same process randomly, but if you know what to hit, it could be done on any load. So it would be correct to say "there was a bug 3 years ago which in certain configurations made mod_php serve source after certain sequence of requests". It was never happening just "due to high load", as far as I can see. And as far as I know (and nobody so far presented any evidence to the contrary, AFAIK) Facebook case had nothing to do with it anyway. It would be really weird for Facebook to run random 3-years-old PHP in production too.

Re: Facebook PHP Source Code from August 2007

#152

Earlier quoted context omitted.

...do the credentials still work? :)

The db was most likely never listening for connections from the world at large anyway.

If their code was so easily leaked, it's not out of the realm of possibility...

Re: Facebook PHP Source Code from August 2007

#153
post #4

This is quite neat compared to the average shitfest people leave inside wordpress templates. I had to unpick a whole 200 page intranet written with wordpress and buddypress (which stinks) recently and rewrite it as a non-wordpress site as it's hit the inevitable hack brick wall. It's now an asp.net mvc app on Azure. There's hardly any code in it now and a the page response times are down at 50ms rather than 1500ms! O…

Exaggeration is the mother of ... well, something.

An entire intranet functionality with one SQL query per page. Right, okay...

Re: Facebook PHP Source Code from August 2007

#154

Earlier quoted context omitted.

It's kind of funny to see two reactions here: * Reaction A: code is ugly, what a bunch of jerks! * Reaction B strikes me a bit as hero worship. Since we already know the outcomes, already some consider them geniuses; we must conclude every decision they made was a good one, and there is no room for criticism. Perhaps neither are great, but I think reaction B especially is a little dangerous. One must acknowledge that…

A false dichotomy if ever there was one. Anyone who doesn't think the code is ugly must just be blinded by hero worship? How about the possibility that a1a is one of the people who just automatically equates "large volume of code" with "spaghetti"? In my experience there is a fair number of HN users (and devs in general) with this knee-jerk perspective. In my very humble opinion any reasonable person who takes a few…

It's almost like you are trying to misinterpret my post. Large volume of code? The site displays roughly 600 lines of code, is this a large volume of code to you?

Like I posted - just below - a day before your post: "My post was not meant to trash the code, but rather to point out that this code shows us that the primary objective shouldn't necessarily be writing the perfect code."

Post reply on HN