Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Zen-Cart and PHP 5.3.0 FixES
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  11 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Joe Suttle  
View profile  
 More options Sep 25 2009, 6:14 pm
From: Joe Suttle <joesut...@attglobal.net>
Date: Fri, 25 Sep 2009 15:14:32 -0700
Local: Fri, Sep 25 2009 6:14 pm
Subject: Zen-Cart and PHP 5.3.0 FixES

Lewis and all,

I now have Zen-Cart working on my system (WSeB, Apache 2.2.13, php 5.3.0
and mySQL 5.1.36)

The problems had to do with the changes made to or more specifically in
PHP 5.3.0. Those changes made the code in Zen-Cart fail. Did the
following things, and now have Zen-Cart back up and working. Thanks to
Lewis for making me test this, since I would have waited a couple of
months before doing anything with the cart.

Thanks to several Zen-Cart "masters" for finding what needed to be
changed. You can use any text search engine to find the other occurances
of 'date_diff' and change them as shown in the following:

= = = = =
- Prefix 'set_magic_quotes_runtime' with '@' in application_top.php
(there are two files with this name, one in includes and one in
/admin/includes). There are other uses of set_magic_quotes_runtime in
the code, but I'll deal with them as I come to them.

- Replace "ereg('thing', $other)" with "preg_match('/thing/', $other)",
as noted by Andy Whittaker.
        one file that has a problem is
includes/classes/db/mysql/query_factory.php
        Calls such as "ereg('^[0-9]', $key)" need to be replaced by
"preg_match('/^[0-9]/', $key)" in several places,
             note the / / surrounding the string."

- 'date_diff' is now a keyword in PHP 5.3.0
(http://th2.php.net/manual/en/function.date-diff.php) so change the
function to something like zen_date_diff in:
          admin/orders.php
          admin/includes/header.php
          admin/includes/modules/orders_download.php
          admin/includes/functions/general.php
          includes/modules/payment/paypal/paypal_functions.php
          includes/functions/functions_general.php

= = = = =

--
Joe Suttle * IBM Warp Certified System Expert * Member of IEEE
joesut...@attglobal.net                    http://www.joesuttle.com/blog
Richmond, California                           http://www.warpedbox.com/
+----------------------------------------------------------------------+
      "We learn something every day, and lots of times it's that
      what we learned the day before was wrong." -- Bill Vaughan
+----------------------------------------------------------------------+
Using the power  |  WSeB, Apache, Weasel, FileStar
 of OS/2, Linux  |  Lotus SmartSuite, Firefox, Thunderbird, Kompozer
     and XP Pro  |  OpenSuse, Adtran, MySQL, PHP
+----------------------------------------------------------------------+


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lewis G Rosenthal  
View profile  
 More options Sep 25 2009, 8:04 pm
From: Lewis G Rosenthal <lgrosent...@2rosenthals.com>
Date: Fri, 25 Sep 2009 20:04:53 -0400
Local: Fri, Sep 25 2009 8:04 pm
Subject: Re: [Apache/2] Zen-Cart and PHP 5.3.0 FixES
On 09/25/09 06:14 pm, Joe Suttle thus wrote :
> Lewis and all,

> I now have Zen-Cart working on my system (WSeB, Apache 2.2.13, php
> 5.3.0 and mySQL 5.1.36)

> The problems had to do with the changes made to or more specifically
> in PHP 5.3.0. Those changes made the code in Zen-Cart fail. Did the
> following things, and now have Zen-Cart back up and working. Thanks to
> Lewis for making me test this, since I would have waited a couple of
> months before doing anything with the cart.

> Thanks to several Zen-Cart "masters" for finding what needed to be
> changed. You can use any text search engine to find the other
> occurances of 'date_diff' and change them as shown in the following:

<snip>

Thanks, Joe. This is all very good information to have. Now to see
whether your system behaves any better and how these mods turn out once
you start seeing some traffic.

Cheers.

--
Lewis
-------------------------------------------------------------
Lewis G Rosenthal, CNA, CLP, CLE
Rosenthal & Rosenthal, LLC                www.2rosenthals.com
Need a managed Wi-Fi hotspot?                www.hautspot.com
Secure, stable, operating system          www.ecomstation.com
-------------------------------------------------------------


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stilarsen  
View profile  
 More options Oct 29 2009, 10:51 am
From: Stilarsen <stilar...@gmail.com>
Date: Thu, 29 Oct 2009 07:51:08 -0700 (PDT)
Local: Thurs, Oct 29 2009 10:51 am
Subject: Re: Zen-Cart and PHP 5.3.0 FixES

> - Replace "ereg('thing', $other)" with "preg_match('/thing/', $other)",
> as noted by Andy Whittaker.

Hi, where can i find this file? In which file can i find that line?

Thank you


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lewis G Rosenthal  
View profile  
 More options Oct 29 2009, 4:35 pm
From: Lewis G Rosenthal <lgrosent...@2rosenthals.com>
Date: Thu, 29 Oct 2009 16:35:33 -0400
Local: Thurs, Oct 29 2009 4:35 pm
Subject: Re: [Apache/2] Re: Zen-Cart and PHP 5.3.0 FixES
On 10/29/09 10:51 am, Stilarsen thus wrote :

>> - Replace "ereg('thing', $other)" with "preg_match('/thing/', $other)",
>> as noted by Andy Whittaker.

> Hi, where can i find this file? In which file can i find that line?

I haven't scanned my files, though you will likely encounter those
statements in multiple places. FWIW, the thread which Joe referenced is
apparently here:

http://www.zen-cart.com/forum/showthread.php?p=774374

Just scan your Zen-Cart tree and/or do a search/replace via Perl or
something, and you'll find those lines. Joe: you didn't mention which
version of ZC you've got installed; I'm assuming 1.3.8...

Cheers/2

--
Lewis
-------------------------------------------------------------
Lewis G Rosenthal, CNA, CLP, CLE
Rosenthal & Rosenthal, LLC                www.2rosenthals.com
Need a managed Wi-Fi hotspot?                www.hautspot.com
Secure, stable, operating system          www.ecomstation.com
-------------------------------------------------------------


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joe Suttle  
View profile  
 More options Oct 30 2009, 3:48 pm
From: Joe Suttle <joesut...@attglobal.net>
Date: Fri, 30 Oct 2009 12:48:06 -0700
Local: Fri, Oct 30 2009 3:48 pm
Subject: Re: [Apache/2] Re: Zen-Cart and PHP 5.3.0 FixES
Lewis G Rosenthal wrote:
> Just scan your Zen-Cart tree and/or do a search/replace via Perl or
> something, and you'll find those lines. Joe: you didn't mention which
> version of ZC you've got installed; I'm assuming 1.3.8...

> Cheers/2

That is correct Lewis. Thanks for jogging my memory. It is 1.3.8.

Seems that when it rains, it pours. Not only did I have web server
problems (presently resolved), wife broke her leg, and I am the resident
nurse/driver/cook for 4.5 more weeks (at least), - just call me "Mr. Mom".

--
Joe Suttle * IBM Warp Certified System Expert * Member of IEEE
joesut...@attglobal.net                    http://www.joesuttle.com/blog
Richmond, California                           http://www.warpedbox.com/
+----------------------------------------------------------------------+
      "We learn something every day, and lots of times it's that
      what we learned the day before was wrong." -- Bill Vaughan
+----------------------------------------------------------------------+
Using the power  |  WSeB, Apache, Weasel, FileStar
 of OS/2, Linux  |  Lotus SmartSuite, Firefox, Thunderbird, Kompozer
     and XP Pro  |  OpenSuse, Adtran, MySQL, PHP
+----------------------------------------------------------------------+


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
kevin  
View profile  
 More options Nov 1 2009, 4:56 am
From: kevin <ke...@taongajewellery.co.uk>
Date: Sun, 1 Nov 2009 01:56:09 -0800 (PST)
Local: Sun, Nov 1 2009 4:56 am
Subject: Re: Zen-Cart and PHP 5.3.0 FixES
Hi everyone,

I was pointed in this direction for a fix to my Zen Cart by my hosting
company who have upgraded to PHP 5.3 without even telling me.

I have done all that has been suggested and the site is now working
but the admin control panel is not. I get the following errors:

*****************************
Deprecated: Assigning the return value of new by reference is
deprecated in /customers/rosecottagebalmsandsoap.co.uk/
rosecottagebalmsandsoap.co.uk/httpd.www/includes/functions/
functions_email.php on line 161

Warning: session_start() [function.session-start]: Cannot send session
cookie - headers already sent by (output started at /customers/
rosecottagebalmsandsoap.co.uk/rosecottagebalmsandsoap.co.uk/httpd.www/
includes/functions/functions_email.php:161) in /customers/
rosecottagebalmsandsoap.co.uk/rosecottagebalmsandsoap.co.uk/httpd.www/
includes/functions/sessions.php on line 108

Warning: session_start() [function.session-start]: Cannot send session
cache limiter - headers already sent (output started at /customers/
rosecottagebalmsandsoap.co.uk/rosecottagebalmsandsoap.co.uk/httpd.www/
includes/functions/functions_email.php:161) in /customers/
rosecottagebalmsandsoap.co.uk/rosecottagebalmsandsoap.co.uk/httpd.www/
includes/functions/sessions.php on line 108

Deprecated: Function ereg_replace() is deprecated in /customers/
rosecottagebalmsandsoap.co.uk/rosecottagebalmsandsoap.co.uk/httpd.www/
includes/functions/sessions.php on line 112

Deprecated: Function eregi() is deprecated in /customers/
rosecottagebalmsandsoap.co.uk/rosecottagebalmsandsoap.co.uk/httpd.www/
admin/includes/classes/language.php on line 100

Deprecated: Function eregi() is deprecated in /customers/
rosecottagebalmsandsoap.co.uk/rosecottagebalmsandsoap.co.uk/httpd.www/
admin/includes/classes/language.php on line 100

Deprecated: Function eregi() is deprecated in /customers/
rosecottagebalmsandsoap.co.uk/rosecottagebalmsandsoap.co.uk/httpd.www/
admin/includes/classes/language.php on line 100

Deprecated: Function eregi() is deprecated in /customers/
rosecottagebalmsandsoap.co.uk/rosecottagebalmsandsoap.co.uk/httpd.www/
admin/includes/classes/language.php on line 100

Deprecated: Function eregi() is deprecated in /customers/
rosecottagebalmsandsoap.co.uk/rosecottagebalmsandsoap.co.uk/httpd.www/
admin/includes/classes/language.php on line 100

Deprecated: Function eregi() is deprecated in /customers/
rosecottagebalmsandsoap.co.uk/rosecottagebalmsandsoap.co.uk/httpd.www/
admin/includes/classes/language.php on line 100

Deprecated: Function eregi() is deprecated in /customers/
rosecottagebalmsandsoap.co.uk/rosecottagebalmsandsoap.co.uk/httpd.www/
admin/includes/classes/language.php on line 100

Deprecated: Function eregi() is deprecated in /customers/
rosecottagebalmsandsoap.co.uk/rosecottagebalmsandsoap.co.uk/httpd.www/
admin/includes/classes/language.php on line 100

Deprecated: Function eregi() is deprecated in /customers/
rosecottagebalmsandsoap.co.uk/rosecottagebalmsandsoap.co.uk/httpd.www/
admin/includes/classes/language.php on line 100

Warning: Cannot modify header information - headers already sent by
(output started at /customers/rosecottagebalmsandsoap.co.uk/
rosecottagebalmsandsoap.co.uk/httpd.www/includes/functions/
functions_email.php:161) in /customers/rosecottagebalmsandsoap.co.uk/
rosecottagebalmsandsoap.co.uk/httpd.www/admin/includes/init_includes/
init_templates.php on line 36

Warning: Cannot modify header information - headers already sent by
(output started at /customers/rosecottagebalmsandsoap.co.uk/
rosecottagebalmsandsoap.co.uk/httpd.www/includes/functions/
functions_email.php:161) in /customers/rosecottagebalmsandsoap.co.uk/
rosecottagebalmsandsoap.co.uk/httpd.www/admin/includes/functions/
general.php on line 21
*****************************

(admin folder name changed for security reasons.

Any ideas on how to fix this??

Thanks,

Kevin

On Sep 26, 12:04 am, Lewis G Rosenthal <lgrosent...@2rosenthals.com>
wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lewis G Rosenthal  
View profile  
 More options Nov 1 2009, 1:44 pm
From: Lewis G Rosenthal <lgrosent...@2rosenthals.com>
Date: Sun, 01 Nov 2009 13:44:58 -0500
Local: Sun, Nov 1 2009 1:44 pm
Subject: Re: [Apache/2] Re: Zen-Cart and PHP 5.3.0 FixES
Hi, Kevin...

On 11/01/09 04:56 am, kevin thus wrote :

Have you read thoroughly
http://www.zen-cart.com/forum/showthread.php?p=774374 ? It sounds like
magic quotes are still enabled (for one). If the rest of the site is
working, then search your admin files for "set_magic_quotes_runtime" and
prefix with "@".

What would also help would be knowing your ZC version and some pertinent
data from phpinfo() (magic quotes, etc.).

> Deprecated: Function ereg_replace() is deprecated in /customers/
> rosecottagebalmsandsoap.co.uk/rosecottagebalmsandsoap.co.uk/httpd.www/
> includes/functions/sessions.php on line 112

Again, per Andy Whittaker's post referenced above:

>     Calls such as ereg('^[0-9]', $key) need to be replaced by
>     preg_match('/^[0-9]/', $key) in several places; note the / /
>     surrounding the string.
> Deprecated: Function eregi() is deprecated in /customers/
> rosecottagebalmsandsoap.co.uk/rosecottagebalmsandsoap.co.uk/httpd.www/
> admin/includes/classes/language.php on line 100

ZC has forked much of its code from OS Commerce, the original project.
This page should help:

http://devthought.com/tumble/2009/06/fix-ereg-is-deprecated-errors-in...

<snip>

> *****************************

> (admin folder name changed for security reasons.

> Any ideas on how to fix this??

Hope the above is of some help.

I still run my ZC installations under PHP 4, simply because they have
not officially supported PHP 5 (in any flavor) up to this point (unless
I missed an announcement somewhere). I know that many people have had
good results with pre-5.3 builds of PHP 5, but I've tried to stick with
what's supported in that regard.

Cheers.

<snip>

--
Lewis
-------------------------------------------------------------
Lewis G Rosenthal, CNA, CLP, CLE
Rosenthal & Rosenthal, LLC                www.2rosenthals.com
Need a managed Wi-Fi hotspot?                www.hautspot.com
Secure, stable, operating system          www.ecomstation.com
-------------------------------------------------------------


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lewis G Rosenthal  
View profile  
 More options Nov 1 2009, 1:46 pm
From: Lewis G Rosenthal <lgrosent...@2rosenthals.com>
Date: Sun, 01 Nov 2009 13:46:21 -0500
Local: Sun, Nov 1 2009 1:46 pm
Subject: Re: [Apache/2] Re: Zen-Cart and PHP 5.3.0 FixES
Hi, Joe...

On 10/30/09 03:48 pm, Joe Suttle thus wrote :

Geez... Sorry to hear of your run of bad luck, buddy.

On the bright side, things could always be worse. All the best to the
misses for a speedy recovery.

--
Lewis
-------------------------------------------------------------
Lewis G Rosenthal, CNA, CLP, CLE
Rosenthal & Rosenthal, LLC                www.2rosenthals.com
Need a managed Wi-Fi hotspot?                www.hautspot.com
Secure, stable, operating system          www.ecomstation.com
-------------------------------------------------------------


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andrew  
View profile  
 More options Nov 4 2009, 10:33 am
From: Andrew <hematomnicia....@gmail.com>
Date: Wed, 4 Nov 2009 07:33:51 -0800 (PST)
Local: Wed, Nov 4 2009 10:33 am
Subject: Re: Zen-Cart and PHP 5.3.0 FixES

On Oct 29, 8:35 pm, Lewis G Rosenthal <lgrosent...@2rosenthals.com>
wrote:

> Just scan your Zen-Cart tree and/or do a search/replace via Perl or
> something, and you'll find those lines. Joe: you didn't mention which
> version of ZC you've got installed; I'm assuming 1.3.8...

You can do this using the Developers Tool Kit under Zencarts Admin
panel. Use the "Look-up in all files" and enter the function name in
the "Key or Name:" input and select "All files - Catalog/Admin" in the
dropdown.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lewis G Rosenthal  
View profile  
 More options Nov 8 2009, 9:48 pm
From: Lewis G Rosenthal <lgrosent...@2rosenthals.com>
Date: Sun, 08 Nov 2009 21:48:53 -0500
Local: Sun, Nov 8 2009 9:48 pm
Subject: Re: [Apache/2] Re: Zen-Cart and PHP 5.3.0 FixES
Hi...

On 11/04/09 10:33 am, Andrew thus wrote :

> On Oct 29, 8:35 pm, Lewis G Rosenthal <lgrosent...@2rosenthals.com>
> wrote:

>> Just scan your Zen-Cart tree and/or do a search/replace via Perl or
>> something, and you'll find those lines. Joe: you didn't mention which
>> version of ZC you've got installed; I'm assuming 1.3.8...

> You can do this using the Developers Tool Kit under Zencarts Admin
> panel. Use the "Look-up in all files" and enter the function name in
> the "Key or Name:" input and select "All files - Catalog/Admin" in the
> dropdown.

Of course, if the admin panel is broken, as Kevin seems to indicate,
then this method won't quite yield the desired result... ;-)

--
Lewis
-------------------------------------------------------------
Lewis G Rosenthal, CNA, CLP, CLE
Rosenthal & Rosenthal, LLC                www.2rosenthals.com
Need a managed Wi-Fi hotspot?                www.hautspot.com
Secure, stable, operating system          www.ecomstation.com
-------------------------------------------------------------


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
waldo kitty  
View profile  
 More options Nov 8 2009, 11:19 pm
From: waldo kitty <wkitt...@windstream.net>
Date: Sun, 08 Nov 2009 23:19:12 -0500
Local: Sun, Nov 8 2009 11:19 pm
Subject: Re: [Apache/2] Re: Zen-Cart and PHP 5.3.0 FixES

that's why the made mc and other tools that can/do search out the specific text
strings and point out which files they reside in :P :)

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »