Jump to content

Archived

This topic is now archived and is closed to further replies.

Guest

GoPHP5 Initiative

Recommended Posts

Guest

Here at CubeCart, we've always aimed to keep up with the latest technology. For a good amount of time now, all our servers have been running with PHP 5 and MySQL 5, but we've had to retain PHP4 compatibility in our product, due to it's widespread usage.

While this is great for business, as we can almost guarantee it'll run on any server, it has been holding back our development. PHP4 is 7 years old now, and it has its shortcomings. We can't take advantage of the full potential of PHP5, itself nearly 3 years old, while trying to retain PHP4 compatibility.

To this end, the GoPHP5 Initiative has been formed by the PHP developer community. Their goal is to move web development forward, by ensuring that all their software releases from February 5th, 2008 will only support PHP5.2 and later.

The reasons for this are obvious, some of the benefits and features of PHP5 are:

  • Improved performance and a more accurate memory usage.
  • Better security through the filter extension.
  • ZIP extension for creating and editing zip files.
  • Hooks for tracking file upload progress were introduced.
  • DateTime and DateTimeZone objects with methods to manipulate date/time information.
  • SQLite has been bundled with PHP.
  • Vastly improved XML support (critical for many things, including feeds and aggregation.)
  • Real opportunities for object oriented programming.

To this end, CubeCart has joined the inititative, along with the likes of Drupal, phpMyAdmin, Symfony, and many others, as well as many web hosting companies, who will be upgrading their servers to run PHP 5.2

What this means for you, the CubeCart users, is this:

  • All versions of CubeCart released after February 5th 2008 will require a minimum of PHP Version 5.2 on your server.
  • The forthcoming version 4.0, the current version 3.0.x, and all releases until Februrary 5th will still be PHP4 compatible, and will remain so for as long as they are supported and maintained

We hope you can appreciate this as being a positive move forward for CubeCart, and in helping encourage better code development by the entire PHP community

Share this post


Link to post
Share on other sites

Guest Brivtech

I'm all for staying up to date with the latest, especially if security is concerned. Already ensured all hosting accounts were set for mySQL 5.

My hosting guys tell me this:

Support for PHP 5

With PHP 5 support, you can program using the latest version and take advantage of existing applications and add ons written in PHP 5. You can also run both PHP 4 and PHP 5 simultaneously on the same site.

By default, files with a .php extension run under PHP 4 and files with the .php5 extension run under PHP 5. The .htaccess file, located at the root of your site, can be used to change these default settings. The following entries in a directory's .htaccess file designate .php files to run under PHP 5 and .php4 files to run under PHP 4.

AddHandler x-httpd-php5 .php

 AddHandler x-httpd-php .php4

Does this seem right to you? Is the .php5 extension used by default in php5 versions of CC, or would I need to make a change to the .htacess file?

Share this post


Link to post
Share on other sites
Guest

I'm all for staying up to date with the latest, especially if security is concerned.

My hosting guys tell me this:

Support for PHP 5

With PHP 5 support, you can program using the latest version and take advantage of existing applications and add ons written in PHP 5. You can also run both PHP 4 and PHP 5 simultaneously on the same site.

By default, files with a .php extension run under PHP 4 and files with the .php5 extension run under PHP 5. The .htaccess file, located at the root of your site, can be used to change these default settings. The following entries in a directory's .htaccess file designate .php files to run under PHP 5 and .php4 files to run under PHP 4.

AddHandler x-httpd-php5 .php

 AddHandler x-httpd-php .php4

Does this seem right to you? Is the .php5 extension used by default in php5 versions of CC, or would I need to make a change to the .htacess file?

Thanks for the support! we think this will be a very positive advancement for CubeCart.

as for .php5 file extensions, it's just stupid. the default extension for any php script should be .php, which is what we will continue to use

you should use the .htaccess code sample they give you to change it, but ideally you should contact your webhost to tell them to change it. no-one likes made-up extensions

Share this post


Link to post
Share on other sites
Guest Brivtech

I guess they do it to allow for both 4 and 5 to run together on the same server., so you can run older scripts for compatibility purposes.

.htaccess changed - waiting for cache update.

EDIT: Works a treat! Showing new version in phpinfo.

NOTE: Some of you lot out there who may want to try this should bare in mind that some servers have a .htaccess cache that is only updated on a periodical basis, if a .htaccess file is created or deleted. If you are changing an existing .htaccess file, then tis cacheing probably won't apply. Our servers have 1 hour cache refreshing.

Share this post


Link to post
Share on other sites
Guest Charles2005

So I take it that CubeCart4 will work on both

PHP4 and PHP5 and MySQL4 and MySQL5.

Share this post


Link to post
Share on other sites
Guest

So I take it that CubeCart4 will work on both

PHP4 and PHP5 and MySQL4 and MySQL5.

Yes, currently the 4.0.0 betas run on PHP 4.3.0 or later, inclusing PHP 5.x, and any version on MySQL later than 4.1

Share this post


Link to post
Share on other sites

Bravo to you for having the strength to commit to move forward. It has been, what, 3 years since php5 came out? And php6 is on the way. That is long enough for hosts to step up and do the work to make things current.

Not to start a rant, but......

Web standards are a mess and progress is further slowed by the resistance of programmers to look forward. It is up to all of us to suck it up and do a lot of retrofitting at regular intervals to keep this train rolling. If the people who are constantly whining and resisting upgrading things used that energy to just do it, we would all be better off.

It also seems hypocritical for programmers to bitch about users with version 3.x or 4.x browsers, and also bitch about software or scripts that won't degrade to their obsolete server set up. Hmmm. How do you justify that little contradiction? THREE YEARS PEOPLE! Get off your butt!

CC v4 is a perfect example of having to make a turn and, in so doing, force people to make some changes. For it to reach the next level, it had to be redone pretty much from the ground up. No "easy upgrade" for all of us with clients using CC3x. Although I don't look forward to all the work it will take to migrate the stores I host, I will do it happily for all the long-term benefits it will provide and understand that progress means sacrifice. Brooky and the crew are doing it to make a better product so we can do it to take advantage of their efforts.

Look ahead, do the work, reap the benefits... in programming and in life. Period.

Rant off.

Share this post


Link to post
Share on other sites
Guest

One of the reasons why I still run PHP4 on my server is because of the many times I've heard that one piece of software or another wouldn't work with PHP5. At the moment, I'm not exactly sure what will or what won't work if I upgrade PHP.

It's good to hear that CubeCart works with PHP5. Now if I can find a definitive answer on my other scripts (Dynatracker, PostAffiliatePro, ListMailPro, especially) that they also work in PHP5, I'd switch this minute.

Of course, I guess I could make the upgrade, and if something fails, I could revert back to PHP4. I have no idea how to set the server up to run both at the same time. My knowledge of server administration is limited to WHM and CPanel.

Share this post


Link to post
Share on other sites

One of the reasons why I still run PHP4 on my server is because of the many times I've heard that one piece of software or another wouldn't work with PHP5. At the moment, I'm not exactly sure what will or what won't work if I upgrade PHP.

It's good to hear that CubeCart works with PHP5. Now if I can find a definitive answer on my other scripts (Dynatracker, PostAffiliatePro, ListMailPro, especially) that they also work in PHP5, I'd switch this minute.

Of course, I guess I could make the upgrade, and if something fails, I could revert back to PHP4. I have no idea how to set the server up to run both at the same time. My knowledge of server administration is limited to WHM and CPanel.

And so it goes full circle. If the users insist on php5 compatible programs and companies like CC step up and join the initiative, then the software producers who aren't in step will HAVE to update their wares or get left behind. It is a process that has to start somewhere and, as I said, there are sacrifices to be made, nothing worth anything is painless. And, as customers to these software providers, we need to speak up.

Share this post


Link to post
Share on other sites
Guest Rikki

Sounds very good! I think one of the prmary reasons for slow uptake is lazy coding. Im not being rude as I do it myself. Php is so "easy" to make things work that when something does work, there usually isnt much code refinement taking place, and since PHP does all the donkey work for you (more or less) that leads to a lot of scripts that are hanging on by a thread. Changing PHP versions can murder these scripts and a lot of such code is sitting on servers all over the place.

I remember the fuss and hassle I had from clients when their hosting companies overnight changed the global registers option and a load of code died instantly.

Having said that, people who use their websites for selling (thats what CC is all about right) should have the forethought to put money aside for servicing and maintenance and getting the programs on their site to function under PHP5 should be included in this budget methinks.

R

Share this post


Link to post
Share on other sites
Guest

I've heard back from the 4 main software developers and it sounds like all of my major scripts are compatible with PHP5, so I'm going to go ahead with the upgrade.

Share this post


Link to post
Share on other sites

Great stuff. I'm 100% for moving forward. If it means finding new webhosts, well, won't be the first time nor prolly the last :)

Share this post


Link to post
Share on other sites

while Id love to upgrade our server to php5 I have over 150 hosting clients with apps that depend on php4

and if I upgraded Id have to upgrade or find new apps that would work under php5 at my cost for the different apps that would be broken it took 2 weeks of my time just going thru and fixing things when we moved to a new box and Sir WIlliam and I set it up properly and had register_globals OFF and safe_mode ON

for any file or app that depended on safe_mode and register_globals which in 9/10 cases was an easy thing

and NEEDED to be updated but man goin from php4 to php 5 id be working non stop for 2 months cleaning up all the apps...

good news is from reading the posts here it IS possible to run both php4 and 5 at the same time guess Ill go poke Sir William and see what he says (that guy a server sys admin genius)

Share this post


Link to post
Share on other sites
Guest

while Id love to upgrade our server to php5 I have over 150 hosting clients with apps that depend on php4

and if I upgraded Id have to upgrade or find new apps that would work under php5 at my cost for the different apps that would be broken it took 2 weeks of my time just going thru and fixing things when we moved to a new box and Sir WIlliam and I set it up properly and had register_globals OFF and safe_mode ON

for any file or app that depended on safe_mode and register_globals which in 9/10 cases was an easy thing

and NEEDED to be updated but man goin from php4 to php 5 id be working non stop for 2 months cleaning up all the apps...

good news is from reading the posts here it IS possible to run both php4 and 5 at the same time guess Ill go poke Sir William and see what he says (that guy a server sys admin genius)

are you sure that your applications would be broken, as PHP5 is backwards compatible

Share this post


Link to post
Share on other sites

Alot of hosts support 4 and 5. To switch to using version 5 you just put a line in your .htaccess file. This is a great way of doing it.

Share this post


Link to post
Share on other sites

while Id love to upgrade our server to php5 I have over 150 hosting clients with apps that depend on php4

and if I upgraded Id have to upgrade or find new apps that would work under php5 at my cost for the different apps that would be broken it took 2 weeks of my time just going thru and fixing things when we moved to a new box and Sir WIlliam and I set it up properly and had register_globals OFF and safe_mode ON

for any file or app that depended on safe_mode and register_globals which in 9/10 cases was an easy thing

and NEEDED to be updated but man goin from php4 to php 5 id be working non stop for 2 months cleaning up all the apps...

good news is from reading the posts here it IS possible to run both php4 and 5 at the same time guess Ill go poke Sir William and see what he says (that guy a server sys admin genius)

You can also ask Will (Everythingweb) he recently reconfigured his hosting to run PHP4 and PHP5 on the same php files. It works great ;)

Share this post


Link to post
Share on other sites
Guest EverythingWeb

You can also ask Will (Everythingweb) he recently reconfigured his hosting to run PHP4 and PHP5 on the same php files. It works great ;)

Yeah, we built custom SRPMS to install PHP5, but removing any SAPI references, so that it would install alongside PHP4 and run via CGI, and then implemented suPHP at the same time for security etc.

Seems to be nice and smooth, after working out a couple of kinks and is very easy to implement now.

We also loaded Zend and ionCube in to PHP by default, so there shouldn't be the need for people to uploade ionCube loaders. If anyone wants any advice, if they run their own VPS/Dedicated server (obviously not available to people running reseller accounts where they cant do this themselves) then drop me a PM.

Cheers Milos :P

Share this post


Link to post
Share on other sites
Guest hennaboy

So do you run php4 with zend and php5 with ioncube (or visa versa) ?

Share this post


Link to post
Share on other sites
Guest hennaboy

Oooooooo thats fancy. Didnt think you could run both Zend and Ioncube at the same time!

Share this post


Link to post
Share on other sites
Guest EverythingWeb

Aye, you can do lots when you know how ;)

Share this post


Link to post
Share on other sites
Guest hennaboy

;)

Yeah just installed it on my own server it took all of 5minutes!.

Share this post


Link to post
Share on other sites
Guest m__art@hotmail.com

Hello!

I'm currently running cubecart v3 and would like to upgrade to the latest v4. From my hosting panel I can myself change from php4 to php5 but I'd like to know if my current cubecart v3 will run without problem on php5 or not?

I need some time before totally switching to cubecart v4 and must be sure that my current v3 will work.

Any idea?

Share this post


Link to post
Share on other sites
Guest EverythingWeb

Yes, v3 will work on PHP5, as it (PHP5) is backward compatible.

Share this post


Link to post
Share on other sites

My host Heartinternet say to use the following in the htaccess;

SetEnv DEFAULT_PHP_VERSION 5 as they have the .php5 malarkey.

Tried this and got an error with IonCube re admin_enc_ion.php

I ran that and got this;

Software License Error #5

Your license key has expired.

Status:

includes/extra folder doesn't exist!

includes/extra/key.php doesn't exist!

Changed back to old htaccess and everything is ok.

Is there something else I can do to change to php5?

Share this post


Link to post
Share on other sites

×
×
  • Create New...