UnitedForums - UK Web Hosting Forum UnitedHosting Community Hosting Forums
Network and Server StatusCustomer SupportUK Web Hosting
UnitedHostingUnitedHosting Sitemap UK Hosting ForumUK Web HostingWeb Hosting ForumsUK Reseller HostingWeb Host CommunityUK Managed Dedicated ServersHosting Help and SupportUK Domain Name Registration

Go Back   UnitedForums.co.uk > UnitedHosting Community > Website Development & Scripting

Reply
 
Thread Tools Rate Thread Display Modes
Old 22nd October 2007, 01:43 PM   #1 (permalink)
pursuit
Registered User
 
Join Date: Feb 2006
Location: London, UK
Posts: 281
php5 and osCommerce

Just had some time to test the newly available php5 on my test/development server (on UH). None of the osc shops prior to rc1 works due to i guess register_globals have been turned off on php5. There are different ways/syntax to set it on per site but not sure which one is the right one that can used on UH server or if this is allowed on UH server at all.
Before spending time on testing each of the methods, think better do a post here and hope UH or someone who has done it successfully could offer an answer .
The so called register_globals patch is not an option for me.
pursuit is offline   Reply With Quote
Old 22nd October 2007, 10:19 PM   #2 (permalink)
UH-Matt
Administrator
 
UH-Matt's Avatar
 
Join Date: Oct 2002
Location: London, UK
Posts: 8,135
change register_globals in /etc/php5/php.ini
__________________
.
Matt
UnitedHosting Staff

For official support please use our helpdesk at UnitedSupport.co.uk

UnitedHosting proudly hosting more than 20,000 sites since 1998.
UH-Matt is offline   Reply With Quote
Old 22nd October 2007, 10:53 PM   #3 (permalink)
red-defender
Land Rovers Rule!
 
red-defender's Avatar
 
Join Date: Feb 2003
Location: In the Heart of the Lake District
Posts: 481
Quote:
Originally Posted by UH-Matt View Post
change register_globals in /etc/php5/php.ini
I tried that on Hawk. The file php.ini is owned by root and is not editable.
red-defender is offline   Reply With Quote
Old 22nd October 2007, 11:49 PM   #4 (permalink)
UH-Simon
Administrator
 
UH-Simon's Avatar
 
Join Date: Oct 2002
Location: Hertfordshire, UK
Posts: 4,601
If you put a ticket in we'll get that changed for you.
__________________
.
Simon
UnitedHosting Staff

For official support please use our helpdesk at UnitedSupport.co.uk

UnitedHosting proudly hosting more than 20,000 sites since 1998.
UH-Simon is offline   Reply With Quote
Old 23rd October 2007, 12:26 AM   #5 (permalink)
Hetha
Registered User
 
Join Date: Mar 2005
Posts: 1
Successfully changed our osc shops to php 5 over the weekend.

The following instructions may be of use

Upgrade to php 5

Ask support to turn register globals on


1. add to .htaccess

Action php5-script /interpreters/php5-script
AddHandler php5-script .php


2. admin/includes/classes/upload.php

find line 31 $this = null;

change to // $this = null;


3. admin/includes/languages/english.php

add to bottom of file

include_once("english/index.php");


4. Open notepad copy text below and create file php5fix.php in catalog/includes



<?php
// PHP5 Fix by Steve Kamerman, Steve Kamerman's Blog

$phpversion = explode('.', phpversion());
if((int) $phpversion[0] >= 5){
// PHP 5 has no idea what this crap is
$HTTP_GET_VARS = &$_GET;
$HTTP_POST_VARS = &$_POST;
$HTTP_REQUEST_VARS = &$_REQUEST;
$HTTP_SESSION_VARS = &$_SESSION;
$HTTP_COOKIE_VARS = &$_COOKIE;
$HTTP_SERVER_VARS = &$_SERVER;
$HTTP_FILES_VARS = &$_FILES;
$HTTP_ENV_VARS = &$_ENV;
}
?>



5. catalog/includes/application_top.php

add to top of file just below Released under the GNU General Public License
*/

// PHP5 fix
require_once("includes/php5fix.php");


6. catalog/admin/includes/application_top.php


add to top of file just below Released under the GNU General Public License
*/

// PHP5 fix
require_once("../includes/php5fix.php");




Above instructions credit to
Steve Kamerman's Blog
osCommerce Community Support Forums
Hetha is offline   Reply With Quote
Old 23rd October 2007, 02:39 AM   #6 (permalink)
pursuit
Registered User
 
Join Date: Feb 2006
Location: London, UK
Posts: 281
problem is if you are talking about one or two osc shops then theres quite a few 'fixes' that you don't mind bothering to do, otherwise you may be looking for trouble - there's no gains from php5 as far as the legacy osc shops are concerned (btw, theres thousands of them out there).
Looks like a support ticket needed to be submitted. that php.ini under php5 folder is something you can see but cant do anything to it. there's another php.ini i can get my hands on but that register_globals in it is already ON.
pursuit is offline   Reply With Quote
Old 23rd October 2007, 06:46 AM   #7 (permalink)
percepts
Senile Member
 
percepts's Avatar
 
Join Date: Mar 2005
Posts: 1,009
I think the gain si that PHP4 is being chopped and if you don't convert to PHP5, your shops will become insecure and or fail.

p.s. note that shared SSL is not available on PHP5 yet but is coming soon I think. So if you are using shared SSL then I would wait for that until you make your changes.
__________________
An old dog learning new tricks
percepts is offline   Reply With Quote
Old 23rd October 2007, 07:56 AM   #8 (permalink)
UH-Matt
Administrator
 
UH-Matt's Avatar
 
Join Date: Oct 2002
Location: London, UK
Posts: 8,135
The reason we have added a dual php4/php5 setup is that we will be moving to a PHP5 only setup in a matter of months. We are giving everyone the chance to make the switch themselves first before it is forced upon all sites anyway.

PHP4 is officially end of life at the end of 2007, so we do plan to make it end of life across UH servers by Feb 08. We will be announcing more of a "roadmap" about this shortly.

We are also more than happy to assist with anything you might need when switching or testing PHP5 - just contact the helpdesk or post to these forums for guidance.
__________________
.
Matt
UnitedHosting Staff

For official support please use our helpdesk at UnitedSupport.co.uk

UnitedHosting proudly hosting more than 20,000 sites since 1998.
UH-Matt is offline   Reply With Quote
Old 23rd October 2007, 01:41 PM   #9 (permalink)
pursuit
Registered User
 
Join Date: Feb 2006
Location: London, UK
Posts: 281
Quote:
Originally Posted by percepts View Post
I think the gain si that PHP4 is being chopped .
That sounds like I sold you a house, now I am selling another one: if you dont buy this new one I will blast your old one into pieces - and that's the benefit of getting a new house!

On another note, I have in fact been running osc shops with php5 (v5.20) on local server for the past one year or so, with register globals all on, and have not noticed any problem although these are not real since you dont have the time to run through every corners of the code like on a live online shop. I do not recognise any need of those so called php5 fixes nor the shared ssl not available on php5 issue (I do have a couple of osc shops currently running on php5 (v5.20) live and they all use shared ssl for the checkout process). The point here is oscommerce was developed for php4 and before php5 was developed, and so were osc's thousands of contribs/add ons, of which I have only used a limited number so far. Its fair to say the php team has been doing a good job for backward compatibility so far. It may also be fair to say you dont know it for sure whats in the mind of these guys for the future: they are now already talking about php6.

One not so relevant 'upgrade' example: Filezilla 3. if you want to get a copy of Filezilla now, you are offered v3. The problem is, newest version it may be, it wont allow you to right click a file to edit it, whereas v2 would give you this convenience. To me v3 is simply useless.
pursuit is offline   Reply With Quote
Old 23rd October 2007, 02:08 PM   #10 (permalink)
desquinn
Senior Member
 
Join Date: Dec 2005
Location: Paisley
Posts: 332
Quote:
Originally Posted by pursuit View Post
One not so relevant 'upgrade' example: Filezilla 3. if you want to get a copy of Filezilla now, you are offered v3. The problem is, newest version it may be, it wont allow you to right click a file to edit it, whereas v2 would give you this convenience. To me v3 is simply useless.
The old versions are still available, just obscured by sourceforge

Gains or not, UH will be discontinuing PHP4 on their servers so if you do not move the sites to v5 then the sites will stop working. Keeping them working on a supported version of PHP would seem like a positive thing to me
desquinn is offline   Reply With Quote
Old 23rd October 2007, 06:27 PM   #11 (permalink)
Vger
Senior Member
 
Join Date: Sep 2003
Location: United Kingdom
Posts: 2,820
Everyone here should know (from my posts) that I have long resisted a switchover from PHP 4 to 5. And as we have our own dedicated servers we could do that.

However, even I have to yield to the inevitable when the PHP Organisation discontinues support for PHP 4 bug fixes and security patches - and we shall switchover to PHP5-only on the old servers from the end of July next year, and any new servers we bring online before then will be PHP5-only right from the start.

Switching over to MySQL 5 is a much bigger problem - and we won't be doing that for the forseeable future.

I doubt that anyone here has more osCommerce sites hosted than we do, and so the switchover will be that much greater for us than anyone else. However, this is one of those cases where, as the Borg say, "Resistance is futile"!

Vger
__________________
Working with computers is a bit like getting old - the longer you're around the more wrinkles you find!
Vger is offline   Reply With Quote
Old 23rd October 2007, 06:39 PM   #12 (permalink)
Charles
Registered User
 
Join Date: Sep 2007
Location: 17°59′N 76°48′W
Posts: 150
Quote:
Originally Posted by Vger View Post
However, this is one of those cases where, as the Borg say, "Resistance is futile"!

Vger
LOL!!
Charles is offline   Reply With Quote
Old 23rd October 2007, 10:47 PM   #13 (permalink)
UH-Matt
Administrator
 
UH-Matt's Avatar
 
Join Date: Oct 2002
Location: London, UK
Posts: 8,135
.... and wont it make everyones lives easier once this is all done.... one version of PHP to worry about? At least until PHP6 goes stable.
__________________
.
Matt
UnitedHosting Staff

For official support please use our helpdesk at UnitedSupport.co.uk

UnitedHosting proudly hosting more than 20,000 sites since 1998.
UH-Matt is offline   Reply With Quote
Old 23rd October 2007, 11:48 PM   #14 (permalink)
Vger
Senior Member
 
Join Date: Sep 2003
Location: United Kingdom
Posts: 2,820
Quote:
At least until PHP6 goes stable
....at least until several years after PHP 6 goes stable!

Vger
__________________
Working with computers is a bit like getting old - the longer you're around the more wrinkles you find!
Vger is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT. The time now is 02:33 PM.

UK Web Hosting  |  UK Reseller Hosting  |  UK Dedicated Servers UnitedHosting  |  UnitedSupport  |  UnitedForums  |  SEO by vBSEO 3.0.0
Copyright © 1998-2008 United Communications Limited. All Rights Reserved. Registered in England and Wales 3651923 - VAT Reg No. 737662309