FutureQuest, Inc. FutureQuest, Inc. FutureQuest, Inc.

FutureQuest, Inc.
Go Back   FutureQuest Community > General Site Owner Support (All may read/respond) > E-Commerce
User Name
Password  Lost PW

Reply
 
Thread Tools Search this Thread Display Modes
Old 11-10-2008, 05:14 PM   Postid: 171236
Matt
Site Owner
 
Matt's Avatar

Forum Notability:
671 pts: Dignified Competence!
[Post Feedback]
 
Join Date: Nov 2000
Location: Birmingham, AL, US
Posts: 1,231
osCommerce site migration to PHP5

I have a number of clients sites running osCommerce or a derivative of osCommerce. As I deal with the PHP5 migration, I will post here problems/ solutions that I encounter so that others can successfully make the migration as well.

Problem 1: Global variables no longer supported
Note: there are solutions out there to deal with this, but most of these "solutions" aren't any better than simply re-enabling global variables within an .htaccess file. From a security perspective, any security risks associated with global variables have already most likely been addressed. So, here's the lines to add to your .htaccess file for osCommerce:
Code:
php_value register_globals 1
php_value register_long_arrays 1
Problem 2: Another issue comes up in your admin/includes/classes/upload.php file that will result in the administrative login screen not loading. If you view your PHP error logs, you will see an entry like Cannot re-assign $this in /big/dom/xdomain/.../admin/includes/classes/upload.php. This is easy enough to fix, just open admin/includes/classes/upload.php and on about line 30, comment out the following line:
Code:
$this = null;
and add
Code:
unset($this);
so that it reads:
Code:
//$this = null;
unset($this);
If you are running osCommerce, or a derivative thereof, and experience problems after implementing these fixes, feel free to post here.

-Matt
__________________
Webspace Creations
Matt is offline   Reply With Quote
Old 11-14-2008, 12:18 AM   Postid: 171351
izann
Registered User

Forum Notability:
0 pts: Even-handed
[Post Feedback]
 
Join Date: Feb 2006
Location: United States
Posts: 6
Re: osCommerce site migration to PHP5

I'm not running osCommerce or derivative of it, but I tried this solution anyhow. It did enable my variable to echo in some places but not in others.

I have over the years learned enough PHP to set up all my sites in PHP and be able to cut down a lot of work by using variables and a few if-then statements and arrays. I'm not a "real" programmer, so I can only understand the simplest of explanations. However, I'm hoping someone can help. All of a sudden, none of my sites work. The variables from the URL are not being echoed in includes. Help!!

Last edited by izann : 11-14-2008 at 12:21 AM. Reason: clarify that this may not belong in this thread
izann is offline   Reply With Quote
Old 11-14-2008, 05:30 AM   Postid: 171354
kitchin
Site Owner

Forum Notability:
1163 pts: A True Crowd-pleaser!
[Post Feedback]
 
Join Date: Jan 2001
Location: Virginia
Posts: 2,992
Re: osCommerce site migration to PHP5

Look in logs_cgi to see if there are recent errors.
Coomon probalmes are here:
http://www.aota.net/forums/showthread.php?t=23259
and here:
http://www.aota.net/forums/showthread.php?t=24432

If you see $this and it does not look like it is being used as an object ($this->whatever, near code with 'class', 'public'), then rename it everywhere.
kitchin is offline   Reply With Quote
Old 11-14-2008, 11:14 AM   Postid: 171361
Matt
Site Owner
 
Matt's Avatar

Forum Notability:
671 pts: Dignified Competence!
[Post Feedback]
 
Join Date: Nov 2000
Location: Birmingham, AL, US
Posts: 1,231
Re: osCommerce site migration to PHP5

I would prefer to keep this thread focused on osCommerce-related issues. izann, could you start a new thread and post some sample code that you are having problems with?
Matt is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 visitors)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 07:31 PM.


Running on vBulletin®
Copyright © 2000 - 2013, Jelsoft Enterprises Ltd.
Hosted & Administrated by FutureQuest, Inc.
Images & content copyright © 1998-2013 FutureQuest, Inc.
FutureQuest, Inc.