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] Quote Link to comment 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. Quote Link to comment 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? Quote Link to comment 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. Quote Link to comment 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... Quote Link to comment 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.. Quote Link to comment 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! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.