Forum Moderators: buckworks
> all you need to do is to open up admin\includes\classes\upload.php and edit the line on or about line #31 that says
$this = null; to be
//$this >= null; and that should fix the issue.
That fixed one problem. But then the next problem I encountered was this:
PHP Fatal error: main() [<a href='function.main'>function.main</a>]: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "navigationHistory" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in /var/cvsroot/lc_all/webapps/ecommerce/catalog/includes/application_top.php on line 316
The 2nd oscommerce page you visit, when the navigationHistory object is found in the session, it is an "incomplete class." Dumping with print_r:
(
[__PHP_Incomplete_Class_Name] => navigationHistory
[path] => Array
(
[0] => Array
(
[page] => index.php
[mode] => NONSSL
[get] => Array
(
)[post] => Array
(
))
)
[snapshot] => Array
(
))
Thanks!
I changed the navigation history code in application_top.php to this:
[pre]
// navigation history
if (tep_session_is_registered('navigation')) {
if (PHP_VERSION < 4 ¦¦ PHP_VERSION >= 5) {
$broken_navigation = $navigation;
$navigation = new navigationHistory;
$navigation->unserialize($broken_navigation);
}
} else {
tep_session_register('navigation');
$navigation = new navigationHistory;
}
$navigation->add_current_page();
[/pre] I'm not sure _why_ we need to "fix" the navigationHistory in PHP5, but oh well, it works.
I also had to add a php5 section for session.auto_start in .htaccess to get rid of warning (since i run with session.auto_start turned on):
<IfModule mod_php4.c>
php_value session.auto_start 0
</IfModule>
<IfModule mod_php5.c>
php_value session.auto_start 0
</IfModule>
Hope this helps someone.
Anybody found any other PHP5 issues with oscommerce?