The open letter to Derick Rethans <derick@php.net>

php.internals

Alexander Valyalkin

22 years ago
On Tue, 15 Jun 2004 12:47:29 +0200 (CEST), Derick Rethans <derick@php.net> wrote:
> On Tue, 15 Jun 2004, Alexander Valyalkin wrote: > >> Today I checked file /win32/readdir.c >> Below you can view its source with my comments. > > Just a little notice that you succesfully made it into my killfilter. > Great job! > > Derick
And what about your job? So, you are author of mcrypt module. Let audit your work: /ext/mcrypt/mcrypt.c Can you explain me the sense of the memset() after any memory allocation in the mcrypt.c. For example: =========================== /* missing type casting from (void *) to (unsigned char *) */ pointer = emalloc (length_of_data); /* sense of the next string? wasting time? */ memset (pointer, 0, length_of_data); memcpy (pointer, data_pointer, length_of_data); =========================== Why you don't wipe keys and initialization vectors before freeing memory? Leave it for spies from NSA and KGB ? :) For example: =========================== if (key_s != NULL) efree (key_s); if (iv_s != NULL) efree (iv_s); =========================== Can you explain me the sense of initialization vector [iv] for ECB mode? : =========================== /* {{{ proto string mcrypt_ecb(int cipher, string key, string data, int mode, string iv) ECB crypt/decrypt data using key key with cipher cipher starting with iv */ =========================== Well, let see documentation of Mcrypt http://php.net/mcrypt/ : ============================== MCRYPT_MODE_OFB (output feedback, in 8bit) is comparable to CFB, but can be used in applications where error propagation cannot be tolerated. It's insecure (because it operates in 8bit mode) so it is not recommended to use it. ============================== 1) What happens with error propagation after deleting/inserting any data into encrypted in OFB-mode text? Do you know what means "self-synchronizing" words for CFB mode? 2) Do you know that not only 8bit OFB is insecure? OFB mode always have less security if size of encrypted text is not equal to blocksize of used cypher. For example, the security of 256bit AES cypher in 255bit mode is the same as for 256bit AES in 8bit OFB mode. ============================== MCRYPT_MODE_CFB (cipher feedback) is the best mode for encrypting byte streams where single bytes must be encrypted. ============================== How can I use this mode for encrypting byte streams, if function mcrypt_cfb() dont return current [iv] value? The same question for other modes, excepting ECB.
-- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/

George Schlossnagle

22 years ago
Dude. You need to brush up a bit on the inter-personal skills. Starting a flame-war or dick-waving contest on this list is probably not the best way to get your patches accepted. George

Jason Garber

22 years ago
Hey Alexander, It appears from your posts that you are a very knowledgeable coder who knows how to improve and increase the performance, stability, and security of the PHP program. I think your input could be very valuable. I think there would be a more, let's say, graceful, way of giving your input. I know that it's hard to interpret (and easy to misinterpret) attitudes from reading plain text, but here is what I see: *It seems* that the intro to your code patches have somewhat of a superior attitude. While they may be great patches, you have to remember that real people busted their rear ends to write the code in the first place, and probably got no money for it to boot. Also, you have many people on this list like Derick that really do and have spent countless hours of time making PHP into what it is. They are the ones that are in charge of what get's included into this great language. They are constantly working their tails off to fix the latest bug, or implement the a new requested feature, or meet the deadline to roll the next RC. I would say that the priority on developing PHP is: 1. Bug Fixes from bugs.php.net 2. Features that are slated for upcoming versions of PHP 3. Recoding old functions to make them faster and more stable where needed. If you want your input to be accepted, you got to play the way the rest of the crowd is, in order for it to work. Thanks for your effort, and I hope you direct it to where it can be used to the fullest. Sincerely, Jason Garber President IonZoft, Inc. At 6/15/2004 06:30 PM +0300, you wrote:

Thomas Goyne

22 years ago
On Tue, 15 Jun 2004 14:46:01 -0400, Jason Garber <jason@ionzoft.com> wrote:
> [snip] > > I would say that the priority on developing PHP is: > 1. Bug Fixes from bugs.php.net > 2. Features that are slated for upcoming versions of PHP > 3. Recoding old functions to make them faster and more stable where > needed.
As a user, I personally see placing new features over making old features work better a large mistake. Perhaps that was necessary back in the days of PHP3, but its been a very long time since I've run into simply not being able to do something. Quite often, however, I've run into that the most direct way of getting something done performs too poorly to be usable. Maybe I'm just stuck with worse hardware than most others, but improved performance is one of the biggest thing I'd like to see out of new releases.
-- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

Bert Slagter

22 years ago
Thomas Goyne wrote:
> As a user, I personally see placing new features over making old > features work better a large mistake. Perhaps that was necessary back > in the days of PHP3, but its been a very long time since I've run into > simply not being able to do something. Quite often, however, I've run > into that the most direct way of getting something done performs too > poorly to be usable. Maybe I'm just stuck with worse hardware than > most others, but improved performance is one of the biggest thing I'd > like to see out of new releases.
There's a lot that can be said about this. Of course it would be great if things get faster. But this optimization should be done very carefully and under strict supervision of those who know how and why things were done in a specific way. Alexander just sprays around some code snippets with a high risk of introducing new bugs that might be invisible for weeks. But this is another discussion. Alexander: become a teamplayer! Don't try to be the star and do everything yourself. Follow those who lead. And for that sake: Derick is one of them :). Bert

Scott MacVicar

22 years ago
If Alexander could provide proper benchmarks from PHP rather than separate C++ files and if the strings changes could be tested thoroughly with multiple values. I think improving performance would be great, there isn't a developer devoted to improving what already exists. Scott Bert Slagter wrote:

Derick Rethans

22 years ago
On Tue, 15 Jun 2004, Scott MacVicar wrote:
> If Alexander could provide proper benchmarks from PHP rather than > separate C++ files and if the strings changes could be tested thoroughly > with multiple values. > > I think improving performance would be great, there isn't a developer > devoted to improving what already exists.
There is: Ilia :) Derick

Alexander Valyalkin

22 years ago
On Tue, 15 Jun 2004 22:48:35 +0200, Bert Slagter <bert@procurios.nl> wrote:
> Thomas Goyne wrote: >> As a user, I personally see placing new features over making old >> features work better a large mistake. Perhaps that was necessary back >> in the days of PHP3, but its been a very long time since I've run into >> simply not being able to do something. Quite often, however, I've run >> into that the most direct way of getting something done performs too >> poorly to be usable. Maybe I'm just stuck with worse hardware than >> most others, but improved performance is one of the biggest thing I'd >> like to see out of new releases. > > There's a lot that can be said about this. Of course it would be great > if things get faster. But this optimization should be done very > carefully and under strict supervision of those who know how and why > things were done in a specific way.
As you could notice, I provide majority of my patches with standalone test applications, which could be used to track possible bugs in my code and to compare the performance, stability, advantages and clearity to old code. It is not very hard, because all patches are quite small. But nobody from PHP team developers has not checked up any of my patches till now. So, I can done the conclusion, that PHP developers are not interested in performance and stability improving at all. It seems, that all of them are occupied by "fixing" bugs reported by users at bugs.php.net (are you consider that any PHP user is your "beta-tester"?), but do not audit any existing code for memory leaks, memory access violation and nessessary error checks. Po etomu povodu jest' horoshaja russkaja pogovorka: "Poka grom ne gryanet, muzhik ne perekrestitsa".
> Alexander: become a teamplayer! Don't try to be the star and do > everything yourself. Follow those who lead. And for that sake: Derick is > one of them :). >
Thank you for offer. But I'm not ready to become a teamplayer right now. Maybe later.
-- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/

Antony Dovgal

22 years ago
On Wed, 16 Jun 2004 10:55:56 +0300 "Alexander Valyalkin" <valyala@tut.by> wrote:
> On Tue, 15 Jun 2004 22:48:35 +0200, Bert Slagter <bert@procurios.nl> > wrote: > > As you could notice, I provide majority of my patches with standalone > test applications, which could be used to track possible bugs in my > code and to compare the performance, stability, advantages and > clearity to old code.
Please, point to me these tests. http://lists.php.net/article.php?group=php.internals&article=10467 http://lists.php.net/article.php?group=php.internals&article=10461 http://lists.php.net/article.php?group=php.internals&article=10435 http://lists.php.net/article.php?group=php.internals&article=10409 I can't find any tests in your letters, that can prove, that your patches work at all platforms and do not break existing functionality. And even more. You didn't prove, that with your patches it will work faster, as you claim - there is also no benchmarks.
> So, I can done the conclusion, that PHP developers are not > interested in performance and stability improving at all. It seems, > that all of them are occupied by "fixing" bugs reported by users > at bugs.php.net (are you consider that any PHP user is your > "beta-tester"?), but do not audit any existing code > for memory leaks, memory access violation and nessessary error checks.
Oh, yeah, of course. --- WBR, Antony Dovgal aka tony2001 tony2001@phpclub.net || antony@dovgal.com

Lester Caine

22 years ago
Thomas Goyne wrote:
> On Tue, 15 Jun 2004 14:46:01 -0400, Jason Garber <jason@ionzoft.com> wrote: > >> [snip] >> >> I would say that the priority on developing PHP is: >> 1. Bug Fixes from bugs.php.net >> 2. Features that are slated for upcoming versions of PHP >> 3. Recoding old functions to make them faster and more stable where >> needed. > > As a user, I personally see placing new features over making old > features work better a large mistake. Perhaps that was necessary back > in the days of PHP3, but its been a very long time since I've run into > simply not being able to do something. Quite often, however, I've run > into that the most direct way of getting something done performs too > poorly to be usable. Maybe I'm just stuck with worse hardware than > most others, but improved performance is one of the biggest thing I'd > like to see out of new releases.
On the other hand, if code IS working stably then it may be better to leave it alone. I'm not saying don't tidy up code, but ALL the tests against a change need to be in place before a change is applied to the live code, and in some cases it is worth remembering that PHP *IS* multi-platform. Some changes tailored for one environment may be a disaster in another - code for the 'safe' ground. So changes must be applied properly, tested in all ports and approved before going live. At present we are in the final stages of release for PHP5 - which I want now - so we do not want to introduce updates that take us back to the start of testing :) Once PHP5 is out - THEN the sorts of fixes Alexander is suggesting could be looked at - but not until then. The next question is - are both PHP4 and PHP5 going to be run in parallel, like Apache 1 and 2 so that neither gets finished ;)
-- Lester Caine ----------------------------- L.S.Caine Electronic Services

Steph

22 years ago
> The next question is - are both PHP4 and PHP5 going to be run in > parallel, like Apache 1 and 2 so that neither gets finished ;)
Darn.. y'mean PHP 4 isn't finished? ;)

Lester Caine

22 years ago
Steph wrote:
>>The next question is - are both PHP4 and PHP5 going to be run in >>parallel, like Apache 1 and 2 so that neither gets finished ;) > > > Darn.. y'mean PHP 4 isn't finished? ;)
Well is it approved for use with Apache2?
-- Lester Caine ----------------------------- L.S.Caine Electronic Services

潘庆峰

22 years ago
I think Fastcgi is a solution to make non-threadsafe PHP extionsion to work with Apache2... that's why I develop my Apache2 module mod_fcgid, it's available on fastcgi.coremail.cn. I think the community will not accept this module as a part of PHP now, but I will make another try when the PHP5.1 is branched. any suggestion is appreciated... "Lester Caine" <lester@lsces.co.uk> ???? news:20040615210038.20942.qmail@pb1.pair.com...

Christian Schneider

22 years ago
Lester Caine wrote:
> Well is it approved for use with Apache2?
Correct me if I'm wrong but my understanding is that the PHP core is approved with Apache2 in threaded mode. If you use non-threadsafe modules you have to use Apache 2 in --mpm=prefork mode and then it's approved too. We've been using Apache 2 prefork / PHP 4 in production for quite a while now without any problems. - Chris

Curt Zirzow

22 years ago
* Thus wrote Christian Schneider (cschneid@cschneid.com):
> Lester Caine wrote: > >Well is it approved for use with Apache2? > > Correct me if I'm wrong but my understanding is that the PHP core is > approved with Apache2 in threaded mode.
If my memory serves my right, I dont think that all extesions in php can be guaranteed to be thread safe.
> > If you use non-threadsafe modules you have to use Apache 2 in > --mpm=prefork mode and then it's approved too. > > We've been using Apache 2 prefork / PHP 4 in production for quite a > while now without any problems.
To note also, i've been using prefork in a production evironment as well, whithout hickups. btw, thanks for changing the subject :) Curt
-- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid!

Derick Rethans

22 years ago
On Wed, 16 Jun 2004, Curt Zirzow wrote:
> * Thus wrote Christian Schneider (cschneid@cschneid.com): > > Lester Caine wrote: > > >Well is it approved for use with Apache2? > > > > Correct me if I'm wrong but my understanding is that the PHP core is > > approved with Apache2 in threaded mode. > > If my memory serves my right, I dont think that all extesions in > php can be guaranteed to be thread safe.
Correct.
> > We've been using Apache 2 prefork / PHP 4 in production for quite a > > while now without any problems. > > To note also, i've been using prefork in a production evironment as > well, whithout hickups.
THough there is no good reason to run apache 2 in prefork mode over apache 1.3... I'd pick apache 1.3 then as it has a more stable codebase. Derick

潘庆峰

22 years ago
Yes, it's right, there is no problem if Apache2 in prefork MPM mode, but I will prefer Apache1 if I don't need a thread-enable Web server... "Christian Schneider" <cschneid@cschneid.com> ???? news:40CFC2D1.8010507@cschneid.com...

Lester Caine

22 years ago
Christian Schneider wrote:
> Lester Caine wrote: > >> Well is it approved for use with Apache2? > > Correct me if I'm wrong but my understanding is that the PHP core is > approved with Apache2 in threaded mode. > If you use non-threadsafe modules you have to use Apache 2 in > --mpm=prefork mode and then it's approved too. > We've been using Apache 2 prefork / PHP 4 in production for quite a > while now without any problems.
As Pan says That is fine. Personally I am running PHP5/Apache2 24/7 without any problems. The only difficulty is " Do not use Apache 2.0 and PHP in a production environment neither on Unix nor on Windows." in the manual tells my customers that I should not be! Either we are moving to Apache2, or THAT is a dead end? When I started playing with this Apache2 was recommended for Windows because of problems with Apache1. Should I change back now and throw Apache2 in the bin? The original statement was "Is PHP4 and 5 going to end up in the same mess" both being required to be maintained and no incentive to drop the old version exactly like Apache?
-- Lester Caine ----------------------------- L.S.Caine Electronic Services

Lester Caine

22 years ago
Lester Caine wrote: What I should have added is:- What are the problem modules? :)
-- Lester Caine ----------------------------- L.S.Caine Electronic Services

Rasmus Lerdorf

22 years ago
On Wed, 16 Jun 2004, Lester Caine wrote:
> Lester Caine wrote: > > What I should have added is:- > > What are the problem modules? :)
Ah, you see, if we knew that we would just fix them and be done with it. The problem here is not as simple as people like to make it sound. Time and time again I see the /. mentality where people berate PHP developers for being stupid and stubborn for not just "fixing PHP" so it is stable and robust with Apache2. I have explained this a number of time, but here we go again. Apache2 is a complete rewrite and a complete architecture change from Apache1. It's not like going from PHP3 to PHP4 or from PHP4 to PHP5. There is a lot of code that is common, and certainly the base architecture of PHP hasn't changed for years. So comparing Apache1 vs. Apache2 to PHP4 vs. PHP5 makes no sense. As far as I am concerned I see no reason for Apache1 development to stop. The architecture has been proven over the years and the code, while somewhat unwieldy in places, is a known entity. PHP from the very early days was designed against this basic Apache1 architecture and works extremely well running under it. The major feature that draws people to Apache2 is threading. On Windows where most basic libraries are, and must be, threadsafe, Apache2 does actually make sense and it would be good to work out the kinks on that platform. However, on UNIX there are a lot of basic libraries where thread safety is an unknown. And here I am not talking about PHP extensions, I am talking about 3rd-party libraries underneath our hundreds of extensions. Whether any one 3rd-party library is threadsafe is really hard to determine. There are a lot of variables involved, including which OS, which version of the OS, which libc, which version of that libc and on some platforms even the compiler flags used to compile these things. And to make it even more fun, tracking down a thread safety problem is damn well near impossible. Hundreds of people may well post to this list that Apache+PHP+ext/foo works perfectly for them, but maybe they are only getting about a million hits a day. Then another user comes along who gets 100 million hits a day and uses a fast dual-cpu machine and everything blows up because now suddenly the window for some tiny race condition has been made much larger due to the faster cpu speeds, the second cpu and the higher frequency of requests. And the bug report we get from this user will be something along the lines of: It don't work sometimes. Most of the times it works fine, but then every now and then it just don't. The error is different each time and I have no idea how to reproduce it, but fix it right away!!! What do you suggest we do about these? I tracked one of these down a couple of years ago. Someone was using an early version of Apache2 with the PostgreSQL libpq client library. The PostgreSQL developers swore up and down that their library was threadsafe and I spent a whole day eliminating libraries one by one. Luckily this particular problem was somewhat reproducable. If I banged hard enough at one section which created new accounts every now and then an account would end up with a bogus password entry and the user wouldn't be able to log in. It turned out that libpq was using the system's crypt() function which was not threadsafe. So the account creation which used something line INSERT INTO users ... CRYPT($password)... would mess up when 2 or more threads were trying to do this at the same time. This wasn't PHP's fault in any way, it wasn't really PostgreSQL's fault either, but it was still broken. I can give you a number of (fixable) technical reasons why I don't think Apache2+PHP is a good idea in a production environment, but setting those aside it really boils down to one simple concept: PHP is glue. It is the glue we use to build cool web applications by sticking dozens of 3rd-party libraries together and making it all appear as one coherent entity through an intuitive and easy to learn language interface. The flexibility and power of PHP relies on the stability and robustness of the underlying platform. We need a working OS, a working web server and working 3rd-party libraries to glue together. When any of these stop working we need ways to identify the problems and fix them quickly. By making the underlying framework more complex by not having completely separate execution threads, completely separate memory segments and a strong sandbox for each request to play in, we introduce feet of clay into our system. And yes, you could use the prefork mpm with Apache2 to avoid the threading, and yes you could use a standalone fastcgi mechanism to avoid the threading, but you are going out of your way to avoid the defining characteristic of the web server you have decided to use. At this point in its development, I still maintain that you are better off simply sticking with Apache1 for serving up PHP pages with the one caveat that Apache1 sucks pretty badly on Windows. -Rasmus

潘庆峰

22 years ago
For example, usleep() is not thread-safe on Solaris, and I can grep this function call from the source codes( I don't make a deep look, it may be my misunderstand...), but that explain how hard the review jobs are. "Lester Caine" <lester@lsces.co.uk> ???? news:20040616051414.56163.qmail@pb1.pair.com...

Jakub Vrana

22 years ago
Lester Caine wrote:
> The only difficulty is > " Do not use Apache 2.0 and PHP in a production environment neither on > Unix nor on Windows." > in the manual tells my customers that I should not be!
There is also good Rasmus' explanation at http://bugs.php.net/bug.php?id=27583 Jakub Vrana

Derick Rethans

22 years ago
On Tue, 15 Jun 2004, Lester Caine wrote:
> Steph wrote: > >>The next question is - are both PHP4 and PHP5 going to be run in > >>parallel, like Apache 1 and 2 so that neither gets finished ;) > > > > > > Darn.. y'mean PHP 4 isn't finished? ;) > > Well is it approved for use with Apache2?
That has nothing to do with PHP 4 (or PHP 5) really; it's apache 2 that's kinda rough. Derick

Alexander Valyalkin

22 years ago
On Tue, 15 Jun 2004 21:56:37 +0100, Lester Caine <lester@lsces.co.uk> wrote:
> Once PHP5 is out - THEN the sorts of fixes Alexander is suggesting could > be looked at - but not until then.
Once PHP5 is out - THEN all of my fixes will safely forgotten, on my opinion :) I can't find any serious reason to apply the pathes into the current PHP4 and PHP5 versions.
-- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/

Antony Dovgal

22 years ago
On Wed, 16 Jun 2004 11:06:31 +0300 "Alexander Valyalkin" <valyala@tut.by> wrote:
> I can't find any serious reason to apply the pathes into the current > PHP4 and PHP5 versions.
Yup. Me too. I can't find any reason to apply not tested patches to both stable & unstable branches. --- WBR, Antony Dovgal aka tony2001 tony2001@phpclub.net || antony@dovgal.com

Alexander Valyalkin

22 years ago
On Wed, 16 Jun 2004 12:11:07 +0400, Antony Dovgal <tony2001@phpclub.net> wrote:
> On Wed, 16 Jun 2004 11:06:31 +0300 > "Alexander Valyalkin" <valyala@tut.by> wrote: > >> I can't find any serious reason to apply the pathes into the current >> PHP4 and PHP5 versions. > > Yup. Me too. > I can't find any reason to apply not tested patches to both stable & > unstable branches. >
Why you dont test them? Is it very difficult? Are you not able to compile C sourses of my tests? Are you dont like my tests? Create your own or write down your wishes for tests, and I try to help you.
-- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/

Antony Dovgal

22 years ago
On Wed, 16 Jun 2004 11:20:33 +0300 "Alexander Valyalkin" <valyala@tut.by> wrote:
> On Wed, 16 Jun 2004 12:11:07 +0400, Antony Dovgal > <tony2001@phpclub.net> wrote: > > > On Wed, 16 Jun 2004 11:06:31 +0300 > > "Alexander Valyalkin" <valyala@tut.by> wrote: > > > >> I can't find any serious reason to apply the pathes into the > >current> PHP4 and PHP5 versions. > > > > Yup. Me too. > > I can't find any reason to apply not tested patches to both stable & > > unstable branches. > > > > Why you dont test them? Is it very difficult? Are you not able to > compile C sourses of my tests? Are you dont like my tests?
which tests are you talking about?
> Create your own or write down your wishes for tests, and I try to help > you.
take a look at *.phpt files in PHP sources. --- WBR, Antony Dovgal aka tony2001 tony2001@phpclub.net || antony@dovgal.com

Stanislav Malyshev

22 years ago
AV>>I can't find any serious reason to apply the pathes into the current AV>>PHP4 and PHP5 versions. PHP5 is in freeze now. Meaning, no changes are done unless they are absolutely critical. The reason is that we want PHP5 to be sufficiently tested and be confident that it is working before releasing it. And this is very hard to do if the code is changing all the time. I understand that you are fully confident that you code would always work. However, these are the common rules for project release (not only for this project, but for any major project out there), and unless your fixes are critical (meaning - fix major bug or crash or provide critically missing feature) they are not going to be in PHP5 before release. Not because we are thinking your code would break - it might, and it might not, nobody can say that for sure - but because no changes of this grade are entered on this stage. After PHP 5.0.0 is released, adding your patches - as well as many other patches of many other developers waiting for the release - would be possible.
-- Stanislav Malyshev, Zend Products Engineer stas@zend.com http://www.zend.com/ +972-3-6139665 ext.115

Bert Slagter

22 years ago
Stanislav Malyshev wrote:
> I understand that you are fully confident that you code would always
work. Well, I'm not quite sure of this. Almost EVERY new piece of code Alexander posted on php.internals was followed by one or more revisions within one or two days! For me, this means that the chance that the 'final' code he gives most likely isn't perfect at all... Bert

Stanislav Malyshev

22 years ago
BS>>Well, I'm not quite sure of this. Almost EVERY new piece of code BS>>Alexander posted on php.internals was followed by one or more BS>>revisions within one or two days! For me, this means that the chance BS>>that the 'final' code he gives most likely isn't perfect at all... The point is, however, that is doesn't matter at all - even if the code would be perfect, it's not the time to put it in. There are many reasons for that, but the main point is not about the quality of the code - which is another matter - but about the fact that it can not be in PHP5 now unless it addresses important problem.
-- Stanislav Malyshev, Zend Products Engineer stas@zend.com http://www.zend.com/ +972-3-6139665 ext.115

Marcus Börger

22 years ago
Hello Stanislav, Wednesday, June 16, 2004, 10:16:17 AM, you wrote: AV>>>I can't find any serious reason to apply the pathes into the current AV>>>PHP4 and PHP5 versions.
> PHP5 is in freeze now. Meaning, no changes are done unless they are > absolutely critical. The reason is that we want PHP5 to be sufficiently > tested and be confident that it is working before releasing it. And this > is very hard to do if the code is changing all the time.
Even i am holding back tons of patches right now to not disturb release process further :-) best regards marcus

Sebastian Bergmann

22 years ago
Marcus Boerger wrote:
> Even i am holding back tons of patches right now to not disturb release > process further :-)
Why not branch PHP 5.0 now and continue development in HEAD as PHP 5.1?
-- Sebastian Bergmann http://sebastian-bergmann.de/ http://phpOpenTracker.de/ Das Buch zu PHP 5: http://professionelle-softwareentwicklung-mit-php5.de/

Andi Gutmans

22 years ago
Don't think that's a good idea. I suggest to wait for another 2 weeks or so, then release 5.0.0 and create a 5_0 branch for bug fix releases and 5_1 for bigger changes. BTW, Zeev suggested 4th of July for a release date. I think that's nice timing. Anyone object? (maybe the French? :) Andi At 06:24 PM 6/18/2004 +0200, Sebastian Bergmann wrote:

Sterling Hughes

22 years ago
% telnet www.php.net 80 Trying 64.246.30.37... Connected to php.net. Escape character is '^]'. HEAD / HTTP/1.0 HTTP/1.1 301 Moved Permanently Date: Fri, 18 Jun 2004 18:13:45 GMT Server: Apache/1.3.26 (Unix) mod_gzip/1.3.26.1a PHP/4.3.3-dev Location: http://www.php.net/ Connection: close Content-Type: text/html; charset=iso-8859-1
-- % telnet www.zend.com 80 Trying 209.61.191.11... Connected to www.zend.com. Escape character is '^]'. HEAD / HTTP/1.0 HTTP/1.1 200 OK Date: Fri, 18 Jun 2004 18:14:38 GMT Server: Apache/1.3.27 (Unix) PHP/4.3.7 mod_macro/1.1.1 mod_ssl/2.8.12 OpenSSL/0. 9.6b Set-Cookie: SaneID=68.120.96.254-1087582479359; path=/; expires=Fri, 18-Jun-09 2 1:14:39 GMT X-Powered-By: PHP/4.3.7 Set-Cookie: Zend_Session_DB=4a6d867cea6c870397399eb97c44a415; expires=Mon, 21-Ju n-2004 18:14:39 GMT; path=/ Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Set-Cookie: Zend_In=deleted; expires=Thu, 19-Jun-2003 18:14:38 GMT; path=/ Connection: close Content-Type: text/html -- Perhaps we should try running php.net and zend.com on php5 before we release? if we're not even eating our own dogfood yet, it seems premature to release. -sterling On Fri, 18 Jun 2004 20:07:30 +0200, Andi Gutmans <andi@zend.com> wrote:

George Schlossnagle

22 years ago
On Jun 18, 2004, at 2:16 PM, Sterling Hughes wrote:
> % telnet www.php.net 80 > Trying 64.246.30.37... > Connected to php.net. > Escape character is '^]'. > HEAD / HTTP/1.0 > > HTTP/1.1 301 Moved Permanently > Date: Fri, 18 Jun 2004 18:13:45 GMT > Server: Apache/1.3.26 (Unix) mod_gzip/1.3.26.1a PHP/4.3.3-dev
^^^^^^^^^^^^^
> > Perhaps we should try running php.net and zend.com on php5 before we > release? if we're not even eating our own dogfood yet, it seems > premature to release.
I think it's kinda quaint that php.net runs a development version 4 point-releases behind current. George

Stanislav Malyshev

22 years ago
SH>>Perhaps we should try running php.net and zend.com on php5 before we SH>>release? if we're not even eating our own dogfood yet, it seems SH>>premature to release. As for zend.com, I don't think this is going to happen before the release, if the release dates are what they are announced. Also, I understand PHP4 is far from being dead or unusable, so I don't see the reason why not to use it :)
-- Stanislav Malyshev, Zend Products Engineer stas@zend.com http://www.zend.com/ +972-3-6139665 ext.115

Zeev Suraski

22 years ago
At 10:28 20/06/2004, Stanislav Malyshev wrote:
>SH>>Perhaps we should try running php.net and zend.com on php5 before we >SH>>release? if we're not even eating our own dogfood yet, it seems >SH>>premature to release. > >As for zend.com, I don't think this is going to happen before the release, >if the release dates are what they are announced. >Also, I understand PHP4 is far from being dead or unusable, so I don't see >the reason why not to use it :)
We'll actually try to move something on www.zend.com to PHP 5 before the release, but definitely not the whole of it. It's a much more complicated site than www.php.net is, though, so it will take longer to actually migrate the whole of it. I don't think it reflects on the quality of PHP 5. It does reflect on the fact that migrating is a bit scary. Did anybody try to run www.php.net (a replica, that is) on PHP 5? Zeev

Andi Gutmans

22 years ago
I don't think having php.net run PHP 5 is a pre-requisite for a release. That said, I think it'd be great if there'd be people willing to pitch in and work on trying to get it to work. And I don't see any problem with php.net not running the latest 4.x version either. Most high-traffic websites don't upgrade every minor version and I don't think php.net should be different. If it works, why break it? (unless there's a security bug fix). Andi At 11:16 AM 6/18/2004 -0700, Sterling Hughes wrote:

Sterling Hughes

22 years ago
On Fri, 18 Jun 2004 21:04:36 +0200, Andi Gutmans <andi@zend.com> wrote:
> > I don't think having php.net run PHP 5 is a pre-requisite for a release.
What high traffic site is PHP5 RCx powering at the moment? Where is PHP5 being stress tested? How many people have deployed it for non-academic purposes? Running php.net on PHP5 isn't about making php.net run better, its about making PHP5 run better. In the PHP4 days, as you remember, we were running PHP4 on php.net since beta 1, why have we not switched to php5 since beta 1? I understand that deployment must come after the release for the majority of sites out there, but that is all the more reason that we should take every opportunity we have to test it in a real world circumstance before releasing it onto the public. -Sterling

Jeremy S. Johnstone

22 years ago
On Friday 18 June 2004 02:04 pm, Andi Gutmans wrote:
> That said, I think it'd be great if there'd be people willing to pitch in > and work on trying to get it to work.
Well if it's help which is needed, then I volunteer myself for anything that needs to be done to make it happen.
-- Jeremy Johnstone http://www.jeremyjohnstone.com

Andrei Zmievski

22 years ago
On Fri, 18 Jun 2004, Andi Gutmans wrote:
> Don't think that's a good idea. I suggest to wait for another 2 weeks or > so, then release 5.0.0 and create a 5_0 branch for bug fix releases and 5_1 > for bigger changes. > BTW, Zeev suggested 4th of July for a release date. I think that's nice > timing. Anyone object? (maybe the French? :)
Why not July 1? - Andrei

Derick Rethans

22 years ago
On Fri, 18 Jun 2004, Andi Gutmans wrote:
> Don't think that's a good idea. I suggest to wait for another 2 weeks or > so, then release 5.0.0 and create a 5_0 branch for bug fix releases and 5_1 > for bigger changes.
erm, not again. HEAD is main development for 5.1 (read the archives :)
> BTW, Zeev suggested 4th of July for a release date. I think that's nice > timing. Anyone object? (maybe the French? :)
Don't make PHP a pollitcal thing; I other words: I object too. regards, Derick

Andi Gutmans

22 years ago
At 11:37 PM 6/18/2004 +0200, Derick Rethans wrote:
>On Fri, 18 Jun 2004, Andi Gutmans wrote: > > > Don't think that's a good idea. I suggest to wait for another 2 weeks or > > so, then release 5.0.0 and create a 5_0 branch for bug fix releases and 5_1 > > for bigger changes. > >erm, not again. HEAD is main development for 5.1 (read the archives :)
Yeah that's what I meant.
> > BTW, Zeev suggested 4th of July for a release date. I think that's nice > > timing. Anyone object? (maybe the French? :) > >Don't make PHP a pollitcal thing; I other words: I object too.
hehe OK. I don't really care. It wasn't meant to be political just a nice thing because it happens to be in July. Andi

Andi Gutmans

22 years ago
At 12:43 PM 6/18/2004 -0700, Andrei Zmievski wrote:
>On Fri, 18 Jun 2004, Andi Gutmans wrote: > > Don't think that's a good idea. I suggest to wait for another 2 weeks or > > so, then release 5.0.0 and create a 5_0 branch for bug fix releases and > 5_1 > > for bigger changes. > > BTW, Zeev suggested 4th of July for a release date. I think that's nice > > timing. Anyone object? (maybe the French? :) > >Why not July 1?
Works too :) Any volunteers to try and make php.net run with PHP 5? I'm on vacation right now (and I shouldn't be reading email if my wife had a say :) Andi

George Schlossnagle

22 years ago
On Jun 16, 2004, at 4:06 AM, Alexander Valyalkin wrote:
> On Tue, 15 Jun 2004 21:56:37 +0100, Lester Caine <lester@lsces.co.uk> > wrote: > >> Once PHP5 is out - THEN the sorts of fixes Alexander is suggesting >> could be looked at - but not until then. > > Once PHP5 is out - THEN all of my fixes will safely forgotten, on my > opinion :)
Obviously if you are still interested in being part of the PHP developer community at that time, then you yourself will be around to remind us all of your patches at that point. George

Ard Biesheuvel

22 years ago
Lester Caine wrote:
> On the other hand, if code IS working stably then it may be better to > leave it alone. I'm not saying don't tidy up code, but ALL the tests > against a change need to be in place before a change is applied to the > live code, and in some cases it is worth remembering that PHP *IS* > multi-platform. Some changes tailored for one environment may be a > disaster in another - code for the 'safe' ground.
As Alexander's initial re-implementation of crc32() was broken on 64-bit architectures, I think this is a very good point.
-- Ard

Alexander Valyalkin

22 years ago
On Wed, 16 Jun 2004 12:03:36 +0200, Ard Biesheuvel <abies@php.net> wrote:
> As Alexander's initial re-implementation of crc32() was broken on 64-bit > architectures, I think this is a very good point. >
Have you tested my initial re-implementation of crc32() on 64-bit architectures?
-- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/

Ard Biesheuvel

22 years ago
Alexander Valyalkin wrote:
> On Wed, 16 Jun 2004 12:03:36 +0200, Ard Biesheuvel <abies@php.net> wrote: > > Have you tested my initial re-implementation of crc32() on 64-bit > architectures?
No, but I don't have to: register unsigned long int crc = ~0ul; ... so crc = 0xffffffffffffffff do { crc = (crc >> 8) ^ crc32tab[(crc ^ *p++) & 0xff]; n--; } while (n); ... which is xor'ed with crc32tab, which has 0x00000000 in the upper halves of all its elements. This leads to the following a) the returned CRC is larger than 32 bits in the first 4 iterations, leading to incorrect results for strings of length up to 3; b) in the first couple of iterations, 1's have been shifted in instead of 0's, leading to incorrect results for strings of length 3 and up. Which means it still works for all strings of length zero. How's that for a BC break ?
-- Ard

Alexander Valyalkin

22 years ago
On Wed, 16 Jun 2004 16:35:04 +0200, Ard Biesheuvel <abies@php.net> wrote:
> Alexander Valyalkin wrote: >> On Wed, 16 Jun 2004 12:03:36 +0200, Ard Biesheuvel <abies@php.net> >> wrote: >> Have you tested my initial re-implementation of crc32() on 64-bit >> architectures? > > No, but I don't have to: > > register unsigned long int crc = ~0ul; > > ... so crc = 0xffffffffffffffff > > do { > crc = (crc >> 8) ^ crc32tab[(crc ^ *p++) & 0xff]; > n--; > } while (n); > > ... which is xor'ed with crc32tab, which has 0x00000000 in the upper > halves of all its elements. > > This leads to the following > a) the returned CRC is larger than 32 bits in the first 4 iterations, > leading to incorrect results for strings of length up to 3; > b) in the first couple of iterations, 1's have been shifted in instead > of 0's, leading to incorrect results for strings of length 3 and > up. > > Which means it still works for all strings of length zero. > > How's that for a BC break ? >
Your answer is excellent! Thank you for good explanation of my fault.
-- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/

Rasmus Lerdorf

22 years ago
On Wed, 16 Jun 2004, Ard Biesheuvel wrote:
> Lester Caine wrote: > > On the other hand, if code IS working stably then it may be better to > > leave it alone. I'm not saying don't tidy up code, but ALL the tests > > against a change need to be in place before a change is applied to the > > live code, and in some cases it is worth remembering that PHP *IS* > > multi-platform. Some changes tailored for one environment may be a > > disaster in another - code for the 'safe' ground. > > As Alexander's initial re-implementation of crc32() was broken on 64-bit > architectures, I think this is a very good point.
And his stripslashes() "improvement" actually broke backward compatibility and would have broken thousands of working scripts out there. That set the tone for me for the rest of the patches. -Rasmus

Alexander Valyalkin

22 years ago
On Wed, 16 Jun 2004 07:05:32 -0700 (Pacific Standard Time), Rasmus Lerdorf <rasmus@php.net> wrote:
>> As Alexander's initial re-implementation of crc32() was broken on 64-bit >> architectures, I think this is a very good point. > > And his stripslashes() "improvement" actually broke backward > compatibility > and would have broken thousands of working scripts out there. That set > the tone for me for the rest of the patches. > > -Rasmus
Yes, my stripslahses() improvement broke backward compatibility. But can you show me at least one script which it'll brake? Or show me real-life example, which my improvement will brake. And do not forget about following bugs: #9437, #19947, #27848, which have been fixed in my stripslashes() function.
-- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/

Rasmus Lerdorf

22 years ago
On Wed, 16 Jun 2004, Alexander Valyalkin wrote:
> On Wed, 16 Jun 2004 07:05:32 -0700 (Pacific Standard Time), Rasmus Lerdorf > <rasmus@php.net> wrote: > > >> As Alexander's initial re-implementation of crc32() was broken on 64-bit > >> architectures, I think this is a very good point. > > > > And his stripslashes() "improvement" actually broke backward > > compatibility > > and would have broken thousands of working scripts out there. That set > > the tone for me for the rest of the patches. > > > > -Rasmus > > Yes, my stripslahses() improvement broke backward compatibility. > But can you show me at least one script which it'll brake? > Or show me real-life example, which my improvement will brake. > And do not forget about following bugs: #9437, #19947, #27848, > which have been fixed in my stripslashes() function.
You have no idea how people use functions. Changing them because you don't think they use them in a certain way is not a decision you can make. And yes, looking through cvs here I do see a couple of instances of stripslashes being used to strip strings where the slashes may not have been solely introduced by the addslashes logic. And why do you keep referring to bogus bug reports? At most it is a documentation bug that it isn't clear that stripslashes() doesn't only strip the slashes added by addslashes. -Rasmus