From: Carsten K. <car...@ma...> - 2002-02-27 00:31:24
|
Jeff, Very well put, I understand now and agree with your point, that PhpWiki should generally strive to support a particular version of PHP and stick with it, until in the future it might be agreed that a higher version of PHP is needed. I have some questions for you and the group about how to proceed from here. .. The INSTALL docs I can change back to: PhpWiki requires a web server with PHP version 4.0.? or greater and a database application. (Fill in the decided upon version number above) and change the version number in the next line from 4.0.5 to: (PhpWiki uses the array_search() function which is present only in PHP version php-4.0.4pl1 or greater.) Up until now I hadn't been giving any consideration to which version of PHP a function was available in, except perhaps that it is available in PHP 4.x.x. So far I only recall the one function I added in, array_search(), which apparently is only available in 4.0.4pl1 ? and Reini has given some handy substitute functions so this can easily be changed to work with older versions of PHP. Whenever this situation arises in the future, should we put the workaround functions somewhere globally accessible like stdlib? or start a new library file only containing these functions? (and then call them if !function_exists('funcname') ?) From browsing around the PHP web site a bit, I think I figured out that php-4.0.4pl1 is a CVS version of PHP before the final release of 4.0.4. The online documentation doesn't always list in which CVS version of PHP a function was added, usually just the full release version number as is the case with the example array_search(). (The docs for call_user_func_array is one I found which *does* mention a pl version number http://www.php.net/ manual/en/html/function.call-user-func-array.html). At least I haven't found any such online reference yet for which functions were added in any pl version. When SF was running the older version of PHP it probably would have been almost immediately evident when a new function was added which broke it. So now that SF is running PHP/4.0.6 do we just wait until somebody complains ;-) that a new function broke their PhpWiki running PHP-plxxx? I'm sure there are a lot of stable CVS variations of PHP different people could be using, how to decide which version is PhpWiki going to support? If it will help us, I am willing to to some "monkey" work, examine each function currently used in PhpWiki then visit each function page in the PHP docs to determine the necessary PHP version. Someone else with experience using non-release "pl" builds would have to fill in the blanks where the pl version is not available. Carsten On Sunday, February 24, 2002, at 12:34 pm, Jeff Dairiki wrote: > My point is, that we need to decide what versions of PHP we are going > to support (I thought we already had). Then, if PhpWiki uses functions > which aren't available in a "supported" version of PHP (without providing > appropriate fallbacks or replacements), it is, by definition, a bug > in PhpWiki. > > Of course, it's allowable to change the list of supported PHP versions, > (e.g. PhpWiki 1.2 runs under PHP 3, PhpWiki 1.3 doesn't) but that > shouldn't be done without a fair amount of deliberation. > > > > Carsten Klapp said: >> >> Hi Jeff, >> >> I based this on the most recent function I could think of that is used >> by PhpWiki, I think it's array_search() but I haven't created a list >> of all the functions used. The PHP online docs say this one needs PHP >> 4.0.5 or greater. What's the pl designation in your version, is that a >> beta? >> >> Do you know if there is a table somewhere which lists what version of >> php all the various functions were introduced? (so that one doesn't >> have to look at all the individual function pages). >> >> Carsten >> >> On Saturday, February 23, 2002, at 09:03 pm, Jeff Dairiki wrote: >> >>> Carsten Klapp said: >>>> Update of /cvsroot/phpwiki/phpwiki >>>> In directory usw-pr-cvs1:/tmp/cvs-serv22514 >>>> >>>> Modified Files: >>>> INSTALL >>>> Log Message: >>>> Required PHP version 4.0.5, updated instructions for new RawHTML >>>> plugin >>> >>> Why are we requiring 4.0.5? I use 4.0.4pl1. I'm sure lots of others >>> do too. (It's what RedHat, and others distributions distribute.) >>> (Keep in mind, too, that many people don't have complete control over >>> their web-servers. Up until recently the SourceForge project servers >>> were running 4.0.4pl1, I think...) > |