First, do not turn off the error codes. That's the only way you're going to find the problems.
Next, you must change your sessions.php on both the catalog and admin side: /catalog/includes/functions/sessions.php and /catalog/admin/includes/functions/sessions.php
REPLACE THIS: (around line 70)
function tep_session_register($variable) {
return session_register($variable);
}
function tep_session_is_registered($variable) {
return session_is_registered($variable);
}
function tep_session_unregister($variable) {
return session_unregister($variable);
}
WITH THIS:
// check PHP version and use appropriate session variables - authored by ecartz (Matt)
function tep_session_register($variable) {
global $session_started;
if ($session_started == true) {
if (PHP_VERSION < 4.3) {
return session_register($variable);
} else {
if (isset($GLOBALS[$variable])) {
$_SESSION[$variable] =& $GLOBALS[$variable];
} else {
$_SESSION[$variable] = null;
}
}
}
return false;
}
function tep_session_is_registered($variable) {
if (PHP_VERSION < 4.3) {
return session_is_registered($variable);
} else {
return isset($_SESSION) && array_key_exists($variable, $_SESSION);
}
}
function tep_session_unregister($variable) {
if (PHP_VERSION < 4.3) {
return session_unregister($variable);
} else {
unset($_SESSION[$variable]);
}
}
Once you have this complete, you need to change all your ereg functions to the new preg functions for 5.3. I used the following tutorial authored by Mark Evans:
https://github.com/o...def4f2c9f94b0b7
Once this was complete, you must update your usps.php files for shipping. catalog/includes/modules/shipping/usps.php
In this file, you will find many ereg functions that need to be changed to preg_match functions. They look like this:
OLD if (ereg('<Error>', $response[0])) {
NEW if (preg_match('/<Error>/', $response[0])) {
OLD $number = ereg('<Number>(.*)</Number>', $response[0], $regs);
NEW $number = preg_match('|<Number>(.*)</Number>|', $response[0], $regs);
Note the | instead of the / in some of the lines. In the 2nd example, you'll see this and that's because the forward slash interferes with the original code. So you must use a pipe ( | ) character for these lines.
Finally, once you have this complete, you'll get your USPS shipping module back and you should be done (FedEx was unaffected and I don't use UPS). If you did not turn off error messages, you will not see any errors.
I run Dynamo Effects One Page Checkout and everything works great after all the above is complete.
Now I'm updated to PHP 5.3.8 and I can start upgrading to osC 3.0 and still run my old store.
I hope this helps others and I take no credit as I did not write any of the code.
Edited by stickypod, 11 November 2011 - 08:42 PM.










