Hardened PHP 187
Frank Kreuzbach writes "Yesterday the Hardened-PHP Project has announced its existence on the PHP-general mailinglist. It is the first public patch for PHP which adds security
hardening features. It is meant as a proactive approach to protect servers against known and unknown weaknesses within PHP scripts or the engine itself. It enforces restrictions on include statements, adds canary protection to allocated memory and other internal structures and protects against internal format string vulnerabilities.
It has syslog support and logs every attack together with the originating ip."
Oops (Score:3, Funny)
Is your PHP hardened? (Score:2, Funny)
Phew! (Score:5, Funny)
Is that protection against canaries? Protection with Japanese kunf-fu canaries? Or protection for canaries? I mean, the kung-fu canaries have potential...
Re:Phew! (Score:4, Insightful)
So from that, I assume that "canary protection" is actually running a kind of honeytrap for common PHP exploits, and if one is triggered ("dies") then it does some computery equivalent of ("lets get the fuck out of this mine").
This is all speculation based upon the name though.
Re:Phew! (Score:4, Funny)
Re:Phew! (Score:5, Informative)
Re:Phew! (Score:2)
Re:Phew! (Score:2)
Already in use (Score:4, Interesting)
Re:Already in use (Score:5, Interesting)
1) I've heard some complaints about PHP on "high traffic" sites, is it easier on you guys because you're primarily serving static pages? I mean, I'm not a big porn freak, but it seems to me that most porn sites wouldn't be overly dynamic, since most of the content doesn't change once it's posted. Maybe some of the userauth stuff is PHP based, and maybe a site forum, but I don't really see what else would need to be supar-dynamic.
2) Maybe this seems like a naive post - and maybe it's offtopic, mods, have your way - but with all the free porn that's constantly bombarding my mailbox and my computer screen with flashing messages, how do you all make money?
I mean, what's "high traffic"? 20 paying users? Where *are* all these people that don't get the same spams for free porn that I do?
Maybe the free porn isn't actually free, and that's why people pay.
Re:Already in use (Score:3, Interesting)
2) Try thousands of users (it's not uncommon). Lots of free porn is out there, but the goal is to tease the surfer into pulling out a credit card. There are som
Re:Already in use (Score:5, Informative)
shrugs.
Hell, people probably can write fast software in PHP... I can't stand the language, myself, so I've never bothered to learn optimization tricks. Mod_perl kicks ass... as Slashdot knows, not to mention Amazon...
Can a PHP devotee who also knows web development from a mod_perl standpoint explain why you like PHP so much? I'm honestly curious. I've modified other people's apps, and find the language both cumbersome to use for non-trivial things and overly low level, at the same time.
Not likely to get many replies (Score:3, Informative)
Re:Already in use (Score:5, Informative)
The reasons I like PHP better than perl for web development is the fact that you can escape in and out of execution (yes, this can be and is often abused) and I like how PHP wraps some of the more unreadable aspects of perl (like extracting arguments, etc) and has nice session support.
Also, PHP seems to have a lot of standard web stuff rolled in by default. I know that you can configure perl to be whatever you want it to be, but back before I had access to my own servers whose environment I could control, this mattered a bit more.
Anyway, just my two cents - it really comes down to personal preference between the two in my opinion - lots of the major disctinctions have gone away in the last couple of years.
Re:Already in use (Score:5, Insightful)
Mention this on comp.lang.perl.misc and you get flamed for referring to Perl as a web developmnent tool. Well, if the Perl community only sees Perl as a tool for large web projects then so be it but they're making a big mistake. There should be a decent Perl templating engine which can run as an Apache module without exposing the Apache API, so that it would just do the one job well. Until this happens PHP will simply wipe Perl off the map in shared hosting environments.
Hopefully Perl 6//Parrot/Ponie will come up with something to break the inertia as bog-standard Perl CGI is irrelevant these days. Hell, many hosts don't even allow you free reign with installing CPAN modules.
Re:Already in use (Score:4, Interesting)
I'd be interested to know how this is done. As far as I have been able to tell from installing PHP, playing with it, and skimming the documentation there is no easy way of preventing and PHP pages run by mod_php being run as the Apache user. For me, this is not a problem since no one else uses my server. It seems the only way to run PHP pages as the user who owns them is to use the CGI version of PHP which has the disadvantage of loading a 4MB binary every time a PHP page is called.
Re:Already in use (Score:2)
PHP is really easy to write poorly. The only reason this doesn't do horrible things more often is servers are powerful enough to handle the amount of traffic that hits them when they're funning poorly written PHP code.
You can certainly find poorly written Perl, or whatever other language you like, but I think it's more common to find people who really care about granular details, security, coding style, etc. in other la
Re:Already in use (Score:2)
For 1.3 you can use mod_become [snert.com], but it looks a little scary to me.
For 2.x you can use mod_suid2 [bluecoara.net]
Re:Already in use (Score:4, Insightful)
Re:Already in use (Score:3, Insightful)
The fact of the matter is that before mod-perl, getting perl to run as a scripting language required spawning perl processes for each request made to the server. This causes significant problems. PHP as a compiled in resource could be handled by the apache children themselves and did not suck up extra resources.
Now, that's not the case with perl any longer, but with any system
Re:Already in use (Score:2)
Re:Already in use (Score:2)
Re:Already in use (Score:5, Interesting)
Re:Already in use (Score:5, Interesting)
Surprisingly, it has to be fairly dynamic. Most of the work that my software has to do is in posting the content for the first time. You upload a zip, and the software will extract the zip taking the images makes thumbs and full sized samples with embedded watermarks. From this point on, the software is basically an advanced shopping cart with some extra features like the ability to order individual images out of a particular zip, and instant download.
The sites that I have setup are surprisingly popular, and within the past year and a half, the sites I work with have sold closs to half a million dollars worth of porn. That may not seem much to a big business tycoon, but it is when theres only a handfull of people making the profit.
I dont know how well the end user sales are however. I like this hardened php stuff and I think it has great potential. I am waiting for them to come out with a PHP5 version, and then I will jump right on it because all of my newer projects are going to be in php5.
Dynamic Porn (Score:2)
Re:Dynamic Porn (Score:2)
Re:Dynamic Porn (Score:2, Insightful)
I understand that the galleries of pics have to be filtered from a single database for each site, but there is a better way to do this.
Instead of writing dynamic pages, write an application that produces static pages based on the database. Whenever your content changes, re-run the applications to get fresh static pages.
Dynamic pages are just way too much overhead for what you're trying to accomplish.
Re:Dynamic Porn (Score:2)
Re:Already in use (Score:5, Interesting)
Basically every page is dynamically generated, even the images go through a PHP script to make sure the right people are seeing the right images.
We honestly have a bigger problem with the SQL server keeping up than PHP consuming too much CPU. The site listed in my home page URL here runs on 3 servers, one for MySQL, one for most PHP scripts, and one to serve all the images. The two httpd servers handle about 1200 requests per second, and the loads are pretty low. 95% of those requests are PHP scripts.
2) For the site I'm talking about there, we've got anywhere from 1000 to 5000 people browsing the site at once. Another site I admin [stileproject.com](very NSFW) gets much more traffic than that, and a lot of those visitors are downloading 5-200MB movies for free. There we have two thttpd servers handling most of the static files (videos and images). At times there we're in the more-than OC-12 levels of bandwidth, and they handle the load just fine.
How do we make money? Some of our sites are subscription based, and we try to have content that you can't get anywhere else. We try to drive the community aspect of our sites, and try not to just be "another generic porn site".
The first site lets anyone browse for free as much as they want, you just get access to more content if you pay. You also get to talk to the "performers" and a few other perks. The second site I mentioned is all free, it's supported by ads though.
(trying not to make this spam, just a bit of insight into how porn on the internet actually works. And no, I'm not Stile.)
Re:Already in use (Score:3, Insightful)
Re:Already in use (Score:4, Informative)
Re:Already in use (Score:2)
We use it, and it rocks, but its future is in doubt.
Re:Already in use (Score:3, Informative)
I don't think it's future is in doubt at all, just that the insane pace it was developed at has slowed a little bit.
Re:Already in use (Score:2, Insightful)
I use PHP all the time. I know perl/mod-perl too but it doesn't have the install-base that php does - especially selling to people on shared hosting packages..
It's also kind of unusual to find cheapo shared hosting sites (on the adult side of things) who will let you run cron jobs or the like. Understandably
Re:Already in use (Score:2)
Re:Already in use (Score:2)
Re:Already in use (Score:3, Funny)
Dontcha mean "peek" traffic
Re:Already in use (Score:3, Funny)
Re:Already in use (Score:2)
Call Me Crazy But.... (Score:4, Insightful)
to protect your servers on the one hand against a number of well known problems in hastily written PHP scripts
Wouldn't a better defense be to simply write good code?
Re:Call Me Crazy But.... (Score:5, Insightful)
Re:Call Me Crazy But.... (Score:2, Insightful)
Yes. But that is something that over 50% of today's coders aren't capable of.
Re:Call Me Crazy But.... (Score:5, Insightful)
is this just an excuse to write sloppy code (Score:4, Insightful)
Re:is this just an excuse to write sloppy code (Score:3, Interesting)
Re:is this just an excuse to write sloppy code (Score:2)
But the lecture didn't exactly give us a lot of help in actually doing defensive programming so as to actually *avoid* those errors...
Re:is this just an excuse to write sloppy code (Score:4, Interesting)
Besides the dangers of bad code in general, PHP is particularly dangerous, with it's very flexible and network enabled features. It only gets worse because it is (apparently) so easy to learn and use and it makes everybody feel like a God of website making in no time flat. [Insert boss saying "hey, secretaries could write PHP without a problem" here].
The solution would be a very restrictive safe mode, which would freaking MAKE people watch what code they're writing and give up incredibly stupid and at the same time tricky stuff like using variables with globals enabled without any kind of previous cleaning or filtering. And the second half of the solution would be to throw out on their ass all the self-proclaimed PHP programmers who pull stupid stuff like this.
The first part won't happen because hosting services can't afford to break all the sites using globals and so on. The second half may happen, I dunno.
Meanwhile, hardened PHP won't mean much, I'm afraid. If a guy doesn't know enough to use an automated filtering class on his $_GET[] he won't know he needs Hardened PHP either, because he lacks severely where PHP security is concerned. You can lead a horse to water but you can't make it drink, right?
Re:is this just an excuse to write sloppy code (Score:3, Interesting)
How 'bout a link to or example of (a good) one?
Re:is this just an excuse to write sloppy code (Score:2)
Here's the intro:
"User Submitted Data
The greatest weakness in many PHP programs is not inherent in the language itself, but merely an issue of code not being written with security in mind. For this reason, you should always take the time to consider the implications of a given piece of code, to ascertain the possible damage if an unexpected variable is submitted to it."
Re:is this just an excuse to write sloppy code (Score:5, Insightful)
as the japanese car makers discovered (or at least the idea came to prominence) in the 1950s, ANYBODY (even people with 93 PhDs) who assembles something makes mistakes occasionally. the trick is to limit the number of modalities that allow for mistakes. a person who is asked to make a wheel fairing in three minutes using simple hand tools will make far more mistakes than one who has a dedicted stamping machine.
in fact, the japanese cars excelled in quality, worker satisfaction, and in the competitive marketplace for many years in large part that their idea that a) errors are natural stochastic processes b) the rate of errors in an any process is more determined by the design of the process than some inherent quality of the worker and therefore c) when a mistake is made, analyze the process, don't blame the worker as this will lead to d) continuous improvement and also empower workers to speak up.
even the most experienced PhP programmer can make an error. education helps, but fixing the system is a better idea.
Re:is this just an excuse to write sloppy code (Score:2, Insightful)
Ok, there's a difference between cutting a board with a handsaw and cutting something with a electric powered table saw. No matter how much training I have, a table saw will cut a board faster and straigher than a hand saw.
Which is why education is so important, let's move away from syntax/coding and look at testing/eval
Re:is this just an excuse to write sloppy code (Score:5, Insightful)
Its all about the process, and very little about the worker, if you designed the process right. Similarly, if Hardened PHP can make it so that exploitable code simply can't run, you've cut down your probability of breach whether you have great programmers or George W. writing your code.
Re:is this just an excuse to write sloppy code (Score:2)
When you can trust the process, you don't need to be able to trust the worker anywhere near as far. Things like Hardened PHP, NX-protection, etc., are not only a substitute for good practice, but eventually software circles will figure out they are in fact more important than good practice.
That said, the two together are sti
Laziness (Score:5, Insightful)
I'm not sure that this project is a good thing, as if someone gets used to it and switches to a server without it they might be in trouble.
Re:Laziness (Score:5, Insightful)
The problem is that it's complete BS. Even the most wizardly coder will make mistakes. The only way to be secure is to have lots of code reviews, and then things still get through; look at holes in SSH or Apache. Tools like this certainly don't hurt, and they might just help. "Don't make mistakes" is not an option.
Bad Coding = Security Holes (Score:5, Insightful)
This Hardened PHP is just hand holding the developer into a false sence of security.
Re:Bad Coding = Security Holes (Score:4, Interesting)
Re:Bad Coding = Security Holes (Score:5, Interesting)
It's so easy to write bad code in PHP that half the world is doing it. Anything that helps ISPs protect users from the shortcomings of their peers has to be good news.
Re:Bad Coding = Security Holes (Score:2)
There are plenty of shared hosts that provide server processes running under separate UIDs, chrooted services, etc. which mean that as well as exploting a PHP script hole, the attacker would have to break the OS kernel protection as well in order to get at your
How about fixing safe mode instead? (Score:3, Interesting)
Not that this is not nice; every language should have internal hack/bug protections. But a proper security model would do more, no?
Thing is... (Score:2)
PHP *can* run in a suexec environment. But to do that, you have to make your php run as cgi-bin.
This isn't exactly the greatest thing for performance. Not to mention having to put a !#/usr/bin/php on the top of each file.
I'm sure some mod_rewrite work could pipe all php file extensions to one script that would do a require on the file, eliminating the need for that string on the top. What a pain in the ass, though.
So your statement should read: wouldn't it be a lot more useful if they found an inge
PHP security all relies on the coder (Score:5, Interesting)
The most interesting one I saw used a programming flaw (note: not PHP's fault) to execute arbitrary commands to get the web server to download, compile, and execute a telnetd-like program for remote logins. Once the attacker had gained access via user nobody, they ran one of several trivial Linux local root exploits to get root. Don't kid yourself, Linux ain't all that secure.
Re:PHP security all relies on the coder (Score:2)
Java has SecurityManagers, so its not the same as with C or anything else. Its easy to protect against dumb coding.
Not quite (Score:5, Interesting)
``A Study In Scarlet - Exploiting Common Vulnerabilities in PHP'' [Clowes 2001]
PHP is probably slightly better these days, but, just like Windoze, simply wasn't designed with security in mind. It's a language grown incrementally, designed to allow you to write websites very quickly. And yes, easy to use means that it attracts people who know very little about programming.
Conclusion: combination of insecure language plus low-quality developpers equals security disaster.
Re:Not quite (Score:2, Insightful)
the default installation of PHP today makes people write a lot more robust code than it used to do. New applications has been able to move away from the 'ugly' things and a general un
Re:Not quite (Score:4, Interesting)
The super-global variables were first available in php4.0 beta 4 (released 2/2000), and were upgraded in 4.1 (12/2001), for further information, see PHP's ChangeLog [php.net].
The biggest change this created was discouraging people from using register_globals - probably the biggest security hazard until that time with writing php. This has been turned off by default since then, but unfortunately I'm still seeing developers rely upon this awful feature.
This doesn't make php bad, it makes those who write with that feature bad programmmers. Just because you can plow over a pedestrian with your car, it doesn't mean that everyone should have their car taken away... it just means that they're crappy drivers.
Re:Not quite (Score:2)
1. There are lots of PHP scripts that require register_globals on, as until relatively recently that was the default setting.
2. Because ISPs need to offer compatibility, most ISPs have register_globals on, so that the scripts mentioned in (1) can be used.
3. Because most ISPs have register_globals on, there is little point in programmers not using the facility it provides. The insecurity is inherent in it being swit
Re:Not quite (Score:2)
There are lots of PHP scripts that require register_globals on, as until relatively recently that was the default setting.
Well, it was strongly mentioned as a security issue on 10-Dec-2001 when version 4.1.0 was announced:
And it was turned off as a default with the 4.2.0 release on 22-Apr-2002 - two years ago.
Version 4.2.0
* ATTENTION!! register_globals defaults to 'off' now !!!
Considering that php 4 was relea
Re:Not quite (Score:5, Informative)
Its advantages: faster (java isn't slow, it has a slow startup, which for a server is hardly a big deal), because the code you write is going to be converted in machine code; scales better (PHP still doesn't provide connection pooling; pconnect doesn't count, btw); more secure (no buffer overflow b/c of java, can use security policies to restrict what your pages are doing)
Its disadvantage: well, you have to learn java. You can't just jump into writing jsp pages, as you'd do with php. But I can equally argue that that's an advantage as well, as it increases the quality of code.
Re:Not quite (Score:2)
OK -- why not?
(Note, I know next to nothing about how Java's connection pooling works, and only a little about PHP's, but I'm really interested to find out).
no buffer overflow b/c of java
I'm fairly sure buffer overflows are impossible in PHP code too. Although of course some PHP internal functions may have buffer overflows. But the same might be true of native Java functions. You have to trust in both cases that such potentia
Re:Not quite (Score:2)
It's not lack of experience either. I've used Java since it became mainstream, circa '94. I was a heavy user for eight years, then switched to PHP. My veredict: Java has sto
Re:Not quite (Score:2)
Anyway, the "continually growing" thing makes me think of a "soft leak" (e.g. you continually add stuff to a collection). If that's not the case, well, probably a faulty VM or a bad web server (Tomcat, for instance, is rather poorly written)
BTW, Java in 94 was bleeding-edge, it was only with 1.3 that it got truly mainstream.
Re:Not quite (Score:2)
We started on using Tomcat, switched to Resin trying to solve performance problems. It was lots better with Resin, but the memory condition wasn't solved.
There's absolutely no reason not to isolate memory usage between requests, to avoid this kind of memory leak. PHP does it. It pays some a penalty because of session d
orion (Score:2)
There are many better alternatives to PHP (Score:3, Informative)
The ones I'm most familiar with are extensions of Common Lisp. There are 3 CL web servers, each with dynamic HTML generation capability (AllegroServe, Araneida, CL-HTTP [mit.edu]). Then there's Lisp Server Pages, Active Lisp
Re:There are many better alternatives to PHP (Score:2, Insightful)
Re:There are many better alternatives to PHP (Score:2)
Thank you. :)
Well, that is why I said "annoying," instead of "bad" or "stupid" or something absolute like that.
This is a Good Thing(R) (Score:4, Insightful)
Besides, if everyone writed only really nice code, why would there be RSBAC and PaX?
Trust is a weakness.
Re:This is a Good Thing(R) (Score:2)
It would be nice to specify what you think a script's priviledges should be.
htpriviledges:
<Files *.php>
Database: Deny
Filesytem: allow
RemoteFiles: allow
Input-Cookies: deny
Input-Post: allow
</Files>
Really Now.. (Score:5, Interesting)
From one of "Hardened PHP's" examples:
Which is certainly a good example of what not to do; but if somebody's dumb enough to do something like this, likely no amount of engine protection is going to help them.Re:Really Now.. (Score:3, Insightful)
Re:Really Now.. (Score:2)
likely no amount of engine protection is going to help them.
Are you familiar with the concept of a sandbox? In Java, you could easily set up security permissions which prevent people doing malicious things like this. Even if the user did blah.jsp?page=/etc/passwd, if the JVM has no permissions to read that directory, all you will see is a security exception being thrown and the page not working as a result.
I don't see why this couldn't be implemented in a scripting language just as easily as it was im
Re:Really Now.. (Score:3, Insightful)
Re:Really Now.. (Score:2, Informative)
Because PHP was written with security as a distant afterthought.
Re:Really Now.. (Score:3, Insightful)
If the remote server is set up to simply send the file as text, then the *local* server will execute the text. As a PHP script. As the local user. And your remote attacker has the ability to run any commands on the server that a local script could run (usually, "wget a rootkit from this other server, unzip it, and execute it...")
Other PHP Hardening Sites (Score:5, Informative)
Re:Other PHP Hardening Sites (Score:2)
Plz fix, kthxbye.
Nothing wrong running everything through index.php (Score:2)
Although it may be nicer to use mod_rewrite to be able to use friendly url's
For instance in my companies e-commerce web app you can either use:
http://www.site.url/index.php?fuseaction=shop.cat e gory&categoryid=xxx
http://www.site.url/index.php/fuseaction/shop.cate gory/categoryid/xxx
or http://www.site.url/shop.category/categoryid/xxx
Whatever, they all get piped through index.php through which then puts them through to the relevant circuit (i.e.
Re:Nothing wrong running everything through index. (Score:3, Interesting)
Ugh. God I hate seeing sites handled almost entirely out of index.php. Like an iceburg it's the publicly visible part of a very troubled language.
Try this for an ugly URL:
Sorry to pick on the Ogre3D project. I've seen similar URL's around (in particlar on sourceforge projects) so it appears to be using one of the popular PHP theming packages. What an ugly abominatio
Re:Nothing wrong running everything through index. (Score:2, Interesting)
Re:Nothing wrong running everything through index. (Score:4, Interesting)
To state the obvious, no shit. Of course you're going to have problems with the ficticious URL and system you presented. Somewhat of a straw-man argument there.
Now here's what I suggest: Don't combine "content" pages/scripts with "action" pages/scripts. What I mean is, have a script that does the adding/deleting/renaming/whatever and then does a 302 Temporary redirect (back) to the page/script that actually displays the data.
This has the following advantages:
As for authentication and protection, well that's a different matter. It doesn't really have much to do with URL's. Use cookies and even SSL to nail things down.
Did you actually read my post? (Score:2)
Seriously, have a look at Fusebox for PHP (or coldfusion, ASP or $favourite_scripting_language), it has increased productivity and code reuse in our company.
The other nice thing is naming conventions have you putting your "action/logic" code into files prepended with act_ and your display code into file
nice intent but wrong approach (Score:5, Interesting)
A better approach might be to create some sort of code-parser that examines PHP code and warns the programmer of possible bad habits. Of course this should be prefaced with a long disclaimer that such a system isn't foolproof but is a good idea to run on any code to make sure you haven't overlooked any obvious problems.
A patch? (Score:5, Insightful)
The problem I have with this project is that it's likely PHP-version dependent, and once you implement it, you have two different sources you have to synchronize code for (not unlike Apache+Mod_SSL). I'd rather not have twice as much work to incorporate these features if necessary.
Probably a few reasons: (Score:3, Insightful)
2) Some of these patches may introduce performance hits which would not be acceptable for some uses.
3) If you are running a large hosting company these patches may subtly break scripts being used by customers, tech supportality ensues.
4) Since this is a fairly new project, not even to a 1.0 release the pace of change may be so fast that it's more t
I dont get this (Score:5, Interesting)
Yet just the other day people where bitching about Fedora not having SELinux on by default.
PHP - Hardened PHP
Fedora - "Hardened Fedora"
Its really the same thing. Instead of fixing root flaws we through more security over them hoping it will stop then next hacker..
Linus must really suck at kernel programming if we have to do things like this..
No he doesn't Linus rocks, I cheer for every single developer that has ever submitted a patch to the kernel.
Fact of the matter is this..
WE ARE HUMAN.. TO BE HUMAN IS TO ERR.
Yes the programmers, be it php exploits or the next kernel buffer overflow make mistakes.. Does that mean they are bad programmers.. HELL NO..
Are there a lot of bad PHP programmers, yes.. I bet there are a lot of bad C programmers out there as well. We are just lucky they dont get to commit changes to the kernel or we would all be FUBAR.
Errare humanum est, (Score:2)
It's human to err, but diabolic to persevere in your errors.
When I talk with php "developpers" who learnt it by example and without any formal programming background, it's extremely difficult to get past the "but it works very well this way ..."
Umm.. (Score:2, Funny)
Wouldn't that make it HPHP?
If it's not Consolidated Lint, it's just fuzz!
Perspective (Score:5, Insightful)
Now don't get me wrong, I understand, it's *hard* to think as an admin if you have never *been* one. But when you are an admin on a machine, you don't think "My users will just have to learn how to code secure, then there is no problem."
Sorry folks, just ain't gonna happen!
Joe home who wrote a site just to show off his holliday pictures thinks its swell how easy php is, and he doesn't really care about becoming fluent in php, as long as his little enviroment runs!
Sure, you can try and educate your user, but if you maintain a 500+ user server, security is in YOUR hands. only ONE of your users need make an error, and the whole machine might go down. And the "poor coding is the only reason for security holes" just doesnt cut it there.
Harden your servers, admins. Make the internet a fun place to be.
"Safe programming" ain't that easy (Score:5, Interesting)
Looking at the Documentation Page [hardened-php.net] for Hardened PHP, the project is adding some very good changes to the underlying runtime environment and constraints on programmers. Based on my first glance I would be pleased, and not at all surprised, if some of these are incorporated into the main PHP in some form down the road, once it's been ironed out for a while. I'm glad to see folks actively using it.
As for the various mod-perl advocates who don't grok PHP, I personally dislike working in Perl, which seems to me to be a collection of all the things that were thrown out of other languages because they promote bad programming practice. That's OK, I understand it has power and flexibility, but Perl code too often looks like sneezing to me. Different strokes, see.
The security issues raised by this project are certainly matched by many of the same or equivalent ones in Perl. IMHO, both PHP and Perl have become too big. It is a truism that the probability of failure increases geometrically with the size of a system.