Jump to content



Latest News: (loading..)

- - - - -

OSC 2.2RC2a PHP 5.2 - PHP 5.3 - Crisis!


This topic has been archived. This means that you cannot reply to this topic.
58 replies to this topic

#1   Mort-lemur

Mort-lemur
  • Members
  • 1,195 posts

Posted 05 January 2012 - 03:32 PM

Hi,

I am running several shops using 2.2 RC2a and have received the following from my host (United Hosting)

Quote

This is a reminder that all UnitedHosting shared and reseller hosting servers will be upgraded from PHP 5.2 to PHP 5.3 next tuesday (10th January).

Now I am in a blind panic ! Which is the best thread to read on the minimum I need to do to ensure my shops still function?

Many 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.

#2   DunWeb

DunWeb

    The Censored One

  • Members
  • 12,724 posts

Posted 05 January 2012 - 03:36 PM

Heather,

Look at the deprecated ereg contribution.  It gives you most of the files that will be effected by the update.


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

See my Profile (click here)

#3   Mort-lemur

Mort-lemur
  • Members
  • 1,195 posts

Posted 05 January 2012 - 04:07 PM

Thanks Chris,

I will give it a go.............
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.

#4   DunWeb

DunWeb

    The Censored One

  • Members
  • 12,724 posts

Posted 05 January 2012 - 05:45 PM

Heather,

There may be a couple of issues after you have completed those updates, just let me know if you find more.  Some members have had issues with the SPLIT function found in older contributions and it is not addressed in the deprecated ereg contribution.


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

See my Profile (click here)

#5   beuleux

beuleux
  • Members
  • 13 posts

Posted 05 January 2012 - 06:57 PM

I have the same problem with the same hosts except I have version 2.3.1 United say all support  for PHP 5.2 will be discontinued. Does anyone know if this effects osC v2.3.1 also?

Oh yeh pardon the hijack :)

#6   DunWeb

DunWeb

    The Censored One

  • Members
  • 12,724 posts

Posted 05 January 2012 - 07:13 PM

Rob,

A standard installation of osCommerce v2.3.1 is PHP 5.3 compatible but if you have add on installed you may have to make some minor changes to that code to remain compatible.



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

See my Profile (click here)

#7   Mort-lemur

Mort-lemur
  • Members
  • 1,195 posts

Posted 05 January 2012 - 07:34 PM

Hi Chris,

Installed the changes as per your post on one of my stores - and all is well (ie still working)

Currently Im downloading a copy of all the files and then intend doing a text search using Examine 32 to find any other instances of "ereg" or "Split" in the files that may be as a result of modifications - will this cover it do you think ?

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.

#8   Mort-lemur

Mort-lemur
  • Members
  • 1,195 posts

Posted 05 January 2012 - 08:44 PM

OK, Lots of files with the bad words in "ereg" - so Im working through updates

The first one being PHP Thumb - just updated to the latest version (1.7.11) which appears OK.

Now going to attempt "Dynamenu" update......
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.

#9   Mort-lemur

Mort-lemur
  • Members
  • 1,195 posts

Posted 05 January 2012 - 09:04 PM

OK - Dynamenu fixed in includes/functions/dynamenu/lib/layersmenu-common.inc.php

From the post on 30 July 2011 here: http://forums.oscommerce.com/topic/209045-dynamenu-for-oscommerce/page__st__1040

The post is not quite correct for my version, but you can get the gist of the changes from it.
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.

#10   DunWeb

DunWeb

    The Censored One

  • Members
  • 12,724 posts

Posted 05 January 2012 - 09:43 PM

Hi Heather,

Just what I thought would happen.  Many contributions need to be updated to be PHP 5.3 compatible.


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

See my Profile (click here)

#11   Mort-lemur

Mort-lemur
  • Members
  • 1,195 posts

Posted 05 January 2012 - 09:44 PM

ereg in index.php fixed with info from this post : http://forums.oscommerce.com/topic/377796-function-ereg-index/
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.

#12   Mort-lemur

Mort-lemur
  • Members
  • 1,195 posts

Posted 05 January 2012 - 10:17 PM

Google XML Sitemap resolved by updating to Version 1.5
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.

#13   Mort-lemur

Mort-lemur
  • Members
  • 1,195 posts

Posted 05 January 2012 - 10:19 PM

Sitemap SEO resolved by the 9 August 2011 post from this thread: http://forums.oscommerce.com/topic/324829-sitemap-seo/page__st__600

Slowly getting there - I hope this is of some help to others....
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.

#14   justinswa

justinswa
  • Members
  • 83 posts

Posted 05 January 2012 - 11:36 PM

View PostMort-lemur, on 05 January 2012 - 03:32 PM, said:

Hi,

I am running several shops using 2.2 RC2a and have received the following from my host (United Hosting)



Now I am in a blind panic ! Which is the best thread to read on the minimum I need to do to ensure my shops still function?

Many Thanks


ditto everything here. United have said that they will let us roll back selected sites to 5.2 for up to 2 months, which gives us a bit more time. I have one site with 2.2 rac2a and one with2.3.1. PLEASE tell me that 2.3.1 is compatible? As for the 2.2 site, would now be a good time to go to 3.0.2? Is this "production" yet? On the subject of sorting out eregs, maybe somebody can tell me what is wrong with this:

ereg("$get_year-$get_month_no", $event->date)

changed to

preg_match("$get_year-$get_month_no", $event->date)?

I get error

preg_match() [function.preg-match]: Delimiter must not be alphanumeric or backslash

Thanks.

Edited by justinswa, 05 January 2012 - 11:37 PM.


#15   DunWeb

DunWeb

    The Censored One

  • Members
  • 12,724 posts

Posted 05 January 2012 - 11:40 PM

Justin,

3.0.2 is more than likely a year or more away from a production release so NO, don't think of using it.  v2.3.1 core code is PHP 5.3 compatible, however like the RC2a contributions you may find code in them that will have to be upgraded.


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

See my Profile (click here)

#16   Mort-lemur

Mort-lemur
  • Members
  • 1,195 posts

Posted 06 January 2012 - 04:22 PM

Fixed monthly sales report in file admin/stats_monthly_sales.php

with the 28 December 2010 post in this thread: http://forums.oscomm...f-ereg-to-preg/

Edited by Mort-lemur, 06 January 2012 - 04:22 PM.

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   Mort-lemur

Mort-lemur
  • Members
  • 1,195 posts

Posted 06 January 2012 - 10:29 PM

Ok - After spending all day with Google searching, I am now down to 6 files that need correcting for PHP 5.3. I cant find the answers so Im looking for some help here please. The files and code are as follows:

includes\functions\affiliate_functions.php  
    
return eregi("^https?://[a-z0-9]([-_.]?[a-z0-9])+[.][a-z0-9][a-z0-9/=?.&\~_-]+$",$url);

includes\functions\compatibility.php  
	  return ereg('^[0-9]{1,50}.?[0-9]{0,50}$', $param);
		  if(eregi("^$host", $line)) {

admin\create_account_process.php  
    
if (eregi($mail_pat, $email, $components)) {
	  if (eregi($user_pat, $user)) {
		if (eregi($ip_domain_pat, $domain, $ip_components)) {
		  if (eregi($domain_pat, $domain)) {

admin\includes\functions\sitemap.php   
if (eregi("<a(.*)</a", $lines[$i], $out))
		  if (eregi("tep_href_link((.*))", $out[1], $locn))

admin\includes\modules\newsletters\newsletter.php  
  
 if (eregi('^[-a-z0-9._]+@([-a-z0-9_]+\.)+[a-z]{2,6}$',$row['customers_email_address'])) {

admin\order_editor\functions.php  
 $keyword = ereg_replace("(,)|('s)", "", $keyword);

Any help would be great thanks - Now I need to sleep...
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.

#18   Mort-lemur

Mort-lemur
  • Members
  • 1,195 posts

Posted 07 January 2012 - 11:18 AM

Hi,

Still searching.....

The first two files above are probably the most important to me - as they are on the Catalog side rather than Admin functions.

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.

#19   Mort-lemur

Mort-lemur
  • Members
  • 1,195 posts

Posted 07 January 2012 - 11:39 AM

Ok for
includes\functions\compatibility.php  
  
return ereg('^[0-9]{1,50}.?[0-9]{0,50}$', $param);
		  if(eregi("^$host", $line)) {

I have changed the 2 lines as follows:

return preg('/^[0-9]{1,50}.?[0-9]{0,50}$/', $param);
		  if(preg_match("/^$host/", $line)) {

No Idea if this is correct - but site still works and the changes seem in line with others.
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.

#20   Mort-lemur

Mort-lemur
  • Members
  • 1,195 posts

Posted 07 January 2012 - 11:46 AM

In : includes\functions\affiliate_functions.php

I have changed:
return eregi("^https?://[a-z0-9]([-_.]?[a-z0-9])+[.][a-z0-9][a-z0-9/=?.&\~_-]+$",$url);


To:
return preg_match("/^https?://[a-z0-9]([-_.]?[a-z0-9])+[.][a-z0-9][a-z0-9/=?.&\~_-]+$/",$url);

Ditto above re correctness - would someone like to give me a warm feeling ??
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.