Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Which PHP version as minimum for webERP?
03-28-2014, 12:27 AM, (This post was last modified: 03-28-2014, 12:47 AM by icedlava.)
#1
Which PHP version as minimum for webERP?
Opening this thread in case for discussion of minimum recommended version for webERP. Rather than hijacking other threads, the topic could be better dealt with here.

At the moment the minimum recommended PHP for webERP is 5.2.

I'd like to suggest we consider upgrading the minimum recommended php for webERP to 5.3 (or even php 5.2.6 ?? or higher). Note this is a --recommended-- php version.

I would support a maintenance version of php 5.2 webERP branch. A development branch with a minimum recommended php of 5.3.

Here are a few reasons that you may or may not think are important.

1. PHP 5.2 is no longer supported and does not get security patches. End of life was some years ago. As a community we should encourage users to upgrade their PHP for their benefit and webERP community. It doesn't look good for webERP if someone has a hacked installation even if it is not directly webERP responsible.

2. If we support php 5.2 we cannot take advantage of other features of php 5.3 without also writing additional code that supports the php 5.2 - sometimes that is just not practical and we have to forgo the higher php code which cold be more efficient, as an example.

3. As an open source community, we should encourage upgrading of our code to a minimum recommended php 5.3 and in so doing encourages others. An app that does not support higher php can hold up an upgrade of a whole server. This can create headaches when one app requires an outdated php 5.2, and another has a minimum of eg php 5.3 to run, not to mention putting the whole server at risk with unsupported php and potential security issues.


Cheers,



I quote from another thread:
Quote:I hear WordPress still has 5.3 issues in their code.

And it will continue to probably until they fix php 5.3 as their minimum recommended version. It's a problem that will go round and round.

Wordpress has a huge user base and probably many from years ago, that installed their sites on old php 5.2 servers. It has a huge following with many new users over the last few years - all on servers with a minimum of php 5.3 (it's offered as standard on most major hosting companies )

Now, even if Wordpress wanted to - how can they drop support for php 5.2 overnight?

The problem is that such a huge community has huge number of developers of many different standards and many would have long forgotten php 5.2 (end of life some years ago) and moved to a minimum of php 5.3 to take advantage of the many, many improvements in security, especially performance, error handling and so on.

This will create an issue for wordpress if their core code doesn't support php 5.3 fully. Plugins may not work, php libraries require php 5.3 but some old wordpress plugins are written for php 5.2 and so on.

Thus, I would expect wordpress to have lots of issues both directly and indirectly with anything written in php 5.3 until they make it their minimum. If wordpress updated then a whole lot of CMS users could also probably update their servers and move to php 5.3 rather than keeping them on an old insecure server.

Now, with some hosting companies offering php 5.4 as standard, the issue can only get worse.


Reply
03-28-2014, 01:17 AM,
#2
RE: Which PHP version as minimum for webERP?
For my two cents
PHP 5.2 reached end of life 3 years ago. PHP 5.3 is supposed to reach end of life this year, although it keeps being delayed, likely as it already difficult for people to switch from PHP 5.2 -> 5.3 let alone from 5.3 -> 5.4.
I'm okay with keeping a stable legacy branch but my vote would be to support continued development on PHP 5.4+ as the minimum. PHP 5.4 will reach end of life next year, which means we still have 3 years (this year, next year and the year after) before it is fully unsupported. I would like to move to PHP 5.5 since it has a built-in optimizer which will make the code run a lot faster, (and also reduce overheads of classes etc.) but I don't think it's well distributed yet, a non-technical user who downloads xampp or wamp to make a web server will likely have PHP 5.4, which makes it a good balance between looking towards future support and also ease of installation etc.
Reply
03-28-2014, 01:20 AM,
#3
RE: Which PHP version as minimum for webERP?
An interesting discussion and one a lot of projects have been having.

I don't think it will be people with their own servers who will be at 5.2. The reason most projects still support 5.2 is because a lot of hosting companies do. Remember that just because the core developers stop patching a version doesn't mean the likes of Red hat, SUSE etc stop. For instance RHEL4 which was released in Feb 2005 is still under support and contains a fully security patched PHP 5.2 version. Upgrading from 5.2 to 5.3 is a major headache for hosting companies which is why some smaller ones are holding out until their distros stop supporting it

I think the obvious question is what aspect of 5.3 and above do you want to use?

Thanks
Tim
Reply
03-28-2014, 01:29 AM,
#4
RE: Which PHP version as minimum for webERP?
(03-28-2014, 01:20 AM)Uhuru Wrote: I think the obvious question is what aspect of 5.3 and above do you want to use?

Yeah that is the key right there.

For me, the biggest thing I would like to be able to use is traits, specifically for the Views project I'm working on: if I define all the classes as traits, and the 'core' classes are just a collection of traits, someone who wants to override a class and provide their own functionality, can just add the trait that their custom class, and replace the functions they want to override without having to modify the core code or completely copy it. However, I will survive without it.

The next use would be that parametrized queries for mysqli are easier to write if you can use ReflectionMethod, but PDO would not need that and legacy PHP has call_user_funct_array which is convoluted but gets the job done, so it is possible to avoid.
Reply
03-28-2014, 02:14 AM,
#5
RE: Which PHP version as minimum for webERP?
(03-28-2014, 01:17 AM)serakfalcon Wrote: I'm okay with keeping a stable legacy branch but my vote would be to support continued development on PHP 5.4+ as the minimum.
I'd be happy with that too, although I opted for suggesting php 5.3 as a recommended minimum as that seems more likely to happen.

There are a number of new features we could take advantage as you mention. I'd also note the general performance and security improvements, and add improved exception handling to your list.
Reply
03-28-2014, 05:40 AM,
#6
RE: Which PHP version as minimum for webERP?
What are the PHP features that we currently use that will be gone in 5.4?

The only thing I was aware of was the demise of the old mysql - so our $DBType='mysql' is history. We have the upgrade with mysqli already and if seakfalcon writes us a new DBType='dbal' that would be cool to support a host of other DBs - we would need another config option in config.php I think for $DBDbalType=?? to select the dbal DB type - which would be ignored if DBType!='dbal'

We need to update the readme - and prerequisites to recommend PHP 5.4+ but is that all it is?

I prefer we keep to pretty basic PHP functions as far as possible - this policy has stood us in pretty good stead throughout the various incarnations of PHP over time.
Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
Reply
03-28-2014, 11:44 AM,
#7
RE: Which PHP version as minimum for webERP?
Dear all,

(03-28-2014, 05:40 AM)phil Wrote: I prefer we keep to pretty basic PHP functions as far as possible - this policy has stood us in pretty good stead throughout the various incarnations of PHP over time.

I vote for this. webERP is an application which used in Business environment, and the target is SME. It's a merit that webERP can be run across many PHP version. I think the idea one is 'PHP version independent'. So the users only need to upgrade their webERP application instead of environment.

As Tim point out, lots of hosting company still use heavily patched php5.2. I'm glad to see that webERP worked pretty well in php5.2 and php5.3. I know this because I use appserv which stayed in php5.2.6 and I use wamp too. And I've experienced another projects which absolutely failed php5.3. So it has to be distributed with a php 5.2 environment packing.

Although we have not introduced most brand new features, webERP still performance very well over many projects.

So the policy has been tested by practice and the results can be reviewed by everyone. I vote to stick to it instead of pursuing those brand new features which may deprecated very soon. It'll waste developers' time and also hurt the users.

Keeping webERP's pragmatic way is a must. If there is problem, dig it out and fix it. To constraint ourselves and enhance webERP's dependable on environments is never a good choice, IMHO.

Best regards!
Exson





Reply
11-14-2014, 06:06 PM,
#8
RE: Which PHP version as minimum for webERP?
PHP greater than 5.1. As PHP can be configured to run under most web-servers under all common operating systems, webERP is therefore operating system independent.

MySQL greater than version 4 with Innodb transactional tables support. Foreign key constraints are also required. These were added to Innodb in 2003. Innodb was introduced in 2001 to MySQL and has Oracle like functionality - row level locking and database transactions with similar speed. (The system could be used with Oracle or other database systems, with minimal modification.) An example configuration file, my.cnf, normally under /usr/local/mysql/var is available in the MyySQL documentation to show typical settings for the Innodb configuration. The expected size of the data is useful although Innodb can create an auto-extending data file and does so by default as of MySQL 4. All tables are defined as Innodb tables as of version 2.8.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)