Forums / General Questions / Help needed after updating PHP 5.3

Help needed after updating PHP 5.3

Locked

Views: 918

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
28 Feb 2010, 9:58 PM
#1
slimmoses avatar

slimmoses

New Zenner

Join Date:
Oct 2009
Posts:
12
Plugin Contributions:
0

Help needed after updating PHP 5.3

Hi

After updating patch for PHP 5.3 I get errormessage

HP Deprecated: Function ereg() is deprecated in /includes/classes/db/mysql/query_factory.php on line 177
and line 139 and several other lines with ereg() and ereg_replace()

I have versiom 1.3.8 and have done all the security patches even though I did some of them after the PHP5.3 patch but have gone through the affected files to see that the changes were still there.

The shop seems to work but get these warnings if I turn errorlogging on. The way I noticed it was because I forgot to turn errorlogging off and my webserver got full of MYdebug.log files

should I change ereg() to preg_match() instead in affected files which I read here
http://docs.php.net/manual/en/migration53.deprecated.php

or do I not need to worry about the warnings?

28 Feb 2010, 11:08 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Help needed after updating PHP 5.3

Just patch it: http://www.zen-cart.com/forum/showthread.php?t=140960
The error messages will be suppressed if properly patched, and thus will not trigger any failures.
Messages about "deprecated" calls can be safely ignored if the patch is in place.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

1 Mar 2010, 7:50 AM
#3
slimmoses avatar

slimmoses

New Zenner

Join Date:
Oct 2009
Posts:
12
Plugin Contributions:
0

Re: Help needed after updating PHP 5.3

Thanks DrByte, I appriciate your time.

But why does these warnings show up? Even though I can ignore them it would be intresting to know why.

1 Mar 2010, 11:11 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Help needed after updating PHP 5.3

Those messages show up because the PHP authors changed how many internal PHP functions work when they released PHP 5.3. They're trying to force a phasing-out of some components which they don't want to support anymore. Thus the messages in the cases where Zen Cart uses calls to functions the PHP people are trying to phase out.
The next version of Zen Cart will no longer use those functions. In the meantime, the patch suppresses the problem. There would have been almost hundreds of lines to fix, involving almost as many files, if the patch were to update every case. Instead of making you go through the pain of that, we opted for a simpler patch, since the patch is just that: a patch.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.