Hacker News new | past | comments | ask | show | jobs | submit login

Fun fact: mod_php can't safely coexist with anything else.

A few years ago, I briefly ran a webserver that had both mod_python and mod_php installed at the same time. Everything seemed fine until I tried using md5 from Python and repeatedly got completely wrong values:

    >>> md5.md5("hello").hexdigest()
    '00000000000000005039985304054aac'
    >>> md5.md5("hello").hexdigest()
    '00000000000000009ebb1c1ea77b5505'
As it turns out, both PHP and Python defined MD5Init, MD5Update, and MD5Final functions, with slightly different interfaces, and ld.so picked a winner to be shared by both of them.

But I get your point about PHP's deployment story being one of its (arguably few) strong points.




Might one not say, then, that mod_python also cannot safely coexist with anything else? Seems neither decided to namespace that but you seem to decide to blame PHP?


To be fair, blame mod_python all you want, seeing as it's deprecated, I don't think anyone cares. Meanwhile mod_php is...far from deprecated.


The point is that the mod_* approach isn't sustainable.




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

Search: