[Xerte-dev] Re: [Xerte] database.php (PHP Version 4 vs 5)

David Goodwin david at palepurple.co.uk
Mon Apr 30 11:28:55 BST 2012


Hi,

Some statistics :

orange:~/src/xerteonlinetoolkits $ phpci print --reference PHP5 --report function -R . | grep 5.
436 / 436 [+++++++++++++++++++++++++++++++++++++++++++++++++++++++++>] 100.00%
  spl_autoload_register                 SPL               5.1.2               1
  simplexml_load_file                   SimpleXML         5.0.0               1
  iconv_set_encoding                    iconv             4.0.5               1
  iconv_strlen                          iconv             5.0.0              10
  iconv_strpos                          iconv             5.0.0              38
  iconv_strrpos                         iconv             5.0.0               3
  iconv_substr                          iconv             5.0.0              33
  dirname                               standard          4.0.0              53
  fclose                                standard          4.0.0              51
  file_put_contents                     standard          5.0.0               6
  fopen                                 standard          4.0.0              55
  fread                                 standard          4.0.0              57
  fwrite                                standard          4.0.0              50
  htmlentities                          standard          5.2.3               1
  md5                                   standard          4.0.0               1
  scandir                               standard          5.0.0               1
  str_split                             standard          5.0.0               3
REQUIRED PHP 5.2.3 (MIN) 
Time: 1 second, Memory: 28.25Mb



modules/xerte/new_template.php uses scandir(). (PHP5)
rss.php uses/expects htmlentities() with PHP5 style parameters.
website_code/php/import/dUnzip2.inc.php uses file_put_contents() but should work with PHP4 as it checks if the function exists and defines one if not.
library/Zend/* requires PHP5.2+
library/autoloader.php requires PHP 5.1+
functions.php (_debug()) requires file_put_contents (PHP5)
index.php - requires PHP5.1 for InvalidArgumentException



Thanks
David.

On 30 Apr 2012, at 07:50, Julian Tenney wrote:

> It may well be well past its end of life, but the systems people here have only just upgraded to PHP5 from 4.
>  
> How big an issue is this, if we insist on PHP5? I agree with the rationale, just not sure about the reality…?
>  
> From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of David Goodwin
> Sent: 29 April 2012 17:59
> To: Xerte discussion list
> Subject: [Xerte] Re: database.php
>  
>  
> On 29 Apr 2012, at 17:50, Dave Burnett wrote:
> 
> 
> "Having said all that, I'm about to commit a change to the code which will remove the foreach($params as &$value). But I'm also about to commit some other stuff which will definitely not be compatible with PHP4."
>  
> Glad we had that discussion.
>  
> Yeah… sorry….
>  
> I hadn't known Xerte still claimed to support PHP4 … so it's highly likely that I will have previously committed something which disagrees with PHP4 - e.g. file_put_contents(). 
>  
> If Julian / Pat wish to still support PHP4 then I will undo whatever I've done - but I feel like it's saying we should still support Windows 95. PHP5 was released in ~2004.
>  
> thanks,
>  
> David.
>  
>  
> Pale Purple Ltd.  (Company No: 5580814)
> 'Business Web Application Development and Training in PHP'
>  
> http://www.palepurple.co.uk   
> Office: 0845 0046746     Mobile: 07792380669 
>  
> Follow us on Twitter: @PalePurpleLtd
>  
> 
> This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.
> 
> This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.
> 
> _______________________________________________
> Xerte mailing list
> Xerte at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
> 
> This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it.   Please do not use, copy or disclose the information contained in this message or in any attachment.  Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.
> 
> This message has been checked for viruses but the contents of an attachment
> may still contain software viruses which could damage your computer system:
> you are advised to perform your own checks. Email communications with the
> University of Nottingham may be monitored as permitted by UK legislation.

Pale Purple Ltd.  (Company No: 5580814)
'Business Web Application Development and Training in PHP'

http://www.palepurple.co.uk   
Office: 0845 0046746     Mobile: 07792380669 

Follow us on Twitter: @PalePurpleLtd

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte-dev/attachments/20120430/2fe9930c/attachment-0001.html>


More information about the Xerte-dev mailing list