Zen Follower
- Join Date:
- Dec 2003
- Location:
- UPstate NY
- Posts:
- 398
- Plugin Contributions:
- 1
ZC version 1.5.1 is compatible with which PHP versions??
Can 1.5.1 run on PHP 5.6??
Or should I downgrade it??
Thank you, Tom
Views: 5,194
Zen Follower
Can 1.5.1 run on PHP 5.6??
Or should I downgrade it??
Thank you, Tom
Sensei
From the home page at www.zen-cart.com: Server Requirements for Zen Cart
Zen Follower
Thank you, my question is answered...
I'm gonna leave it on php 5.6 for now and see how it goes.
I can downgrade it to 5.3 if I must.
Thank you, Tom
Sensei
I don't recommend downgrading PHP versions. Ever.
I know you already know that you should upgrade your Zen Cart version from v1.5.1 to a modern version.
Let me point out some of the issues you're going to have if you don't:
a) Your site is now experiencing a load of errors related to array-element handling, because PHP 5.4 became much more strict about how array elements were coded, and the older code prior to ZC 1.5.2 was sloppy in a few places. So in shipping-quote functionality you'll see the most errors related to that.
And your server's PHP error logs will be accumulating these messages with every visitor's browsing and shopping activity, using up more disk space to log them.
b) Some regular-expression functions were using syntaxes that were changed out for callbacks in PHP 5.4, so you'll get fatal PHP errors if those are used. I can't recall off the top of my head where those changes were needed, but there were a handful. Not as many as PHP 5.3 needed, but still a few.
c) In PHP 5.5 the support for "mysql_xxxx()" functions was deprecated, and later removed in 5.6, making it necessary to manually compile those features back into PHP on sites that need those old unmaintained functions. I believe it was ZC 1.5.2 where Zen Cart was converted to use the new "mysqli_xxxxx()" functions instead.
d) If you upgrade your PHP version and then downgrade it again, when using ZC v1.5.2 or newer, you will mangle the passwords and people will need to reset their passwords in order to access their accounts again, because of the way ZC and PHP interact regarding password encryption.
Those are probably the biggest PHP compatibility issues you'll encounter.
And then there's the list of bugs that have been fixed in the 4 years since v1.5.1 was released.
I'm sure you already understand the myriad other reasons why using current, maintained versions is better than using unsupported versions. And I'm not posting all this to berate or scold. Just to help inform you of the symptoms you're likely to encounter, so that you know why they're happening.
Hope that's helpful.
Zen Follower
That was excessively educational, to say the least :) :)
All very good information too -- I think :) :)
May have to wait awhile before I can do anything though.
I found that ZC is really hard to upgrade and someday it will get better at upgrading.
Especially since my site uses an ancient custom template etc. that is no longer maintained, which is not Zen Cart's fault. :)
I've saved a bunch of stuff about upgrading and I'll need to set up a LAMP server to work on it as well...practice and so forth.
Thank you, Tom
Zen Follower
I'm on a hosting provider that lets me through cPanel to choose whatever version of PHP I want for running a particular site...it's a dropdown list sort of thing.
Is that the same as downgrading??
I would think not...
Thank you, Tom
Deceased
Look, upgrading from ZC 1.5.1 to the latest version (1.5.5a) is not that complicated.
DrByte has outlined all the reasons why you should run the latest versions of any software, not just for functionality but also for the latest security ie to prevent hacking attempts etc etc.
Another big plus of running the latest version of ZC (1.5.5a) is that you can run it on PHP 7.x and that version of PHP is really fast.
Last but not least, an upgrade is a perfect opportunity to 'weed out' old and unused plugins which may just clutter up your code base.
My 5 cents
Zen Follower
I don't recall that we have any plugins, it's a pretty vanilla install.
The problem is the CSS/theme customizations used...that's where it's not so easy, lots of file and css changes.
I can't just upgrade...so many files to review and revise.
I should really figure out putting the existing site into a LAMP server and practicing.
But I don't think changing the PHP in cPanel should cause any harm...
Totally Zenned
tlyczko:
I'm on a hosting provider that lets me through cPanel to choose whatever version of PHP I want for running a particular site...it's a dropdown list sort of thing.
Is that the same as downgrading??
I would think not...
Thank you, Tom
The "downgrading" issues occur whenever the php used at the site goes from a higher version (larger number combination) to a lower version for anyone, literally anyone that has logged into the site. Otherwise the server is impacted by error logs for every guest/checkout or loop through the checkout.
I'm also not entirely sure how serious you are/were with the above statement so I apologize if this has come off as something that it wasn't meant to. The purpose was to identify what changes constitute downgrading regardless of the method(s) provided to adjust the operating php version.
Zen Follower
The site is not broken...yet.
Time will tell in the coming days/weeks.
It displays things so far as I know.
I'll leave things alone for now.
The php version went up b/c the hosting plan changed.
Just out of curiosity, if no one is logged in and the php version is changed, then what happens??
The same errors and whatnot??
Thank you, Tom
Totally Zenned
tlyczko:
The site is not broken...yet.
Time will tell in the coming days/weeks.It displays things so far as I know.
I'll leave things alone for now.The php version went up b/c the hosting plan changed.
Just out of curiosity, if no one is logged in and the php version is changed, then what happens??
The same errors and whatnot??Thank you, Tom
Php errors occur when the problem code is run. One of the issues DrByte specifically listed had to do with login passwords. The PHP version doesn't exactly cause an error with the login password, but as one upgrades the PHP version, the code will rescramble the password based on an increase in PHP, but doesn't "know" what to do with the password (doesn't modify it) when the PHP version is downgraded. The "scramble" is performed once per login and at the point of logging in. After that point the user remains logged in until their session ends or is ended.
So the only ones that would be faced with a problem would be those that have logged into or attempted to log into their account while the php level was above a certain threshold and then tried again when the php version was again reduced and they tried again.
Sensei
mc12345678:
One of the issues DrByte specifically listed had to do with login passwords. The PHP version doesn't exactly cause an error with the login password, but as one upgrades the PHP version, the code will rescramble the password based on an increase in PHP, but doesn't "know" what to do with the password (doesn't modify it) when the PHP version is downgraded. The "scramble" is performed once per login and at the point of logging in. After that point the user remains logged in until their session ends or is ended.
So the only ones that would be faced with a problem would be those that have logged into or attempted to log into their account while the php level was above a certain threshold and then tried again when the php version was again reduced and they tried again.
... and only from v152 upward. Not an issue with v151 since it uses weaker security.
Totally Zenned
DrByte:
... and only from v152 upward. Not an issue with v151 since it uses weaker security.
Doh... I had the wrong paradigm... man.
Tell staff why this post should be reviewed.