katapofatico Posted April 28, 2015 Share Posted April 28, 2015 Hello everybody, Osc 2.4.0 in master branch requires >= PHP 5.5. My production server only offer PHP 5.3.2. ... the v2.4.0 codebase is still based on v2.3 and could work on an earlier PHP version (eg, PHP v5.3) [source] I've tried to run on this server and the only problem I detect is several files (lower than 10, at the moment) using the new array sintax declaration from PHP 5.4, for example: catalog/address_book_proccess.php: $OSCOM_Db->delete('address_book', ['address_book_id' => (int)$_GET['delete'], 'customers_id' => (int)$_SESSION['customer_id']]); catalog/includes/OSC/OM/Db.php: protected $driver_options = []; I suposse that a lot of people is in my case, and I ask the reason to make & mantain this PHP backguards incompatible code. I don't know if there are more aspects to consider, but I've converted this array declarations to classic sintax and the e-shop runs perfectly. It would be possible not to close the door to people with PHP < 5.4? Thanks for your replies! Link to comment Share on other sites More sharing options...
burt Posted April 28, 2015 Share Posted April 28, 2015 php 5.5 will be the minimum requirement for oscom 2.4 We want to move forward... Link to comment Share on other sites More sharing options...
ArtcoInc Posted April 28, 2015 Share Posted April 28, 2015 My hosting company currently offers only up to PHP 5.4. When I contacted them last week (only spent an hour on hold), I was told that there is no timeline in place for offering PHP 5.5 or newer. It looks like I will be on osC 2.3.x for a while ... Malcolm Link to comment Share on other sites More sharing options...
katapofatico Posted April 28, 2015 Author Share Posted April 28, 2015 php 5.5 will be the minimum requirement for oscom 2.4 We want to move forward... Ok, "to move forward" sounds good, but if this only means a new form to write array declaration that make OSC incompatible with a lot of hosting providers... then "forward" becomes meaningless. It's a minimal effort to rewrite the lines with 5.4 PHP syntax. I offer myself to make it. Link to comment Share on other sites More sharing options...
♥14steve14 Posted April 28, 2015 Share Posted April 28, 2015 I think making it so that the latest version can be used on only the newest php is the way forward. There must come a time when it is necessary to drop all the old code out of the files, as there will be more to add when newer versions are released. Having the clean out of code is not a bad idea, i just wish it wouldnt stop there. Maybe then, there is a chance for you to write and code a working addon that will make oscommerce 2.4 backwards compatible with older version of php. That should make everyone happy. REMEMBER BACKUP, BACKUP AND BACKUP Link to comment Share on other sites More sharing options...
katapofatico Posted April 28, 2015 Author Share Posted April 28, 2015 Maybe then, there is a chance for you to write and code a working addon that will make oscommerce 2.4 backwards compatible with older version of php. That should make everyone happy. Ok, I can do this, but it will consist necessarily in a list of find&replace directions, isn't it? Is there another way? Thanks anyway Link to comment Share on other sites More sharing options...
burt Posted April 28, 2015 Share Posted April 28, 2015 That would not be welcome. We are trying to move osCommerce forward. You are trying to hold osCommerce back. If (for whatever reason) you cannot handle 2.4, stay on 2.3. Don't put obstacles in my way. Link to comment Share on other sites More sharing options...
♥kymation Posted April 28, 2015 Share Posted April 28, 2015 @@katapofatico PHP 5.3 is obsolete. There is no support of any kind, and there are known security vulnerabilities. If your host only offers obsolete and insecure software, you need to find a new host immediately. This is urgent - you need to do this now before you are hacked. @@ArtcoInc PHP 5.4 is no longer actively supported, and security patches will only be made until 14 September 2015. If your host does not already have a plan to migrate to a supported version, you should start looking for a host that does. It's not as urgent as the people who are still on 5.3, but you should do this now rather than wait until it is urgent. There are plenty of hosts that offer up-to-date versions of PHP. Regards Jim See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
clustersolutions Posted April 28, 2015 Share Posted April 28, 2015 A good host should make 5.5 avail as 5.4 is in its twilight...I need to upgrade mine... Link to comment Share on other sites More sharing options...
ArtcoInc Posted April 28, 2015 Share Posted April 28, 2015 @@kymation Jim, @@ArtcoInc PHP 5.4 is no longer actively supported, and security patches will only be made until 14 September 2015. If your host does not already have a plan to migrate to a supported version, you should start looking for a host that does. It's not as urgent as the people who are still on 5.3, but you should do this now rather than wait until it is urgent. There are plenty of hosts that offer up-to-date versions of PHP. The funny things is, the host is one of the osCommerce 'partners' ... Malcolm Link to comment Share on other sites More sharing options...
MrPhil Posted April 28, 2015 Share Posted April 28, 2015 OK, so will 2.4.0 actually be using PHP 5.5 features, AND this leads to much cleaner code than would otherwise be found if those features had to be rewritten to, say, PHP 5.3? In that case, it is reasonable to prereq PHP 5.5 for osC 2.4.x so long as osC 2.3.x continues to be actively supported and prereqs some lower PHP level. It would be absolutely unreasonable to require the latest PHP level just because it sounds cool. There are many hosts who do not rapidly upgrade, for whatever reason. Forcing osC users to new hosts will more likely result in their leaving osC. My host is currently at 5.3 and has no announced plans for 5.4 or 5.5 (that their service sucks is another matter, and will probably lose me as a customer). Very old PHP levels (4.x) should certainly be abandoned as soon as possible. No reasonable host still supports PHP 4.x as its highest level. Link to comment Share on other sites More sharing options...
♥Tsimi Posted April 29, 2015 Share Posted April 29, 2015 In the past I have read many times that people say "my host runs only phpx.x". Is that normal behaviour? At my host i can select and change my php version anytime. From very old php4.x up to php5.5. Is this not an option that every good host should provide? It is stupid and ridiculous to have to wait for the host to upgrade so that a certain software can be used. Link to comment Share on other sites More sharing options...
♥14steve14 Posted April 29, 2015 Share Posted April 29, 2015 That would not be welcome. We are trying to move osCommerce forward. You are trying to hold osCommerce back. If (for whatever reason) you cannot handle 2.4, stay on 2.3. Don't put obstacles in my way. But I thought the aim was that people should be using the current version. That is what everyone is pushing for, yourself included. Now you are contradicting yourself by saying that its fine to use an old version. I think its best to use the latest version and if that means that someone wants to make an addon that means that they and many other people can use that new version, then its a forward step to those users. Once the persons hosts upgrades to the latest php version then the addon can be removed, and its back to original by reversing the install steps. What is wrong with that, or an I over simplifying something. Yes, get rid of the old code, but don't stop those that want to use oscomerce from using it. REMEMBER BACKUP, BACKUP AND BACKUP Link to comment Share on other sites More sharing options...
burt Posted April 29, 2015 Share Posted April 29, 2015 Yes, of course we want people to use the latest version, but not if they have to retrofit it back so much that it is now not the latest version anymore. And especially not if they then make that code available to others...what katapofatico proposes is not an "addon" but multiple core code changes, which takes a 2.4 user all the way back to 1 inch past 2.3.4. Pointless in the extreme. To reiterate; if one cannot use 2.4 because ones host is crap, use 2.3 or find a new host. Link to comment Share on other sites More sharing options...
katapofatico Posted April 29, 2015 Author Share Posted April 29, 2015 what katapofatico proposes is not an "addon" but multiple core code changes, which takes a 2.4 user all the way back to 1 inch past 2.3.4. I'm agree with "is not an addon", but not with "multiple code changes": there are 10-15 array declarations with 5.4 syntax in osc2-master: of course you can introduce more in Beta roadmap... if it's so necessary ;) If 1 inch is enough to avoid hosting migrations, maybe some people will be interested on it. I apologize because I have not experience with the improvements between PHP 5.3 and 5.5: maybe there are some crucial aspects that you need/want to use in your coding. Very interesting dialog! :thumbsup: Link to comment Share on other sites More sharing options...
MrPhil Posted April 29, 2015 Share Posted April 29, 2015 At my host i can select and change my php version anytime. From very old php4.x up to php5.5. Is this not an option that every good host should provide? No, you have a most unusual host (to offer multiple levels of PHP). It's a lot of work on their part to not only stick them out on the disk, but also to support them, keep up with security patches (if available), and field customer questions and problems. Most hosts offer only what they consider to be the "current" level of PHP (which may be as low as 5.3), and maybe one previous or older version (to buy time for customers to upgrade their code). Link to comment Share on other sites More sharing options...
ArtcoInc Posted April 29, 2015 Share Posted April 29, 2015 The choices through my host (an osCommerce partner, by the way) are PHP v5.2 and v5.4. And, as I mentioned earlier, when I asked what their plans are for offering v5.5, I was told that there was no timeline. Malcolm Link to comment Share on other sites More sharing options...
clustersolutions Posted April 29, 2015 Share Posted April 29, 2015 Well...2.4 has not been released yet...I looked at the changes between 5.4 and 5.5, what would cause 2.4 not work in 5.4? Anyone... Link to comment Share on other sites More sharing options...
♥Tsimi Posted April 29, 2015 Share Posted April 29, 2015 No, you have a most unusual host (to offer multiple levels of PHP). It's a lot of work on their part to not only stick them out on the disk, but also to support them, keep up with security patches (if available), and field customer questions and problems. Most hosts offer only what they consider to be the "current" level of PHP (which may be as low as 5.3), and maybe one previous or older version (to buy time for customers to upgrade their code). Well, then I can consider myself really lucky. (w00t) I can switch between MySQL 5.0 and 5.5 and between 5 different php versions. :D Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.