Jump to content
paguilar

Patch OSC 2.2RC2a update PHP 5.3 and STS

Recommended Posts

Hello,

 

The webserver where I have two OSC online carts, had its PHP version updated into version 5.3.

With this some issues started to appear in this carts. In one of them I installed the referred patch and all went well but with the second one things are getting problematic.

 

After the update with the Patch it started to give errors concerning the STS 4.1 template system.

 

Now it gives the following error:

 

Fatal error: Call to a member function image() on a non-object in /catalog/includes/functions/html_output.php on line 78

 

Line 78 shows this:

$sts->image($src); // Take image from template folder if exists.

 

If I comment on this line it passes on to line 129 of the same file, also regarding the STS function. After this, the online store starts to appear with OSC's initial layout.

 

I'd appreciate some insight on this subject. If anyone already faced this and has any suggestion on to solve it.

 

Thanks in advance.

 

Pedro Aguilar

Share this post


Link to post
Share on other sites

@@paguilar

 

Unfortunately, STS / BTS was discontinued with the introduction of osCommerce v2.3.x and support has steadily ceased since then. However, you should be able to correct any PHP 5.3 deprecated function errors using THIS website as a guide.

 

As a side note, you should consider updating your out-dated sites to the latest stable version as PHP 5.4 approaches, you will find yourself with even more problems.

 

 

 

Chris


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

 

See my Profile to learn more about add ons, templates, support plans and custom coding (click here)

Share this post


Link to post
Share on other sites

@@paguilar

 

Unfortunately, STS / BTS was discontinued with the introduction of osCommerce v2.3.x and support has steadily ceased since then. However, you should be able to correct any PHP 5.3 deprecated function errors using THIS website as a guide.

 

As a side note, you should consider updating your out-dated sites to the latest stable version as PHP 5.4 approaches, you will find yourself with even more problems.

 

 

 

Chris

 

Thank you very much for your reply and advice

 

The website in question is 1 year and half and I was trying to avoid the upgrade scenario. Back then we ended up using 2.2 because some of the add-ons needed only existed for that version and not for the 2.3.x.

 

We used:

- Separate price per client

- Prices only for logged in users

- Client registration by Admin only

 

By what I can see now, they are all available for 2.3.x.

 

Now, I ask is there an easy way of upgrading from OSC 2.2 into 2.3.x ?

 

Thanks for your attention.

 

Best regards,

Pedro Aguilar

Share this post


Link to post
Share on other sites

@@paguilar

 

You will have to upgrade to 2.3.0 then, 2.3.1 then 2.3.2 then 2.3.3 if you follow the upgrade path but then you would end up with a 'frankenstore' hybrid. Again, I suggest creating a new store using v2.3.3

 

 

 

Chris


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

 

See my Profile to learn more about add ons, templates, support plans and custom coding (click here)

Share this post


Link to post
Share on other sites

@@paguilar

 

You will have to upgrade to 2.3.0 then, 2.3.1 then 2.3.2 then 2.3.3 if you follow the upgrade path but then you would end up with a 'frankenstore' hybrid. Again, I suggest creating a new store using v2.3.3

 

 

 

Chris

 

Chris,

 

That would also mean "recreating the DB" from the start? Or could I import the DB with a fresh install?

 

Here's the problem, the store has over 500 products!

 

Thanks once again,

Pedro Again

Edited by paguilar

Share this post


Link to post
Share on other sites

The DB can be changed to work with a 2.3 shop. Though I think you would be better off upgrading your version of STS, which may fix the problem you are having. Upgrading to 2.3, you will find, is a very big job. And, at some point, 2.4 will be released, which won't be compatible, yet again. It is just a never ending hole and you will be starting over each time. It would be better, from a security viewpoint, to upgrade, but 2.2 shops can be made secure too, if that is an issue.

Share this post


Link to post
Share on other sites

Thanks Jack,

 

After reading your post I got digging again and found the solution.

 

It's described here at the bottom of the thread:

http://forums.oscommerce.com/index.php?showtopic=253442

 

How to Fix:

 

Search in catalog/includes/application_top.php

// initialize the message stack for output messages
require(DIR_WS_CLASSES . 'message_stack.php');
$messageStack = new messageStack;

 

Then write the following code above this and it should be like this:

// START STS 4.5
 require (DIR_WS_CLASSES.'sts.php');
 $sts= new sts();
 $sts->start_capture();
 // END STS

// initialize the message stack for output messages
 require(DIR_WS_CLASSES . 'message_stack.php');
 $messageStack = new messageStack;

 

Thanks for your help.

 

Best regards,

Pedro

Edited by paguilar

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×