Re: [PHP4BETA] Installation quirk

From: Date: Wed, 02 Jun 1999 06:04:41 +0000
Subject: Re: [PHP4BETA] Installation quirk
References: 1 2 3 4 5 6 7 8  Groups: php.version4 
Request: Send a blank email to php-version4+get-1245@lists.php.net to get a copy of this message
At 00:08 02/06/99 , Sascha Schumann wrote:
CGI is dog slow.
That's a myth. It simply is. [some widely known things] You really don't need to tell me what CGI is. I'm talking about big sites which absolutely depend on PHP. Technical directors of such companies would laugh at me, if I would suggest to them to use CGI on their web servers
Well, forgive me if I repeat that thing over again, but I'm not sure I've made my point clear, and it's definitely not a widely known thing. You didn't seem to know it either since you said that the CGI overhead would eliminate the speed advantages of PHP 4.0, and it will do so under NO circumstances. When I say it's a myth I mean that the number of sites that can't *easily* switch to the CGI, performance-wise, is probably well under 1% of the sites that use PHP. Whether the technical directors of these companies would laugh at you or not depends only on the number of times they read or heard that myth about CGI being dog slow. I'd bet you anything that most of them never actually tested a CGI-based solution.
Hm, well, if you would look at the second line above the beginning of your last paragraph..
Both scenarios are indiscutable for sites getting more than a few hits per minute
O(1) sounds great for a searching algorithm, but we are talking about real life here. The overhead CGI creates (let alone lacking features such as persistent database connections, a must for busy sites) is not insignificant.
It is in most cases.
Scenarios: - site A is an e-commerce site with millions of hits per day. - site B has an extra PHP server hosting 500 domains of standard clients, with a wide mix of different authors, scripting techniques and so on. Both scenarios have in common that they depend on PHP. Both could gain advantage by using PHP4. Both are afraid of trying PHP4, because it may not work for them (before you repeat the argument "that PHP4 is compatible" now, read on).
Uhm, the number of these sites is almost negligible.
They both cannot really test "on another port." But they would both benefit from the possibility of driving PHP3 and PHP4 concurrently
Really? And why is that? It hardly gives them any added value. All it would mean in practice, for them, is that they'd have to manually convert each and every page's extension and references, or alternately, begin wandering around different parts of the site and providing different mime type for different directories. Neither is a very user friendly solution. And what added value does it give you? With complex sites you can never hope to test 100% of the functionality of your site. The best you can do is walk around and see whether it appears to be working right. Running PHP3 and PHP4 concurrently is simply just a very inefficient way to do it. On the contrary, running a PHP 4.0 enabled web server on a different port is the *PERFECT* solution. First, it gives you the actual environment (did you consider the fact that PHP 3.0 and PHP 4.0 may, hell, WILL interfere with each other, by performing library initializations twice and stuff like that? Running them in two separate processes gives you 100% isolation). Second, you don't have to change a single file extension or mime type to check out your entire site.
Yes, that is true for Joe Random User. It is blatantly wrong for sites with "millions of hits," as you said yourself (I smell a consensus here ;-).
As I said earlier, they could always run an httpd on a different port, and I stand behind that. It's a much cleaner solution than running two versions of the same program within the same process, that are more than likely to interfere with each other.
You forgot one important point. It is called reliability. PHP4 is compatible by design. I simply accept that (and ignore the "Incompatabilities" list in ZEND_CHANGES). PHP4 is not compatible in the sense of using code which has been proven to be stable on hundreds of thousands of web servers world-wide. I can easily demonstrate that - PHP4 crashes here when used as an APXS module whereas PHP3 does not. Does the compatibility of the scripting engine help me in this case? No.
That's what the beta phase is for. It'll be release when it meets the 100% compatibility in reality, not only from a design point of view. We're currently in a closed beta that's limited to people that are well aware that PHP 4.0 *has* bugs. Beta 1 will be targeted at people that have small to medium scale web sites that can already play with the idea of replacing PHP 3.0 with 4.0 on their production environment and see if it works. Beta 2 and beyond will probably be stable enough for prime time everywhere, even though I don't think that sites with millions of hits will be eager to try anything that's tagged 'beta' anyway. About APXS/Alpha, considering we didn't test Zend on any 64-bit platform it's not all that surprising that it doesn't work out of the box, and as I said, I don't worry about it too much. To illustrate my point, when I installed PHP 4.0 on www.zend.com, it worked right away (it's a simple site). Getting it to work with il.php.net required quite a few hours of bug fixing (not design issues, pure and simple bug fixing) (mind you, il.php.net is a very complex site, and includes fancy pieces of code like the bugs database). When I tried it on webdev.berber.co.il, it only required one bug fix and a couple of memory leak fixes. The graph is definitely going down, and it'll reach a point where most sites will simply work as-is, without requiring modifications in the PHP code or in the PHP 4.0 code. The last big step towards compatibility would be ensuring that phplib works properly with PHP 4.0 (something that was never done yet to the best of my knowledge, and considering it's a complex piece of PHP code, I'd expect there to be some problems). I'll conclude with three facts I've already mentioned, regarding the technical aspects of making PHP 3.0 and 4.0 run in the same process, if we were to decide it was, after all, important (and I don't expect to be convinced :) 1. It's not quite feasible to change all of the function names in PHP 3.0 to different names in PHP 4.0. Especially API functions, where it's not proper to change the name in between versions. We could do stuff with macros and try to change all function names, but it would be ugly, bloated, and prone to errors. 2. The likelihood of PHP 3.0 and 4.0 messing each other is high. At the least, it'll cause memory and file descriptor leaks. At worse, it can cause you to crash. Testing a combined 3.0/4.0 web server would be lowering your chances of success. That, combined with my point of view above, really pushes me in the direction of forgetting about it completely, and pointing people at a web server on a different port if they're afraid to go online right away, much like they'd do with any other server. Zeev -- Zeev Suraski <zeev@zend.com> http://www.zend.com/ For a PGP public key, finger bourbon@netvision.net.il

« previous php.version4 (#1245) next »