Jump to content



Latest News: (loading..)

* * * * * 1 votes

PHP 5.4 - what impact will it have on OsC v.2.x?

php php 5.4 php5.4

  • Please log in to reply
30 replies to this topic

#1   rimote

rimote
  • Members
  • 4 posts
  • Real Name:Ennio Wolsink

Posted 22 September 2011 - 09:49 AM

So I noticed that PHP 5.4., which now has a release candidate and thusly will be most likely before the year is out, no longer supports functions such as session_register(), session_unregister() and session_is_registered().

There are of course a host of other changes, interesting things being the new Traits, as well as the fact that PHP 5.4 will apparantly run almost twice as fast (without having to make any modifations to your existing code), for more info check out: http://www.tech-lull...reparing-php-54 and: http://php.net/relea..._4_0_alpha1.txt

Anyway, I'm wondering if any of you know if it's necessary to patch/hack/update OsC v.2.x because of this new PHP version. Or if someone else already made a post on this subject, I tried Google and this forum's search but I didn't find anything relevant.

Edited by rimote, 22 September 2011 - 09:51 AM.


#2   Harald Ponce de Leon

Harald Ponce de Leon

    Healthy Giraffe

  • Core Team
  • 3,946 posts
  • Real Name:Harald Ponce de Leon
  • Gender:Male
  • Location:Solingen, Germany

Posted 22 September 2011 - 10:10 AM

Hi Ennio..

v2.2/v2.3 will not work with PHP 5.4. A v2.4 release will be made available shortly after PHP 5.4 is released with the remaining deprecated functions removed.

The new framework in v3.0 has no problems working with PHP 5.4. I would love to make PHP 5.4 the minimum requirement - next year perhaps when PHP 5.4 is more widespread Posted Image

Kind regards,
Harald Ponce de Leon

#3   DunWeb

DunWeb

    The Censored One

  • Members
  • 12,720 posts
  • Real Name:Chris
  • Gender:Male
  • Location:Ontario, Canada

Posted 22 September 2011 - 02:53 PM

View Postrimote, on 22 September 2011 - 09:49 AM, said:

So I noticed that PHP 5.4., which now has a release candidate and thusly will be most likely before the year is out, no longer supports functions such as session_register(), session_unregister() and session_is_registered().

There are of course a host of other changes, interesting things being the new Traits, as well as the fact that PHP 5.4 will apparantly run almost twice as fast (without having to make any modifations to your existing code), for more info check out: http://www.tech-lull...reparing-php-54 and: http://php.net/relea..._4_0_alpha1.txt

Anyway, I'm wondering if any of you know if it's necessary to patch/hack/update OsC v.2.x because of this new PHP version. Or if someone else already made a post on this subject, I tried Google and this forum's search but I didn't find anything relevant.


That is hilarious considering PHP 5.3 still isn't used by 95% of hosting companies.  So even if 5.4 was released tomorrow, it would still take hosting companies 2-3 years to update.



Chris

Edited by DunWeb, 22 September 2011 - 02:53 PM.

:|: Was this post helpful ? Click the LIKE THIS button :|:

See my Profile (click here)

#4   rimote

rimote
  • Members
  • 4 posts
  • Real Name:Ennio Wolsink

Posted 22 September 2011 - 02:57 PM

@Harold: thanks very much, you've answered my question completely. I'll treat my osCommerce websites accordingly.
@Chris: That's not PHP's fault per se ;). Regardless of how well adopted it will be in the near future, my question and Harold's answer on it would be relevant for anyone who is willing or unwilling but still has to upgrade/is upgraded to PHP 5.4.

Edit: the improved performance that PHP 5.4 also offers might be more enticing to hosts, than say closure.. Hopefully.

Edited by rimote, 22 September 2011 - 03:02 PM.


#5   MrPhil

MrPhil
  • Members
  • 4,127 posts
  • Real Name:Phil
  • Gender:Male

Posted 22 September 2011 - 03:16 PM

View PostDunWeb, on 22 September 2011 - 02:53 PM, said:

That is hilarious considering PHP 5.3 still isn't used by 95% of hosting companies.  So even if 5.4 was released tomorrow, it would still take hosting companies 2-3 years to update.
While hosting companies will take years to get up to PHP 5.4, I have noticed that many people who make test/development installations on XAMPP, etc. tend to be using bleeding-edge PHP and MySQL levels. So, it wouldn't hurt to get osC 2.4 out the door fairly soon, to help them along. In some cases it's just ignorance, but some are really trying to prepare for the future. The question then becomes, how much longer will 2.x be supported, once PHP 5.3 becomes commonplace? And at what point will 3.x be a real product and 2.x can be retired?

#6   DunWeb

DunWeb

    The Censored One

  • Members
  • 12,720 posts
  • Real Name:Chris
  • Gender:Male
  • Location:Ontario, Canada

Posted 22 September 2011 - 03:24 PM

View PostMrPhil, on 22 September 2011 - 03:16 PM, said:

While hosting companies will take years to get up to PHP 5.4, I have noticed that many people who make test/development installations on XAMPP, etc. tend to be using bleeding-edge PHP and MySQL levels. So, it wouldn't hurt to get osC 2.4 out the door fairly soon, to help them along. In some cases it's just ignorance, but some are really trying to prepare for the future. The question then becomes, how much longer will 2.x be supported, once PHP 5.3 becomes commonplace? And at what point will 3.x be a real product and 2.x can be retired?


Phil,

Very true about those who set up local machine environments, they do seem to use the latest versions of Php and MySQL.  Once Php 5.4 is released, I am sure patches will become available to make 2.3.1 compliant with the changes.

Ennio,

I wasn't trying to undermine your question in any way, I just find it funny how software is developed years before anyone will actually be able to use it.  Once they are able to use it, a revision or new version of the software is already being worked on so hosting companies will never be able to offer the 'latest' release.  I apologize if you took offense to my reply.


Chris
:|: Was this post helpful ? Click the LIKE THIS button :|:

See my Profile (click here)

#7   knifeman

knifeman
  • Members
  • 1,674 posts
  • Real Name:Tim
  • Gender:Male

Posted 22 September 2011 - 05:36 PM

View PostDunWeb, on 22 September 2011 - 02:53 PM, said:



That is hilarious considering PHP 5.3 still isn't used by 95% of hosting companies.  


Chris

PCI will drive this faster. We have updated ahead of schedule to continue meeting compliance.

Tim

#8   Harald Ponce de Leon

Harald Ponce de Leon

    Healthy Giraffe

  • Core Team
  • 3,946 posts
  • Real Name:Harald Ponce de Leon
  • Gender:Male
  • Location:Solingen, Germany

Posted 22 September 2011 - 06:30 PM

Hi All..

I wouldn't be surprised to see hosting providers that have not yet updated to PHP 5.3 to skip it and jump to PHP 5.4 once ready.

Lets make PHP 5.4 a minimum requirement for v2.4 to speed this up :D (unfortunately just kidding)

Kind regards,
Harald Ponce de Leon

#9   DunWeb

DunWeb

    The Censored One

  • Members
  • 12,720 posts
  • Real Name:Chris
  • Gender:Male
  • Location:Ontario, Canada

Posted 22 September 2011 - 06:43 PM

View PostHarald Ponce de Leon, on 22 September 2011 - 06:30 PM, said:

Hi All..

I wouldn't be surprised to see hosting providers that have not yet updated to PHP 5.3 to skip it and jump to PHP 5.4 once ready.

Lets make PHP 5.4 a minimum requirement for v2.4 to speed this up [img]http://forums.oscommerce.com//public/style_emoticons/default/biggrin.png[/img] (unfortunately just kidding)

Kind regards,


You certainly are a visionary Harald.  [img]http://forums.oscommerce.com//public/style_emoticons/default/w00t.gif[/img]


Chris

ps, Why don't the smileys work ??

Edited by DunWeb, 22 September 2011 - 06:44 PM.

:|: Was this post helpful ? Click the LIKE THIS button :|:

See my Profile (click here)

#10   Mark Evans

Mark Evans

    Code Monkey Rockstar

  • Core Team
  • 2,516 posts
  • Real Name:Mark
  • Gender:Male
  • Location:Behind you :-P

Posted 22 September 2011 - 07:57 PM

I am fairly close with getting a PHP 5.4 compatible version of 2.4.x ready, keep an eye on github
Mark Evans
osCommerce Monkey & Lead Guitarist for "Sparky + the Monkeys" (Album on sale in all good record shops)

---------------------------------------
Software is like sex: It's better when it's free. (Linus Torvalds)

#11 ONLINE   multimixer

multimixer

    Lemons or Melons ?

  • Partner
  • 4,387 posts
  • Real Name:George Zarkadas
  • Gender:Male
  • Location:Greece

Posted 23 September 2011 - 04:04 AM

off topic: What is going on with the osCommerce versions? A v 2.4 now?

#12   Mark Evans

Mark Evans

    Code Monkey Rockstar

  • Core Team
  • 2,516 posts
  • Real Name:Mark
  • Gender:Male
  • Location:Behind you :-P

Posted 23 September 2011 - 04:58 AM

View Postmultimixer, on 23 September 2011 - 04:04 AM, said:

off topic: What is going on with the osCommerce versions? A v 2.4 now?

2.4.x will be the PHP 5.4 compatible version - Since this requires more than just bug fixing its common to increase the middle version number
2.3.2 will be the next minor bug fix release and only contains minor changes so only the last digit is increased.

This follows pretty common versioning standards
Mark Evans
osCommerce Monkey & Lead Guitarist for "Sparky + the Monkeys" (Album on sale in all good record shops)

---------------------------------------
Software is like sex: It's better when it's free. (Linus Torvalds)

#13 ONLINE   multimixer

multimixer

    Lemons or Melons ?

  • Partner
  • 4,387 posts
  • Real Name:George Zarkadas
  • Gender:Male
  • Location:Greece

Posted 23 September 2011 - 06:05 AM

View PostMark Evans, on 23 September 2011 - 04:58 AM, said:


2.4.x will be the PHP 5.4 compatible version - Since this requires more than just bug fixing its common to increase the middle version number
2.3.2 will be the next minor bug fix release and only contains minor changes so only the last digit is increased.

This follows pretty common versioning standards

No issues with the numbers used, the question was more about direction of development. Well anyway, let's not hijack this topic, sorry for jumping in

#14 ONLINE   burt

burt

    Code Monkey

  • Community Team
  • 7,739 posts
  • Real Name:G Burton
  • Gender:Male
  • Location:UK/DEV/on

Posted 23 September 2011 - 07:55 AM

Mark, how about skipping 2.4 (name) entirely.  And instead saying it is called;  2.5.4

Serious idea, which would be (I think, with my fuddled brain) a good move.

Harald, I cannot see any reason why you should not set 5.4 as minimum for 3.x (3.5.4 ;)) as 5.4 brings with it good  benefits over previous version.
eBooks / Templates

Warning: My posts may contain Horsemeat.

#15   Harald Ponce de Leon

Harald Ponce de Leon

    Healthy Giraffe

  • Core Team
  • 3,946 posts
  • Real Name:Harald Ponce de Leon
  • Gender:Male
  • Location:Solingen, Germany

Posted 23 September 2011 - 08:34 AM

Hi Gary..

View Postburt, on 23 September 2011 - 07:55 AM, said:

Harald, I cannot see any reason why you should not set 5.4 as minimum for 3.x (3.5.4 Posted Image) as 5.4 brings with it good  benefits over previous version.

We will ultimately move to PHP 5.4 for v3.x (not v3.0; v3.1 is too sudden). BTW, v3.0 runs superbly under PHP 5.4 Posted Image

Kind regards,
Harald Ponce de Leon

#16   Mort-lemur

Mort-lemur
  • Members
  • 1,195 posts
  • Real Name:Heather
  • Gender:Female
  • Location:UK

Posted 23 September 2011 - 12:28 PM

Excuse my ignorance - but does this mean that if my host jumps to php 5.4 that my 2.2 Rc2a site will cease to function and will not be able to be patched to work under php 5.4?

Thanks
Now my store is the way I want it - Secure, working well, and good Google Ranks - Thanks to all for the help given.

If you want to see the mods I have installed, then see my profile.

#17   Harald Ponce de Leon

Harald Ponce de Leon

    Healthy Giraffe

  • Core Team
  • 3,946 posts
  • Real Name:Harald Ponce de Leon
  • Gender:Male
  • Location:Solingen, Germany

Posted 23 September 2011 - 12:54 PM

Hi Heather..

The 2.4 upgrade guide will describe what changes are necessary to apply to existing installations that need to run on PHP 5.4.

From our internal notes, this mainly boils down to:

* Replace HTTP_*_VARS with super globals (eg, HTTP_GET_VARS to _GET)
* Replace session_register, session_unregister, and session_is_registered with $_SESSION['key'] = $value, isset($_SESSION['key']), and unset($_SESSION['key'])
* Replace global session variables with $_SESSION['key'] (and remove "global $session_var" from functions)
* magic_quotes deprecated since v5.3 but compatibility.php works around it as if it was on; either this is kept or we look at changing this to work as if it was off.

From the PHP 5.4 Alpha 1 release notes:

Quote

* Removed: break/continue $var syntax

break/continue is used, but not with the $var syntax so this has no affect.

Quote

* Removed: register_globals, allow_call_time_pass_reference, and register_long_arrays ini options

This only affects v2.2/v2.3 with register_long_arrays. register_globals is only needed for <PHP4.3 due to the session class; register_globals can be removed with the session changes.

Quote

* Removed: session_is_regisitered(), session_registered(), and session_unregister()

This affects v2.2/v2.3 with the session functions file and how session variables are set and accessed (in the global scope).

That should be it, and would bring the minimum requirement to PHP 4.1 due to the super global variables.

####

Kind regards,

Edited by Harald Ponce de Leon, 23 September 2011 - 12:54 PM.

Harald Ponce de Leon

#18   Jack_mcs

Jack_mcs
  • Members
  • 25,307 posts
  • Real Name:Jack York
  • Gender:Male
  • Location:Michigan

Posted 23 September 2011 - 01:13 PM

View PostMark Evans, on 23 September 2011 - 04:58 AM, said:


2.4.x will be the PHP 5.4 compatible version - Since this requires more than just bug fixing its common to increase the middle version number
2.3.2 will be the next minor bug fix release and only contains minor changes so only the last digit is increased.

This follows pretty common versioning standards
I think you would be doing the oscommerce platform a huge favor if you released the next version without the template code already added. I've had a very large number of clients that chose not to use 2.3, and some even moved away from the main oscommerce package, due to the limitation that system places on existing shops. Not having it part of the package would make for a more natural upgrade and make it more popular, in my opinion.

#19   faaliyet

faaliyet
  • Members
  • 19 posts
  • Real Name:.
  • Gender:Male

Posted 26 September 2011 - 01:09 PM

View PostHarald Ponce de Leon, on 22 September 2011 - 10:10 AM, said:


The new framework in v3.0 has no problems working with PHP 5.4. I would love to make PHP 5.4 the minimum requirement - next year perhaps when PHP 5.4 is more widespread [img]http://forums.oscommerce.com//public/style_emoticons/default/innocent.gif[/img]

Kind regards,

Hi Harald,
It's hard to say that, because $this support for Closures was removed. OSCOM3 will need the changes.

A simple article about that:
http://drupal4hu.com/node/291

http://stackoverflow.com/questions/5734011/php-5-4-closure-this-support

#20   Gergely

Gergely
  • Community Team
  • 528 posts
  • Real Name:Gergely Tóth
  • Gender:Male

Posted 06 April 2012 - 08:16 PM

Hi all,

it is time for the main flagship needs change and it looks like not good idea to develop v2.3.1 for php 5.4...

The next oscommerce php 5.4 combatibility version should call v3.1. I think the community do suicides if works too hard to solve php 5.4 projects in contributions on v2 core.  v3's new projects will be more easy to develop.

I dont belive the v2 system is the good way for php 5.4. The v2 core is not a modern system and it will be a "blind track" in the future. The v2 core has limited functions. Why would you like to develop old timers? I do not understand you really.
Header Footer Content Modules
SCM
v3

and some rewrites :-)