PHP5 Co-Creator Interview 53
mandozcode writes "I came across an interesting interview with PHP co-creator Zeev Suraski at Open Enterprise Trends on the latest upgrades for PHP5's First Release Candidate (just released a week or so ago). Sounds like lots of improvements to help make it in the enterprise, including better bundled support for SQLlite and XML. Also encouraging, looks like Zend is getting more millions in VC investment."
PHP's broken security model (Score:3, Interesting)
If you enable PHP on your apache server, all PHP runs as the same user. That means any files writable by one PHP script are writable by all PHP scripts. There's no such thing as a secure apache PHP installation unless you run in feature limited mode which breaks virtually all PHP scripts and makes it unusable for most tasks.
Until PHP adds suid so PHP runs as the user owning the script, it's a no-go. Run in high security mode it's usable as a toy at best, or run in default mode, it's a security nightmare.
I've spoken with the PHP developers about this at several conferences. Their solution is that you have each user run their own copy of apache or have each user create their own PHP installation and run everything as CGI, launching the local PHP copy. I'm sorry, but that's insane.
I don't give a lick about new features if you can't get the foundation fixed. Take care of the wet sand base before you up the supported database count or make grand announcements about clever new scripting keywords.
Re:PHP's broken security model (Score:1)
Re:PHP's broken security model (Score:3, Informative)
Then the other day, I think he may have found our (temporary) savior.
This module is in development, but looks to be almost *exactly* what we are looking for.
http://httpd.apache.org/docs-2.0/mod/perchi
Re:PHP's broken security model (Score:2, Insightful)
If you don't want to take PHP seriously, do so because of it's instability (and poor release engineering), it's lack of speed (which has been partially fixed several times, but hey; Zend need to make their money!), the complete mess it's extensions are in, the inflexibility of the language (again, partially dealt with in Ze
Re:PHP's broken security model (Score:1)
Re:PHP's broken security model (Score:2, Insightful)
Re:PHP's broken security model (Score:1)
Re:PHP's broken security model (Score:1)
Re:PHP's broken security model (Score:1)
Re:PHP's broken security model (Score:3, Insightful)
You gotta be kidding, right? I mean this isn't even a concern if you aren't running in a shared hosting environment. Seems a bit premature to toss out an entire programming language that could potentially be beneficial because you don't agree with how it's implemented in one particular situation.
That said, it is entirely possible to get PHP working w/Apache suExec and to automatically have it execute php scripts as the User/Gr
Re:PHP's broken security model (Score:2, Insightful)
Re:PHP's broken security model (Score:2, Insightful)
No one language is going to work for everyone. Is PHP the most secure language? Definitely not. Is it one of the easiest to learn languages? Yes.
Hind-sight is 20/20. I am sure that way back when PHP was created, had they known that such a ginormous percentage of websites on the Internet would be using it they might have done things differently. Who knows...
PHP is so popular because it is easy to learn, supported by a massive, massive user base,
Re:php (Score:1)
Re:php (Score:1)
IonCube - http://www.php-accelerator.co.uk/
MMCache - http://turck-mmcache.sourceforge.net/
That said, a company following the model of PHP/Zend actually gives me some peace of mind. These guys have the right balanace of OpenSource/Business that I think alot more projects/companies need to realize.
While exi
Re:php (Score:2)
The usual method of running PHP is with Apache configured to spawn a number of child processes when it starts up, and to handle connections using those processes.
A new process is not spawned for each new request. You may be thinking of the old standalone CGI method.
Re:php (Score:2)
Use mod_spin [rexursive.com], a template engine with C API
support and session data tracking.
Re:php (Score:2)
code in the db, wow! (Score:2, Funny)
Bring on the Lang X has had that for years
Yea, with a lot of lame hacks you could have done this with a file structure with php itself. But this sounds seamless.
Re:code in the db, wow! (Score:2)
Re:Bunch of Perl haters (Score:2, Interesting)
PHP GTK - http://gtk.php.net/
Sockets for PHP - http://php.net/manual/sv/ref.sockets.php
PHP Process Control Functions (fork, etc) - http://php.net/manual/en/ref.pcntl.php
PHP Functions to Parse Conf/Ini Files - http://php.net/manual/en/function.parse-ini-file. p hp
PHP also builds a CLI (command line interface) everytime you compile it enabling you to do perl style #/
Re:Bunch of Perl haters (Score:1)
Php in the enterprise? Scary thought. (Score:4, Insightful)
Scary.
To write web applications properly and efficiently, you need a framework to support you. You do NOT want to be reinventing the wheel. Have you noticed the massive proliferation of database abstraction layers, incompatible form processing libraries, etc. etc. all written in PHP for PHP developers? Libraries of code written in a templating language! Eep. Every reasonably experienced PHP developer has probably tried to create an application framework at some point - if people keep seeing the need for one, it's a good bet PHP needs to supply one. No, PEAR is not an application development framework.
And what is it with all those PHP developers who seem to think a "class" is another term for "static function library"? The concept of using object types is foreign to thse people - they'd rather make huge monster arrays.
Just because the "I Can Use A Database So I Must Be A Web Developer" crowd thinks every web app could and should be written in PHP does NOT mean that that's actually the case.
PHP downright _encourages_ beginners to embed application-logic in HTML pages. I've been through a rewrite of an absolutely MASSIVE PHP site, and it was a year-long affair for five developers. The old site had become impossible to maintain. Talk about a waste of resources.
When PHP adopts a *standard* way of separating content logic from application logic, and enforces that split (kind of the way JSP pages work with servlets), then _maybe_ there will be some hope for it in the enterprise. Until then, Java will continue to dominate. I find it funny that Java interaction is such a high priority for PHP - if Java's installed on a company's hardware, a developer's natural reaction would be to use Java, not write something in some other language.
Re:Php in the enterprise? Scary thought. (Score:5, Interesting)
Smarty is a joke. (Score:3, Insightful)
You don't need a "templating engine" to gain that separation. You need a standard, well understood way of organizing your PHP application, and some libraries of code to support that method of organization - that is, you need an application fra
Re:Php in the enterprise? Scary thought. (Score:1)
Here, here.
I would agree that PHP needs some standard way of separating presentation code/html from code. Both JSP and ASP.NET do a good job of providing a standard mechanism to acheive this.
The existence of Smarty shows the need and willingness of developers to use this kind of tool. However, skipping over the important point of whether Smart
Re:Php in the enterprise? Scary thought. (Score:1)
Re:Php in the enterprise? Scary thought. (Score:2)
it's really about peopel writing good code, much more than PHP providing an application framework.
(http://www.robotholocaust.com/scripts/template
Why would you write a templating layer in PHP? (Score:1)
A lot of well-meaning people have written templating layers for PHP to "separate layout from content". What they really need to do is separate layout-related PHP code (that's the stuff that generates HTML t
Re:Why would you write a templating layer in PHP? (Score:2)
PHP was "Personal home page". Just a stupid little template system. Now it is insanely complex. There is PHP-GTK+ bindings. Command line apps are being writen in it. Someone said "PHP nee
Re:Php in the enterprise? Scary thought. (Score:3, Insightful)
Try "PHP wants to be done poorly." (Score:1)
If you don't agree, you've probably not had to work on a PHP site that gets thirty million hits a day, nor experienced the near-euphoria of moving to Java after dealing with that class A mes
Re:Php in the enterprise? Scary thought. (Score:1)
nothing incommon at the time being.
php has no business with enterprise software until it has no real security model nor a backward compatible language nor a threading model. not even thinking of application servers that interract on the language level like java's or sharing massive amount of data between threads so they would be synchronized and desynchronized as needed.
php has a long way to go.
i must admit that the php5 is a big step in the right dir
Re:Php in the enterprise? Scary thought. (Score:1)
Well, what would you expect from a procedural programmer? Incidentatally, these are also the kind of developers that would shun OO as unneccessary and illogical without taking the time to understand it.
Re:Php in the enterprise? Scary thought. (Score:4, Informative)
Scary? Projects evolve. Apache wasn't always "enterprise ready". FreeBSD wasn't always "enterprise ready". Just because something started out as a pet project rather than at a lab, that doesn't mean it's automatically "tainted" and cannot ever be useful to big businesses.
PHP may have started out as a templating language, but it is a general purpose scripting language now. You can even write GUI applications with it.
So the language is judged on its worst practitioners? If that is the case, then, judging all languages equally, we'd better just give up this programming lark and hide under a rock.
Rewrites of crufty code are not exclusive to PHP, you know. Neither are bad developers.
I write web apps efficiently... (Score:3, Interesting)
There is a framework out there that is proven, reliable and very easy to start using, it's
Re:Php in the enterprise? Scary thought. (Score:3, Interesting)
As for frameworks look at apache. Have you seen how many frameworks it has for java? What about Swing, AWT, SWT etc? Just because they're are lots of frame works doesn't mean it bad.
I agree with your class as a static function library but that's not PHP's fault. C++, Java and Perl have the same problem. When people learn C or VB first and then go to an OO langauge they generally get it wrong.
As for bad projects I sure if yo