Static_Nexus Posted January 9, 2008 Share Posted January 9, 2008 Hi everyone! a few days ago one of my companies webhost's upgraded their servers from php4 to php5, this seems to have broken part of our site. unfortunately the guys who designed this old part of our site are long gone so we have no one to support it here is the error users are getting: Fatal error: Cannot re-assign $this in /home/voltnet/public_html/qdata/sq2-07.php on line 3906 this page is located here: http://www.volteurope.net/qdata/sq2-07.php I looked up line 3906 and found this: $this = FALSE; i have attached the whole php file, if any one could help it would be MASSIVELY appreciated. ps. Our webhost is Clook [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/85150-upgrading-php4-to-php5-caused-an-issue-please-help/ Share on other sites More sharing options...
shamsuljewel Posted January 9, 2008 Share Posted January 9, 2008 $this is a special variable. PHP 5 is totally include oop concept. So you should change the variable name $this. Link to comment https://forums.phpfreaks.com/topic/85150-upgrading-php4-to-php5-caused-an-issue-please-help/#findComment-434433 Share on other sites More sharing options...
Static_Nexus Posted January 9, 2008 Author Share Posted January 9, 2008 $this is a special variable. PHP 5 is totally include oop concept. So you should change the variable name $this. forgive me i know next to nothing about php . what do you mean oop concept? And are you saying i just need to change all instances of $this to another name? Link to comment https://forums.phpfreaks.com/topic/85150-upgrading-php4-to-php5-caused-an-issue-please-help/#findComment-434435 Share on other sites More sharing options...
shamsuljewel Posted January 9, 2008 Share Posted January 9, 2008 if $this is used as a normal variable in your page...so that you should change $this variable to another name...OOP means Object Oriented Programming...PHP4 do not support full oop..but PHP5 now full OOP language...so that we can now handle big softwares..easily. Link to comment https://forums.phpfreaks.com/topic/85150-upgrading-php4-to-php5-caused-an-issue-please-help/#findComment-434437 Share on other sites More sharing options...
rajivgonsalves Posted January 9, 2008 Share Posted January 9, 2008 instead of using $this = FALSE; try using unset($this); not too sure it will work tho but logically speaking should give you the same result... Link to comment https://forums.phpfreaks.com/topic/85150-upgrading-php4-to-php5-caused-an-issue-please-help/#findComment-434440 Share on other sites More sharing options...
shamsuljewel Posted January 9, 2008 Share Posted January 9, 2008 if u post the code that may be someone can tell u better sugestions.. Link to comment https://forums.phpfreaks.com/topic/85150-upgrading-php4-to-php5-caused-an-issue-please-help/#findComment-434465 Share on other sites More sharing options...
Static_Nexus Posted January 10, 2008 Author Share Posted January 10, 2008 instead of using $this = FALSE; try using unset($this); not too sure it will work tho but logically speaking should give you the same result... this fixed the error but i encountered other problems after that - not to worry though it has been resolved! thanks very much for all your help! Link to comment https://forums.phpfreaks.com/topic/85150-upgrading-php4-to-php5-caused-an-issue-please-help/#findComment-435422 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.